cryptonite-0.30: Cryptography Primitives sink
LicenseBSD-style
MaintainerOlivier Chéron <olivier.cheron@gmail.com>
Stabilityexperimental
Portabilityunknown
Safe HaskellNone
LanguageHaskell2010

Crypto.PubKey.Ed448

Description

Ed448 support

Internally uses Decaf point compression to omit the cofactor and implementation by Mike Hamburg. Externally API and data types are compatible with the encoding specified in RFC 8032.

Synopsis

Documentation

data SecretKey Source #

An Ed448 Secret key

Instances

Instances details
Eq SecretKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Show SecretKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

NFData SecretKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

rnf :: SecretKey -> () #

ByteArrayAccess SecretKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

length :: SecretKey -> Int #

withByteArray :: SecretKey -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: SecretKey -> Ptr p -> IO () #

data PublicKey Source #

An Ed448 public key

Instances

Instances details
Eq PublicKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Show PublicKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

NFData PublicKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

rnf :: PublicKey -> () #

ByteArrayAccess PublicKey Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

length :: PublicKey -> Int #

withByteArray :: PublicKey -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: PublicKey -> Ptr p -> IO () #

data Signature Source #

An Ed448 signature

Instances

Instances details
Eq Signature Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Show Signature Source # 
Instance details

Defined in Crypto.PubKey.Ed448

NFData Signature Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

rnf :: Signature -> () #

ByteArrayAccess Signature Source # 
Instance details

Defined in Crypto.PubKey.Ed448

Methods

length :: Signature -> Int #

withByteArray :: Signature -> (Ptr p -> IO a) -> IO a #

copyByteArrayToPtr :: Signature -> Ptr p -> IO () #

Size constants

publicKeySize :: Int Source #

A public key is 57 bytes

secretKeySize :: Int Source #

A secret key is 57 bytes

signatureSize :: Int Source #

A signature is 114 bytes

Smart constructors

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

Try to build a signature from a bytearray

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

Try to build a public key from a bytearray

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

Try to build a secret key from a bytearray

Methods

toPublic :: SecretKey -> PublicKey Source #

Create a public key from a secret key

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

Sign a message using the key pair

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

Verify a message

generateSecretKey :: MonadRandom m => m SecretKey Source #

Generate a secret key