Implementation notes: amd64, hydra8, crypto_aead/morus1280256v2

Computer: hydra8
Microarchitecture: amd64; Ivy Bridge+AES (306a9)
Architecture: amd64
CPU ID: GenuineIntel-000306a9-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: morus1280256v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
696410053 0 025848 860 1024T:sse2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
697510069 0 027808 860 1024T:sse2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
698310845 0 024776 860 1024T:sse2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
838312154 0 028528 860 1024T:sse2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
102826876 0 023428 812 1088T:sse2gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
107063630 0 017210 852 1024T:sse2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
107213644 0 018964 812 1088T:sse2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
112193763 0 018828 812 1088T:sse2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1333516334 0 032908 812 1088T:ref64gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
1337613101 0 029644 812 1088T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
224435856 0 020835 804 1088T:ref64gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
225845982 0 021324 812 1088T:ref64gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
232205511 0 019223 788 1056T:ref64gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023121320231212
250526698 0 023144 860 1024T:ref64clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
262226836 0 024656 860 1024T:ref64clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
263036836 0 022712 860 1024T:ref64clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
263555438 0 019042 852 1024T:ref64clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212
279727295 0 021312 860 1024T:ref64clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2023121320231212

Compiler output

Implementation: T:avx2
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], state[3]);
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:26:27: note: expanded from macro 'AND256'
encrypt.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.c: state[0] = ROTL256(state[0], n1);
encrypt.c: ^
encrypt.c: encrypt.c:39:34: note: expanded from macro 'ROTL256'
encrypt.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*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.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
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], state[3]);
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:70:13: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:26:27: note: expanded from macro 'AND256'
encrypt.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.c:71:30: error: AVX vector argument of type '__m256i' (vector of 4 'long long' values) without 'avx' enabled changes the ABI
encrypt.c: encrypt.c:26:27: note: expanded from macro 'AND256'
encrypt.c: #define AND256(x,y) _mm256_and_si256((x),(y)) /*AND(x,y) = x & y, where x and y are two 256-bit word*/
encrypt.c: ^
encrypt.c: encrypt.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'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:25:27: note: expanded from macro 'XOR256'
encrypt.c: #define XOR256(x,y) _mm256_xor_si256((x),(y)) /*XOR256(x,y) = x ^ y, where x and y are two 256-bit word*/
encrypt.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
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from encrypt.c:2:
encrypt.c: encrypt.c: In function 'morus_enc_aut_step':
encrypt.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
encrypt.c: 1071 | _mm256_permute4x64_epi64 (__m256i __X, const int __M)
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:41:27: note: called from here
encrypt.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*/
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:220:20: note: in expansion of macro 'ROTL256_64'
encrypt.c: 220 | state[2] = ROTL256_64(state[2]);
encrypt.c: | ^~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:47,
encrypt.c: from encrypt.c:2:
encrypt.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
encrypt.c: 574 | _mm256_or_si256 (__m256i __A, __m256i __B)
encrypt.c: | ^~~~~~~~~~~~~~~
encrypt.c: encrypt.c:28:27: note: called from here
encrypt.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*/
encrypt.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:39:27: note: in expansion of macro 'OR256'
encrypt.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*/
encrypt.c: | ^~~~~
encrypt.c: encrypt.c:219:20: note: in expansion of macro 'ROTL256'
encrypt.c: 219 | state[4] = ROTL256(state[4], n5);
encrypt.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.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_morus1280256v2.a(encrypt.o): in function `crypto_aead_morus1280256v2_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_morus1280256v2.a(encrypt.o): in function `crypto_aead_morus1280256v2_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_morus1280256v2.a(encrypt.o): in function `crypto_aead_morus1280256v2_sse2_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_morus1280256v2.a(encrypt.o): in function `crypto_aead_morus1280256v2_sse2_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:sse2