Implementation notes: amd64, hydra5, crypto_kem/ntruhrss701

Computer: hydra5
Microarchitecture: amd64; K10 32nm (300f10)
Architecture: amd64
CPU ID: AuthenticAMD-00300f10-178bfbff
SUPERCOP version: 20240625
Operation: crypto_kem
Primitive: ntruhrss701
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
174835536751 0 0110725 884 1728compactclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
174924135647 0 0109733 884 1728compactclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
175162233119 0 0106349 884 1728compactclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
218858139597 0 0114366 828 1760compactgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
685043619964 0 093213 884 1728refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
688057419743 0 093877 884 1728refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
688106419967 0 094069 884 1728refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
75452687416 0 078527 876 1728refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
77965035913 0 077239 876 1728compactclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
79952677395 0 079429 884 1728compactclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
84069415850 0 079350 828 1760compactgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
908390320846 0 095342 828 1760refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
91275698484 0 081686 828 1760refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
130831217317 0 078094 820 1728refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
138031477776 0 079708 820 1760refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
140211357213 0 079221 884 1728refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
141741014821 0 077308 820 1760compactgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625
145208884254 0 075558 820 1728compactgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070520240625

Test failure


error 111

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)
avx2clang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
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


owcpa.c: owcpa.c:44:40: warning: argument 3 of type 'const unsigned char[1400]' with mismatched bound [-Warray-parameter=]
owcpa.c:    44 |                    const unsigned char seed[NTRU_SAMPLE_FG_BYTES])
owcpa.c:       |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
owcpa.c: In file included from owcpa.c:1:
owcpa.c: owcpa.h:14:40: note: previously declared as 'const unsigned char[32]'
owcpa.c:    14 |                    const unsigned char seed[NTRU_SEEDBYTES]);
owcpa.c:       |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
owcpa.c: owcpa.c: In function 'crypto_kem_ntruhrss701_avx2_constbranchindex_owcpa_keypair':
owcpa.c: <command-line>: warning: 'crypto_kem_ntruhrss701_avx2_constbranchindex_sample_fg' reading 1400 bytes from a region of size 32 [-Wstringop-overread]
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: owcpa.c:54:3: note: in expansion of macro 'sample_fg'
owcpa.c:    54 |   sample_fg(f,g,seed);
owcpa.c:       |   ^~~~~~~~~
owcpa.c: <command-line>: note: referencing argument 3 of type 'const unsigned char *'
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: owcpa.c:54:3: note: in expansion of macro 'sample_fg'
owcpa.c:    54 |   sample_fg(f,g,seed);
owcpa.c:       |   ^~~~~~~~~
owcpa.c: <command-line>: note: in a call to function 'crypto_kem_ntruhrss701_avx2_constbranchindex_sample_fg'
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: sample.h:10:6: note: in expansion of macro 'sample_fg'
owcpa.c:    10 | void sample_fg(poly *f, poly *g, const unsigned char uniformbytes[NTRU_SAMPLE_FG_BYTES]);
owcpa.c:       |      ^~~~~~~~~
pack3.c: pack3.c:3:36: warning: argument 1 of type 'unsigned char[280]' with mismatched bound [-Warray-parameter=]
pack3.c:     3 | void poly_S3_tobytes(unsigned char msg[NTRU_OWCPA_MSGBYTES], const poly *a)
pack3.c:       |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: In file included from pack3.c:1:
pack3.c: poly.h:33:36: note: previously declared as 'unsigned char[140]'
pack3.c:    33 | void poly_S3_tobytes(unsigned char msg[NTRU_PACK_TRINARY_BYTES], const poly *a);
pack3.c:       |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: pack3.c:19:53: warning: argument 2 of type 'const unsigned char[280]' with mismatched bound [-Warray-parameter=]
pack3.c:    19 | void poly_S3_frombytes(poly *r, const unsigned char msg[NTRU_OWCPA_MSGBYTES])
pack3.c:       |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: In file included from pack3.c:1:
pack3.c: poly.h:34:53: note: previously declared as 'const unsigned char[140]'
pack3.c:    34 | void poly_S3_frombytes(poly *r, const unsigned char msg[NTRU_PACK_TRINARY_BYTES]);
pack3.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


