crypto-pubkey-0.2.8: Public Key cryptography

Safe Haskell | None
Language | Haskell98

Crypto.PubKey.ECC.ECDSA

Description

WARNING: Signature operations may leak the private key. Signature verification should be safe.

Synopsis

- 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

signWith #

Arguments

:: 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) #

Sign message using the private key.

WARNING: Vulnerable to timing attacks.

verify :: HashFunction -> PublicKey -> Signature -> ByteString -> Bool #

Verify a bytestring using the public key.