Copyright | (c) Austin Seipp 2013-2015 |
---|---|
License | MIT |
Maintainer | aseipp@pobox.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
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
A
created by SecretKey
. Be sure to keep this
safe!createKeypair
createKeypair :: IO (PublicKey, SecretKey) Source
:: ByteString | Two byte seed input |
-> (PublicKey, SecretKey) | Resulting keypair |
Signing and verifying messages
:: SecretKey | Signers |
-> ByteString | Input message |
-> ByteString | Resulting signed message |
:: PublicKey | Signers |
-> ByteString | Signed message |
-> Bool | Verification result |
Detached signatures
A
which is detached from the message it signed.Signature
:: SecretKey | Signers |
-> ByteString | Input message |
-> Signature | Message |