crypto-pubkey-0.2.4: Public Key cryptography

Safe HaskellNone

Crypto.PubKey.ECC.ECDSA

Description

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

Synopsis

Documentation

signWithSource

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 -> BoolSource

Verify a bytestring using the public key.