| Portability | portable |
|---|---|
| Stability | experimental |
| Maintainer | aseipp@pobox.com |
| Safe Haskell | None |
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)
- 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.
Constructors
| PublicKey | |
Fields | |
A SecretKey created by createKeypair. Be sure to keep this
safe!
Constructors
| SecretKey | |
Fields | |
createKeypair :: IO (PublicKey, SecretKey)Source
Randomly generate a public and private key for doing authenticated signing and verification.
Signing and verifying messages
Arguments
| :: SecretKey | Signers secret key |
| -> ByteString | Input message |
| -> ByteString | Resulting signed message |
Sign a message with a particular SecretKey.
Arguments
| :: PublicKey | Signers public key |
| -> ByteString | Signed message |
| -> Bool | Verification check |
Verifies a signed message against a PublicKey.
Detached signatures
Arguments
| :: 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.