Safe Haskell | None |
---|---|
Language | Haskell98 |
WARNING: Signature operations may leak the private key. Signature verification should be safe.
- module Crypto.Types.PubKey.ECDSA
- signWith :: Integer -> PrivateKey -> HashFunction -> ByteString -> Maybe Signature
- sign :: CPRG g => g -> PrivateKey -> HashFunction -> ByteString -> (Signature, g)
- verify :: HashFunction -> PublicKey -> Signature -> ByteString -> Bool
Documentation
module Crypto.Types.PubKey.ECDSA
:: Integer | k random number |
-> PrivateKey | private key |
-> HashFunction | hash function |
-> ByteString | message to sign |
-> Maybe Signature |
Sign message using the private key and an explicit k number.
WARNING: Vulnerable to timing attacks.
sign :: CPRG g => g -> PrivateKey -> HashFunction -> ByteString -> (Signature, g) Source
Sign message using the private key.
WARNING: Vulnerable to timing attacks.
verify :: HashFunction -> PublicKey -> Signature -> ByteString -> Bool Source
Verify a bytestring using the public key.