Implementation notes: amd64, hiphop, crypto_aead/aes256gcmv1

Computer: hiphop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-bfebfbff
SUPERCOP version: 20231107
Operation: crypto_aead
Primitive: aes256gcmv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
975216709 0 040381 804 1088dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
102859637 0 031285 804 1088dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
106219771 0 030860 796 1088dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
106406104 0 025608 780 1056dolbeau/aesenc-intgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
1090417118 0 040120 860 1056dolbeau/aesenc-intclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
1096317296 0 040544 860 1056dolbeau/aesenc-intclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
1112414146 0 034738 852 1088dolbeau/aesenc-intclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
1118414254 0 034016 860 1024dolbeau/aesenc-intclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
12718893 0 024799 940 1056T:opensslnewclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
12738893 0 023751 940 1024T:opensslnewclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
127741120 0 025795 900 1056T:opensslnewgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
12832893 0 022361 932 1088T:opensslnewclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
12835890 0 021543 940 1024T:opensslnewclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
12850893 0 025079 940 1056T:opensslnewclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
128501120 0 023747 900 1056T:opensslnewgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
129971148 0 023226 892 1056T:opensslnewgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
130711041 0 021494 876 1056T:opensslnewgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
2084140817 3040 01663303 148892 11104T:cryptoppg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
2093617795 3040 01651028 148972 11040T:cryptoppclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
2100816919 3040 01649888 148972 11040T:cryptoppclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
2111614075 2456 01645521 148956 11072T:cryptoppclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
2136535774 3040 01656385 148900 11104T:cryptoppg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
2139715888 4072 01629027 149716 11072T:cryptoppg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
2151535743 3040 01655275 148900 11104T:cryptoppg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
2234221277 6160 01657312 151532 11008T:cryptoppclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023053020230530
16963965079 0 1628957 804 1120refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
17356225027 0 1629000 860 1056refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110720231107
17464873795 0 1627488 860 1056refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110720231107
17586732872 0 1625544 860 1056refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110720231107
17847992398 0 1623714 852 1120refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110720231107
146171221878 0 1622360 860 1056refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023110720231107
174007812333 0 1624165 804 1120refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
179477352298 0 1623604 796 1120refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107
183706541950 0 1621688 780 1088refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023110720231107

Compiler output

Implementation: dolbeau/aesenc-int
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aesenc-int.c: aesenc-int.c:665:16: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_aead_aes256gcmv1_dolbeau_aesenc_int_constbranchindex_encrypt' that is compiled without support for 'ssse3'
aesenc-int.c: __m128i Hv = _mm_shuffle_epi8(_mm_loadu_si128((const __m128i*)H), rev);
aesenc-int.c: ^
aesenc-int.c: 1 error generated.

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

Compiler output

Implementation: dolbeau/aesenc-int
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
aesenc-int.c: aesenc-int.c:25: warning: "_bswap64" redefined
aesenc-int.c: 25 | #define _bswap64(a) __builtin_bswap64(a)
aesenc-int.c: |
aesenc-int.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
aesenc-int.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
aesenc-int.c: from aesenc-int.c:11:
aesenc-int.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:273: note: this is the location of the previous definition
aesenc-int.c: 273 | #define _bswap64(a) __bswapq(a)
aesenc-int.c: |
aesenc-int.c: aesenc-int.c:26: warning: "_bswap" redefined
aesenc-int.c: 26 | #define _bswap(a) __builtin_bswap32(a)
aesenc-int.c: |
aesenc-int.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
aesenc-int.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
aesenc-int.c: from aesenc-int.c:11:
aesenc-int.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:307: note: this is the location of the previous definition
aesenc-int.c: 307 | #define _bswap(a) __bswapd(a)
aesenc-int.c: |

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

Compiler output