owcpa.c: owcpa.c:44:40: warning: argument 3 of type 'const unsigned char[1400]' with mismatched bound [-Warray-parameter=]
owcpa.c:    44 |                    const unsigned char seed[NTRU_SAMPLE_FG_BYTES])
owcpa.c:       |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~
owcpa.c: In file included from owcpa.c:1:
owcpa.c: owcpa.h:14:40: note: previously declared as 'const unsigned char[32]'
owcpa.c:    14 |                    const unsigned char seed[NTRU_SEEDBYTES]);
owcpa.c:       |                    ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
owcpa.c: owcpa.c: In function 'crypto_kem_ntruhrss701_ref_constbranchindex_owcpa_keypair':
owcpa.c: <command-line>: warning: 'crypto_kem_ntruhrss701_ref_constbranchindex_sample_fg' reading 1400 bytes from a region of size 32 [-Wstringop-overread]
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: owcpa.c:54:3: note: in expansion of macro 'sample_fg'
owcpa.c:    54 |   sample_fg(f,g,seed);
owcpa.c:       |   ^~~~~~~~~
owcpa.c: <command-line>: note: referencing argument 3 of type 'const unsigned char *'
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: owcpa.c:54:3: note: in expansion of macro 'sample_fg'
owcpa.c:    54 |   sample_fg(f,g,seed);
owcpa.c:       |   ^~~~~~~~~
owcpa.c: <command-line>: note: in a call to function 'crypto_kem_ntruhrss701_ref_constbranchindex_sample_fg'
owcpa.c: <command-line>: note: in definition of macro 'CRYPTO_NAMESPACE'
owcpa.c: sample.h:10:6: note: in expansion of macro 'sample_fg'
owcpa.c:    10 | void sample_fg(poly *f, poly *g, const unsigned char uniformbytes[NTRU_SAMPLE_FG_BYTES]);
owcpa.c:       |      ^~~~~~~~~
pack3.c: pack3.c:3:36: warning: argument 1 of type 'unsigned char[280]' with mismatched bound [-Warray-parameter=]
pack3.c:     3 | void poly_S3_tobytes(unsigned char msg[NTRU_OWCPA_MSGBYTES], const poly *a)
pack3.c:       |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: In file included from pack3.c:1:
pack3.c: poly.h:32:36: note: previously declared as 'unsigned char[140]'
pack3.c:    32 | void poly_S3_tobytes(unsigned char msg[NTRU_PACK_TRINARY_BYTES], const poly *a);
pack3.c:       |                      ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: pack3.c:19:53: warning: argument 2 of type 'const unsigned char[280]' with mismatched bound [-Warray-parameter=]
pack3.c:    19 | void poly_S3_frombytes(poly *r, const unsigned char msg[NTRU_OWCPA_MSGBYTES])
pack3.c:       |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
pack3.c: In file included from pack3.c:1:
pack3.c: poly.h:33:53: note: previously declared as 'const unsigned char[140]'
pack3.c:    33 | void poly_S3_frombytes(poly *r, const unsigned char msg[NTRU_PACK_TRINARY_BYTES]);
pack3.c:       |                                 ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Number of similar (implementation,compiler) pairs: 4, 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)
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)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10C4F0
   at 0x...: poly_S3_tobytes (kem.c:206)
   by 0x...: owcpa_keypair (kem.c:300)
   by 0x...: crypto_kem_ntruhrss701_compact_constbranchindex_keypair (kem.c:353)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10C590
   at 0x...: poly_S3_tobytes (kem.c:206)
   by 0x...: owcpa_keypair (kem.c:300)
   by 0x...: crypto_kem_ntruhrss701_compact_constbranchindex_keypair (kem.c:353)
   by 0x...: test (try.c:126)
   by 0x...: main (try-anything.c:345)

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

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10B750
   at 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_poly_S3_tobytes (pack3.c:11)
   by 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_owcpa_keypair (owcpa.c:57)
   by 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_keypair (kem.c:16)
   by 0x...: test (try.c:126)
   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_14.0.0)

TIMECOP error (can be valgrind bug)


Process terminating with default action of signal 4 (SIGILL)
 Illegal opcode at address 0x10B7F0
   at 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_poly_S3_tobytes (pack3.c:11)
   by 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_owcpa_keypair (owcpa.c:57)
   by 0x...: crypto_kem_ntruhrss701_ref_constbranchindex_keypair (kem.c:16)
   by 0x...: test (try.c:126)
   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_14.0.0)

Passed TIMECOP


TIMECOP iterations: 1

Number of similar (implementation,compiler) pairs: 14, namely:
ImplementationCompiler
compactclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
compactclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
compactclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Ubuntu_Clang_14.0.0)
compactgcc -march=native -mtune=native -O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
compactgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
compactgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.0)
compactgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (11.4.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)
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)
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)