Implementation notes: amd64, hertz, crypto_dh/claus

Computer: hertz
Microarchitecture: amd64; Zen 4 (a60f12)
Architecture: amd64
CPU ID: AuthenticAMD-00a60f12-178bfbff
SUPERCOP version: 20240716
Operation: crypto_dh
Primitive: claus
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
40571141426 0 029489 956 1800T:opensslnewgcc_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
40584721426 0 031497 956 1832T:opensslnewgcc_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
42028671370 0 027393 948 1800T:opensslnewgcc_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47250082212 16 0245362 1116 1832T:gmpclang++_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47250122243 16 0239241 1084 1864T:gmpg++_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47256302035 16 0236937 1076 1832T:gmpg++_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47258982212 16 0245234 1116 1832T:gmpclang++_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47277492262 16 0239056 1108 1832T:gmpclang++_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47301492243 16 0241265 1084 1928T:gmpg++_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47713274136 320 0454542 3068 3720T:ntlg++_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47731182775 320 0450010 3012 3656T:ntlg++_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47738853014 320 0451864 3044 3688T:ntlclang++_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47750523617 320 0458495 3052 3688T:ntlclang++_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47757394136 320 0452518 3068 3688T:ntlg++_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
47791473537 320 0458383 3052 3688T:ntlclang++_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
49533192184 16 2241770684 144524 11464T:cryptoppg++_-march=native_-mtune=native_-Os_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
49541412143 16 1681772847 144540 11400T:cryptoppclang++_-march=native_-Os_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
49667382275 16 1681779113 144548 11400T:cryptoppclang++_-march=native_-O2_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
49679053026 16 2241775520 144532 11592T:cryptoppg++_-march=native_-mtune=native_-O3_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
49725382321 16 1681779273 144548 11400T:cryptoppclang++_-march=native_-O3_-fwrapv_-Qunused-arguments_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716
51719043026 16 2241773432 144532 11528T:cryptoppg++_-march=native_-mtune=native_-O2_-fwrapv_-fPIC_-fPIE_-gdwarf-4_-Wall2024071620240716

Compiler output


keypair.c: keypair.c:19:8: warning: 'DH_new' is deprecated [-Wdeprecated-declarations]
keypair.c:    19 |   dh = DH_new();
keypair.c:       |        ^
keypair.c: /usr/include/openssl/dh.h:203:1: note: 'DH_new' has been explicitly marked deprecated here
keypair.c:   203 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
keypair.c:       | ^
keypair.c: /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
keypair.c:   182 | #   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
keypair.c:       |                                                 ^
keypair.c: /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
keypair.c:    62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
keypair.c:       |                                                    ^
keypair.c: keypair.c:25:5: error: incomplete definition of type 'struct dh_st'
keypair.c:    25 |   dh->p = BN_new(); if (!dh->p) goto error;
keypair.c:       |   ~~^
keypair.c: /usr/include/openssl/types.h:134:16: note: forward declaration of 'struct dh_st'
keypair.c:   134 | typedef struct dh_st DH;
keypair.c:       |                ^
keypair.c: keypair.c:25:28: error: incomplete definition of type 'struct dh_st'
keypair.c:    25 |   dh->p = BN_new(); if (!dh->p) goto error;
keypair.c:       |                          ~~^
keypair.c: /usr/include/openssl/types.h:134:16: note: forward declaration of 'struct dh_st'
keypair.c:   134 | typedef struct dh_st DH;
keypair.c:       |                ^
keypair.c: keypair.c:26:5: error: incomplete definition of type 'struct dh_st'
keypair.c: ...

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

Compiler output


keypair.c: keypair.c: In function 'crypto_dh_claus_openssl_timingleaks_keypair':
keypair.c: keypair.c:19:3: warning: 'DH_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
keypair.c:    19 |   dh = DH_new();
keypair.c:       |   ^~
keypair.c: In file included from keypair.c:3:
keypair.c: /usr/include/openssl/dh.h:203:27: note: declared here
keypair.c:   203 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
keypair.c:       |                           ^~~~~~
keypair.c: keypair.c:25:5: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    25 |   dh->p = BN_new(); if (!dh->p) goto error;
keypair.c:       |     ^~
keypair.c: keypair.c:25:28: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    25 |   dh->p = BN_new(); if (!dh->p) goto error;
keypair.c:       |                            ^~
keypair.c: keypair.c:26:5: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    26 |   dh->g = BN_new(); if (!dh->g) goto error;
keypair.c:       |     ^~
keypair.c: keypair.c:26:28: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    26 |   dh->g = BN_new(); if (!dh->g) goto error;
keypair.c:       |                            ^~
keypair.c: keypair.c:28:39: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    28 |   if (!BN_bin2bn(prime,sizeof prime,dh->p)) goto error;
keypair.c:       |                                       ^~
keypair.c: keypair.c:29:22: error: invalid use of incomplete typedef 'DH' {aka 'struct dh_st'}
keypair.c:    29 |   if (!BN_set_word(dh->g,2)) goto error;
keypair.c: ...

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

