crypto-pubkey-0.2.8: Public Key cryptography

Safe HaskellNone
LanguageHaskell98

Crypto.PubKey.ECC.ECDSA

Description

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

Synopsis

Documentation

signWith Source

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) 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.