Implementation notes: amd64, h6sandy, crypto_aead/aes128cpfbv1

Computer: h6sandy
Microarchitecture: amd64; Sandy Bridge (206a7)
Architecture: amd64
CPU ID: GenuineIntel-000206a7-bfebfbff
SUPERCOP version: 20240625
Operation: crypto_aead
Primitive: aes128cpfbv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
12335716207 0 036019 844 1024T:gladmanclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
12443316445 0 038171 844 1024T:gladmanclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
12444416472 0 038803 844 1024T:gladmanclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
12447516445 0 040115 844 1024T:gladmanclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
12613416410 0 035720 780 1056T:gladmangcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
12643017284 0 038797 804 1088T:gladmangcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
13219718453 0 041197 804 1088T:gladmangcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
13556016422 0 035893 836 1024T:gladmanclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
14572817363 0 038324 796 1088T:gladmangcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
14936220871 0 043717 804 1088T:aesrefgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
15324317248 0 039619 844 1024T:aesrefclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
15341015698 0 037467 844 1024T:aesrefclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
15373117234 0 040947 844 1024T:aesrefclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
15736616950 0 038565 804 1088T:aesrefgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
16085515214 0 034741 836 1024T:aesrefclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
16136116718 0 037796 796 1088T:aesrefgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
16204915405 0 035235 844 1024T:aesrefclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
21027716081 0 035504 780 1056T:aesrefgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2172604309 0 032845 804 1088T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2229362310 0 032155 844 1024T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2230582293 0 030795 844 1024T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2249512310 0 030211 844 1024T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2251211684 0 027349 836 1024T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2507222947 0 030253 804 1088T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2509071890 0 027859 844 1024T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2669552142 0 028972 796 1088T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625
2846471847 0 027024 780 1056T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024062720240625

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: 5, 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)
T:aesniclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


cpfbkey.c: In file included from cpfbkey.c:15:
cpfbkey.c: cpfbkey.c: In function 'KEY_256_ASSIST_2':
cpfbkey.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/wmmintrin.h:87:1: error: inlining failed in call to 'always_inline' '_mm_aeskeygenassist_si128': target specific option mismatch
cpfbkey.c:    87 | _mm_aeskeygenassist_si128 (__m128i __X, const int __C)
cpfbkey.c:       | ^~~~~~~~~~~~~~~~~~~~~~~~~
cpfbkey.c: cpfbkey.c:162:9: note: called from here
cpfbkey.c:   162 | temp4 = _mm_aeskeygenassist_si128 (*temp1, 0x0);
cpfbkey.c:       |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
T:aesnigcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:aesnigcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:aesnigcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
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)