cryptonite-0.24: Cryptography Primitives sink

LicenseBSD-style
MaintainerVincent Hanquez <vincent@snarc.org>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.PubKey.Ed25519

Contents

Description

Ed25519 support

Synopsis

Documentation

Size constants

publicKeySize :: Int

A public key is 32 bytes

secretKeySize :: Int

A secret key is 32 bytes

signatureSize :: Int

A signature is 64 bytes

Smart constructors

signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature

Try to build a signature from a bytearray

publicKey :: ByteArrayAccess ba => ba -> CryptoFailable PublicKey

Try to build a public key from a bytearray

secretKey :: ByteArrayAccess ba => ba -> CryptoFailable SecretKey

Try to build a secret key from a bytearray

methods

toPublic :: SecretKey -> PublicKey

Create a public key from a secret key

sign :: ByteArrayAccess ba => SecretKey -> PublicKey -> ba -> Signature

Sign a message using the key pair

verify :: ByteArrayAccess ba => PublicKey -> ba -> Signature -> Bool

Verify a message

generateSecretKey :: MonadRandom m => m SecretKey

Generate a secret key