Implementation notes: amd64, bolero, crypto_aead/aes128cpfbv1

Computer: bolero
Microarchitecture: amd64; Broadwell+AES (406f1)
Architecture: amd64
CPU ID: GenuineIntel-000406f1-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_aead
Primitive: aes128cpfbv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1562812897 0 036014 776 928T:aesnigcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
197449396 0 030478 776 928T:aesnigcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
220688852 0 029365 768 928T:aesnigcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
772004260 0 027430 776 928T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
774962655 0 026276 816 872T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
780362559 0 026524 816 872T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
780522293 0 024636 816 856T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
841561668 0 022230 808 920T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9180817260 0 038270 776 928T:gladmangcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9225216395 0 035217 752 896T:gladmangcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9616416182 0 035500 816 856T:gladmanclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9746816500 0 039668 816 872T:gladmanclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
9873216472 0 038364 816 856T:gladmanclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10300016500 0 039980 816 872T:gladmanclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10453618377 0 041398 776 928T:gladmangcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
1045722851 0 023974 776 928T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
1056081890 0 021652 816 856T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
10590417327 0 037757 768 928T:gladmangcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
11200416435 0 036542 808 920T:gladmanclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
1123162120 0 022749 768 928T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
11959620681 0 043798 776 928T:aesrefgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12682816913 0 038006 776 928T:aesrefgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12795215151 0 035294 808 920T:aesrefclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12899617524 0 041068 816 872T:aesrefclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12930816686 0 037229 768 928T:aesrefgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
12962415972 0 039204 816 872T:aesrefclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
13107617248 0 039180 816 856T:aesrefclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
13344015367 0 034716 816 856T:aesrefclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
1590801847 0 020881 752 896T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625
18622816079 0 035017 752 896T:aesrefgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062620240625

Test failure


error 111
crypto_aead_decrypt does not match m

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:aesniclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:aesniclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:aesniclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:aesniclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


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-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: 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-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: 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 (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:aesniclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(encrypt.o): in function `crypto_aead_aes128cpfbv1_aesni_timingleaks_encrypt':
try.c: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/encrypt.c:696: 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: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:51: undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:55: undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:59: undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:63: undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:67: undefined reference to `key_expansion_128'
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o):.../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:71: 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: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:182: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:184: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:187: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:189: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:192: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:194: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:197: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:199: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:202: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:204: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:207: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:209: undefined reference to `KEY_256_ASSIST_2'
try.c: /usr/bin/ld: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:212: undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: libcrypto_aead_aes128cpfbv1.a(cpfbkey.o): in function `AES_256_Key_Expansion_2':
try.c: .../supercop-data/bolero/amd64/try/c/gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_aead/aes128cpfbv1/aesni/work/cpfbkey.c:230: undefined reference to `KEY_256_ASSIST_1'
try.c: ...

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

Compiler output


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/types.h:102: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/types.h:102: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/types.h:102: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/types.h:102: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 (implementation,compiler) pairs: 5, namely:
ImplementationCompiler
T:evpclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:evpclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:evpclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:evpclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:evpclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


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:35: error: type of formal parameter 3 is incomplete
encrypt.c:   265 |         gen_kappa(nonce, kappa_m, ctx_k);
encrypt.c:       |                                   ^~~~~
encrypt.c: encrypt.c:190:20: warning: unused variable 'ctx_kappa_m' [-Wunused-variable]
encrypt.c:   190 |     EVP_CIPHER_CTX ctx_kappa_m[1];
encrypt.c:       |                    ^~~~~~~~~~~
encrypt.c: encrypt.c:189:20: warning: unused variable 'ctx_kappa_0' [-Wunused-variable]
encrypt.c:   189 |     EVP_CIPHER_CTX ctx_kappa_0[1];
encrypt.c:       |                    ^~~~~~~~~~~
encrypt.c: ...

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