Implementation notes: amd64, intelnuci8, crypto_aead/kiasueq128v1

Computer: intelnuci8
Architecture: amd64
CPU ID: GenuineIntel-000906e9-bfebfbff
SUPERCOP version: 20191221
Operation: crypto_aead
Primitive: kiasueq128v1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
786927558 0 047805 784 928optgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
787721398 0 038236 776 928optgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
803020275 0 036900 776 928optgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
820820727 0 036024 760 896optgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
891128408 0 047001 776 872optclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
900828376 0 046953 776 872optclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
901028376 0 046953 776 872optclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
903424500 0 039407 768 856optclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
9139661845 352 077353 1144 872bitsliceclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
9142462189 352 077713 1144 872bitsliceclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
9143160135 352 074769 1144 856bitsliceclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
9182661845 352 077353 1144 872bitsliceclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
9270957473 352 069213 1128 856bitsliceclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
24518130445 0 046717 784 928refgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
24797425450 0 039929 776 856refclang_-mcpu=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
25437027061 0 042433 776 872refclang_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
26235426333 0 041689 776 872refclang_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
26317021139 0 032791 768 856refclang_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
27029422543 0 035428 776 928refgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
27382326333 0 041689 776 872refclang_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2020011320191221
27730220887 0 032808 760 896refgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221
28648122103 0 035028 776 928refgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2020011320191221

Compiler output

Implementation: bitslice
Security model: unknown
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
try.c: /usr/bin/ld: crypto_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 -fPIC
try.c: /usr/bin/ld: final link failed: Nonrepresentable section on output
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 bitslice
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE bitslice
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE bitslice
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE bitslice

Compiler output

Implementation: opt
Security model: unknown
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 opt
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt

Compiler output

Implementation: opt
Security model: unknown
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 opt

Namespace violations

Implementation: bitslice
Security model: unknown
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 bitslice
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE bitslice
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE bitslice
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE bitslice
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE bitslice

Namespace violations

Implementation: opt
Security model: unknown
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 opt
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE opt
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE opt
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE opt
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE opt
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE opt

Namespace violations

Implementation: ref
Security model: unknown
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 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 -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE ref
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
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE ref