Implementation notes: amd64, r24000, crypto_aead/aes128cpfbv1

Computer: r24000
Microarchitecture: amd64; Coffee Lake (906ea)
Architecture: amd64
CPU ID: GenuineIntel-000906ea-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: aes128cpfbv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1082413085 0 037344 804 1072T:aesnigcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
150209443 0 030959 796 1072T:aesnigcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
155518950 0 030255 796 1072T:aesnigcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
832453508 0 028208 804 1072T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
8880216217 0 035995 780 1040T:gladmangcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
889032246 0 025725 804 1040T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
889092246 0 025725 804 1040T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
893342246 0 025613 804 1040T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9310718353 0 040341 804 1008T:gladmanclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
942871698 0 021599 796 1008T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
945632450 0 024893 804 1008T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9521419545 0 042557 804 1040T:gladmanclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9536419545 0 042557 804 1040T:gladmanclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9567919545 0 042445 804 1040T:gladmanclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9849817866 0 041960 804 1072T:gladmangcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
9991316238 0 035671 796 1008T:gladmanclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
10040317191 0 038615 796 1072T:gladmangcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
10138116980 0 038183 796 1072T:gladmangcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
11238016753 0 038079 796 1072T:aesrefgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
1142462645 0 024623 796 1072T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
11578919208 0 043440 804 1072T:aesrefgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
1204162126 0 023919 796 1072T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
12044417049 0 039997 804 1040T:aesrefclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
12052615497 0 038557 804 1040T:aesrefclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
12064415497 0 038557 804 1040T:aesrefclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
1208651929 0 022267 780 1040T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
12363716433 0 037967 796 1072T:aesrefgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
12646615249 0 034727 796 1008T:aesrefclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
12728017165 0 039197 804 1008T:aesrefclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
14046416016 0 035915 780 1040T:aesrefgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107

Test failure

Implementation: T:aesni
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111
crypto_aead_decrypt does not match m

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: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
cpfbkey.c: cpfbkey.c:50:9: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
cpfbkey.c: temp2 = _mm_aeskeygenassist_si128 (temp1,0x1);
cpfbkey.c: ^
cpfbkey.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
cpfbkey.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:52:6: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'AES_128_Key_Expansion_and_encryption' that is compiled without support for 'aes'
cpfbkey.c: k1 = _mm_aesenc_si128(k1,temp1);
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:53:6: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'AES_128_Key_Expansion_and_encryption' that is compiled without support for 'aes'
cpfbkey.c: k2 = _mm_aesenc_si128(k2,temp1);
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:54:9: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
cpfbkey.c: temp2 = _mm_aeskeygenassist_si128 (temp1,0x2);
cpfbkey.c: ^
cpfbkey.c: /usr/lib/llvm-10/lib/clang/10.0.0/include/__wmmintrin_aes.h:136:12: note: expanded from macro '_mm_aeskeygenassist_si128'
cpfbkey.c: (__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R))
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:56:6: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'AES_128_Key_Expansion_and_encryption' that is compiled without support for 'aes'
cpfbkey.c: k1 = _mm_aesenc_si128(k1,temp1);
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:57:6: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'AES_128_Key_Expansion_and_encryption' that is compiled without support for 'aes'
cpfbkey.c: k2 = _mm_aesenc_si128(k2,temp1);
cpfbkey.c: ^
cpfbkey.c: cpfbkey.c:58:9: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
cpfbkey.c: ...

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni

Compiler output

Implementation: T:aesni
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(encrypt.o): in function `crypto_aead_aes128cpfbv1_aesni_timingleaks_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `safe_store_partial'
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o): in function `AES_128_Key_Expansion_and_encryption':
try.c: cpfbkey.c:(.text+0x...): undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o):cpfbkey.c:(.text+0x...): more undefined references to `key_expansion_128' follow
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o): in function `AES_256_Key_Expansion':
try.c: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o):cpfbkey.c:(.text+0x...): more undefined references to `KEY_256_ASSIST_1' follow
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesni

Compiler output

