Skip to content
/ lg15 Public

x100 faster implementation of GOST 34.12-2015 Kuznyechik optimized for high throughput and low latency on SSE2-capable CPUs

License

Notifications You must be signed in to change notification settings

app13y/lg15

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lg15

Travis GitHub release

New Russian national block cipher GOST R 34.12-'15, also known as Kuznechik (as in Kuzmin, Nechaev and Kompany), was introduced in 2015. New cipher features:

  • SP-network structure,
  • block length of 128 bits,
  • 9 complete encryption rounds,
  • advanced round keys scheduling.

lg15 library provides implementation for fast block encryption, decryption, and round keys scheduling routines by employing vector-by-matrix multiplication precomutation technique described in [no link yet], similar to one in 64KB versions of AES. This optimisation provides significant speed-up, but requires 128KB of additional memory for storing precomputed tables.

Two (interchangeable) versions of implementations are provided:

  • Universal implementation, which is written in pure C, and
  • SSE2 implementation, which utilises SSE2 instructions.

Tests

Configure with WITH_TESTS to build tests executables, which evaluates implementation of encryption, decryption and keys scheduling against data from specification.

Tests can be run via CTest.

Benchmarks

Configure with WITH_BENCHMARKS to build benchmarks executable. All functions provided by lg15 are non-blocking thus measuring takes place in single thread.

Portability

I am working as hard as I can to make this code portable and test it on as many platforms as I can. Bug reports and pull requests are welcome.

About

x100 faster implementation of GOST 34.12-2015 Kuznyechik optimized for high throughput and low latency on SSE2-capable CPUs

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages