Implementation notes: amd64, speed2supercop, crypto_aead/lunarkeyakv2

Computer: speed2supercop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-1fc9cbf5
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: lunarkeyakv2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
51768188033 0 0192877 752 928T:SandyBridgegcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
51908180034 0 0185069 752 928T:SandyBridgegcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
51988150187 0 0154989 752 928T:Nehalemgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
52480142252 0 0147237 752 928T:Nehalemgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
52612175148 0 0179405 752 928T:SandyBridgegcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
53936164454 0 0169429 744 896T:SandyBridgegcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
54116137336 0 0141557 752 928T:Nehalemgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
55384126652 0 0131629 744 896T:Nehalemgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
73696139985 0 0144861 752 928T:generic64gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
73892133506 0 0137821 752 928T:generic64gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
76908128312 0 0131965 752 928T:generic64gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
84136147394 0 0152277 752 928T:generic64lcgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
85180139371 0 0143693 752 928T:generic64lcgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
85280113808 0 0118024 728 896T:generic64gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
85752132294 0 0135949 752 928T:generic64lcgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
93276117541 0 0121768 728 896T:generic64lcgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
19054863207 0 1665552 768 928T:referencegcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
19394479945 0 084885 752 928T:generic32gcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
19428881557 0 086501 752 928T:generic32lcgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
20234869641 0 074405 752 928T:compactgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
21413668924 0 073285 752 928T:generic32gcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
21420069992 0 074357 752 928T:generic32lcgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
22219664736 0 068445 752 928T:generic32gcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
22255265460 0 069173 752 928T:generic32lcgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
23670056519 0 060768 728 896T:generic32lcgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
23766055674 0 059928 728 896T:generic32gcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
32040052718 0 058653 752 928T:compactgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
34550849009 0 054549 752 928T:compactgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
34877241265 0 046720 728 896T:compactgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
83347658291 0 1660736 768 928T:referencegcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
89878069384 0 1671864 768 928T:reference32bitsgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
114081255925 0 1657384 768 928T:referencegcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
171118046005 0 1648552 744 896T:referencegcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
175054865650 680 595828 2256 952T:refnewg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
177469263305 584 593399 2144 952T:refg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
215553251856 584 580785 2168 952T:refg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
215837253706 680 582714 2280 952T:refnewg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
307362460644 0 1663136 768 928T:reference32bitsgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
467290857947 0 1659472 768 928T:reference32bitsgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
471852047811 0 1650432 744 896T:reference32bitsgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
503243246213 552 573535 2136 952T:refg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
505093647723 648 575078 2248 952T:refnewg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
785776822771 648 547739 1704 920T:refnewg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
806326022187 552 546876 1608 920T:refg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107

Compiler output

Implementation: T:Bulldozer
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
KeccakP-1600-XOP.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/x86intrin.h:38,
KeccakP-1600-XOP.c: from KeccakP-1600-XOP.c:32:
KeccakP-1600-XOP.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/xopintrin.h: In function 'KeccakP1600_Permute_12rounds':
KeccakP-1600-XOP.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/xopintrin.h:272:1: error: inlining failed in call to 'always_inline' '_mm_roti_epi64': target specific option mismatch
KeccakP-1600-XOP.c: 272 | _mm_roti_epi64(__m128i __A, const int __B)
KeccakP-1600-XOP.c: | ^~~~~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-XOP.c:60:29: note: called from here
KeccakP-1600-XOP.c: 60 | #define ROL6464same(a, o) _mm_roti_epi64(a, o)
KeccakP-1600-XOP.c: | ^~~~~~~~~~~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-XOP.c:250:13: note: in expansion of macro 'ROL6464same'
KeccakP-1600-XOP.c: 250 | Bsusa = ROL6464same(Bsusa, 2); \
KeccakP-1600-XOP.c: | ^~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-XOP.c:270:36: note: in expansion of macro 'thetaRhoPiChiIotaPrepareTheta'
KeccakP-1600-XOP.c: 270 | #define thetaRhoPiChiIota(i, A, E) thetaRhoPiChiIotaPrepareTheta(i, A, E)
KeccakP-1600-XOP.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-unrolling.macros:57:5: note: in expansion of macro 'thetaRhoPiChiIota'
KeccakP-1600-XOP.c: 57 | thetaRhoPiChiIota(23, E, A) \
KeccakP-1600-XOP.c: | ^~~~~~~~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-XOP.c:402:5: note: in expansion of macro 'rounds12'
KeccakP-1600-XOP.c: 402 | rounds12
KeccakP-1600-XOP.c: | ^~~~~~~~
KeccakP-1600-XOP.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/xopintrin.h:245:1: error: inlining failed in call to 'always_inline' '_mm_rot_epi64': target specific option mismatch
KeccakP-1600-XOP.c: 245 | _mm_rot_epi64(__m128i __A, __m128i __B)
KeccakP-1600-XOP.c: | ^~~~~~~~~~~~~
KeccakP-1600-XOP.c: KeccakP-1600-XOP.c:61:29: note: called from here
KeccakP-1600-XOP.c: ...

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

Compiler output

