Implementation notes: amd64, cannon, crypto_aead/aes256gcmv1

Computer: cannon
Architecture: amd64
CPU ID: GenuineIntel-00060663-bfebfbff
SUPERCOP version: 20190910
Operation: crypto_aead
Primitive: aes256gcmv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
747012486 0 029100 800 928dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
752818789 0 038245 808 928dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
767612685 0 029180 800 928dolbeau/aesenc-intgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
785617192 0 036627 832 904dolbeau/aesenc-intclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
785817192 0 036627 832 904dolbeau/aesenc-intclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
786217208 0 036963 832 904dolbeau/aesenc-intclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
84766095 0 021292 784 896dolbeau/aesenc-intgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
1827034554 3040 01725496 148023 10904cryptoppg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
1834619777 3040 01723733 148079 10840cryptoppclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
1839636221 3040 01730791 148015 10904cryptoppg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
1841419777 3040 01723733 148079 10840cryptoppclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
1850615449 2456 01721449 148071 10840cryptoppclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
1877214491 3264 01693139 148055 10872cryptoppg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
1883015843 2456 01717881 148071 10808cryptoppclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
1949835598 3040 01727423 148015 10904cryptoppg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
18204623558 0 1623661 808 944refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
24403401826 0 1618569 824 880refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
110886423817 0 1624291 832 928refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
112577483817 0 1623971 832 928refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
112775543817 0 1623971 832 928refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2019091020190910
174301622477 0 1619732 800 944refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910
185807322231 0 1619372 800 944refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2019091020190910

Test failure

Implementation: ref
Security model: unknown
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
error 111

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

Compiler output

Implementation: dolbeau/aesenc-int
Security model: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aesenc-int.c: aesenc-int.c:40:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i *' [-Wincompatible-pointer-types]
aesenc-int.c: __m128i key0 = _mm_loadu_si128((const unsigned int *)(key+0));
aesenc-int.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: /usr/lib/clang/8.0.1/include/emmintrin.h:3567:32: note: passing argument to parameter '__p' here
aesenc-int.c: _mm_loadu_si128(__m128i const *__p)
aesenc-int.c: ^
aesenc-int.c: aesenc-int.c:41:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i *' [-Wincompatible-pointer-types]
aesenc-int.c: __m128i key1 = _mm_loadu_si128((const unsigned int *)(key+16));
aesenc-int.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: /usr/lib/clang/8.0.1/include/emmintrin.h:3567:32: note: passing argument to parameter '__p' here
aesenc-int.c: _mm_loadu_si128(__m128i const *__p)
aesenc-int.c: ^
aesenc-int.c: 2 warnings generated.

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

Compiler output

