Implementation notes: amd64, titan0, crypto_dh/claus

Computer: titan0
Microarchitecture: amd64; HW+AES (306c3)
Architecture: amd64
CPU ID: GenuineIntel-000306c3-bfebfbff
SUPERCOP version: 20230530
Operation: crypto_dh
Primitive: claus
TimeObject sizeTest sizeImplementationCompilerBenchmark dateSUPERCOP version
52070312123 16 0226165 1204 1856T:gmpg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52100982123 16 0224101 1204 1856T:gmpg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52139552050 16 0223568 1204 1856T:gmpg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52151601981 16 0221482 1196 1824T:gmpg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52473042921 336 2426203 3172 3680T:ntlg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52533574156 336 2431085 3228 3712T:ntlg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52610794218 336 2429085 3228 3712T:ntlg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
52923264084 336 2428471 3228 3712T:ntlg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
77928842879 16 2241738918 144436 11520T:cryptoppg++_-march=native_-mtune=native_-O2_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
77955832879 16 2241740982 144436 11520T:cryptoppg++_-march=native_-mtune=native_-O3_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
78478262762 16 2241738346 144436 11520T:cryptoppg++_-march=native_-mtune=native_-O_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530
78748352145 16 2241735814 144428 11488T:cryptoppg++_-march=native_-mtune=native_-Os_-fomit-frame-pointer_-fwrapv_-fPIC_-fPIE2023053020230530

Test failure

Implementation: T:openssl
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111
crypto_dh_keypair returns nonzero

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

Test failure

Implementation: T:opensslnew
Security model: timingleaks
Compiler: clang -march=native -O2 -fomit-frame-pointer -fwrapv -Qunused-arguments -fPIC -fPIE
error 111

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

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:34:8: warning: implicit declaration of function 'DH_set0_pqg' is invalid in C99 [-Wimplicit-function-declaration]
keypair.c: if (!DH_set0_pqg(dh,p,0,g)) goto error;
keypair.c: ^
keypair.c: keypair.c:39:7: warning: implicit declaration of function 'DH_get0_pub_key' is invalid in C99 [-Wimplicit-function-declaration]
keypair.c: z = DH_get0_pub_key(dh);
keypair.c: ^
keypair.c: keypair.c:39:5: warning: incompatible integer to pointer conversion assigning to 'const BIGNUM *' (aka 'const struct bignum_st *') from 'int' [-Wint-conversion]
keypair.c: z = DH_get0_pub_key(dh);
keypair.c: ^ ~~~~~~~~~~~~~~~~~~~
keypair.c: keypair.c:46:7: warning: implicit declaration of function 'DH_get0_priv_key' is invalid in C99 [-Wimplicit-function-declaration]
keypair.c: z = DH_get0_priv_key(dh);
keypair.c: ^
keypair.c: keypair.c:46:5: warning: incompatible integer to pointer conversion assigning to 'const BIGNUM *' (aka 'const struct bignum_st *') from 'int' [-Wint-conversion]
keypair.c: z = DH_get0_priv_key(dh);
keypair.c: ^ ~~~~~~~~~~~~~~~~~~~~
keypair.c: 5 warnings generated.
sharedsecret.c: sharedsecret.c:35:8: warning: implicit declaration of function 'DH_set0_pqg' is invalid in C99 [-Wimplicit-function-declaration]
sharedsecret.c: if (!DH_set0_pqg(alice,p,0,g)) goto error;
sharedsecret.c: ^
sharedsecret.c: sharedsecret.c:44:8: warning: implicit declaration of function 'DH_set0_key' is invalid in C99 [-Wimplicit-function-declaration]
sharedsecret.c: if (!DH_set0_key(alice,pub_key,priv_key)) goto error;
sharedsecret.c: ^
sharedsecret.c: 2 warnings generated.

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:34:8: warning: implicit declaration of function 'DH_set0_pqg' [-Wimplicit-function-declaration]
keypair.c: 34 | if (!DH_set0_pqg(dh,p,0,g)) goto error;
keypair.c: | ^~~~~~~~~~~
keypair.c: keypair.c:39:7: warning: implicit declaration of function 'DH_get0_pub_key'; did you mean 'DH_check_pub_key'? [-Wimplicit-function-declaration]
keypair.c: 39 | z = DH_get0_pub_key(dh);
keypair.c: | ^~~~~~~~~~~~~~~
keypair.c: | DH_check_pub_key
keypair.c: keypair.c:39:5: warning: assignment to 'const BIGNUM *' {aka 'const struct bignum_st *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
keypair.c: 39 | z = DH_get0_pub_key(dh);
keypair.c: | ^
keypair.c: keypair.c:46:7: warning: implicit declaration of function 'DH_get0_priv_key' [-Wimplicit-function-declaration]
keypair.c: 46 | z = DH_get0_priv_key(dh);
keypair.c: | ^~~~~~~~~~~~~~~~
keypair.c: keypair.c:46:5: warning: assignment to 'const BIGNUM *' {aka 'const struct bignum_st *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
keypair.c: 46 | z = DH_get0_priv_key(dh);
keypair.c: | ^
sharedsecret.c: sharedsecret.c: In function 'crypto_dh_claus_opensslnew_timingleaks':
sharedsecret.c: sharedsecret.c:35:8: warning: implicit declaration of function 'DH_set0_pqg' [-Wimplicit-function-declaration]
sharedsecret.c: 35 | if (!DH_set0_pqg(alice,p,0,g)) goto error;
sharedsecret.c: | ^~~~~~~~~~~
sharedsecret.c: sharedsecret.c:44:8: warning: implicit declaration of function 'DH_set0_key' [-Wimplicit-function-declaration]
sharedsecret.c: 44 | if (!DH_set0_key(alice,pub_key,priv_key)) goto error;
sharedsecret.c: | ^~~~~~~~~~~

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