Curvy.Key (Curvy v0.3.1) View Source
Module used to create ECDSA keypairs and convert to private and public key binaries.
Link to this section Summary
Functions
Converts the given Point to a ECDSA Keypair struct
without a private key.
Converts the given private key binary to a ECDSA Keypair.
Converts the given public key binary to a ECDSA Keypair struct
without a private key.
Creates a new random ESCDA keypair.
Returns the 32 byte private key binary from the given ECDSA Keypair.
Returns the public key binary from the given ECDSA Keypair in either
compressed or uncompressed form.
Link to this section Types
Specs
t() :: %Curvy.Key{
compressed: boolean(),
crv: atom(),
point: Curvy.Point.t(),
privkey: binary() | nil
}
ECDSA Keypair.
Always contains the t:Point.t coordinates and optionally a private key binary.
Link to this section Functions
Specs
from_point( Curvy.Point.t(), keyword() ) :: t()
Converts the given Point to a ECDSA Keypair struct
without a private key.
Specs
Converts the given private key binary to a ECDSA Keypair.
Specs
Converts the given public key binary to a ECDSA Keypair struct
without a private key.
Specs
Creates a new random ESCDA keypair.
Returns the 32 byte private key binary from the given ECDSA Keypair.
Returns the public key binary from the given ECDSA Keypair in either
compressed or uncompressed form.
Accepted options
:compressed- Return a 32 byte compressed public key. Default istrue.