Implementation: T:Haswell
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_lunarkeyakv2.a(KeccakP-1600-AVX2.o): relocation R_X86_64_32 against symbol `keccak_rc' can not be used when making a PIE object; recompile with -fPIE
try.c: /usr/bin/ld: failed to set dynamic section sizes: bad value
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: T:KnightsLanding
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c: In function 'KeccakP1600_Permute_12rounds':
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:292:17: warning: AVX512F vector return without AVX512F enabled changes the ABI [-Wpsabi]
KeccakP-1600-AVX512.c: 292 | V512 moveThetaPrev = _mm512_setr_epi64(4, 0, 1, 2, 3, 5, 6, 7); \
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~~~
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:476:5: note: in expansion of macro 'KeccakP_DeclareVars'
KeccakP-1600-AVX512.c: 476 | KeccakP_DeclareVars
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~~~~~~~~~
KeccakP-1600-AVX512.c: In file included from /usr/lib/gcc/x86_64-linux-gnu/12/include/immintrin.h:49,
KeccakP-1600-AVX512.c: from KeccakP-1600-AVX512.c:26:
KeccakP-1600-AVX512.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h:6482:1: error: inlining failed in call to 'always_inline' '_mm512_mask_storeu_epi64': target specific option mismatch
KeccakP-1600-AVX512.c: 6482 | _mm512_mask_storeu_epi64 (void *__P, __mmask8 __U, __m512i __A)
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:213:49: note: called from here
KeccakP-1600-AVX512.c: 213 | #define STORE_Plane(a,v) _mm512_mask_storeu_epi64( a, 0x1F, v)
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:322:5: note: in expansion of macro 'STORE_Plane'
KeccakP-1600-AVX512.c: 322 | STORE_Plane(pState+20, Saeiou);
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:484:5: note: in expansion of macro 'copyToState'
KeccakP-1600-AVX512.c: 484 | copyToState(stateAsLanes);
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~
KeccakP-1600-AVX512.c: /usr/lib/gcc/x86_64-linux-gnu/12/include/avx512fintrin.h:6482:1: error: inlining failed in call to 'always_inline' '_mm512_mask_storeu_epi64': target specific option mismatch
KeccakP-1600-AVX512.c: 6482 | _mm512_mask_storeu_epi64 (void *__P, __mmask8 __U, __m512i __A)
KeccakP-1600-AVX512.c: | ^~~~~~~~~~~~~~~~~~~~~~~~
KeccakP-1600-AVX512.c: KeccakP-1600-AVX512.c:213:49: note: called from here
KeccakP-1600-AVX512.c: ...

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

Compiler output

Implementation: T:asmX86-64
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_lunarkeyakv2.a(KeccakP-1600-x86-64-gas.o): relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIE
try.c: /usr/bin/ld: failed to set dynamic section sizes: bad value
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: T:asmX86-64shld
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_lunarkeyakv2.a(KeccakP-1600-x86-64-shld-gas.o): relocation R_X86_64_32S against `.text' can not be used when making a PIE object; recompile with -fPIE
try.c: /usr/bin/ld: failed to set dynamic section sizes: bad value
try.c: collect2: error: ld returned 1 exit status

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

Compiler output

Implementation: T:ref
Security model: timingleaks
Compiler: g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
Keyakv2.cpp: In file included from Keyakv2.h:21,
Keyakv2.cpp: from Keyakv2.cpp:16:
Keyakv2.cpp: Motorist.h:31:5: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
Keyakv2.cpp: 31 | auto_ptr<UINT8> state;
Keyakv2.cpp: | ^~~~~~~~
Keyakv2.cpp: In file included from /usr/include/c++/12/memory:76,
Keyakv2.cpp: from Motorist.h:20:
Keyakv2.cpp: /usr/include/c++/12/bits/unique_ptr.h:64:28: note: declared here
Keyakv2.cpp: 64 | template<typename> class auto_ptr;
Keyakv2.cpp: | ^~~~~~~~
Motorist.cpp: In file included from Motorist.cpp:17:
Motorist.cpp: Motorist.h:31:5: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
Motorist.cpp: 31 | auto_ptr<UINT8> state;
Motorist.cpp: | ^~~~~~~~
Motorist.cpp: In file included from /usr/include/c++/12/memory:76,
Motorist.cpp: from Motorist.h:20:
Motorist.cpp: /usr/include/c++/12/bits/unique_ptr.h:64:28: note: declared here
Motorist.cpp: 64 | template<typename> class auto_ptr;
Motorist.cpp: | ^~~~~~~~
encrypt.cpp: In file included from Keyakv2.h:21,
encrypt.cpp: from encrypt.cpp:22:
encrypt.cpp: Motorist.h:31:5: warning: 'template<class> class std::auto_ptr' is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
encrypt.cpp: 31 | auto_ptr<UINT8> state;
encrypt.cpp: | ^~~~~~~~
encrypt.cpp: In file included from /usr/include/c++/12/memory:76,
encrypt.cpp: from Motorist.h:20:
encrypt.cpp: /usr/include/c++/12/bits/unique_ptr.h:64:28: note: declared here
encrypt.cpp: 64 | template<typename> class auto_ptr;
encrypt.cpp: | ^~~~~~~~

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