Implementation notes: amd64, saber214, crypto_aead/morus1280256v1

Computer: saber214
Microarchitecture: amd64; Bulldozer (600f20)
Architecture: amd64
CPU ID: AuthenticAMD-00600f20-1789c3f5
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: morus1280256v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
71508829 0 023468 816 856T:sse2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
71708845 0 025876 816 872T:sse2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
833612362 0 028260 816 856T:sse2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
1089810089 0 023468 816 856T:sse2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
127633554 0 016574 808 856T:sse2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
129856781 0 022965 784 928T:sse2gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
139303779 0 018285 784 928T:sse2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
139763652 0 018381 784 928T:sse2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
1730211949 0 028125 784 928T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
1735615166 0 031365 784 928T:ref64gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
273395958 0 020701 784 928T:ref64gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
273435081 0 018118 808 856T:ref64clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
273545515 0 018712 760 896T:ref64gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
274976234 0 020956 816 856T:ref64clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
277216234 0 023348 816 872T:ref64clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
281276754 0 022740 816 856T:ref64clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212
283355869 0 020284 776 928T:ref64gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121420231212
315897147 0 020612 816 856T:ref64clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121420231212

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
morus1280256v1avx2.c: morus1280256v1avx2.c:70:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], state[3]);
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:25:27: note: expanded from macro 'XOR256'
morus1280256v1avx2.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:71:30: error: always_inline function '_mm256_and_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:26:27: note: expanded from macro 'AND256'
morus1280256v1avx2.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:71:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:25:27: note: expanded from macro 'XOR256'
morus1280256v1avx2.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:72:13: error: always_inline function '_mm256_slli_epi64' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = ROTL256(state[0], n1);
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:39:34: note: expanded from macro 'ROTL256'
morus1280256v1avx2.c: #define ROTL256(x,n) OR256( _mm256_slli_epi64((x), (n)), _mm256_srli_epi64((x),(64-n)) ) /*Rotate 4 64-bit unsigned integers in x to the left by n-bit positions*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:72:13: error: always_inline function '_mm256_srli_epi64' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: ...

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
morus1280256v1avx2.c: morus1280256v1avx2.c:70:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], state[3]);
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:25:27: note: expanded from macro 'XOR256'
morus1280256v1avx2.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:70:13: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
morus1280256v1avx2.c: morus1280256v1avx2.c:25:27: note: expanded from macro 'XOR256'
morus1280256v1avx2.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:71:30: error: always_inline function '_mm256_and_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:26:27: note: expanded from macro 'AND256'
morus1280256v1avx2.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:71:30: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
morus1280256v1avx2.c: morus1280256v1avx2.c:26:27: note: expanded from macro 'AND256'
morus1280256v1avx2.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:71:13: error: always_inline function '_mm256_xor_si256' requires target feature 'avx2', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'avx2'
morus1280256v1avx2.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
morus1280256v1avx2.c: ^
morus1280256v1avx2.c: morus1280256v1avx2.c:25:27: note: expanded from macro 'XOR256'
morus1280256v1avx2.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: ...

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

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
morus1280256v1avx2.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
morus1280256v1avx2.c: from morus1280256v1avx2.c:2:
morus1280256v1avx2.c: morus1280256v1avx2.c: In function 'morus_enc_aut_step':
morus1280256v1avx2.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:1071:1: error: inlining failed in call to 'always_inline' '_mm256_permute4x64_epi64': target specific option mismatch
morus1280256v1avx2.c: 1071 | _mm256_permute4x64_epi64 (__m256i __X, const int __M)
morus1280256v1avx2.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
morus1280256v1avx2.c: morus1280256v1avx2.c:41:27: note: called from here
morus1280256v1avx2.c: 41 | #define ROTL256_64(x) _mm256_permute4x64_epi64((x), _MM_SHUFFLE(2,1,0,3)) /*Rotate x by 64-bit positions to the left*/
morus1280256v1avx2.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
morus1280256v1avx2.c: morus1280256v1avx2.c:219:20: note: in expansion of macro 'ROTL256_64'
morus1280256v1avx2.c: 219 | state[2] = ROTL256_64(state[2]);
morus1280256v1avx2.c: | ^~~~~~~~~~
morus1280256v1avx2.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
morus1280256v1avx2.c: from morus1280256v1avx2.c:2:
morus1280256v1avx2.c: /usr/lib/gcc/x86_64-linux-gnu/11/include/avx2intrin.h:574:1: error: inlining failed in call to 'always_inline' '_mm256_or_si256': target specific option mismatch
morus1280256v1avx2.c: 574 | _mm256_or_si256 (__m256i __A, __m256i __B)
morus1280256v1avx2.c: | ^~~~~~~~~~~~~~~
morus1280256v1avx2.c: morus1280256v1avx2.c:28:27: note: called from here
morus1280256v1avx2.c: 28 | #define OR256(x,y) _mm256_or_si256((x),(y)) /*OR(x,y) = x | y, where x and y are two 256-bit word*/
morus1280256v1avx2.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
morus1280256v1avx2.c: morus1280256v1avx2.c:39:27: note: in expansion of macro 'OR256'
morus1280256v1avx2.c: 39 | #define ROTL256(x,n) OR256( _mm256_slli_epi64((x), (n)), _mm256_srli_epi64((x),(64-n)) ) /*Rotate 4 64-bit unsigned integers in x to the left by n-bit positions*/
morus1280256v1avx2.c: | ^~~~~
morus1280256v1avx2.c: morus1280256v1avx2.c:218:20: note: in expansion of macro 'ROTL256'
morus1280256v1avx2.c: 218 | state[4] = ROTL256(state[4], n5);
morus1280256v1avx2.c: ...

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o):encrypt.c:(.text+0x...): more undefined references to `morus_stateupdate' follow
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (compiler,implementation) pairs: 3, 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 -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ref

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_dec_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: clang: error: linker command failed with exit code 1 (use -v to see invocation)

Number of similar (compiler,implementation) pairs: 2, namely:
CompilerImplementations
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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_dec_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o):encrypt.c:(.text+0x...): more undefined references to `morus_stateupdate' follow
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `morus_dec_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `crypto_aead_morus1280256v1_ref_timingleaks_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(encrypt.o): in function `crypto_aead_morus1280256v1_ref_timingleaks_decrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: encrypt.c:(.text+0x...): undefined reference to `morus_dec_aut_step'
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: T:sse2
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(morus1280256v1sse2.o): in function `crypto_aead_morus1280256v1_sse2_timingleaks_encrypt':
try.c: morus1280256v1sse2.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: morus1280256v1sse2.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: libcrypto_aead_morus1280256v1.a(morus1280256v1sse2.o): in function `crypto_aead_morus1280256v1_sse2_timingleaks_decrypt':
try.c: morus1280256v1sse2.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: /usr/bin/ld: morus1280256v1sse2.c:(.text+0x...): undefined reference to `morus_dec_aut_step'
try.c: collect2: error: ld returned 1 exit status

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