ed25519-0.0.2.0: ed25519 cryptographic signatures

Portabilityportable
Stabilityexperimental
Maintaineraseipp@pobox.com
Safe HaskellNone

Crypto.Sign.Ed25519

Contents

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.

Synopsis

Keypair creation

newtype PublicKey Source

A PublicKey created by createKeypair.

Constructors

PublicKey 

newtype SecretKey Source

A SecretKey created by createKeypair. Be sure to keep this safe!

Constructors

SecretKey 

createKeypair :: IO (PublicKey, SecretKey)Source

Randomly generate a public and private key for doing authenticated signing and verification.

Signing and verifying messages

signSource

Arguments

:: SecretKey

Signers secret key

-> ByteString

Input message

-> ByteString

Resulting signed message

Sign a message with a particular SecretKey.

verifySource

Arguments

:: PublicKey

Signers public key

-> ByteString

Signed message

-> Bool

Verification check

Verifies a signed message against a PublicKey.

Detached signatures

newtype Signature Source

A Signature which is detached from the message it signed.

Constructors

Signature 

sign'Source

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.

verify'Source

Arguments

:: PublicKey

Signers public key

-> ByteString

Input message, without signature

-> Signature

Message signature

-> Bool 

Verify a message with a detached Signature, for a given PublicKey.