Implementation notes: amd64, speed2supercop, crypto_sign/sflashv2

Computer: speed2supercop
Microarchitecture: amd64; Haswell+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-1fc9cbf5
SUPERCOP version: 20240625
Operation: crypto_sign
Primitive: sflashv2
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
21384871479 0 094148 840 1600T:refclang_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
21683244953 0 066900 840 1568T:refclang_-mcpu=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
22392882403 0 0104324 840 1600T:refclang_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
24324430476 0 050226 816 1632T:refgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
27748837223 0 058938 816 1632T:refgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
29860027718 0 046106 808 1600T:refgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
30047641632 0 060844 840 1568T:refclang_-march=native_-O_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
31678429462 0 049453 832 1632T:refclang_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625
34640029652 0 049146 816 1632T:refgcc_-march=native_-mtune=native_-O_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024070920240625

Compiler output


keypair.c: keypair.c:10:18: warning: unused variable 'seed' [-Wunused-variable]
keypair.c:   unsigned char *seed;
keypair.c:                  ^
keypair.c: keypair.c:11:7: warning: unused variable 'length' [-Wunused-variable]
keypair.c:   int length;
keypair.c:       ^
keypair.c: 2 warnings generated.
lib_flash.c: lib_flash.c:270:29: warning: argument 'QUAD' of type 'unsigned char[37][37][37]' with mismatched bound [-Warray-parameter]
lib_flash.c: void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:                             ^
lib_flash.c: ./lib_flash.h:38:29: note: previously declared as 'unsigned char[26][37][37]' here
lib_flash.c: void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:                             ^
lib_flash.c: lib_flash.c:270:61: warning: argument 'LIN' of type 'unsigned char[37][37]' with mismatched bound [-Warray-parameter]
lib_flash.c: void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:                                                             ^
lib_flash.c: ./lib_flash.h:38:61: note: previously declared as 'unsigned char[26][37]' here
lib_flash.c: void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:                                                             ^
lib_flash.c: lib_flash.c:270:88: warning: argument 'CONS' of type 'unsigned char[37]' with mismatched bound [-Warray-parameter]
lib_flash.c: void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:                                                                                        ^
lib_flash.c: ./lib_flash.h:38:88: note: previously declared as 'unsigned char[26]' here
lib_flash.c: void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:                                                                                        ^
lib_flash.c: lib_flash.c:409:50: warning: '/*' within block comment [-Wcomment]
lib_flash.c:         init_table_flash(CK->M,/*CK->I,*/CK->M1/*,CK->M2/* /*,CK->M3*/);
lib_flash.c:                                                         ^
lib_flash.c: lib_flash.c:409:53: warning: '/*' within block comment [-Wcomment]
lib_flash.c:         init_table_flash(CK->M,/*CK->I,*/CK->M1/*,CK->M2/* /*,CK->M3*/);
lib_flash.c:                                                            ^
lib_flash.c: lib_flash.c:690:3: warning: '/*' within block comment [-Wcomment]
lib_flash.c: ...
table_flash.c: table_flash.c:25:8: warning: ^ has lower precedence than <; < will be evaluated first [-Wparentheses]
table_flash.c:                 if( x^P < x)
table_flash.c:                      ^~~~~~
table_flash.c: table_flash.c:25:8: note: place parentheses around the '<' expression to silence this warning
table_flash.c:                 if( x^P < x)
table_flash.c:                      ^
table_flash.c:                       (    )
table_flash.c: table_flash.c:25:8: note: place parentheses around the ^ expression to evaluate it first
table_flash.c:                 if( x^P < x)
table_flash.c:                      ^
table_flash.c:                     (  )
table_flash.c: table_flash.c:39:28: warning: suggest braces around initialization of subobject [-Wmissing-braces]
table_flash.c: unsigned char MM[37][37]={ 1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
table_flash.c:                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
table_flash.c:                            {                                                                                                            }
table_flash.c: table_flash.c:40:2: warning: suggest braces around initialization of subobject [-Wmissing-braces]
table_flash.c: ,1 ,1 ,0 ,0 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,1 ,0 ,1 ,1 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1
table_flash.c:  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
table_flash.c:  {                                                                                                            }
table_flash.c: table_flash.c:41:2: warning: suggest braces around initialization of subobject [-Wmissing-braces]
table_flash.c: ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,0 ,1
table_flash.c:  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
table_flash.c:  {                                                                                                            }
table_flash.c: table_flash.c:42:2: warning: suggest braces around initialization of subobject [-Wmissing-braces]
table_flash.c: ,1 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,1 ,1 ,1 ,1 ,1 ,0 ,0 ,1 ,1 ,1 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,0 ,1
table_flash.c: ...

Number of similar (implementation,compiler) pairs: 5, namely:
ImplementationCompiler
T:refclang -march=native -O2 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:refclang -march=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:refclang -march=native -O -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:refclang -march=native -Os -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))
T:refclang -mcpu=native -O3 -fwrapv -Qunused-arguments -fPIC -fPIE -gdwarf-4 -Wall (Debian_Clang_16.0.6_(27+b1))

Compiler output


