Implementation notes: amd64, speed2supercop, crypto_aead/lacv1

Computer: speed2supercop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_aead
Primitive: lacv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
5220687785 16 025335 824 872T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
5232887865 16 024023 824 856T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
5234007769 16 025127 824 872T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
5730166045 16 021846 784 928T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
15497003624 16 017856 816 920T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
18299364352 16 018158 784 928T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
19108044965 16 018359 824 856T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
21229364583 16 018085 776 928T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625
30186163425 16 015721 760 896T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070320240625

Compiler output


encrypt.c: In function 'padding',
encrypt.c:     inlined from 'crypto_aead_lacv1_ref_timingleaks_encrypt' at encrypt.c:426:3:
encrypt.c: encrypt.c:25:28: warning: array subscript -5 is outside array bounds of 'unsigned char[0]' [-Warray-bounds=]
encrypt.c:    25 |          xpad[xpadlen - 5] = ((xlen * 8) >> 32) & 0xff;
encrypt.c:       |          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c: In function 'crypto_aead_lacv1_ref_timingleaks_encrypt':
encrypt.c: encrypt.c:425:41: note: at offset -5 into object of size 0 allocated by 'malloc'
encrypt.c:   425 |                 mpad = (unsigned char *)malloc(mpadlen);        //the array to store padded message(mpad bytes)
encrypt.c:       |                                         ^~~~~~~~~~~~~~~
encrypt.c: In function 'padding',
encrypt.c:     inlined from 'crypto_aead_lacv1_ref_timingleaks_encrypt' at encrypt.c:426:3:
encrypt.c: encrypt.c:26:28: warning: array subscript -4 is outside array bounds of 'unsigned char[0]' [-Warray-bounds=]
encrypt.c:    26 |          xpad[xpadlen - 4] = ((xlen * 8) >> 24) & 0xff;
encrypt.c:       |          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c: In function 'crypto_aead_lacv1_ref_timingleaks_encrypt':
encrypt.c: encrypt.c:425:41: note: at offset -4 into object of size 0 allocated by 'malloc'
encrypt.c:   425 |                 mpad = (unsigned char *)malloc(mpadlen);        //the array to store padded message(mpad bytes)
encrypt.c:       |                                         ^~~~~~~~~~~~~~~
encrypt.c: In function 'padding',
encrypt.c:     inlined from 'crypto_aead_lacv1_ref_timingleaks_encrypt' at encrypt.c:426:3:
encrypt.c: encrypt.c:27:28: warning: array subscript -3 is outside array bounds of 'unsigned char[0]' [-Warray-bounds=]
encrypt.c:    27 |          xpad[xpadlen - 3] = ((xlen * 8) >> 16) & 0xff;
encrypt.c:       |          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c: In function 'crypto_aead_lacv1_ref_timingleaks_encrypt':
encrypt.c: encrypt.c:425:41: note: at offset -3 into object of size 0 allocated by 'malloc'
encrypt.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:refgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)

Compiler output


encrypt.c: encrypt.c: In function 'crypto_aead_lacv1_ref_timingleaks_decrypt':
encrypt.c: encrypt.c:619:57: warning: 'mpad' may be used uninitialized [-Wmaybe-uninitialized]
encrypt.c:   619 |                                 datastate[j + 2] ^= mpad[i + j];
encrypt.c:       |                                                         ^
encrypt.c: encrypt.c:524:24: note: 'mpad' was declared here
encrypt.c:   524 |         unsigned char *mpad;
encrypt.c:       |                        ^~~~

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)