HAP.Crypto.ECDH (HAP v0.1.0) View Source
Functions to work with Elliptic Curve Diffie-Hellman shared secret generation
Link to this section Summary
Functions
Computes a shared secret from the counterpary's public key and our private key, using the x25519
curve.
Generates a new ECDH key pair using the x25519
curve.
Link to this section Types
Link to this section Functions
Specs
compute_key(public_key(), private_key()) :: {:ok, shared_secret()}
Computes a shared secret from the counterpary's public key and our private key, using the x25519
curve.
Returns {:ok, shared secret}
Specs
key_gen() :: {:ok, public_key(), private_key()}
Generates a new ECDH key pair using the x25519
curve.
Returns {:ok, public_key, provate_key}