Implementation notes: amd64, bolero, crypto_kem/kyber90s512

Computer: bolero
Microarchitecture: amd64; Broadwell+AES (406f1)
Architecture: amd64
CPU ID: GenuineIntel-000406f1-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: kyber90s512
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
5767626896 0 049292 840 1576avx2clang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
5816023186 0 041948 840 1576avx2clang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
5824028915 0 051620 840 1576avx2clang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
5891221581 0 040958 832 1640avx2clang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
47758487355 0 0109628 824 1576refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
51642065833 0 087732 824 1576refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
54912068996 0 089964 824 1576refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
55000440749 0 060078 816 1640refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625
56249642235 0 060828 824 1576refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024062820240625

Compiler output


aes256ctr.c: aes256ctr.c:90:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK1(0x01);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp2, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c:   ((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
aes256ctr.c:             ^
aes256ctr.c: aes256ctr.c:91:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK2(0x01);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:81:11: note: expanded from macro 'BLOCK2'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp0, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c:   ((__m128i)__builtin_ia32_aeskeygenassist128((__v2di)(__m128i)(C), (int)(R)))
aes256ctr.c:             ^
aes256ctr.c: aes256ctr.c:93:3: error: '__builtin_ia32_aeskeygenassist128' needs target feature aes
aes256ctr.c:   BLOCK1(0x02);
aes256ctr.c:   ^
aes256ctr.c: aes256ctr.c:71:11: note: expanded from macro 'BLOCK1'
aes256ctr.c:   temp1 = _mm_aeskeygenassist_si128(temp2, IMM);                        \
aes256ctr.c:           ^
aes256ctr.c: /usr/lib/llvm-14/lib/clang/14.0.0/include/__wmmintrin_aes.h:136:13: note: expanded from macro '_mm_aeskeygenassist_si128'
aes256ctr.c: ...

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

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: In file included from kem.c:5:
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: In file included from kem.c:5:
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: In file included from kem.c:5:
kem.c: ...

Number of similar (implementation,compiler) pairs: 4, namely:
ImplementationCompiler
avx2gcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
avx2gcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.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: In file included from aes256ctr.c:27:
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: In file included from aes256ctr.c:27:
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: In file included from aes256ctr.c:27:
aes256ctr.c: ...

Number of similar (implementation,compiler) pairs: 2, namely:
ImplementationCompiler
refgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
refgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.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: In file included from aes256ctr.c:27:
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: In file included from aes256ctr.c:27:
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: In file included from aes256ctr.c:27:
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: In file included from kem.c:4:
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: In file included from kem.c:4:
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: In file included from kem.c:4:
kem.c: ...

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

Passed TIMECOP


TIMECOP iterations: 1

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