TIMECOP
/ crypto_dh

Primitives for crypto_dh

This page lists all primitives grouped under operation crypto_dh.

For each primitive, all listed implementations were checked across a number of compilers, compiler options, and hosts.

The progress bar shows the relative number of successes, fails, and errors:

  • Success. The constant-time checker didn't find any cases where the execution time of the tested code depends on secret data.
  • Fail. The execution time of the tested code depends on secret data.
  • Error.

Errors can have multiple causes:
  • The constant-time checker encountered an error and couldn't be completed.
  • Valgrind found memory issues, but none of them are related to constant-time checks.
  • The constant-time checker timed out after 6 minutes.
  • The tested code produced invalid results. More details can be found near the start of the output file. Example:
    crypto_aead_decrypt returns nonzero 

The absolute number of successes, fails, and errors is shown to the left of the progress bar.

The following code was used to flag secret data, and test implementations:

1void timecop_doit(void)
2{
3 poison(a, alen);
4 poison(b, blen);
5 crypto_dh_keypair(c,a);
6 crypto_dh_keypair(d,b);
7 unpoison(c, clen);
8 unpoison(d, dlen);
9 crypto_dh(e,d,a);
10 crypto_dh(f,c,b);
11
12}

Click an implementation to see all checked compiler options.

claus
Description
Classic Diffie--Hellman secret sharing modulo a 1024-bit prime
Designers
Example for eBATS
Implementations:
curve2251
Description
Elliptic-curve Diffie--Hellman secret sharing using a curve over a field with 2^251 elements
Designers
Pierrick Gaudry (Laboratoire Lorrain de Recherche en Informatique et ses Applications)
Emmanuel Thomé (Laboratoire Lorrain de Recherche en Informatique et ses Applications)
Implementations:
curve25519
Description
Elliptic-curve Diffie--Hellman secret sharing using the curve y^2=x^3+486662x^2+x modulo 2^255-19
Designers
Daniel J. Bernstein
Implementations:
ed448goldilocks
Description
Ed448-Goldilocks sign and dh
Designers
Mike Hamburg
Implementations:
ed521gs
Implementations:
gls254
Description
Elliptic-curve Diffie--Hellman secret sharing using the GLS binary curve (L^2 + LZ + aZ^2)X^2 = X^4 + bZ^4 defined over GF(2^254) and implemented with lambda-projective coordinates (X, L, Z).
Designers
Thomaz Oliveira, Computer Science Department, CINVESTAV-IPN, Mexico
Julio López, Institute of Computing, University of Campinas, Brazil
Diego de Freitas Aranha, Department of Computer Science, University of Brasília, Brazil
Francisco Rodríguez-Henríquez, Computer Science Department, CINVESTAV-IPN, Mexico
Implementations:
gls254prot
Description
Elliptic-curve Diffie--Hellman secret sharing using the GLS binary curve (L^2 + LZ + aZ^2)X^2 = X^4 + bZ^4 defined over GF(2^254) and implemented with lambda-projective coordinates (X, L, Z).
Designers
Thomaz Oliveira, Computer Science Department, CINVESTAV-IPN, Mexico
Julio López, Institute of Computing, University of Campinas, Brazil
Diego de Freitas Aranha, Department of Computer Science, University of Brasília, Brazil
Francisco Rodríguez-Henríquez, Computer Science Department, CINVESTAV-IPN, Mexico
Implementations:
hector
Description
Hyperelliptic Curve with Two-Rank One: Diffie--Hellman secret sharing using a genus-2 hyperelliptic curve of 2-rank 1 over a field of size 2^113
Designers
Peter Birkner (Technische Universiteit Eindhoven)
Peter Schwabe (Technische Universiteit Eindhoven)
Implementations:
k277mon
Description
Elliptic-curve Diffie--Hellman secret sharing using a Koblitz curve defined over the field F_2^277 (Montgomery ladder scalar multiplication)
Designers
Thomaz Oliveira, Cinvestav-IPN
Julio López, University of Campinas
Francisco Rodríguez-Henríquez, Cinvestav-IPN

Implementations:
k277taa
Description
Elliptic-curve Diffie--Hellman secret sharing using a Koblitz curve defined over the field F_2^277 (tau-and-add scalar multiplication)
Designers
Thomaz Oliveira, Cinvestav-IPN
Julio López, University of Campinas
Francisco Rodríguez-Henríquez, Cinvestav-IPN

Implementations:
k298
Description
Elliptic-curve Diffie--Hellman secret sharing using a Koblitz curve defined over the field F_2^298
Designers
Thomaz Oliveira, Cinvestav-IPN
Julio López, University of Campinas
Francisco Rodríguez-Henríquez, Cinvestav-IPN

Implementations:
kummer
Implementations:
nist521gs
Implementations:
nistp256
Description
Elliptic-curve Diffie--Hellman secret sharing using the standard NIST P-256 elliptic curve, a curve modulo the prime 2^256-2^224+2^192+2^96-1
Designers
Yassir Nawaz (University of Waterloo)
Guang Gong (University of Waterloo)
Implementations:
sclaus1024
Description
Variant of CLAUS, using 160-bit exponents and 1024-bit modulus
Designers
Wei Dai
Implementations:
sclaus2048
Description
Variant of CLAUS, using 224-bit exponents and 2048-bit modulus
Designers
Wei Dai
Implementations:
surf127eps
Description
Hyperelliptic-curve Diffie--Hellman secret sharing using a genus-2 curve with complex multiplication by Q(i sqrt(5+sqrt(53))) modulo the prime 2^127-735
Designers
Pierrick Gaudry (Laboratoire Lorrain de Recherche en Informatique et ses Applications)
Thomas Houtmann (École Polytechnique)
Emmanuel Thomé (École Polytechnique)
Implementations:
surf2113
Description
Hyperelliptic-curve Diffie--Hellman secret sharing using a genus-2 curve over a field with 2^113 elements
Designers
Pierrick Gaudry (Laboratoire Lorrain de Recherche en Informatique et ses Applications)
Emmanuel Thomé (Laboratoire Lorrain de Recherche en Informatique et ses Applications)
Implementations: