Implementation notes: amd64, comet, crypto_dh/claus

Computer: comet
Microarchitecture: amd64; Comet Lake (806ec)
Architecture: amd64
CPU ID: GenuineIntel-000806ec-bfebfbff
SUPERCOP version: 20240107
Operation: crypto_dh
Primitive: claus
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
39512471457 0 023497 924 1760T:opensslnewgcc_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
39541981822 0 023361 924 1760T:opensslnewgcc_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
39621631457 0 025449 924 1760T:opensslnewgcc_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
40978511122 0 020569 916 1760T:opensslnewgcc_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
41999402059 16 0220500 1628 1856T:gmpg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42104252059 16 0222388 1628 1856T:gmpg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42181542157 16 0223501 1700 1792T:gmpclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42183791768 16 0217511 1620 1824T:gmpg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42186462203 16 0220155 1692 1824T:gmpclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42186612157 16 0219773 1700 1760T:gmpclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42187192157 16 0223813 1700 1824T:gmpclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42285983711 336 2426002 3692 3648T:ntlclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42409064002 336 2424535 3660 3712T:ntlg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42414693152 336 2422343 3684 3712T:ntlclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42415573681 336 2422170 3692 3648T:ntlclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42428283755 336 2426290 3692 3712T:ntlclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
42428364002 336 2422647 3660 3712T:ntlg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42428782626 336 2419432 3604 3680T:ntlg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
42442473866 336 2421775 3660 3712T:ntlg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
51417851888 16 0219735 1628 1856T:gmpg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
52304282538 16 2241669086 144404 11488T:cryptoppg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
52336222098 16 1681669936 144460 11360T:cryptoppclang++_-march=native_-Os_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
52375132669 16 2241671710 144404 11488T:cryptoppg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
52434681929 16 2241666542 144396 11456T:cryptoppg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
52454112669 16 2241669822 144404 11488T:cryptoppg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2024010620231222
52490642206 16 1681673638 144468 11360T:cryptoppclang++_-march=native_-O3_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
52509782195 16 1681673326 144468 11328T:cryptoppclang++_-march=native_-O2_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222
52574912195 16 1681669502 144468 11296T:cryptoppclang++_-march=native_-O_-fomit-frame-pointer_-fwrapv_-Qunused-arguments_-fPIC_-fPIE2024010620231222

Compiler output

Implementation: T:cryptopp
Security model: timingleaks
Compiler: clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
try.cpp: /usr/bin/ld: warning: crypto_stream_chacha20_moon_avx2_64_constbranchindex-chacha.o: missing .note.GNU-stack section implies executable stack
try.cpp: /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
try.cpp: /usr/bin/ld: warning: crypto_stream_chacha20_moon_avx2_64_constbranchindex-chacha.o: missing .note.GNU-stack section implies executable stack
try.cpp: /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Number of similar (compiler,implementation) pairs: 24, namely:
CompilerImplementations
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:cryptopp
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:cryptopp
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:cryptopp
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:cryptopp
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:cryptopp
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:cryptopp
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:cryptopp
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:cryptopp
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gmp
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gmp
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gmp
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:gmp
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gmp
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gmp
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gmp
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:gmp
clang++ -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ntl
clang++ -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ntl
clang++ -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ntl
clang++ -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:ntl
g++ -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ntl
g++ -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ntl
g++ -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ntl
g++ -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:ntl

Compiler output

Implementation: T:openssl
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
keypair.c: keypair.c:19:8: warning: 'DH_new' is deprecated [-Wdeprecated-declarations]
keypair.c: 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: 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: # 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: # define OSSL_DEPRECATED(since) __attribute__((deprecated))
keypair.c: ^
keypair.c: keypair.c:25:5: error: incomplete definition of type 'struct dh_st'
keypair.c: 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: typedef struct dh_st DH;
keypair.c: ^
keypair.c: keypair.c:25:28: error: incomplete definition of type 'struct dh_st'
keypair.c: 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: 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 (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:openssl
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:openssl
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:openssl
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:openssl
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:openssl

Compiler output

Implementation: T:openssl
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
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 (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:openssl
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:openssl
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:openssl
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:openssl

Compiler output

Implementation: T:opensslnew
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
keypair.c: keypair.c:32:8: warning: 'DH_new' is deprecated [-Wdeprecated-declarations]
keypair.c: 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: 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: # 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: # define OSSL_DEPRECATED(since) __attribute__((deprecated))
keypair.c: ^
keypair.c: keypair.c:34:8: warning: 'DH_set0_pqg' is deprecated [-Wdeprecated-declarations]
keypair.c: 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: 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: # 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: # 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 (compiler,implementation) pairs: 5, namely:
CompilerImplementations
clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opensslnew
clang -march=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opensslnew
clang -march=native -O -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opensslnew
clang -march=native -Os -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opensslnew
clang -mcpu=native -O3 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE T:opensslnew

Compiler output

Implementation: T:opensslnew
Security model: timingleaks
Compiler: gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE
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: ...
try.c: /usr/bin/ld: warning: crypto_stream_chacha20_moon_avx2_64_constbranchindex-chacha.o: missing .note.GNU-stack section implies executable stack
try.c: /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
try.c: /usr/bin/ld: warning: crypto_stream_chacha20_moon_avx2_64_constbranchindex-chacha.o: missing .note.GNU-stack section implies executable stack
try.c: /usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker

Number of similar (compiler,implementation) pairs: 4, namely:
CompilerImplementations
gcc -march=native -mtune=native -O2 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opensslnew
gcc -march=native -mtune=native -O3 -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opensslnew
gcc -march=native -mtune=native -O -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opensslnew
gcc -march=native -mtune=native -Os -fomit-frame-pointer -fwrapv -fPIC -fPIE T:opensslnew