Implementation notes: amd64, hertz, crypto_kem/kyber90s512

Computer: hertz
Microarchitecture: amd64; Zen 4 (a60f12)
Architecture: amd64
CPU ID: AuthenticAMD-00a60f12-178bfbff
SUPERCOP version: 20240716
Operation: crypto_kem
Primitive: kyber90s512
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
2524622556 0 048595 852 1832avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2561436815 0 068977 860 1832avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2564423204 0 048939 852 1800avx2gcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2564936271 0 068321 860 1832avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2583022077 0 046275 844 1768avx2gcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
2588529066 0 056891 852 1832avx2gcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
44943576171 0 0107889 844 1832refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
45203885050 0 0116881 844 1832refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716
54222540918 0 064916 812 1768refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071720240716

Checksum failure


07e96ce96cdf7f0a077e9449364c58abc760e1f218a39e332661d0218c0e5554

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

Compiler output


kem.c: kem.c:24:32: warning: argument 1 of type 'uint8_t[800]' {aka 'unsigned char[800]'} with mismatched bound [-Warray-parameter=]
kem.c:    24 | int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES],
kem.c:       |                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
kem.c: In file included from kem.c:5:
kem.c: kem.h:33:33: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    33 | int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
kem.c:       |                        ~~~~~~~~~^~
kem.c: kem.c:25:32: warning: argument 2 of type 'uint8_t[1632]' {aka 'unsigned char[1632]'} with mismatched bound [-Warray-parameter=]
kem.c:    25 |                        uint8_t sk[KYBER_SECRETKEYBYTES])
kem.c:       |                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
kem.c: kem.h:33:46: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    33 | int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
kem.c:       |                                     ~~~~~~~~~^~
kem.c: kem.c:50:28: warning: argument 1 of type 'uint8_t[768]' {aka 'unsigned char[768]'} with mismatched bound [-Warray-parameter=]
kem.c:    50 | int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES],
kem.c:       |                    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
kem.c: kem.h:36:29: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    36 | int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
kem.c:       |                    ~~~~~~~~~^~
kem.c: kem.c:51:28: warning: argument 2 of type 'uint8_t[32]' {aka 'unsigned char[32]'} with mismatched bound [-Warray-parameter=]
kem.c:    51 |                    uint8_t ss[KYBER_SSBYTES],
kem.c:       |                    ~~~~~~~~^~~~~~~~~~~~~~~~~
kem.c: kem.h:36:42: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    36 | int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
kem.c:       |                                 ~~~~~~~~~^~
kem.c: ...

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

Compiler output