Implementation: T:evp
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:170:89: error: array has incomplete element type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
encrypt.c: static void gen_kappa(unsigned char* nonce, unsigned char* kappa, EVP_CIPHER_CTX ctx_key[1]){
encrypt.c: ^
encrypt.c: /usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'struct evp_cipher_ctx_st'
encrypt.c: typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
encrypt.c: ^
encrypt.c: encrypt.c:188:25: error: array has incomplete element type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
encrypt.c: EVP_CIPHER_CTX ctx_k[1];
encrypt.c: ^
encrypt.c: /usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'struct evp_cipher_ctx_st'
encrypt.c: typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
encrypt.c: ^
encrypt.c: encrypt.c:189:31: error: array has incomplete element type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
encrypt.c: EVP_CIPHER_CTX ctx_kappa_0[1];
encrypt.c: ^
encrypt.c: /usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'struct evp_cipher_ctx_st'
encrypt.c: typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
encrypt.c: ^
encrypt.c: encrypt.c:190:31: error: array has incomplete element type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
encrypt.c: EVP_CIPHER_CTX ctx_kappa_m[1];
encrypt.c: ^
encrypt.c: /usr/include/openssl/ossl_typ.h:90:16: note: forward declaration of 'struct evp_cipher_ctx_st'
encrypt.c: typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
encrypt.c: ^
encrypt.c: encrypt.c:330:25: error: array has incomplete element type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
encrypt.c: ...

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

Compiler output

Implementation: T:evp
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: encrypt.c:170:82: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 170 | static void gen_kappa(unsigned char* nonce, unsigned char* kappa, EVP_CIPHER_CTX ctx_key[1]){
encrypt.c: | ^~~~~~~
encrypt.c: encrypt.c: In function 'crypto_aead_aes128cpfbv1_evp_timingleaks_encrypt':
encrypt.c: encrypt.c:188:20: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 188 | EVP_CIPHER_CTX ctx_k[1];
encrypt.c: | ^~~~~
encrypt.c: encrypt.c:189:20: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 189 | EVP_CIPHER_CTX ctx_kappa_0[1];
encrypt.c: | ^~~~~~~~~~~
encrypt.c: encrypt.c:190:20: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 190 | EVP_CIPHER_CTX ctx_kappa_m[1];
encrypt.c: | ^~~~~~~~~~~
encrypt.c: encrypt.c:204:31: error: type of formal parameter 3 is incomplete
encrypt.c: 204 | gen_kappa(nonce, kappa_0, ctx_k);
encrypt.c: | ^~~~~
encrypt.c: encrypt.c:265:28: error: type of formal parameter 3 is incomplete
encrypt.c: 265 | gen_kappa(nonce, kappa_m, ctx_k);
encrypt.c: | ^~~~~
encrypt.c: encrypt.c: In function 'crypto_aead_aes128cpfbv1_evp_timingleaks_decrypt':
encrypt.c: encrypt.c:330:20: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 330 | EVP_CIPHER_CTX ctx_k[1];
encrypt.c: | ^~~~~
encrypt.c: encrypt.c:331:20: error: array type has incomplete element type 'EVP_CIPHER_CTX' {aka 'struct evp_cipher_ctx_st'}
encrypt.c: 331 | EVP_CIPHER_CTX ctx_kappa_0[1];
encrypt.c: ...

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

Namespace violations

Implementation: T:aesni
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
cpfbkey.o AES_128_Key_Expansion_2 T
cpfbkey.o AES_128_Key_Expansion_and_encryption T
cpfbkey.o AES_256_Key_Expansion T
cpfbkey.o AES_256_Key_Expansion_2 T
cpfbkey.o AES_256_Key_Expansion_and_encryption T

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

Namespace violations

Implementation: T:aesref
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
rijndael-alg-fst.o rijndaelDecrypt T
rijndael-alg-fst.o rijndaelEncrypt T
rijndael-alg-fst.o rijndaelKeySetupDec T
rijndael-alg-fst.o rijndaelKeySetupEnc T

Number of similar (compiler,implementation) pairs: 9, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesref
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesref
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesref
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesref
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesref
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesref
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesref
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesref
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:aesref

Namespace violations

Implementation: T:gladman
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aescrypt.o aes_encrypt T
aeskey.o aes_encrypt_key128 T
aeskey.o aes_encrypt_key256 T
aestab.o aes_init T
aestab.o t_fl R
aestab.o t_fn R
aestab.o t_rc R

Number of similar (compiler,implementation) pairs: 9, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gladman
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gladman
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gladman
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gladman
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gladman
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gladman
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gladman
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gladman
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gladman