Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SIMON-64 and SIMON-128 block ciphers #539

Closed
noloader opened this issue Nov 21, 2017 · 1 comment

Comments

@noloader
Copy link
Collaborator

commented Nov 21, 2017

See The SIMON and SPECK Families of Lightweight Block Ciphers by Ray Beaulieu, Douglas Shors, Jason Smith, Stefan Treatman-Clark, Bryan Weeks, Louis Wingers.

Additional sample code is available at Noloader | Simon-and-Speck. The SIMON-128(128)/CTR reference implementation was modified to produce additional test vectors.

noloader added a commit that referenced this issue Nov 21, 2017
noloader added a commit that referenced this issue Nov 21, 2017
noloader added a commit that referenced this issue Nov 22, 2017
Add additional test vectors (GH #538, #539)
These were generated by Crypto++ using the C/C++ implementation, which operates on 1 block at a time. They are consumed by the SSSE3 implementation, which operates on 4 blocks at a time. Its not ideal, but it will have to do.
noloader added a commit that referenced this issue Nov 22, 2017
noloader added a commit to noloader/cryptopp-autotools that referenced this issue Nov 23, 2017
noloader added a commit to noloader/cryptopp-cmake that referenced this issue Nov 23, 2017

@noloader noloader closed this Nov 24, 2017

noloader added a commit that referenced this issue Nov 27, 2017
Add NEON and ASIMD intrinsics for SPECK-128 (GH #539)
Performance increased by about 200% on a 980 MHz BananaPi dev-board. Throughput went from about 176.6 cpb to about 60.3 cpb.
noloader referenced this issue Dec 3, 2017
Add SIMON-64 SSE intrinsics
Performance went from about 29 cpb (C++) to about 11.1 cpb (SSE)
@noloader

This comment has been minimized.

Copy link
Collaborator Author

commented Dec 3, 2017

Cleared at Commit 3970a066e35f (and friends).

Here are the benchmark numbers for the straight C/C++ implementation. Simon is being benchmarked in CTR mode, so there's some additional overhead being measured in the tables below.

A 6th gen Skylake (AVX2 and BMI2) running at 3.1 GHz:

Algorithm MiB/Second Cycles Per Byte u-sec key setup cycles key setup
SIMON-64(96)/CTR (96-bit key) 264 11.20 0.212 658
SIMON-64(128)/CTR (128-bit key) 252 11.72 0.229 710
SIMON-128(128)/CTR (128-bit key) 292 10.12 0.238 738
SIMON-128(192)/CTR (192-bit key) 290 10.19 0.236 732
SIMON-128(256)/CTR (256-bit key) 276 10.70 0.266 823

And here are the numbers for a Core2 Duo (SSE4.1) running at 2.2 GHz:

Algorithm MiB/Second Cycles Per Byte u-sec key setup cycles key setup
SIMON-64(96) (96-bit key) 59 36.3 0.326 728
SIMON-64(128) (128-bit key) 56 38.4 0.382 853
SIMON-128(128) (128-bit key) 75 28.5 0.403 902
SIMON-128(192) (192-bit key) 79 27.0 0.416 930
SIMON-128(256) (256-bit key) 70 30.3 0.513 1146

And data on an Aarch64 Opteron running at 2.0 GHz:

Algorithm MiB/Second Cycles Per Byte u-sec key setup cycles key setup
SIMON-64(96) (96-bit key) 61 31.5 0.446 891
SIMON-64(128) (128-bit key) 58 33.1 0.444 887
SIMON-128(128) (128-bit key) 77 24.9 0.503 1006
SIMON-128(192) (192-bit key) 76 25.1 0.498 997
SIMON-128(256) (256-bit key) 73 26.3 0.536 1073

And numbers on GCC119, which is a Power8 machine running at 4.1 GHz:

Algorithm MiB/Second Cycles Per Byte u-sec key setup cycles key setup
SIMON-64(96) (96-bit key) 136 28.8 0.191 783
SIMON-64(128) (128-bit key) 135 29.0 0.234 958
SIMON-128(128) (128-bit key) 117 33.5 0.210 863
SIMON-128(192) (192-bit key) 115 33.9 0.215 881
SIMON-128(256) (256-bit key) 111 35.4 0.243 997
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.