License | BSD-style |
---|---|
Maintainer | Olivier Chéron <olivier.cheron@gmail.com> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
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
- data SecretKey
- data PublicKey
- data Signature
- publicKeySize :: Int
- secretKeySize :: Int
- signatureSize :: Int
- signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature
- publicKey :: ByteArrayAccess ba => ba -> CryptoFailable PublicKey
- secretKey :: ByteArrayAccess ba => ba -> CryptoFailable SecretKey
- toPublic :: SecretKey -> PublicKey
- sign :: ByteArrayAccess ba => SecretKey -> PublicKey -> ba -> Signature
- verify :: ByteArrayAccess ba => PublicKey -> ba -> Signature -> Bool
- generateSecretKey :: MonadRandom m => m SecretKey
Documentation
An Ed448 Secret key
An Ed448 public key
An Ed448 signature
Size constants
publicKeySize :: Int #
A public key is 57 bytes
secretKeySize :: Int #
A secret key is 57 bytes
signatureSize :: Int #
A signature is 114 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
sign :: ByteArrayAccess ba => SecretKey -> PublicKey -> ba -> Signature #
Sign a message using the key pair
generateSecretKey :: MonadRandom m => m SecretKey #
Generate a secret key