Implementation notes: amd64, samba, crypto_aead/aeadaes256ocbtaglen128v1

Computer: samba
Microarchitecture: amd64; Skylake (506e3)
Architecture: amd64
CPU ID: GenuineIntel-000506e3-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: aeadaes256ocbtaglen128v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
64416301 0 027053 836 1088T:dolbeau/aesenc-intclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
64576524 0 026371 844 1024T:dolbeau/aesenc-intclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
648010076 0 034139 844 1088T:dolbeau/aesenc-intclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
651510528 21 034660 860 1088T:optgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
65259996 0 033763 844 1056T:dolbeau/aesenc-intclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
660815153 21 039331 892 1088T:optclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
66099272 21 033163 892 1056T:optclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
809315387 16 039275 884 1056T:vaesclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
874325300 16 049420 852 1088T:vaesgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
891722723 16 046915 884 1088T:vaesclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
132676409 21 028396 860 1088T:optgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
140695891 21 025875 892 1024T:optclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
145315463 21 026357 884 1088T:optclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
151529973 16 031436 852 1088T:vaesgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
151579732 16 031708 852 1088T:vaesgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
159646455 21 027924 860 1088T:optgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
171276638 18 029960 952 1024T:optclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
178438215 16 029101 876 1088T:vaesclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
196888894 16 028883 884 1024T:vaesclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
227235808 21 025559 836 1056T:optgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
251859067 16 028823 828 1056T:vaesgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212

Compiler output

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

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

Compiler output

