-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | ed25519 cryptographic signatures
--   
--   This package provides a simple, portable implementation of the ed25519
--   public-key signature system. It also includes support for detached
--   signatures.
--   
--   The underlying implementation uses the <tt>ref10</tt> implementation
--   of ed25519 from SUPERCOP, and should be relatively fast.
--   
--   For more information (including how to get a copy of the software)
--   visit <a>http://ed25519.cr.yp.to</a>.
@package ed25519
@version 0.0.2.0


-- | This module provides bindings to the ed25519 public-key signature
--   system, including detached signatures. The underlying implementation
--   uses the <tt>ref10</tt> implementation of ed25519 from SUPERCOP, and
--   should be relatively fast.
--   
--   For more information (including how to get a copy of the software)
--   visit <a>http://ed25519.cr.yp.to</a>.
module Crypto.Sign.Ed25519

-- | A <a>PublicKey</a> created by <a>createKeypair</a>.
newtype PublicKey
PublicKey :: ByteString -> PublicKey
unPublicKey :: PublicKey -> ByteString

-- | A <a>SecretKey</a> created by <a>createKeypair</a>. Be sure to keep
--   this safe!
newtype SecretKey
SecretKey :: ByteString -> SecretKey
unSecretKey :: SecretKey -> ByteString

-- | Randomly generate a public and private key for doing authenticated
--   signing and verification.
createKeypair :: IO (PublicKey, SecretKey)

-- | Sign a message with a particular <a>SecretKey</a>.
sign :: SecretKey -> ByteString -> ByteString

-- | Verifies a signed message against a <a>PublicKey</a>.
verify :: PublicKey -> ByteString -> Bool

-- | A <a>Signature</a> which is detached from the message it signed.
newtype Signature
Signature :: ByteString -> Signature
unSignature :: Signature -> ByteString

-- | Sign a message with a particular <a>SecretKey</a>, only returning the
--   signature without the message.
sign' :: SecretKey -> ByteString -> Signature

-- | Verify a message with a detached <a>Signature</a>, for a given
--   <a>PublicKey</a>.
verify' :: PublicKey -> ByteString -> Signature -> Bool
instance Eq SecretKey
instance Show SecretKey
instance Ord SecretKey
instance Eq PublicKey
instance Show PublicKey
instance Ord PublicKey
instance Eq Signature
instance Show Signature
instance Ord Signature
