Implementation notes: amd64, panther, crypto_kem/kyber90s768

Computer: panther
Microarchitecture: amd64; Tiger Lake (806c1)
Architecture: amd64
CPU ID: GenuineIntel-000806c1-00-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: kyber90s768
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
3133629014 0 051157 852 1752avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3171532326 0 054485 852 1752avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3297622590 0 042155 844 1752avx2clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3297828645 0 050873 820 1784avx2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3329421472 0 040683 844 1752avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3439822711 0 042809 820 1784avx2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3664321488 0 039969 812 1752avx2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
3694822279 0 041865 820 1784avx2gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
76711554880 0 077125 836 1752refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
77021662192 0 084469 836 1752refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
79792062358 0 083949 836 1752refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
81279959693 0 081760 788 1784refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
81981941147 0 060163 828 1752refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
89400240555 0 060720 788 1784refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
94192339242 0 058824 788 1784refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
104134841544 0 061059 828 1752refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625
140438438643 0 057152 780 1752refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062920240625

Compiler output


aes256ctr.c: aes256ctr.c:90:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK1(0x01);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp2, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c:   (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
aes256ctr.c:            ^
aes256ctr.c: aes256ctr.c:91:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK2(0x01);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:81:11: note: expanded from macro 'BLOCK2'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp0, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c:   (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
aes256ctr.c:            ^
aes256ctr.c: aes256ctr.c:93:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK1(0x02);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp2, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x4026B0
   at 0x...: st32 (try-anything.c:47)
   by 0x...: core (try-anything.c:78)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2clang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x40A25E
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_indcpa_keypair (indcpa.c:476)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2clang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x40723E
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_indcpa_keypair (indcpa.c:476)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2clang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x40210A
   at 0x...: core (try-anything.c:73)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
avx2clang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10F7EE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_indcpa_keypair (indcpa.c:476)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A28A
   at 0x...: st32 (try-anything.c:47)
   by 0x...: core (try-anything.c:78)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10F2EE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_indcpa_keypair (indcpa.c:476)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10EC7E
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_indcpa_keypair (indcpa.c:476)
   by 0x...: crypto_kem_kyber90s768_avx2_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x402690
   at 0x...: st32 (try-anything.c:47)
   by 0x...: core (try-anything.c:78)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x4119EE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x40C4DE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x4020EA
   at 0x...: core (try-anything.c:73)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x411EFE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_11.0.1)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x1147EE
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A26A
   at 0x...: st32 (try-anything.c:47)
   by 0x...: core (try-anything.c:78)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x113F2E
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x11385E
   at 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex_ECRYPT_encrypt_bytes (u16mask.h:114)
   by 0x...: crypto_stream_chacha20_dolbeau_amd64_avx2_constbranchindex (include/estream-convert-api.h:83)
   by 0x...: crypto_rng_chacha20_ref_constbranchindex (rng.c:23)
   by 0x...: randombytes_internal (knownrandombytes.c:37)
   by 0x...: randombytes (knownrandombytes.c:56)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_indcpa_keypair (indcpa.c:217)
   by 0x...: crypto_kem_kyber90s768_ref_constbranchindex_keypair (kem.c:27)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (10.2.1_20210110)