Implementation: dolbeau/vaesenc-int
Security model: constbranchindex
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
vaesenc-int.c: vaesenc-int.c:261:34: warning: incompatible pointer types passing 'const __m128i *' to parameter of type 'const __m256i *' [-Wincompatible-pointer-types]
vaesenc-int.c: __m256i nv = _mm256_load_si256((const __m128i *)n);
vaesenc-int.c: ^~~~~~~~~~~~~~~~~~
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avxintrin.h:3143:34: note: passing argument to parameter '__p' here
vaesenc-int.c: _mm256_load_si256(__m256i const *__p)
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:18: error: '__builtin_ia32_inserti32x4_256' needs target feature avx512vl
vaesenc-int.c: __m256i H12v = _mm256_inserti32x4(_mm256_inserti32x4(_mm256_undefined_si256(), Hv, 1), H2v, 0);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:7887:13: note: expanded from macro '_mm256_inserti32x4'
vaesenc-int.c: ((__m256i)__builtin_ia32_inserti32x4_256((__v8si)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:37: error: '__builtin_ia32_inserti32x4_256' needs target feature avx512vl
vaesenc-int.c: __m256i H12v = _mm256_inserti32x4(_mm256_inserti32x4(_mm256_undefined_si256(), Hv, 1), H2v, 0);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:7887:13: note: expanded from macro '_mm256_inserti32x4'
vaesenc-int.c: ((__m256i)__builtin_ia32_inserti32x4_256((__v8si)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:989:31: error: always_inline function '_mm256_broadcast_i32x4' requires target feature 'avx512vl', but would be inlined into function 'crypto_aead_aes256gcmv1_dolbeau_vaesenc_int_constbranchindex_encrypt' that is compiled without support for 'avx512vl'
vaesenc-int.c: __m256i H34v = mulvv2(H12v, _mm256_broadcast_i32x4(H2v));
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:990:10: error: '__builtin_ia32_inserti64x4' needs target feature avx512f
vaesenc-int.c: vhv0 = _mm512_inserti64x4(_mm512_inserti64x4(_mm512_undefined_epi32(), H12v, 1), H34v, 0);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512fintrin.h:7417:13: note: expanded from macro '_mm512_inserti64x4'
vaesenc-int.c: ...

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

Compiler output

Implementation: dolbeau/vaesenc-int
Security model: constbranchindex
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
vaesenc-int.c: vaesenc-int.c:261:34: warning: incompatible pointer types passing 'const __m128i *' to parameter of type 'const __m256i *' [-Wincompatible-pointer-types]
vaesenc-int.c: __m256i nv = _mm256_load_si256((const __m128i *)n);
vaesenc-int.c: ^~~~~~~~~~~~~~~~~~
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avxintrin.h:3143:34: note: passing argument to parameter '__p' here
vaesenc-int.c: _mm256_load_si256(__m256i const *__p)
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:983:16: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'crypto_aead_aes256gcmv1_dolbeau_vaesenc_int_constbranchindex_encrypt' that is compiled without support for 'ssse3'
vaesenc-int.c: __m128i Hv = _mm_shuffle_epi8(_mm_load_si128((const __m128i*)H), rev);
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:18: error: '__builtin_ia32_inserti32x4_256' needs target feature avx512vl
vaesenc-int.c: __m256i H12v = _mm256_inserti32x4(_mm256_inserti32x4(_mm256_undefined_si256(), Hv, 1), H2v, 0);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:7887:13: note: expanded from macro '_mm256_inserti32x4'
vaesenc-int.c: ((__m256i)__builtin_ia32_inserti32x4_256((__v8si)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:37: error: '__builtin_ia32_inserti32x4_256' needs target feature avx512vl
vaesenc-int.c: __m256i H12v = _mm256_inserti32x4(_mm256_inserti32x4(_mm256_undefined_si256(), Hv, 1), H2v, 0);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/avx512vlintrin.h:7887:13: note: expanded from macro '_mm256_inserti32x4'
vaesenc-int.c: ((__m256i)__builtin_ia32_inserti32x4_256((__v8si)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:56: error: always_inline function '_mm256_undefined_si256' requires target feature 'avx', but would be inlined into function 'crypto_aead_aes256gcmv1_dolbeau_vaesenc_int_constbranchindex_encrypt' that is compiled without support for 'avx'
vaesenc-int.c: __m256i H12v = _mm256_inserti32x4(_mm256_inserti32x4(_mm256_undefined_si256(), Hv, 1), H2v, 0);
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:988:56: error: AVX vector return of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
vaesenc-int.c: ...

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

Compiler output

Implementation: dolbeau/vaesenc-int
Security model: constbranchindex
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
vaesenc-int.c: vaesenc-int.c:28: warning: "_bswap64" redefined
vaesenc-int.c: 28 | #define _bswap64(a) __builtin_bswap64(a)
vaesenc-int.c: |
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
vaesenc-int.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
vaesenc-int.c: from vaesenc-int.c:11:
vaesenc-int.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:273: note: this is the location of the previous definition
vaesenc-int.c: 273 | #define _bswap64(a) __bswapq(a)
vaesenc-int.c: |
vaesenc-int.c: vaesenc-int.c:29: warning: "_bswap" redefined
vaesenc-int.c: 29 | #define _bswap(a) __builtin_bswap32(a)
vaesenc-int.c: |
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
vaesenc-int.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
vaesenc-int.c: from vaesenc-int.c:11:
vaesenc-int.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:307: note: this is the location of the previous definition
vaesenc-int.c: 307 | #define _bswap(a) __bswapd(a)
vaesenc-int.c: |
vaesenc-int.c: vaesenc-int.c: In function 'aesni_encryptv2':
vaesenc-int.c: vaesenc-int.c:261:34: warning: passing argument 1 of '_mm256_load_si256' from incompatible pointer type [-Wincompatible-pointer-types]
vaesenc-int.c: 261 | __m256i nv = _mm256_load_si256((const __m128i *)n);
vaesenc-int.c: | ^~~~~~~~~~~~~~~~~~
vaesenc-int.c: | |
vaesenc-int.c: | const __m128i *
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:43,
vaesenc-int.c: ...

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

Compiler output

Implementation: T:openssl
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
decrypt.c: decrypt.c:13:18: error: variable has incomplete type 'EVP_CIPHER_CTX' (aka 'struct evp_cipher_ctx_st')
decrypt.c: EVP_CIPHER_CTX x;
decrypt.c: ^
decrypt.c: /usr/include/openssl/types.h:102:16: note: forward declaration of 'struct evp_cipher_ctx_st'
decrypt.c: typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
decrypt.c: ^
decrypt.c: 1 error generated.

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

Compiler output

Implementation: T:openssl
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
decrypt.c: decrypt.c: In function 'crypto_aead_aes256gcmv1_openssl_timingleaks_decrypt':
decrypt.c: decrypt.c:13:18: error: storage size of 'x' isn't known
decrypt.c: 13 | EVP_CIPHER_CTX x;
decrypt.c: | ^

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