Implementation notes: amd64, samba, crypto_aead/lacv1

Computer: samba
Microarchitecture: amd64; Skylake (506e3)
Architecture: amd64
CPU ID: GenuineIntel-000506e3-bfebfbff
SUPERCOP version: 20240716
Operation: crypto_aead
Primitive: lacv1
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
4726997579 16 024044 876 1024T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
4762127723 16 025428 876 1056T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
4888167739 16 025740 876 1088T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
18903095152 16 020470 836 1088T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
18920034851 16 018820 876 1024T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
19390714928 16 019821 828 1088T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
21336964046 16 018814 868 1088T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
28018003878 16 017521 812 1056T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716

Compiler output


encrypt.c: encrypt.c: In function 'crypto_aead_lacv1_ref_timingleaks_encrypt':
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:425:41: note: referencing an 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: 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:425:41: note: referencing an 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: 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:425:41: note: referencing an 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: encrypt.c:28:28: warning: array subscript -2 is outside array bounds of 'unsigned char[0]' [-Warray-bounds]
encrypt.c:    28 |          xpad[xpadlen - 2] = ((xlen * 8) >>  8) & 0xff;
encrypt.c:       |          ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
encrypt.c: encrypt.c:425:41: note: referencing an 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: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:refgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.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 in this function [-Wmaybe-uninitialized]
encrypt.c:   619 |                                 datastate[j + 2] ^= mpad[i + j];
encrypt.c:       |                                                         ^

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

Namespace violations


encrypt.o E T
encrypt.o G T
encrypt.o Gleak T
encrypt.o KS T
encrypt.o S D
encrypt.o key_sched_LBlocks T
encrypt.o padding T

Number of similar (implementation,compiler) pairs: 8, namely:
ImplementationCompiler
T:refclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
T:refgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:refgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)