-- 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 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.
@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 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.
module Crypto.Sign.Ed25519

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

-- | A SecretKey created by createKeypair. 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 SecretKey.
sign :: SecretKey -> ByteString -> ByteString

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

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

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

-- | Verify a message with a detached Signature, for a given
--   PublicKey.
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
