Portability | portable |
---|---|
Stability | experimental |
Maintainer | aseipp@pobox.com |
Safe Haskell | None |
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)
- sign :: SecretKey -> ByteString -> ByteString
- verify :: PublicKey -> ByteString -> Bool
- newtype Signature = Signature {}
- sign' :: SecretKey -> ByteString -> Signature
- verify' :: PublicKey -> ByteString -> Signature -> Bool
Keypair creation
A PublicKey
created by createKeypair
.
A SecretKey
created by createKeypair
. Be sure to keep this
safe!
createKeypair :: IO (PublicKey, SecretKey)Source
Randomly generate a public and private key for doing authenticated signing and verification.
Signing and verifying messages
:: SecretKey | Signers secret key |
-> ByteString | Input message |
-> ByteString | Resulting signed message |
Sign a message with a particular SecretKey
.
:: PublicKey | Signers public key |
-> ByteString | Signed message |
-> Bool | Verification check |
Verifies a signed message against a PublicKey
.
Detached signatures
A Signature
which is detached from the message it signed.
:: SecretKey | Signers secret key |
-> ByteString | Input message |
-> Signature | Message signature, without the message |
Sign a message with a particular SecretKey
, only returning the
signature without the message.