An EdDSA Secret key
Modulecryptonite-0.30Haskell2010
Crypto.PubKey.EdDSA
EdDSA signature generation and verification, implemented in Haskell and parameterized with elliptic curve and hash algorithm. Only edwards25519 is supported at the moment.
The module provides "context" and "prehash" variants defined in RFC 8032.
This implementation is most useful when wanting to customize the hash algorithm. See module Crypto.PubKey.Ed25519 for faster Ed25519 with SHA-512.
Synopsis
- newtype SecretKey
- newtype PublicKey
- newtype Signature
- class EllipticCurveEdDSA
- value publicKeySize
- method secretKeySize
- value signatureSize
- value signature
- value publicKey
- value secretKey
- value toPublic
- value sign
- value signCtx
- value signPh
- value verify
- value verifyCtx
- value verifyPh
- value generateSecretKey
- Packagecryptonite-0.30
- Exports18
- LanguageHaskell2010
- LicenceBSD-3-Clause
- SourceEdDSA.hs
An EdDSA public key
Instances4Eq, Show, NFData, ByteArrayAccess
Eq (PublicKey curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSAShow (PublicKey curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSANFData (PublicKey curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSAByteArrayAccess (PublicKey curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSA
An EdDSA signature
Instances4Eq, Show, NFData, ByteArrayAccess
Eq (Signature curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSAShow (Signature curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSANFData (Signature curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSAByteArrayAccess (Signature curve hash)Defined in cryptonite-0.30 · Crypto.PubKey.EdDSA
Curves with EdDSA implementation
class (EllipticCurveBasepointArith curve, KnownNat (CurveDigestSize curve)) => EllipticCurveEdDSA curve whereElliptic curves with an implementation of EdDSA
Associated types
type family CurveDigestSize curve :: NatSize of the digest for this curve (in bytes)
Instances1EllipticCurveEdDSA
EllipticCurveEdDSA Curve_Edwards25519Defined in cryptonite-0.30 · Crypto.PubKey.EdDSA
Size of public keys for this curve (in bytes)
Size of secret keys for this curve (in bytes)
Size of signatures for this curve (in bytes)
Smart constructors
Try to build a signature from a bytearray
Try to build a public key from a bytearray
Try to build a secret key from a bytearray
Methods
Create a public key from a secret key
Sign a message using the key pair
Sign a message using the key pair under context ctx
Sign a prehashed message using the key pair under context ctx
Verify a message
Verify a message under context ctx
Verify a prehashed message under context ctx
Generate a secret key