Compiler output


keypair.c: keypair.c:32:8: warning: 'DH_new' is deprecated [-Wdeprecated-declarations]
keypair.c:    32 |   dh = DH_new(); if (!dh) goto error;
keypair.c:       |        ^
keypair.c: /usr/include/openssl/dh.h:203:1: note: 'DH_new' has been explicitly marked deprecated here
keypair.c:   203 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
keypair.c:       | ^
keypair.c: /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
keypair.c:   182 | #   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
keypair.c:       |                                                 ^
keypair.c: /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
keypair.c:    62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
keypair.c:       |                                                    ^
keypair.c: keypair.c:34:8: warning: 'DH_set0_pqg' is deprecated [-Wdeprecated-declarations]
keypair.c:    34 |   if (!DH_set0_pqg(dh,p,0,g)) goto error;
keypair.c:       |        ^
keypair.c: /usr/include/openssl/dh.h:259:1: note: 'DH_set0_pqg' has been explicitly marked deprecated here
keypair.c:   259 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
keypair.c:       | ^
keypair.c: /usr/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0'
keypair.c:   182 | #   define OSSL_DEPRECATEDIN_3_0                OSSL_DEPRECATED(3.0)
keypair.c:       |                                                 ^
keypair.c: /usr/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED'
keypair.c:    62 | #     define OSSL_DEPRECATED(since) __attribute__((deprecated))
keypair.c:       |                                                    ^
keypair.c: keypair.c:37:8: warning: 'DH_generate_key' is deprecated [-Wdeprecated-declarations]
keypair.c: ...

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

Compiler output


keypair.c: keypair.c: In function 'crypto_dh_claus_opensslnew_timingleaks_keypair':
keypair.c: keypair.c:32:3: warning: 'DH_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
keypair.c:    32 |   dh = DH_new(); if (!dh) goto error;
keypair.c:       |   ^~
keypair.c: In file included from keypair.c:3:
keypair.c: /usr/include/openssl/dh.h:203:27: note: declared here
keypair.c:   203 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
keypair.c:       |                           ^~~~~~
keypair.c: keypair.c:34:3: warning: 'DH_set0_pqg' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
keypair.c:    34 |   if (!DH_set0_pqg(dh,p,0,g)) goto error;
keypair.c:       |   ^~
keypair.c: /usr/include/openssl/dh.h:259:27: note: declared here
keypair.c:   259 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
keypair.c:       |                           ^~~~~~~~~~~
keypair.c: keypair.c:37:3: warning: 'DH_generate_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
keypair.c:    37 |   if (!DH_generate_key(dh)) goto error;
keypair.c:       |   ^~
keypair.c: /usr/include/openssl/dh.h:227:27: note: declared here
keypair.c:   227 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
keypair.c:       |                           ^~~~~~~~~~~~~~~
keypair.c: keypair.c:39:3: warning: 'DH_get0_pub_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
keypair.c:    39 |   z = DH_get0_pub_key(dh);
keypair.c:       |   ^
keypair.c: /usr/include/openssl/dh.h:267:37: note: declared here
keypair.c:   267 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh);
keypair.c: ...
sharedsecret.c: sharedsecret.c: In function 'crypto_dh_claus_opensslnew_timingleaks':
sharedsecret.c: sharedsecret.c:27:3: warning: 'DH_new' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
sharedsecret.c:    27 |   alice = DH_new(); if (!alice) goto error;
sharedsecret.c:       |   ^~~~~
sharedsecret.c: In file included from sharedsecret.c:3:
sharedsecret.c: /usr/include/openssl/dh.h:203:27: note: declared here
sharedsecret.c:   203 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
sharedsecret.c:       |                           ^~~~~~
sharedsecret.c: sharedsecret.c:35:3: warning: 'DH_set0_pqg' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
sharedsecret.c:    35 |   if (!DH_set0_pqg(alice,p,0,g)) goto error;
sharedsecret.c:       |   ^~
sharedsecret.c: /usr/include/openssl/dh.h:259:27: note: declared here
sharedsecret.c:   259 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
sharedsecret.c:       |                           ^~~~~~~~~~~
sharedsecret.c: sharedsecret.c:44:3: warning: 'DH_set0_key' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
sharedsecret.c:    44 |   if (!DH_set0_key(alice,pub_key,priv_key)) goto error;
sharedsecret.c:       |   ^~
sharedsecret.c: /usr/include/openssl/dh.h:262:27: note: declared here
sharedsecret.c:   262 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
sharedsecret.c:       |                           ^~~~~~~~~~~
sharedsecret.c: sharedsecret.c:47:3: warning: 'DH_size' is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations]
sharedsecret.c:    47 |   if (DH_size(alice) > SHAREDSECRET_BYTES) goto error;
sharedsecret.c:       |   ^~
sharedsecret.c: /usr/include/openssl/dh.h:207:27: note: declared here
sharedsecret.c:   207 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
sharedsecret.c: ...

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