keypair.c: keypair.c: In function 'crypto_sign_sflashv2_ref_timingleaks_keypair':
keypair.c: keypair.c:11:7: warning: unused variable 'length' [-Wunused-variable]
keypair.c:    11 |   int length;
keypair.c:       |       ^~~~~~
keypair.c: keypair.c:10:18: warning: unused variable 'seed' [-Wunused-variable]
keypair.c:    10 |   unsigned char *seed;
keypair.c:       |                  ^~~~
lib_flash.c: lib_flash.c:270:29: warning: argument 1 of type 'unsigned char[37][37][37]' with mismatched bound [-Warray-parameter=]
lib_flash.c:   270 | void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:       |               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
lib_flash.c: In file included from lib_flash.c:6:
lib_flash.c: lib_flash.h:38:29: note: previously declared as 'unsigned char[26][37][37]'
lib_flash.c:    38 | void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:       |               ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
lib_flash.c: lib_flash.c:270:61: warning: argument 2 of type 'unsigned char[37][37]' with mismatched bound [-Warray-parameter=]
lib_flash.c:   270 | void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:       |                                               ~~~~~~~~~~~~~~^~~~~~~~~~~
lib_flash.c: lib_flash.h:38:61: note: previously declared as 'unsigned char[26][37]'
lib_flash.c:    38 | void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:       |                                               ~~~~~~~~~~~~~~^~~~~~~~~~~
lib_flash.c: lib_flash.c:270:88: warning: argument 3 of type 'unsigned char[37]' with mismatched bound [-Warray-parameter=]
lib_flash.c:   270 | void priv_pub(unsigned char QUAD[37][37][37], unsigned char LIN[37][37], unsigned char CONS[37], unsigned char S1[37][37],unsigned char S2[37], unsigned char T1[37][37],unsigned char T2[37],  unsigned char M[16384])
lib_flash.c:       |                                                                          ~~~~~~~~~~~~~~^~~~~~~~
lib_flash.c: lib_flash.h:38:88: note: previously declared as 'unsigned char[26]'
lib_flash.c:    38 | void priv_pub(unsigned char QUAD[26][37][37], unsigned char LIN[26][37], unsigned char CONS[26],
lib_flash.c:       |                                                                          ~~~~~~~~~~~~~~^~~~~~~~
lib_flash.c: lib_flash.c: In function 'Flash_build_complete_key':
lib_flash.c: lib_flash.c:409:57: warning: "/*" within comment [-Wcomment]
lib_flash.c:   409 |         init_table_flash(CK->M,/*CK->I,*/CK->M1/*,CK->M2/* /*,CK->M3*/);
lib_flash.c:       |
lib_flash.c: lib_flash.c:409:60: warning: "/*" within comment [-Wcomment]
lib_flash.c: lib_flash.c: In function 'Flash_decrypt':
lib_flash.c: ...
messagesigned.c: messagesigned.c:12:39: warning: argument 5 of type 'const unsigned char[19266]' with mismatched bound [-Warray-parameter=]
messagesigned.c:    12 |                   const unsigned char pk[PUBLICKEY_BYTES]
messagesigned.c:       |                   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
messagesigned.c: In file included from crypto_sign.h:4,
messagesigned.c:                  from sizes.h:1,
messagesigned.c:                  from messagesigned.c:6:
messagesigned.c: crypto_sign_sflashv2.h:12:132: note: previously declared as 'const unsigned char *'
messagesigned.c:    12 | extern int crypto_sign_sflashv2_ref_timingleaks_open(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
messagesigned.c:       |                                                                                                                                    ^~~~~~~~~~~~~~~~~~~~~
signedmessage.c: signedmessage.c:13:39: warning: argument 5 of type 'const unsigned char[2823]' with mismatched bound [-Warray-parameter=]
signedmessage.c:    13 |                   const unsigned char sk[SECRETKEY_BYTES]
signedmessage.c:       |                   ~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~
signedmessage.c: In file included from crypto_sign.h:4,
signedmessage.c:                  from sizes.h:1,
signedmessage.c:                  from signedmessage.c:6:
signedmessage.c: crypto_sign_sflashv2.h:11:127: note: previously declared as 'const unsigned char *'
signedmessage.c:    11 | extern int crypto_sign_sflashv2_ref_timingleaks(unsigned char *,unsigned long long *,const unsigned char *,unsigned long long,const unsigned char *);
signedmessage.c:       |                                                                                                                               ^~~~~~~~~~~~~~~~~~~~~
table_flash.c: table_flash.c: In function 'mult2':
table_flash.c: table_flash.c:25:25: warning: suggest parentheses around comparison in operand of '^' [-Wparentheses]
table_flash.c:    25 |                 if( x^P < x)
table_flash.c:       |                       ~~^~~
table_flash.c: table_flash.c: In function 'build_MM':
table_flash.c: table_flash.c:39:26: warning: missing braces around initializer [-Wmissing-braces]
table_flash.c:    39 | unsigned char MM[37][37]={ 1 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0
table_flash.c:       |                          ^
table_flash.c:       |                            {
table_flash.c:    40 | ,1 ,1 ,0 ,0 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,1 ,0 ,1 ,1 ,0 ,1 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1
table_flash.c:       | }{
table_flash.c:    41 | ,0 ,0 ,0 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,1 ,0 ,1 ,1 ,1 ,1 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,0 ,1 ,0 ,1 ,0 ,0 ,0 ,1
table_flash.c:       | }{
table_flash.c:    42 | ,1 ,0 ,0 ,0 ,1 ,0 ,1 ,1 ,0 ,0 ,0 ,0 ,0 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O2 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)
T:refgcc -march=native -mtune=native -O3 -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)
T:refgcc -march=native -mtune=native -O -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)
T:refgcc -march=native -mtune=native -Os -fwrapv -fPIC -fPIE -gdwarf-4 -Wall (13.3.0)