Implementation notes: amd64, rome0, crypto_aead/aes256cpfbv1

Computer: rome0
Microarchitecture: amd64; Zen 2 (830f10)
Architecture: amd64
CPU ID: AuthenticAMD-00830f10-178bfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: aes256cpfbv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
1197115831 0 038696 780 1080T:aesnigcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
209208984 0 029399 772 1080T:aesnigcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
226879544 0 030712 780 1080T:aesnigcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
594413825 0 027224 780 1080T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
634812368 0 024984 812 1048T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
635362368 0 024856 812 1048T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
681023066 0 025968 812 1016T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
681631844 0 021958 804 1016T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
764492940 0 024648 780 1080T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
823152082 0 022446 804 1016T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
837752111 0 023119 772 1080T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
1110551778 0 021235 756 1048T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
11724415826 0 034691 756 1048T:gladmangcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
11991717620 0 039552 812 1048T:gladmanclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
12020517620 0 039680 812 1048T:gladmanclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
12059316517 0 036374 804 1016T:gladmanclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
12301918593 0 040928 812 1016T:gladmanclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
12681516441 0 035974 804 1016T:gladmanclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
12866317148 0 037551 772 1080T:gladmangcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
13295318767 0 041600 780 1080T:gladmangcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
13674117576 0 038744 780 1080T:gladmangcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
14279116204 0 036655 772 1080T:aesrefgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
15776219697 0 042552 780 1080T:aesrefgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
16120015673 0 037632 812 1048T:aesrefclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
16129417153 0 039240 812 1048T:aesrefclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
16252315292 0 034886 804 1016T:aesrefclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
16364816734 0 037936 780 1080T:aesrefgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212
16479915675 0 035534 804 1016T:aesrefclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
17016317703 0 040080 812 1016T:aesrefclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121220231212
19520015663 0 034579 756 1048T:aesrefgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121220231212

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: 3, 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 -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni

Compiler output

Implementation: T:aesni
Security model: timingleaks
Compiler: clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_aes256cpfbv1.a(encrypt.o): in function `crypto_aead_aes256cpfbv1_aesni_timingleaks_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `safe_store_partial'
try.c: /usr/bin/ld: libcrypto_aead_aes256cpfbv1.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_aes256cpfbv1.a(cpfbkey.o):cpfbkey.c:(.text+0x...): more undefined references to `key_expansion_128' follow
try.c: /usr/bin/ld: libcrypto_aead_aes256cpfbv1.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_2'
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_2'
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_2'
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_2'
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_2'
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_2'
try.c: /usr/bin/ld: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: /usr/bin/ld: libcrypto_aead_aes256cpfbv1.a(cpfbkey.o): in function `AES_256_Key_Expansion_2':
try.c: cpfbkey.c:(.text+0x...): undefined reference to `KEY_256_ASSIST_1'
try.c: ...

Number of similar (compiler,implementation) pairs: 2, namely:
CompilerImplementations
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:aesni
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -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-11/lib/clang/11.0.1/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-11/lib/clang/11.0.1/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: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_aes256cpfbv1_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_aes256cpfbv1_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