Implementation: T:dolbeau/aesenc-int
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:74:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i_u *' [-Wincompatible-pointer-types]
encrypt.c: __m128i key0 = _mm_loadu_si128((const unsigned int *)(key+0));
encrypt.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/emmintrin.h:3552:34: note: passing argument to parameter '__p' here
encrypt.c: _mm_loadu_si128(__m128i_u const *__p)
encrypt.c: ^
encrypt.c: encrypt.c:75:34: warning: incompatible pointer types passing 'const unsigned int *' to parameter of type 'const __m128i_u *' [-Wincompatible-pointer-types]
encrypt.c: __m128i key1 = _mm_loadu_si128((const unsigned int *)(key+16));
encrypt.c: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/emmintrin.h:3552:34: note: passing argument to parameter '__p' here
encrypt.c: _mm_loadu_si128(__m128i_u const *__p)
encrypt.c: ^
encrypt.c: encrypt.c:104:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
encrypt.c: BLOCK1(0x01);
encrypt.c: ^
encrypt.c: encrypt.c:85:11: note: expanded from macro 'BLOCK1'
encrypt.c: temp1 = _mm_aeskeygenassist_si128(temp2, IMM); \
encrypt.c: ^
encrypt.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
encrypt.c: ((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
encrypt.c: ^
encrypt.c: encrypt.c:105:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
encrypt.c: BLOCK2(0x01);
encrypt.c: ^
encrypt.c: encrypt.c:95:11: note: expanded from macro 'BLOCK2'
encrypt.c: ...

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

Compiler output

Implementation: T:dolbeau/aesenc-int
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: encrypt.c:55: warning: "_bswap64" redefined
encrypt.c: 55 | #define _bswap64(a) __builtin_bswap64(a)
encrypt.c: |
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
encrypt.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
encrypt.c: from encrypt.c:45:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:273: note: this is the location of the previous definition
encrypt.c: 273 | #define _bswap64(a) __bswapq(a)
encrypt.c: |
encrypt.c: encrypt.c:56: warning: "_bswap" redefined
encrypt.c: 56 | #define _bswap(a) __builtin_bswap32(a)
encrypt.c: |
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/x86gprintrin.h:33,
encrypt.c: from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:27,
encrypt.c: from encrypt.c:45:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/ia32intrin.h:307: note: this is the location of the previous definition
encrypt.c: 307 | #define _bswap(a) __bswapd(a)
encrypt.c: |
encrypt.c: encrypt.c: In function 'aes256ni_setkey_encrypt':
encrypt.c: encrypt.c:74:34: warning: passing argument 1 of '_mm_loadu_si128' from incompatible pointer type [-Wincompatible-pointer-types]
encrypt.c: 74 | __m128i key0 = _mm_loadu_si128((const unsigned int *)(key+0));
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: | |
encrypt.c: | const unsigned int *
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/xmmintrin.h:1316,
encrypt.c: ...

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:86:5: warning: 'AES_set_encrypt_key' is deprecated [-Wdeprecated-declarations]
encrypt.c: AES_set_encrypt_key(k, KEYBYTES*8, &aes_key);
encrypt.c: ^
encrypt.c: /usr/include/openssl/aes.h:50:1: note: 'AES_set_encrypt_key' has been explicitly marked deprecated here
encrypt.c: OSSL_DEPRECATEDIN_3_0
encrypt.c: ^
encrypt.c: /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
encrypt.c: # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
encrypt.c: ^
encrypt.c: /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
encrypt.c: # define OSSL_DEPRECATED(since) __attribute__((deprecated))
encrypt.c: ^
encrypt.c: encrypt.c:88:5: warning: 'AES_encrypt' is deprecated [-Wdeprecated-declarations]
encrypt.c: AES_encrypt(tmp, lstar, &aes_key);
encrypt.c: ^
encrypt.c: /usr/include/openssl/aes.h:56:1: note: 'AES_encrypt' has been explicitly marked deprecated here
encrypt.c: OSSL_DEPRECATEDIN_3_0
encrypt.c: ^
encrypt.c: /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
encrypt.c: # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0)
encrypt.c: ^
encrypt.c: /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
encrypt.c: # define OSSL_DEPRECATED(since) __attribute__((deprecated))
encrypt.c: ^
encrypt.c: encrypt.c:104:9: warning: 'AES_encrypt' is deprecated [-Wdeprecated-declarations]
encrypt.c: ...

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: encrypt.c: In function 'hash':
encrypt.c: encrypt.c:86:5: warning: 'AES_set_encrypt_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
encrypt.c: 86 | AES_set_encrypt_key(k, KEYBYTES*8, &aes_key);
encrypt.c: | ^~~~~~~~~~~~~~~~~~~
encrypt.c: In file included from encrypt.c:39:
encrypt.c: /usr/include/openssl/aes.h:51:5: note: declared here
encrypt.c: 51 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
encrypt.c: | ^~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:88:5: warning: 'AES_encrypt' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
encrypt.c: 88 | AES_encrypt(tmp, lstar, &aes_key);
encrypt.c: | ^~~~~~~~~~~
encrypt.c: In file included from encrypt.c:39:
encrypt.c: /usr/include/openssl/aes.h:57:6: note: declared here
encrypt.c: 57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
encrypt.c: | ^~~~~~~~~~~
encrypt.c: encrypt.c:104:9: warning: 'AES_encrypt' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
encrypt.c: 104 | AES_encrypt(tmp, tmp, &aes_key);
encrypt.c: | ^~~~~~~~~~~
encrypt.c: In file included from encrypt.c:39:
encrypt.c: /usr/include/openssl/aes.h:57:6: note: declared here
encrypt.c: 57 | void AES_encrypt(const unsigned char *in, unsigned char *out,
encrypt.c: | ^~~~~~~~~~~
encrypt.c: encrypt.c:120:9: warning: 'AES_encrypt' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
encrypt.c: 120 | AES_encrypt(tmp, tmp, &aes_key);
encrypt.c: | ^~~~~~~~~~~
encrypt.c: ...

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

Compiler output

Implementation: T:vaes
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
ocb_vaes.c: ocb_vaes.c:476:15: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ae_init' that is compiled without support for 'ssse3'
ocb_vaes.c: tmp_blk = reverse_bytes(load128(&ctx->Lstar));
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:155:5: note: expanded from macro 'reverse_bytes'
ocb_vaes.c: _mm_shuffle_epi8(b,_mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:478:29: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ae_init' that is compiled without support for 'ssse3'
ocb_vaes.c: store128(&ctx->Ldollar, reverse_bytes(tmp_blk));
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:155:5: note: expanded from macro 'reverse_bytes'
ocb_vaes.c: _mm_shuffle_epi8(b,_mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:480:24: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ae_init' that is compiled without support for 'ssse3'
ocb_vaes.c: store128(ctx->L+0, reverse_bytes(tmp_blk));
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:155:5: note: expanded from macro 'reverse_bytes'
ocb_vaes.c: _mm_shuffle_epi8(b,_mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:483:25: error: always_inline function '_mm_shuffle_epi8' requires target feature 'ssse3', but would be inlined into function 'ae_init' that is compiled without support for 'ssse3'
ocb_vaes.c: store128(ctx->L+i, reverse_bytes(tmp_blk));
ocb_vaes.c: ^
ocb_vaes.c: ocb_vaes.c:155:5: note: expanded from macro 'reverse_bytes'
ocb_vaes.c: _mm_shuffle_epi8(b,_mm_set_epi8(0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15))
ocb_vaes.c: ^
ocb_vaes.c: 4 errors generated.

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