Implementation notes: amd64, h4e450, crypto_aead/morus1280256v2

Computer: h4e450
Architecture: amd64
CPU ID: AuthenticAMD-00500f20-178bfbff
SUPERCOP version: 20200618
Operation: crypto_aead
Primitive: morus1280256v2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
2355511876 0 024660 776 928refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
2356511833 0 024676 776 928refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
2453917211 0 032645 784 928ref64gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
2471914030 0 029437 784 928refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
3049513242 0 027648 760 856sse2clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
376535844 0 018652 776 928ref64gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
383145857 0 018716 776 928ref64gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
401855378 0 017296 760 896ref64gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
4527711021 0 026429 784 928sse2gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
474963740 0 016629 784 928sse2gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
488063916 0 016853 784 928sse2gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020041220200409
4894913263 0 025952 760 856sse2clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
4896313263 0 025952 760 856sse2clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
4898613263 0 027360 760 856sse2clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
650946803 0 021296 760 856ref64clang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
673403562 0 015038 752 856sse2clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
1017076868 0 019640 760 856ref64clang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
1018786868 0 019640 760 856ref64clang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
1019496916 0 021096 760 856ref64clang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409
1042865506 0 016990 752 856ref64clang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020041220200409

Compiler output

Implementation: avx2
Security model: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:67:13: error: always_inline function '_mm256_xor_si256' requires target feature 'xsave', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'xsave'
encrypt.c: state[0] = XOR256(state[0], state[3]);
encrypt.c: ^
encrypt.c: encrypt.c:22: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:68:13: error: always_inline function '_mm256_xor_si256' requires target feature 'xsave', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'xsave'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:22: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:68:30: error: always_inline function '_mm256_and_si256' requires target feature 'xsave', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'xsave'
encrypt.c: state[0] = XOR256(state[0], AND256(state[1], state[2]));
encrypt.c: ^
encrypt.c: encrypt.c:23: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:69:13: error: always_inline function '_mm256_or_si256' requires target feature 'xsave', but would be inlined into function 'morus_stateupdate' that is compiled without support for 'xsave'
encrypt.c: state[0] = ROTL256(state[0], n1);
encrypt.c: ^
encrypt.c: encrypt.c:36:27: 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:25:27: note: expanded from macro 'OR256'
encrypt.c: ...

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

Compiler output

Implementation: avx2
Security model: unknown
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.c: encrypt.c:67: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:22: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:68: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:22: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:68: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:23: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:69:13: error: always_inline function '_mm256_or_si256' 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:36:27: 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:25:27: note: expanded from macro 'OR256'
encrypt.c: ...

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

Compiler output

Implementation: avx2
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.c: encrypt.c: In function 'morus_stateupdate':
encrypt.c: encrypt.c:65:6: note: The ABI for passing parameters with 32-byte alignment has changed in GCC 4.6
encrypt.c: void morus_stateupdate(__m256i msgblk, __m256i *state)
encrypt.c: ^~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:67:11: warning: AVX vector return without AVX enabled changes the ABI [-Wpsabi]
encrypt.c: state[0] = XOR256(state[0], state[3]);
encrypt.c: ^
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:43:0,
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/7/include/avx2intrin.h:1068:1: error: inlining failed in call to always_inline '_mm256_permute4x64_epi64': target specific option mismatch
encrypt.c: _mm256_permute4x64_epi64 (__m256i __X, const int __M)
encrypt.c: ^~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:38:27: note: called from here
encrypt.c: #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:217:13: note: in expansion of macro 'ROTL256_64'
encrypt.c: state[2] = ROTL256_64(state[2]);
encrypt.c: ^~~~~~~~~~
encrypt.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/7/include/immintrin.h:43:0,
encrypt.c: from encrypt.c:2:
encrypt.c: /usr/lib/gcc/x86_64-linux-gnu/7/include/avx2intrin.h:574:1: error: inlining failed in call to always_inline '_mm256_or_si256': target specific option mismatch
encrypt.c: _mm256_or_si256 (__m256i __A, __m256i __B)
encrypt.c: ^~~~~~~~~~~~~~~
encrypt.c: encrypt.c:25:27: note: called from here
encrypt.c: ...

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

Compiler output

Implementation: ref
Security model: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_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: 4, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref

Compiler output

Implementation: ref
Security model: unknown
Compiler: clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_dec_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_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: 1, namely:
CompilerImplementations
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref

Compiler output

Implementation: ref
Security model: unknown
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_initialization':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_tag_generation':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_tag_verification':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_enc_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `morus_dec_aut_partialblock':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_stateupdate'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `crypto_aead_morus1280256v2_ref_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `crypto_aead_morus1280256v2_ref_decrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: 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 ref

Compiler output

Implementation: sse2
Security model: unknown
Compiler: gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `crypto_aead_morus1280256v2_sse2_encrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: crypto_aead_morus1280256v2.a(encrypt.o): In function `crypto_aead_morus1280256v2_sse2_decrypt':
try.c: encrypt.c:(.text+0x...): undefined reference to `morus_enc_aut_step'
try.c: 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 sse2

Namespace violations

Implementation: ref
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
encrypt.o morus_dec_aut_partialblock T
encrypt.o morus_enc_aut_partialblock T
encrypt.o morus_initialization T
encrypt.o morus_tag_generation T
encrypt.o morus_tag_verification T

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

Namespace violations

Implementation: ref64
Security model: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.o morus_dec_aut_partialblock T
encrypt.o morus_dec_aut_step T
encrypt.o morus_enc_aut_partialblock T
encrypt.o morus_enc_aut_step T
encrypt.o morus_initialization T
encrypt.o morus_stateupdate T
encrypt.o morus_tag_generation T
encrypt.o morus_tag_verification T

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

Namespace violations

Implementation: sse2
Security model: unknown
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
encrypt.o morus_dec_aut_partialblock T
encrypt.o morus_enc_aut_partialblock T
encrypt.o morus_initialization T
encrypt.o morus_stateupdate T
encrypt.o morus_tag_generation T
encrypt.o morus_tag_verification T

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