License | BSD-style |
---|---|
Maintainer | Vincent Hanquez <vincent@snarc.org> |
Stability | experimental |
Portability | Good |
Safe Haskell | None |
Language | Haskell98 |
- data Error
- type Params = (Integer, Integer, Integer)
- type Signature = (Integer, Integer)
- data PublicKey :: * = PublicKey {}
- data PrivateKey :: * = PrivateKey {}
- sign :: CryptoRandomGen g => g -> (ByteString -> ByteString) -> PrivateKey -> ByteString -> Either GenError (Signature, g)
- verify :: Signature -> (ByteString -> ByteString) -> PublicKey -> ByteString -> Either Error Bool
Documentation
InvalidSignature | signature is not valid r or s is not between the bound 0..q |
RandomGenFailure GenError | the random generator returns an error. give the opportunity to reseed for example. |
data PublicKey :: *
Represent a DSA public key.
PublicKey | |
|
data PrivateKey :: *
Represent a DSA private key.
Only x need to be secret. the DSA parameters are publicly shared with the other side.
PrivateKey | |
|
sign :: CryptoRandomGen g => g -> (ByteString -> ByteString) -> PrivateKey -> ByteString -> Either GenError (Signature, g) Source
sign message using the private key.
verify :: Signature -> (ByteString -> ByteString) -> PublicKey -> ByteString -> Either Error Bool Source
verify a bytestring using the public key.