Implementation notes: amd64, r24000, crypto_aead/kiasueq128v1

Computer: r24000
Microarchitecture: amd64; Coffee Lake (906ea)
Architecture: amd64
CPU ID: GenuineIntel-000906ea-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_aead
Primitive: kiasueq128v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
709527401 0 051687 812 1072T:optgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
711021297 0 042870 804 1072T:optgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
720420982 0 042358 804 1072T:optgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
757420927 0 040850 788 1040T:optgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
908927999 0 050781 804 1040T:optclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
909027999 0 050781 804 1040T:optclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
912428031 0 050701 804 1040T:optclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
924424220 0 043415 796 1008T:optclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9159061717 352 079005 1172 1040T:bitsliceclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9159161717 352 079005 1172 1040T:bitsliceclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9159762165 352 079341 1172 1040T:bitsliceclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9160557503 352 071093 1156 1008T:bitsliceclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
9182359973 352 076205 1172 1008T:bitsliceclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
23976730352 0 048239 812 1072T:refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
24822026394 0 043437 804 1040T:refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
24914924657 0 040749 804 1008T:refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
25093525546 0 042701 804 1040T:refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
25735325546 0 042701 804 1040T:refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
26349721250 0 034767 796 1008T:refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024011420240107
26627523185 0 038358 804 1072T:refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
27379321212 0 035290 788 1040T:refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107
28087322189 0 037334 804 1072T:refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024011420240107

Compiler output