Implementation: dolbeau/aesenc-int
Security model: unknown
Compiler: clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aesenc-int.c: aesenc-int.c:40:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i *' [-Wincompatible-pointer-types]
aesenc-int.c: __m128i key0 = _mm_loadu_si128((const unsigned int *)(key+0));
aesenc-int.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: /usr/lib/clang/8.0.1/include/emmintrin.h:3567:32: note: passing argument to parameter '__p' here
aesenc-int.c: _mm_loadu_si128(__m128i const *__p)
aesenc-int.c: ^
aesenc-int.c: aesenc-int.c:41:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i *' [-Wincompatible-pointer-types]
aesenc-int.c: __m128i key1 = _mm_loadu_si128((const unsigned int *)(key+16));
aesenc-int.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: /usr/lib/clang/8.0.1/include/emmintrin.h:3567:32: note: passing argument to parameter '__p' here
aesenc-int.c: _mm_loadu_si128(__m128i const *__p)
aesenc-int.c: ^
aesenc-int.c: aesenc-int.c:630:5: warning: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
aesenc-int.c: int crypto_aead_encrypt(
aesenc-int.c: ^
aesenc-int.c: ./crypto_aead.h:6:29: note: expanded from macro 'crypto_aead_encrypt'
aesenc-int.c: #define crypto_aead_encrypt crypto_aead_aes256gcmv1_encrypt
aesenc-int.c: ^
aesenc-int.c: ./crypto_aead_aes256gcmv1.h:18:41: note: expanded from macro 'crypto_aead_aes256gcmv1_encrypt'
aesenc-int.c: #define crypto_aead_aes256gcmv1_encrypt crypto_aead_aes256gcmv1_dolbeau_aesenc_int_encrypt
aesenc-int.c: ^
aesenc-int.c: aesenc-int.c:630:5: warning: loop not unrolled: the optimizer was unable to perform the requested transformation; the transformation might be disabled or specified as part of an unsupported transformation ordering [-Wpass-failed=transform-warning]
aesenc-int.c: ./crypto_aead.h:6:29: note: expanded from macro 'crypto_aead_encrypt'
aesenc-int.c: #define crypto_aead_encrypt crypto_aead_aes256gcmv1_encrypt
aesenc-int.c: ^
aesenc-int.c: ...

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

Compiler output

Implementation: dolbeau/aesenc-int
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
aesenc-int.c: aesenc-int.c: In function 'aesni_key256_expand':
aesenc-int.c: aesenc-int.c:40:34: warning: passing argument 1 of '_mm_loadu_si128' from incompatible pointer type [-Wincompatible-pointer-types]
aesenc-int.c: 40 | __m128i key0 = _mm_loadu_si128((const unsigned int *)(key+0));
aesenc-int.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: | |
aesenc-int.c: | const unsigned int *
aesenc-int.c: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/xmmintrin.h:1255,
aesenc-int.c: from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/immintrin.h:29,
aesenc-int.c: from aesenc-int.c:11:
aesenc-int.c: /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/emmintrin.h:701:35: note: expected 'const __vector(2) long long int *' but argument is of type 'const unsigned int *'
aesenc-int.c: 701 | _mm_loadu_si128 (__m128i_u const *__P)
aesenc-int.c: | ~~~~~~~~~~~~~~~~~^~~
aesenc-int.c: aesenc-int.c:41:34: warning: passing argument 1 of '_mm_loadu_si128' from incompatible pointer type [-Wincompatible-pointer-types]
aesenc-int.c: 41 | __m128i key1 = _mm_loadu_si128((const unsigned int *)(key+16));
aesenc-int.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
aesenc-int.c: | |
aesenc-int.c: | const unsigned int *
aesenc-int.c: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/xmmintrin.h:1255,
aesenc-int.c: from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/immintrin.h:29,
aesenc-int.c: from aesenc-int.c:11:
aesenc-int.c: /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/emmintrin.h:701:35: note: expected 'const __vector(2) long long int *' but argument is of type 'const unsigned int *'
aesenc-int.c: 701 | _mm_loadu_si128 (__m128i_u const *__P)
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: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
vaesenc-int.c: vaesenc-int.c:260: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/clang/8.0.1/include/avxintrin.h:3153: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:391:18: error: '__builtin_ia32_pclmulqdq256' needs target feature vpclmulqdq
vaesenc-int.c: __m256i tmp3 = _mm256_clmulepi64_epi128(A, B, 0x00);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/clang/8.0.1/include/vpclmulqdqintrin.h:32:12: note: expanded from macro '_mm256_clmulepi64_epi128'
vaesenc-int.c: (__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:392:18: error: '__builtin_ia32_pclmulqdq256' needs target feature vpclmulqdq
vaesenc-int.c: __m256i tmp4 = _mm256_clmulepi64_epi128(A, B, 0x10);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/clang/8.0.1/include/vpclmulqdqintrin.h:32:12: note: expanded from macro '_mm256_clmulepi64_epi128'
vaesenc-int.c: (__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:393:18: error: '__builtin_ia32_pclmulqdq256' needs target feature vpclmulqdq
vaesenc-int.c: __m256i tmp5 = _mm256_clmulepi64_epi128(A, B, 0x01);
vaesenc-int.c: ^
vaesenc-int.c: /usr/lib/clang/8.0.1/include/vpclmulqdqintrin.h:32:12: note: expanded from macro '_mm256_clmulepi64_epi128'
vaesenc-int.c: (__m256i)__builtin_ia32_pclmulqdq256((__v4di)(__m256i)(A), \
vaesenc-int.c: ^
vaesenc-int.c: vaesenc-int.c:394:18: error: '__builtin_ia32_pclmulqdq256' needs target feature vpclmulqdq
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: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
vaesenc-int.c: vaesenc-int.c: In function 'aesni_encryptv2':
vaesenc-int.c: vaesenc-int.c:260:34: warning: passing argument 1 of '_mm256_load_si256' from incompatible pointer type [-Wincompatible-pointer-types]
vaesenc-int.c: 260 | __m256i nv = _mm256_load_si256((const __m128i *)n);
vaesenc-int.c: | ^~~~~~~~~~~~~~~~~~
vaesenc-int.c: | |
vaesenc-int.c: | const __vector(2) long long int *
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/immintrin.h:51,
vaesenc-int.c: from vaesenc-int.c:11:
vaesenc-int.c: /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/avxintrin.h:907:35: note: expected 'const __vector(4) long long int *' but argument is of type 'const __vector(2) long long int *'
vaesenc-int.c: 907 | _mm256_load_si256 (__m256i const *__P)
vaesenc-int.c: | ~~~~~~~~~~~~~~~^~~
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/immintrin.h:121,
vaesenc-int.c: from vaesenc-int.c:11:
vaesenc-int.c: vaesenc-int.c: In function 'mulvv2':
vaesenc-int.c: /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/vpclmulqdqintrin.h:65:1: error: inlining failed in call to always_inline '_mm256_clmulepi64_epi128': target specific option mismatch
vaesenc-int.c: 65 | _mm256_clmulepi64_epi128 (__m256i __A, __m256i __B, const int __C)
vaesenc-int.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
vaesenc-int.c: vaesenc-int.c:394:18: note: called from here
vaesenc-int.c: 394 | __m256i tmp6 = _mm256_clmulepi64_epi128(A, B, 0x11);
vaesenc-int.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vaesenc-int.c: In file included from /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/immintrin.h:121,
vaesenc-int.c: from vaesenc-int.c:11:
vaesenc-int.c: /usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/include/vpclmulqdqintrin.h:65:1: error: inlining failed in call to always_inline '_mm256_clmulepi64_epi128': target specific option mismatch
vaesenc-int.c: 65 | _mm256_clmulepi64_epi128 (__m256i __A, __m256i __B, const int __C)
vaesenc-int.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
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: openssl
Security model: unknown
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/ossl_typ.h:90: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: 4, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE openssl
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE openssl
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE openssl
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE openssl

Compiler output

Implementation: openssl
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
decrypt.c: decrypt.c: In function 'crypto_aead_aes256gcmv1_openssl_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 openssl
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE openssl
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE openssl
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE openssl