Module ecdh

Source
Expand description

§ECDH

Depending on the platform and available features the most efficient implementation is chosen.

§x25519

For x25519 the portable HACL implementation is used unless running on an x64 CPU with BMI2 and ADX support. In this case the libjade implementation is used.

§P256

For P256 the portable HACL implementation is used.

Enums§

Algorithm
ECDH algorithm.
Error
LowLevelError

Functions§

derive
Derive the ECDH shared secret. Returns Ok(point * scalar) on the provided curve Algorithm or an error.
generate_secret
Generate a new private key scalar.
key_gen
Generate a fresh key pair.
p256_generate_secret
Generate a new p256 secret (scalar)
p256_key_gen
Generate a new P256 key pair
p256_validate_scalar
secret_to_public
Derive the public key for the provided secret key scalar.
validate_scalar
Validate a secret key.
x25519_generate_secret
Generate a new x25519 secret.
x25519_key_gen
Generate a new P256 key pair