Implementation: T:bitslice
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: libcrypto_aead_kiasueq128v1.a(aes_tweaked.o): relocation R_X86_64_32S against symbol `M0' can not be used when making a PIE object; recompile with -fPIE
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:bitslice
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:bitslice
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:bitslice
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:bitslice

Compiler output

Implementation: T:opt
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
kiasu.c: kiasu.c:119:45: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion]
kiasu.c: const __m128i MSB_XLS1 = constant8( (0x8<<4),0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 );
kiasu.c: ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kiasu.c: ./aes_ni.macros:13:171: note: expanded from macro 'constant8'
kiasu.c: #define constant8(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) _mm_set_epi8 ((b0),(b1),(b2),(b3),(b4),(b5),(b6),(b7),(b8),(b9),(b10),(b11),(b12),(b13),(b14),(b15))
kiasu.c: ~~~~~~~~~~~~ ^~~
kiasu.c: kiasu.c:120:45: warning: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Wconstant-conversion]
kiasu.c: const __m128i MSB_XLS2 = constant8( (0x9<<4),0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 );
kiasu.c: ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kiasu.c: ./aes_ni.macros:13:171: note: expanded from macro 'constant8'
kiasu.c: #define constant8(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) _mm_set_epi8 ((b0),(b1),(b2),(b3),(b4),(b5),(b6),(b7),(b8),(b9),(b10),(b11),(b12),(b13),(b14),(b15))
kiasu.c: ~~~~~~~~~~~~ ^~~
kiasu.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:opt
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opt

Compiler output

Implementation: T:opt
Security model: timingleaks
Compiler: clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
kiasu.c: kiasu.c:119:45: warning: implicit conversion from 'int' to 'char' changes value from 128 to -128 [-Wconstant-conversion]
kiasu.c: const __m128i MSB_XLS1 = constant8( (0x8<<4),0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 );
kiasu.c: ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kiasu.c: ./aes_ni.macros:13:171: note: expanded from macro 'constant8'
kiasu.c: #define constant8(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) _mm_set_epi8 ((b0),(b1),(b2),(b3),(b4),(b5),(b6),(b7),(b8),(b9),(b10),(b11),(b12),(b13),(b14),(b15))
kiasu.c: ~~~~~~~~~~~~ ^~~
kiasu.c: kiasu.c:120:45: warning: implicit conversion from 'int' to 'char' changes value from 144 to -112 [-Wconstant-conversion]
kiasu.c: const __m128i MSB_XLS2 = constant8( (0x9<<4),0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00 );
kiasu.c: ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
kiasu.c: ./aes_ni.macros:13:171: note: expanded from macro 'constant8'
kiasu.c: #define constant8(b15,b14,b13,b12,b11,b10,b9,b8,b7,b6,b5,b4,b3,b2,b1,b0) _mm_set_epi8 ((b0),(b1),(b2),(b3),(b4),(b5),(b6),(b7),(b8),(b9),(b10),(b11),(b12),(b13),(b14),(b15))
kiasu.c: ~~~~~~~~~~~~ ^~~
kiasu.c: kiasu.c:133:12: error: always_inline function '_mm_aesimc_si128' requires target feature 'aes', but would be inlined into function 'XLS' that is compiled without support for 'aes'
kiasu.c: dTweak = mc_inv(Tweak);
kiasu.c: ^
kiasu.c: ./aes_ni.macros:5:23: note: expanded from macro 'mc_inv'
kiasu.c: #define mc_inv(a) _mm_aesimc_si128(a)
kiasu.c: ^
kiasu.c: kiasu.c:135:22: error: always_inline function '_mm_aesenc_si128' requires target feature 'aes', but would be inlined into function 'XLS' that is compiled without support for 'aes'
kiasu.c: if( Direction){ AES( State , subkeys , Tweak ); }
kiasu.c: ^
kiasu.c: ./aes_ni.macros:21:5: note: expanded from macro 'AES'
kiasu.c: s = enc( s , xor( subkeys[1] , tw ) );\
kiasu.c: ^
kiasu.c: ./aes_ni.macros:1:18: note: expanded from macro 'enc'
kiasu.c: ...

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

Namespace violations

Implementation: T:bitslice
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
aes_tweaked.o BS0 D
aes_tweaked.o BS1 D
aes_tweaked.o BS2 D
aes_tweaked.o CSTTWA D
aes_tweaked.o CSTTWB D
aes_tweaked.o CSTTWC D
aes_tweaked.o CTRINC1 D
aes_tweaked.o CTRINC2 D
aes_tweaked.o CTRINC3 D
aes_tweaked.o CTRINC4 D
aes_tweaked.o CTRINC5 D
aes_tweaked.o CTRINC6 D
aes_tweaked.o CTRINC7 D
aes_tweaked.o EXPB0 D
aes_tweaked.o ISR D
aes_tweaked.o ISRM0 D
aes_tweaked.o M0 D
aes_tweaked.o ONE D
aes_tweaked.o RCON D
aes_tweaked.o ROTB D
aes_tweaked.o SR D
aes_tweaked.o SRM0 D
aes_tweaked.o jean_ecb_decrypt T
aes_tweaked.o jean_tweaksetup T
aes_tweaked.o kasper_ecb_encrypt T
aes_tweaked.o kasper_keysetup T
kiasu.o AES_set_encrypt_key T
kiasu.o AES_set_tweak T
kiasu.o XLS T
kiasu.o getUnpaddedLength T
kiasu.o kiasu_aead_decrypt T
kiasu.o kiasu_aead_encrypt T
kiasu.o mix T
kiasu.o printBlock T
kiasu.o set_block_number_in_tweak T
kiasu.o set_nonce_in_tweak T
kiasu.o set_stage_in_tweak T

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

Namespace violations

Implementation: T:opt
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
kiasu.o XLS T
kiasu.o kiasu_aead_decrypt T
kiasu.o kiasu_aead_encrypt T
kiasu.o mix T

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

Namespace violations

Implementation: T:ref
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
kiasu.o XLS T
kiasu.o getUnpaddedLength T
kiasu.o kiasu_aead_decrypt T
kiasu.o kiasu_aead_encrypt T
kiasu.o mix T
kiasu.o set_block_number_in_tweak T
kiasu.o set_nonce_in_tweak T
kiasu.o set_stage_in_tweak T
tweakable_aes.o aesTweakDecrypt T
tweakable_aes.o aesTweakEncrypt T

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