Implementation notes: riscv64, riscvunleashed000, crypto_stream/lexv2

Computer: riscvunleashed000
Microarchitecture: riscv64; U54 (sifive,u54-mc)
Architecture: riscv64
CPU ID: unknown CPU ID
SUPERCOP version: 20240107
Operation: crypto_stream
Primitive: lexv2

Compiler output

Implementation: T:e/v2/ref
Security model: timingleaks
Compiler: clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
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 (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=rv64imafdc -mtune=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:e/v2/ref
clang -march=rv64imafdc -mtune=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:e/v2/ref
clang -march=rv64imafdc -mtune=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:e/v2/ref
clang -march=rv64imafdc -mtune=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:e/v2/ref
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:e/v2/ref

Compiler output

Implementation: T:e/v2/ref
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
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 `.L32':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `.L44':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `ECRYPT_process_blocks':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -mcpu=sifive-u54 -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:e/v2/ref

Compiler output

Implementation: T:e/v2/ref
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE
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 `.L26':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `.L38':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `ECRYPT_process_blocks':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -mcpu=sifive-u54 -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:e/v2/ref

Compiler output

Implementation: T:e/v2/ref
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -O -fomit-frame-pointer -fwrapv -fPIC -fPIE
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 `.L29':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `.L40':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `ECRYPT_process_blocks':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -mcpu=sifive-u54 -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:e/v2/ref

Compiler output

Implementation: T:e/v2/ref
Security model: timingleaks
Compiler: gcc -mcpu=sifive-u54 -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE
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 `.L23':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `.L33':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: /usr/bin/ld: libcrypto_stream_lexv2.a(lex.o): in function `.L46':
try.c: lex.c:(.text+0x...): undefined reference to `U32TO32_LITTLE'
try.c: collect2: error: ld returned 1 exit status

Number of similar (compiler,implementation) pairs: 1, namely:
CompilerImplementations
gcc -mcpu=sifive-u54 -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:e/v2/ref