Crate libcrux_ecdh

Source
Expand description

§ECDH

§x25519

For x25519 the portable HACL implementation is used.

§P256

For P256 the portable HACL implementation is used.

Modules§

curve25519
p256

Structs§

P256PrivateKey
P256PublicKey
P256SharedSecret
Output of a scalar multiplication between a public key and a secret key.
X25519PrivateKey
X25519PublicKey
X25519SharedSecret
Output of a scalar multiplication between a public key and a secret key.

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_derive
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_derive
x25519_generate_secret
Generate a new x25519 secret.
x25519_key_gen
Generate a new P256 key pair