License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | unknown |
Safe Haskell | None |
Language | Haskell2010 |
Ed25519 support
Synopsis
- newtype SecretKey = SecretKey ScrubbedBytes
- newtype PublicKey = PublicKey Bytes
- data Signature
- signature :: ByteArrayAccess ba => ba -> CryptoFailable Signature
- publicKey :: ByteArrayAccess ba => ba -> CryptoFailable PublicKey
- secretKey :: ByteArrayAccess ba => ba -> CryptoFailable SecretKey
- toPublic :: SecretKey -> PublicKey
- sign :: ( ByteArrayAccess msg, ByteArrayAccess salt) => SecretKey -> salt -> PublicKey -> msg -> Signature
- verify :: ByteArrayAccess ba => PublicKey -> ba -> Signature -> Bool
- publicAdd :: PublicKey -> PublicKey -> PublicKey
- secretAdd :: SecretKey -> SecretKey -> SecretKey
Documentation
An Ed25519 Secret key
An Ed25519 public key
An Ed25519 signature
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
sign :: ( ByteArrayAccess msg, ByteArrayAccess salt) => SecretKey -> salt -> PublicKey -> msg -> Signature Source #
Sign a message using the key pair