Copyright | (c) Austin Seipp 2013-2015 |
---|---|
License | MIT |
Maintainer | aseipp@pobox.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Crypto.Sign.Ed25519
Description
This module provides bindings to the ed25519 public-key signature
system, including detached signatures. The underlying
implementation uses the ref10
implementation of ed25519 from
SUPERCOP, and should be relatively fast.
For more information (including how to get a copy of the software) visit http://ed25519.cr.yp.to.
- newtype PublicKey = PublicKey {}
- newtype SecretKey = SecretKey {}
- createKeypair :: IO (PublicKey, SecretKey)
- createKeypairFromSeed :: ByteString -> (PublicKey, SecretKey)
- toPublicKey :: SecretKey -> PublicKey
- sign :: SecretKey -> ByteString -> ByteString
- verify :: PublicKey -> ByteString -> Bool
- newtype Signature = Signature {}
- sign' :: SecretKey -> ByteString -> Signature
- verify' :: PublicKey -> ByteString -> Signature -> Bool
Keypair creation
A
created by PublicKey
.createKeypair
Constructors
PublicKey | |
Fields |
A
created by SecretKey
. Be sure to keep this
safe!createKeypair
Constructors
SecretKey | |
Fields |
createKeypair :: IO (PublicKey, SecretKey) Source
Arguments
:: ByteString | Two byte seed input |
-> (PublicKey, SecretKey) | Resulting keypair |
Signing and verifying messages
Arguments
:: SecretKey | Signers |
-> ByteString | Input message |
-> ByteString | Resulting signed message |
Arguments
:: PublicKey | Signers |
-> ByteString | Signed message |
-> Bool | Verification result |
Detached signatures
Arguments
:: SecretKey | Signers |
-> ByteString | Input message |
-> Signature | Message |