Implementation notes: amd64, hunsnivy, crypto_kem/titaniumccahi

Computer: hunsnivy
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: titaniumccahi
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
574030167237 0 36230920 820 1752T:optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
574472682215 0 36247648 820 1752T:optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
591693554361 0 36215590 812 1752T:optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
598045372930 0 36236776 820 1752T:optclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
598902371780 0 64234768 788 1816T:optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
615431956659 0 64219032 788 1816T:optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
684035156538 0 64218440 788 1816T:optgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
87858623661005 0 36224840 820 1752T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
87859362550831 0 36214496 820 1752T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
87862705468153 0 36233496 820 1752T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
88134480053516 0 64216512 788 1816T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
89116282742836 0 64205064 788 1816T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
89619637843641 0 36204686 812 1752T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
89656022443442 0 36205166 812 1752T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
108968092743020 0 64204784 788 1816T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625
270989288941932 0 64202600 780 1784T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071220240625

Compiler output


encrypt.c: In file included from encrypt.c:18:
encrypt.c: In file included from /usr/lib/llvm-11/lib/clang/11.0.1/include/x86intrin.h:13:
encrypt.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/ia32intrin.h:210:16: error: expected identifier or '('
encrypt.c:   unsigned int D;
encrypt.c:                ^
encrypt.c: ./param.h:28:11: note: expanded from macro 'D'
encrypt.c: #define D 256
encrypt.c:           ^
encrypt.c: In file included from encrypt.c:18:
encrypt.c: In file included from /usr/lib/llvm-11/lib/clang/11.0.1/include/x86intrin.h:13:
encrypt.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/ia32intrin.h:211:20: error: cannot take the address of an rvalue of type 'int'
encrypt.c:   __builtin_memcpy(&D, &__A, sizeof(__A));
encrypt.c:                    ^~
encrypt.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/ia32intrin.h:227:22: error: expected identifier or '('
encrypt.c:   unsigned long long D;
encrypt.c:                      ^
encrypt.c: ./param.h:28:11: note: expanded from macro 'D'
encrypt.c: #define D 256
encrypt.c:           ^
encrypt.c: In file included from encrypt.c:18:
encrypt.c: In file included from /usr/lib/llvm-11/lib/clang/11.0.1/include/x86intrin.h:13:
encrypt.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/ia32intrin.h:228:20: error: cannot take the address of an rvalue of type 'int'
encrypt.c:   __builtin_memcpy(&D, &__A, sizeof(__A));
encrypt.c:                    ^~
encrypt.c: /usr/lib/llvm-11/lib/clang/11.0.1/include/ia32intrin.h:244:9: error: expected identifier or '('
encrypt.c: ...

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

Compiler output


encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: encrypt.c: In function 'crypto_encrypt_keypair':
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c:   567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:65:8: note: called from here
encrypt.c:    65 |    t = _mm256_mul_epu32(u, v);
encrypt.c:       |        ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:567:1: error: inlining failed in call to 'always_inline' '_mm256_mul_epu32': target specific option mismatch
encrypt.c:   567 | _mm256_mul_epu32 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:65:8: note: called from here
encrypt.c:    65 |    t = _mm256_mul_epu32(u, v);
encrypt.c:       |        ^~~~~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/10/include/immintrin.h:53,
encrypt.c:                  from /usr/lib/gcc/x86_64-linux-gnu/10/include/x86intrin.h:32,
encrypt.c:                  from encrypt.c:18:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/10/include/avx2intrin.h:822:1: error: inlining failed in call to 'always_inline' '_mm256_sub_epi64': target specific option mismatch
encrypt.c:   822 | _mm256_sub_epi64 (__m256i __A, __m256i __B)
encrypt.c:       | ^~~~~~~~~~~~~~~~
encrypt.c: ...

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

Compiler output


try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt_keypair':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:55: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:63: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:140: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:150: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt_open':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:194: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_core':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:305: undefined reference to `barrett_2q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1536_2560':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:361: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `intt_core':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:333: undefined reference to `barrett_2q2'
try.c: /usr/bin/ld: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:345: undefined reference to `barrett_2q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_2560_1024':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:389: undefined reference to `barrett_32q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_768_2304':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:404: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1536_2304':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:427: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_2304_2304_inv':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:453: undefined reference to `barrett_32q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1024_1024_inv':
try.c: .../supercop-data/hunsnivy/amd64/try/c/clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:474: undefined reference to `barrett_8q'
try.c: ...

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

Compiler output


try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt_keypair':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:55: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:63: undefined reference to `barrett_4q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:140: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:150: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(encrypt.o): in function `crypto_encrypt_open':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/encrypt.c:194: undefined reference to `barrett_4q2'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1536_2560':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:361: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_2560_1024':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:389: undefined reference to `barrett_32q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_768_2304':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:404: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1536_2304':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:427: undefined reference to `barrett_16q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_2304_2304_inv':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:453: undefined reference to `barrett_32q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1024_1024_inv':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:474: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_768_1024':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:489: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_1024_256':
try.c: .../supercop-data/hunsnivy/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_kem/titaniumccahi/opt/work/ntt.c:498: undefined reference to `barrett_8q'
try.c: /usr/bin/ld: libcrypto_kem_titaniumccahi.a(ntt.o): in function `ntt_butterfly_2304_2560':
try.c: ...

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