aes256ctr.c: aes256ctr.c:557:64: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   557 | void aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                 ~~~~~~~~~~~~~~~^~~
aes256ctr.c: In file included from aes256ctr.c:27:
aes256ctr.c: aes256ctr.h:21:34: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'}
aes256ctr.c:    21 |                    const uint8_t key[32],
aes256ctr.c:       |                    ~~~~~~~~~~~~~~^~~~~~~
aes256ctr.c: aes256ctr.c:557:84: warning: argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   557 | void aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                                     ~~~~~~~~~~~~~~~^~~~~
aes256ctr.c: aes256ctr.h:22:34: note: previously declared as an array 'const uint8_t[12]' {aka 'const unsigned char[12]'}
aes256ctr.c:    22 |                    const uint8_t nonce[12]);
aes256ctr.c:       |                    ~~~~~~~~~~~~~~^~~~~~~~~
aes256ctr.c: aes256ctr.c:565:54: warning: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   565 | void aes256ctr_init(aes256ctr_ctx *s, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                       ~~~~~~~~~~~~~~~^~~
aes256ctr.c: aes256ctr.h:26:35: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'}
aes256ctr.c:    26 |                     const uint8_t key[32],
aes256ctr.c:       |                     ~~~~~~~~~~~~~~^~~~~~~
aes256ctr.c: aes256ctr.c:565:74: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   565 | void aes256ctr_init(aes256ctr_ctx *s, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                           ~~~~~~~~~~~~~~~^~~~~
aes256ctr.c: aes256ctr.h:27:35: note: previously declared as an array 'const uint8_t[12]' {aka 'const unsigned char[12]'}
aes256ctr.c:    27 |                     const uint8_t nonce[12]);
aes256ctr.c:       |                     ~~~~~~~~~~~~~~^~~~~~~~~
aes256ctr.c: ...

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

Compiler output


aes256ctr.c: aes256ctr.c:557:64: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   557 | void aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                 ~~~~~~~~~~~~~~~^~~
aes256ctr.c: In file included from aes256ctr.c:27:
aes256ctr.c: aes256ctr.h:21:34: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'}
aes256ctr.c:    21 |                    const uint8_t key[32],
aes256ctr.c:       |                    ~~~~~~~~~~~~~~^~~~~~~
aes256ctr.c: aes256ctr.c:557:84: warning: argument 4 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   557 | void aes256ctr_prf(uint8_t *out, size_t outlen, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                                     ~~~~~~~~~~~~~~~^~~~~
aes256ctr.c: aes256ctr.h:22:34: note: previously declared as an array 'const uint8_t[12]' {aka 'const unsigned char[12]'}
aes256ctr.c:    22 |                    const uint8_t nonce[12]);
aes256ctr.c:       |                    ~~~~~~~~~~~~~~^~~~~~~~~
aes256ctr.c: aes256ctr.c:565:54: warning: argument 2 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   565 | void aes256ctr_init(aes256ctr_ctx *s, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                       ~~~~~~~~~~~~~~~^~~
aes256ctr.c: aes256ctr.h:26:35: note: previously declared as an array 'const uint8_t[32]' {aka 'const unsigned char[32]'}
aes256ctr.c:    26 |                     const uint8_t key[32],
aes256ctr.c:       |                     ~~~~~~~~~~~~~~^~~~~~~
aes256ctr.c: aes256ctr.c:565:74: warning: argument 3 of type 'const uint8_t *' {aka 'const unsigned char *'} declared as a pointer [-Warray-parameter=]
aes256ctr.c:   565 | void aes256ctr_init(aes256ctr_ctx *s, const uint8_t *key, const uint8_t *nonce)
aes256ctr.c:       |                                                           ~~~~~~~~~~~~~~~^~~~~
aes256ctr.c: aes256ctr.h:27:35: note: previously declared as an array 'const uint8_t[12]' {aka 'const unsigned char[12]'}
aes256ctr.c:    27 |                     const uint8_t nonce[12]);
aes256ctr.c:       |                     ~~~~~~~~~~~~~~^~~~~~~~~
kem.c: kem.c:23:32: warning: argument 1 of type 'uint8_t[800]' {aka 'unsigned char[800]'} with mismatched bound [-Warray-parameter=]
kem.c:    23 | int crypto_kem_keypair(uint8_t pk[KYBER_PUBLICKEYBYTES],
kem.c:       |                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
kem.c: In file included from kem.c:4:
kem.c: kem.h:33:33: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    33 | int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
kem.c:       |                        ~~~~~~~~~^~
kem.c: kem.c:24:32: warning: argument 2 of type 'uint8_t[1632]' {aka 'unsigned char[1632]'} with mismatched bound [-Warray-parameter=]
kem.c:    24 |                        uint8_t sk[KYBER_SECRETKEYBYTES])
kem.c:       |                        ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
kem.c: kem.h:33:46: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    33 | int crypto_kem_keypair(uint8_t *pk, uint8_t *sk);
kem.c:       |                                     ~~~~~~~~~^~
kem.c: kem.c:51:28: warning: argument 1 of type 'uint8_t[768]' {aka 'unsigned char[768]'} with mismatched bound [-Warray-parameter=]
kem.c:    51 | int crypto_kem_enc(uint8_t ct[KYBER_CIPHERTEXTBYTES],
kem.c:       |                    ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
kem.c: kem.h:36:29: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    36 | int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
kem.c:       |                    ~~~~~~~~~^~
kem.c: kem.c:52:28: warning: argument 2 of type 'uint8_t[32]' {aka 'unsigned char[32]'} with mismatched bound [-Warray-parameter=]
kem.c:    52 |                    uint8_t ss[KYBER_SSBYTES],
kem.c:       |                    ~~~~~~~~^~~~~~~~~~~~~~~~~
kem.c: kem.h:36:42: note: previously declared as 'uint8_t *' {aka 'unsigned char *'}
kem.c:    36 | int crypto_kem_enc(uint8_t *ct, uint8_t *ss, const uint8_t *pk);
kem.c:       |                                 ~~~~~~~~~^~
kem.c: ...
sha256.c: sha256.c:229:22: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
sha256.c:   229 | void sha256(uint8_t *out,const uint8_t *in,size_t inlen)
sha256.c:       |             ~~~~~~~~~^~~
sha256.c: In file included from sha256.c:5:
sha256.c: sha2.h:11:21: note: previously declared as an array 'uint8_t[32]' {aka 'unsigned char[32]'}
sha256.c:    11 | void sha256(uint8_t out[32], const uint8_t *in, size_t inlen);
sha256.c:       |             ~~~~~~~~^~~~~~~
sha512.c: sha512.c:258:22: warning: argument 1 of type 'uint8_t *' {aka 'unsigned char *'} declared as a pointer [-Warray-parameter=]
sha512.c:   258 | void sha512(uint8_t *out,const uint8_t *in,size_t inlen)
sha512.c:       |             ~~~~~~~~~^~~
sha512.c: In file included from sha512.c:7:
sha512.c: sha2.h:13:21: note: previously declared as an array 'uint8_t[64]' {aka 'unsigned char[64]'}
sha512.c:    13 | void sha512(uint8_t out[64], const uint8_t *in, size_t inlen);
sha512.c:       |             ~~~~~~~~^~~~~~~

Number of similar (implementation,compiler) pairs: 1, namely:
ImplementationCompiler
refgcc -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: 1, namely:
ImplementationCompiler
avx2clang -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: 1, namely:
ImplementationCompiler
avx2clang -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 0x10A09A
   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: 1, namely:
ImplementationCompiler
avx2clang -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
avx2gcc -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
avx2gcc -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: 1, namely:
ImplementationCompiler
avx2gcc -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 0x10AEA6
   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: 1, namely:
ImplementationCompiler
refclang -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 0x10B9C4
   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: 1, namely:
ImplementationCompiler
refclang -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 0x109EA9
   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
refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.2.0)