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
- LowLevel
Error
Functions§
- derive
- Derive the ECDH shared secret.
Returns
Ok(point * scalar)
on the provided curveAlgorithm
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