HAP.Crypto.EDDSA (HAP v0.1.0) View Source
Functions to generate keys, sign & verify messages using Elliptic Curve Signatures
Link to this section Summary
Functions
Generates a new signing key pair using the ed25519
signature scheme.
Signs the given message with the given ed25519
private key.
Verifies that the given signature signs the given message under the key specified.
Link to this section Types
Link to this section Functions
Specs
key_gen() :: {:ok, public_key(), private_key()}
Generates a new signing key pair using the ed25519
signature scheme.
Returns {:ok, public_key, private_key}
Specs
sign(plaintext(), private_key()) :: {:ok, signature()}
Signs the given message with the given ed25519
private key.
Returns {:ok, signature}
Specs
verify(plaintext(), signature(), public_key()) :: {:ok, boolean()}
Verifies that the given signature signs the given message under the key specified.
Returns {:ok, true}
or {:ok, false}