Implementation notes: aarch64, pi4b, crypto_stream/lexv2

Computer: pi4b
Microarchitecture: aarch64; Cortex-A72 (410fd083)
Architecture: aarch64
CPU ID: 410fd083
SUPERCOP version: 20240716
Operation: crypto_stream
Primitive: lexv2

Compiler output


lex.c: In file included from lex.c:1:
lex.c: ./e/lex.c:685:9: warning: array index 10 is past the end of the array (which contains 10 elements) [-Warray-bounds]
lex.c:         ctx->ks[10] = (t0 & 0xFF00FF00) ^ ((t2 & 0xFF00FF00)>>8); /* Leak for odd rounds */
lex.c:         ^       ~~
lex.c: ./e/ecrypt-sync.h:53:3: note: array 'ks' declared here
lex.c:   u32 ks[NUMWORDS];                     /* Keystream words collected from leaks */
lex.c:   ^
lex.c: In file included from lex.c:1:
lex.c: ./e/lex.c:692:6: warning: array index 11 is past the end of the array (which contains 10 elements) [-Warray-bounds]
lex.c:             ctx->ks[11] = ((s0 & 0xFF00FF)<<8) ^ (s2 & 0xFF00FF);    /* Leak for even rounds */
lex.c:             ^       ~~
lex.c: ./e/ecrypt-sync.h:53:3: note: array 'ks' declared here
lex.c:   u32 ks[NUMWORDS];                     /* Keystream words collected from leaks */
lex.c:   ^
lex.c: In file included from lex.c:1:
lex.c: ./e/lex.c:698:13: warning: array index 12 is past the end of the array (which contains 10 elements) [-Warray-bounds]
lex.c:             ctx->ks[12] = (t0 & 0xFF00FF00) ^ ((t2 & 0xFF00FF00)>>8); /* Leak for odd rounds */
lex.c:             ^       ~~
lex.c: ./e/ecrypt-sync.h:53:3: note: array 'ks' declared here
lex.c:   u32 ks[NUMWORDS];                     /* Keystream words collected from leaks */
lex.c:   ^
lex.c: In file included from lex.c:1:
lex.c: ./e/lex.c:752:59: warning: implicit declaration of function 'U32TO32_LITTLE' is invalid in C99 [-Wimplicit-function-declaration]
lex.c:              *(u32*)(output+ 4*j) = *(u32*)(input+ 4*j) ^ U32TO32_LITTLE(ctx->ks[j]);
lex.c:                                                           ^
lex.c: ...

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
T:e/v2/refclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)

Compiler output


lex.c: In file included from lex.c:1:
lex.c: e/lex.c: In function 'crypto_stream_lexv2_e_v2_ref_timingleaks_ECRYPT_process_bytes':
lex.c: e/lex.c:752:59: warning: implicit declaration of function 'U32TO32_LITTLE'; did you mean 'U8TO32_LITTLE'? [-Wimplicit-function-declaration]
lex.c:   752 |              *(u32*)(output+ 4*j) = *(u32*)(input+ 4*j) ^ U32TO32_LITTLE(ctx->ks[j]);
lex.c:       |                                                           ^~~~~~~~~~~~~~
lex.c:       |                                                           U8TO32_LITTLE
lex.c: e/lex.c: In function 'rijndaelEncrypt':
lex.c: e/lex.c:685:16: warning: array subscript 10 is above array bounds of 'u32[10]' {aka 'unsigned int[10]'} [-Warray-bounds]
lex.c:   685 |         ctx->ks[10] = (t0 & 0xFF00FF00) ^ ((t2 & 0xFF00FF00)>>8); /* Leak for odd rounds */
lex.c:       |         ~~~~~~~^~~~
lex.c: In file included from e/lex.c:34,
lex.c:                  from lex.c:1:
lex.c: e/ecrypt-sync.h:53:7: note: while referencing 'ks'
lex.c:    53 |   u32 ks[NUMWORDS];                     /* Keystream words collected from leaks */
lex.c:       |       ^~
lex.c: In file included from lex.c:1:
lex.c: e/lex.c:692:20: warning: array subscript 11 is above array bounds of 'u32[10]' {aka 'unsigned int[10]'} [-Warray-bounds]
lex.c:   692 |             ctx->ks[11] = ((s0 & 0xFF00FF)<<8) ^ (s2 & 0xFF00FF);    /* Leak for even rounds */
lex.c:       |             ~~~~~~~^~~~
lex.c: In file included from e/lex.c:34,
lex.c:                  from lex.c:1:
lex.c: e/ecrypt-sync.h:53:7: note: while referencing 'ks'
lex.c:    53 |   u32 ks[NUMWORDS];                     /* Keystream words collected from leaks */
lex.c:       |       ^~
lex.c: In file included from lex.c:1:
lex.c: ...

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
T:e/v2/refgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:e/v2/refgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
T:e/v2/refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)

Compiler output


lex.c: In file included from lex.c:1:
lex.c: e/lex.c: In function 'crypto_stream_lexv2_e_v2_ref_timingleaks_ECRYPT_process_bytes':
lex.c: e/lex.c:752:59: warning: implicit declaration of function 'U32TO32_LITTLE'; did you mean 'U8TO32_LITTLE'? [-Wimplicit-function-declaration]
lex.c:   752 |              *(u32*)(output+ 4*j) = *(u32*)(input+ 4*j) ^ U32TO32_LITTLE(ctx->ks[j]);
lex.c:       |                                                           ^~~~~~~~~~~~~~
lex.c:       |                                                           U8TO32_LITTLE
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `crypto_stream_lexv2_e_v2_ref_timingleaks_ECRYPT_process_bytes':
try.c: .../supercop-data/pi4b/aarch64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/lexv2/e/v2/ref/work/e/lex.c:752: undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `crypto_stream_lexv2_e_v2_ref_timingleaks_ECRYPT_keystream_bytes':
try.c: .../supercop-data/pi4b/aarch64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/lexv2/e/v2/ref/work/e/lex.c:776: undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `ECRYPT_process_blocks':
try.c: .../supercop-data/pi4b/aarch64/try/c/gcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall/timingleaks/crypto_stream/lexv2/e/v2/ref/work/e/lex.c:798: undefined reference to `U32TO32_LITTLE'
try.c: collect2: error: ld returned 1 exit status

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