Implementation notes: amd64, h8bobcat, crypto_aead/paeq128tnm

Computer: h8bobcat
Microarchitecture: amd64; Bobcat (500f10)
Architecture: amd64
CPU ID: AuthenticAMD-00500f20-178bfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: paeq128tnm
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
542954511046 32 6553626633 888 66400T:refclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121720231212
615791518625 28 6553634814 812 66496T:refg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121720231212
621014010518 32 6553624961 888 66400T:refclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121720231212
146427686276 32 6553619793 888 66400T:refclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121720231212
150568356172 32 6553618843 880 66400T:refclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121720231212
222030587490 28 6553622246 812 66496T:refg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121720231212
226483515104 28 6553618193 788 66464T:refg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121720231212
266674746397 28 6553620717 804 66496T:refg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121720231212

Compiler output

Implementation: T:aesni
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.cpp: encrypt.cpp:166:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc0 = _mm_aesenc_si128(acc0, roundkey0);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:167:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc1 = _mm_aesenc_si128(acc1, roundkey1);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:168:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc2 = _mm_aesenc_si128(acc2, roundkey2);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:169:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc3 = _mm_aesenc_si128(acc3, roundkey3);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:171:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc4 = _mm_aesenc_si128(acc4, roundkey0);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:172:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc5 = _mm_aesenc_si128(acc5, roundkey1);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:173:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc6 = _mm_aesenc_si128(acc6, roundkey2);
encrypt.cpp: ^
encrypt.cpp: encrypt.cpp:174:11: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'DoubleFPermAsm' that is compiled without support for 'aes'
encrypt.cpp: acc7 = _mm_aesenc_si128(acc7, roundkey3);
encrypt.cpp: ^
encrypt.cpp: 8 errors generated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni

Compiler output

Implementation: T:aesni
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.cpp: In file included from encrypt.cpp:13:
encrypt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h: In function 'void DoubleFPermAsm(const __m128i*, const __m128i*, __m128i*, __m128i*)':
encrypt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:61:1: error: inlining failed in call to 'always_inline' '__m128i _mm_aesenc_si128(__m128i, __m128i)': target specific option mismatch
encrypt.cpp: 61 | _mm_aesenc_si128 (__m128i __X, __m128i __Y)
encrypt.cpp: | ^~~~~~~~~~~~~~~~
encrypt.cpp: encrypt.cpp:174:48: note: called from here
encrypt.cpp: 174 | acc7 = _mm_aesenc_si128(acc7, roundkey3);
encrypt.cpp: | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
encrypt.cpp: In file included from encrypt.cpp:13:
encrypt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:61:1: error: inlining failed in call to 'always_inline' '__m128i _mm_aesenc_si128(__m128i, __m128i)': target specific option mismatch
encrypt.cpp: 61 | _mm_aesenc_si128 (__m128i __X, __m128i __Y)
encrypt.cpp: | ^~~~~~~~~~~~~~~~
encrypt.cpp: encrypt.cpp:173:48: note: called from here
encrypt.cpp: 173 | acc6 = _mm_aesenc_si128(acc6, roundkey2);
encrypt.cpp: | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
encrypt.cpp: In file included from encrypt.cpp:13:
encrypt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:61:1: error: inlining failed in call to 'always_inline' '__m128i _mm_aesenc_si128(__m128i, __m128i)': target specific option mismatch
encrypt.cpp: 61 | _mm_aesenc_si128 (__m128i __X, __m128i __Y)
encrypt.cpp: | ^~~~~~~~~~~~~~~~
encrypt.cpp: encrypt.cpp:172:48: note: called from here
encrypt.cpp: 172 | acc5 = _mm_aesenc_si128(acc5, roundkey1);
encrypt.cpp: | ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
encrypt.cpp: In file included from encrypt.cpp:13:
encrypt.cpp: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:61:1: error: inlining failed in call to 'always_inline' '__m128i _mm_aesenc_si128(__m128i, __m128i)': target specific option mismatch
encrypt.cpp: 61 | _mm_aesenc_si128 (__m128i __X, __m128i __Y)
encrypt.cpp: ...

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesni
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesni
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesni
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesni

Compiler output

Implementation: T:opt-win-aes
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.cpp: In file included from encrypt.cpp:13:
encrypt.cpp: /usr/lib/llvm-14/lib/clang/14.0.0/include/intrin.h:12:15: fatal error: 'intrin.h' file not found
encrypt.cpp: #include_next <intrin.h>
encrypt.cpp: ^~~~~~~~~~
encrypt.cpp: 1 error generated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt-win-aes
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt-win-aes
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt-win-aes
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt-win-aes

Compiler output

Implementation: T:opt-win-aes
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.cpp: encrypt.cpp:13:10: fatal error: intrin.h: No such file or directory
encrypt.cpp: 13 | #include <intrin.h>
encrypt.cpp: | ^~~~~~~~~~
encrypt.cpp: compilation terminated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opt-win-aes
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opt-win-aes
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opt-win-aes
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opt-win-aes

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.cpp: encrypt.cpp:355:27: warning: implicit conversion from 'int' to 'unsigned char' changes value from 256 to 0 [-Wconstant-conversion]
encrypt.cpp: D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits, zero for 256-bit nonce
encrypt.cpp: ~ ~~~~~~~~~~~~~~~~^~
encrypt.cpp: encrypt.cpp:610:27: warning: implicit conversion from 'int' to 'unsigned char' changes value from 256 to 0 [-Wconstant-conversion]
encrypt.cpp: D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits, zero for 256-bit nonce
encrypt.cpp: ~ ~~~~~~~~~~~~~~~~^~
encrypt.cpp: encrypt.cpp:864:27: warning: implicit conversion from 'int' to 'unsigned char' changes value from 256 to 0 [-Wconstant-conversion]
encrypt.cpp: D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits
encrypt.cpp: ~ ~~~~~~~~~~~~~~~~^~
encrypt.cpp: 3 warnings generated.

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.cpp: encrypt.cpp: In function 'int crypto_aead_paeq128tnm_ref_timingleaks_encrypt(unsigned char*, long long unsigned int*, const unsigned char*, long long unsigned int, const unsigned char*, long long unsigned int, const unsigned char*, const unsigned char*, const unsigned char*)':
encrypt.cpp: encrypt.cpp:355:41: warning: unsigned conversion from 'int' to 'unsigned char' changes value from '256' to '0' [-Woverflow]
encrypt.cpp: 355 | D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits, zero for 256-bit nonce
encrypt.cpp: encrypt.cpp: In function 'int crypto_aead_encrypt_no_nonce(unsigned char*, long long unsigned int*, const unsigned char*, long long unsigned int, const unsigned char*, long long unsigned int, const unsigned char*, unsigned char*, const unsigned char*)':
encrypt.cpp: encrypt.cpp:610:41: warning: unsigned conversion from 'int' to 'unsigned char' changes value from '256' to '0' [-Woverflow]
encrypt.cpp: 610 | D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits, zero for 256-bit nonce
encrypt.cpp: encrypt.cpp: In function 'int crypto_aead_paeq128tnm_ref_timingleaks_decrypt(unsigned char*, long long unsigned int*, unsigned char*, const unsigned char*, long long unsigned int, const unsigned char*, long long unsigned int, const unsigned char*, const unsigned char*)':
encrypt.cpp: encrypt.cpp:864:41: warning: unsigned conversion from 'int' to 'unsigned char' changes value from '256' to '0' [-Woverflow]
encrypt.cpp: 864 | D0[0] = CRYPTO_NPUBBYTES*8; //nonce length in bits

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ref