Implementation notes: amd64, hertz, crypto_kem/threebears936r2ccax

Computer: hertz
Microarchitecture: amd64; Zen 4 (a60f12)
Architecture: amd64
CPU ID: AuthenticAMD-00a60f12-178bfbff
SUPERCOP version: 20240716
Operation: crypto_kem
Primitive: threebears936r2ccax
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
17828326350 0 0135560 860 1832vecclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
1881419133 0 0112250 852 1832vecclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
1896349960 0 0112875 836 1800vecgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
19005749280 0 0158600 860 1832vecclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
19186112410 0 0117315 836 1832vecgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2112668631 0 0109979 828 1768vecgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
24589339997 0 076993 852 1832optclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
24622840097 0 077185 852 1832optclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2579749684 0 040412 828 1800optgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
25977712186 0 044916 828 1832optgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2598218826 0 039827 844 1832optclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2816748379 0 037620 820 1768optgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716

Compiler output


threebears.c: threebears.c:100:22: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |             ~~~~~~~~~^~
threebears.c: In file included from threebears.c:7:
threebears.c: threebears.h:23:13: note: previously declared as an array 'uint8_t[1194]' {aka 'unsigned char[1194]'}
threebears.c:    23 |     uint8_t pk[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_PUBLIC_KEY_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:100:35: warning: argument 2 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |                          ~~~~~~~~~^~
threebears.c: threebears.h:24:13: note: previously declared as an array 'uint8_t[2404]' {aka 'unsigned char[2404]'}
threebears.c:    24 |     uint8_t sk[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_PRIVATE_KEY_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:100:54: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |                                       ~~~~~~~~~~~~~~~^~~~
threebears.c: threebears.h:25:19: note: previously declared as an array 'const uint8_t[40]' {aka 'const unsigned char[40]'}
threebears.c:    25 |     const uint8_t seed[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_KEYGEN_SEED_BYTES]
threebears.c:       |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:142:14: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   142 |     uint8_t *shared_secret,
threebears.c:       |     ~~~~~~~~~^~~~~~~~~~~~~
threebears.c: threebears.h:39:13: note: previously declared as an array 'uint8_t[32]' {aka 'unsigned char[32]'}
threebears.c:    39 |     uint8_t shared_secret[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_SHARED_SECRET_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: ...

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
optgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
optgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
optgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

Compiler output


threebears.c: threebears.c:100:22: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |             ~~~~~~~~~^~
threebears.c: In file included from threebears.c:7:
threebears.c: threebears.h:23:13: note: previously declared as an array 'uint8_t[1194]' {aka 'unsigned char[1194]'}
threebears.c:    23 |     uint8_t pk[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_PUBLIC_KEY_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:100:35: warning: argument 2 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |                          ~~~~~~~~~^~
threebears.c: threebears.h:24:13: note: previously declared as an array 'uint8_t[2404]' {aka 'unsigned char[2404]'}
threebears.c:    24 |     uint8_t sk[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_PRIVATE_KEY_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:100:54: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   100 | void keygen(uint8_t *pk, uint8_t *sk, const uint8_t *seed) {
threebears.c:       |                                       ~~~~~~~~~~~~~~~^~~~
threebears.c: threebears.h:25:19: note: previously declared as an array 'const uint8_t[40]' {aka 'const unsigned char[40]'}
threebears.c:    25 |     const uint8_t seed[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_KEYGEN_SEED_BYTES]
threebears.c:       |     ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: threebears.c:157:14: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
threebears.c:   157 |     uint8_t *shared_secret,
threebears.c:       |     ~~~~~~~~~^~~~~~~~~~~~~
threebears.c: threebears.h:39:13: note: previously declared as an array 'uint8_t[32]' {aka 'unsigned char[32]'}
threebears.c:    39 |     uint8_t shared_secret[PQCRYPTO_KEM_THREEBEARS936R2CCAX_IMPL_PRIV_SHARED_SECRET_BYTES],
threebears.c:       |     ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
threebears.c: ...

Number of similar (implementation,compiler) pairs: 3, namely:
ImplementationCompiler
vecgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

Namespace violations


melas_fec.o pqcrypto_kem_threebears936r2ccax_impl_priv_melas_fec_correct T
melas_fec.o pqcrypto_kem_threebears936r2ccax_impl_priv_melas_fec_set T
ring.o pqcrypto_kem_threebears936r2ccax_impl_priv_canon_3120 T
ring.o pqcrypto_kem_threebears936r2ccax_impl_priv_contract_3120 T
ring.o pqcrypto_kem_threebears936r2ccax_impl_priv_expand_3120 T
ring.o pqcrypto_kem_threebears936r2ccax_impl_priv_mac_3120 T
shake.o pqcrypto_kem_threebears936r2ccax_impl_priv_hash_output T
shake.o pqcrypto_kem_threebears936r2ccax_impl_priv_hash_times_n T
shake.o pqcrypto_kem_threebears936r2ccax_impl_priv_hash_update T
shake.o pqcrypto_kem_threebears936r2ccax_impl_priv_threebears_cshake_init T
threebears.o pqcrypto_kem_threebears936r2ccax_impl_priv_decapsulate T
threebears.o pqcrypto_kem_threebears936r2ccax_impl_priv_encapsulate T
threebears.o pqcrypto_kem_threebears936r2ccax_impl_priv_keygen T
threebears.o pqcrypto_kem_threebears936r2ccax_impl_priv_secure_bzero T

Number of similar (implementation,compiler) pairs: 12, namely:
ImplementationCompiler
optclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
optclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
optclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
optgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
optgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
optgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10AEC6
   at 0x...: core (try-anything.c:61)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
optclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10B9E4
   at 0x...: salsa20 (try-anything.c:90)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
optclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A096
   at 0x...: core (try-anything.c:64)
   by 0x...: salsa20 (try-anything.c:89)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
optclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))
vecclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_18.1.3_(1ubuntu1))

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A0C7
   at 0x...: core (try-anything.c:68)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
optgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A11C
   at 0x...: core (try-anything.c:64)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x109EC9
   at 0x...: core (try-anything.c:64)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
optgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)
vecgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A107
   at 0x...: core (try-anything.c:68)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
vecgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)

TIMECOP error (can be valgrind bug)


error 111

Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10A15C
   at 0x...: core (try-anything.c:64)
   by 0x...: salsa20.part.0 (try-anything.c:89)
   by 0x...: salsa20 (try-anything.c:85)
   by 0x...: canary (try-anything.c:148)
   by 0x...: output_prepare (try-anything.c:178)
   by 0x...: test (try.c:124)
   by 0x...: main (try-anything.c:345)

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