Implementation notes: amd64, speed2supercop, crypto_stream/simon64128ctr

Computer: speed2supercop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_stream
Primitive: simon64128ctr
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
390899263 0 0113933 752 864T:avx2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
537295716 0 0106880 728 832T:avx2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
540895874 0 0108525 752 864T:avx2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
594893983 0 0108637 752 864T:sse4gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
602083221 0 099014 792 808T:sse4clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
603683845 0 099830 792 808T:sse4clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
902092219 0 0103352 728 832T:sse4gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
903283015 0 095871 784 856T:sse4clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
928893647 0 0105932 744 864T:sse4gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
973687525 0 099414 792 792T:sse4clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
973692638 0 0105261 752 864T:sse4gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o):.../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331: more undefined references to `Transpose' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o):.../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331: more undefined references to `Transpose' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o):.../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331: more undefined references to `Transpose' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o):.../supercop-data/speed2supercop/amd64/try/c/clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331: more undefined references to `Transpose' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


stream.c: stream.c:147:3: error: always_inline function '_mm256_set_epi32' requires target feature 'avx', but would be inlined into function 'Encrypt' that is compiled without support for 'avx'
stream.c:   SET1(X[0],nonce[1]); SET8(Y[0],nonce[0]);
stream.c:   ^
stream.c: ./Intrinsics_AVX2_64block.h:24:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c,c,c,c,c))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_64block.h:23:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi32
stream.c:             ^
stream.c: stream.c:147:3: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
stream.c: ./Intrinsics_AVX2_64block.h:24:22: note: expanded from macro 'SET1'
stream.c: #define SET1(X,c) (X=SET(c,c,c,c,c,c,c,c))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_64block.h:23:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi32
stream.c:             ^
stream.c: stream.c:147:24: error: always_inline function '_mm256_set_epi32' requires target feature 'avx', but would be inlined into function 'Encrypt' that is compiled without support for 'avx'
stream.c:   SET1(X[0],nonce[1]); SET8(Y[0],nonce[0]);
stream.c:                        ^
stream.c: ./Intrinsics_AVX2_64block.h:25:22: note: expanded from macro 'SET8'
stream.c: #define SET8(X,c) (X=SET(c,c,c,c,c,c,c,c), X=ADD(X,_q))
stream.c:                      ^
stream.c: ./Intrinsics_AVX2_64block.h:23:13: note: expanded from macro 'SET'
stream.c: #define SET _mm256_set_epi32
stream.c:             ^
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


stream.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/13/include/immintrin.h:51,
stream.c:                  from Intrinsics_AVX2_64block.h:5,
stream.c:                  from Simon64128AVX2.h:17,
stream.c:                  from stream.c:20:
stream.c: In function '_mm256_unpacklo_epi32',
stream.c:     inlined from 'Encrypt' at stream.c:182:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:901:19: warning: 'X[1]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c:   901 |   return (__m256i)__builtin_ia32_punpckldq256 ((__v8si)__A, (__v8si)__B);
stream.c:       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stream.c: stream.c: In function 'Encrypt':
stream.c: stream.c:112:8: note: 'X[1]' was declared here
stream.c:   112 |   u256 X[8],Y[8];
stream.c:       |        ^
stream.c: In function '_mm256_unpacklo_epi32',
stream.c:     inlined from 'Encrypt' at stream.c:183:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:901:19: warning: 'X[2]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c:   901 |   return (__m256i)__builtin_ia32_punpckldq256 ((__v8si)__A, (__v8si)__B);
stream.c:       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stream.c: stream.c: In function 'Encrypt':
stream.c: stream.c:112:8: note: 'X[2]' was declared here
stream.c:   112 |   u256 X[8],Y[8];
stream.c:       |        ^
stream.c: In function '_mm256_unpacklo_epi32',
stream.c:     inlined from 'Encrypt' at stream.c:184:22:
stream.c: /usr/lib/gcc/x86_64-linux-gnu/13/include/avx2intrin.h:901:19: warning: 'X[3]' may be used uninitialized [-Wmaybe-uninitialized]
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt':
try.c: .../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:164:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: .../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:173:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o): in function `Encrypt_Xor':
try.c: .../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331:(.text+0x...): undefined reference to `Transpose'
try.c: /usr/bin/ld: libcrypto_stream_simon64128ctr.a(stream.o):.../supercop-data/speed2supercop/amd64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/simon64128ctr/avx2/work/stream.c:331: more undefined references to `Transpose' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)

Compiler output


stream.c: stream.c:340:3: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ExpandKeyBS' that is compiled without support for 'ssse3'
stream.c:   EKBS(rk);
stream.c:   ^
stream.c: ./Simon64128SSE4.h:64:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,4,_D),  RKBS(rk,5,_D),  RKBS(rk,6,_C),  RKBS(rk,7,_D),  RKBS(rk,8,_D),  RKBS(rk,9,_C),  RKBS(rk,10,_D), RKBS(rk,11,_D), \
stream.c:                   ^
stream.c: ./Simon64128SSE4.h:53:52: note: expanded from macro 'RKBS'
stream.c: #define RKBS(rk,r,_V) (rk[r][7]= _D ^ rk[r-4][7] ^ ROR8(rk[r-1][2])  ^ rk[r-3][7] ^ ROR8(rk[r-1][3])  ^ ROR8(rk[r-3][0]), \
stream.c:                                                    ^
stream.c: ./Intrinsics_SSE4_64block.h:39:19: note: expanded from macro 'ROR8'
stream.c: #define ROR8(X)  (SHFL(X,R8))
stream.c:                   ^
stream.c: ./Intrinsics_SSE4_64block.h:34:14: note: expanded from macro 'SHFL'
stream.c: #define SHFL _mm_shuffle_epi8
stream.c:              ^
stream.c: stream.c:340:3: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ExpandKeyBS' that is compiled without support for 'ssse3'
stream.c: ./Simon64128SSE4.h:64:19: note: expanded from macro 'EKBS'
stream.c: #define EKBS(rk) (RKBS(rk,4,_D),  RKBS(rk,5,_D),  RKBS(rk,6,_C),  RKBS(rk,7,_D),  RKBS(rk,8,_D),  RKBS(rk,9,_C),  RKBS(rk,10,_D), RKBS(rk,11,_D), \
stream.c:                   ^
stream.c: ./Simon64128SSE4.h:53:85: note: expanded from macro 'RKBS'
stream.c: #define RKBS(rk,r,_V) (rk[r][7]= _D ^ rk[r-4][7] ^ ROR8(rk[r-1][2])  ^ rk[r-3][7] ^ ROR8(rk[r-1][3])  ^ ROR8(rk[r-3][0]), \
stream.c:                                                                                     ^
stream.c: ./Intrinsics_SSE4_64block.h:39:19: note: expanded from macro 'ROR8'
stream.c: #define ROR8(X)  (SHFL(X,R8))
stream.c:                   ^
stream.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:sse4clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))