Commit Graph

12 Commits

Author SHA1 Message Date
Olivier Chéron
299140f884 Remove unnecessary hash arguments
We don't need to give the hash algorithm as a separate argument since
it is already available from the digest value itself.
2019-03-01 06:28:55 +01:00
Olivier Chéron
997cea369b Rename to signDigestWith 2019-03-01 06:28:55 +01:00
Baojun Wang
b55a93dfdc add ECDSA sign/verify digest APIs
(rebased from commit 045793427e8d46594b0b2afedb314d027ec707ab)
2019-03-01 06:28:32 +01:00
Crockett
0fb8a73d3b Fixed compiler warnings 2019-02-03 16:06:05 -08:00
Crockett
88596509f0 Changed imports to match style of rest of library 2019-02-03 13:51:01 -08:00
Crockett
109600cec2 Added missing imports and removed duplicate imports. Tests pass. 2019-02-03 13:43:54 -08:00
Crockett
c71a6733dd Unified DSA and ECDSA truncate&hash function. 2019-02-03 13:30:56 -08:00
Olivier Chéron
43233cb911 Double-scalar multiplication using Shamir's trick 2016-09-10 12:05:46 +02:00
Olivier Chéron
c84230c69a Fixed hash truncation used in ECDSA signature & verification
The function tHash shifted the hash number to an incorrect number of bits
when the bit string had leading zeros.  This is one of two issues reported
in vincenthz/hs-tls#152.
2016-08-24 23:29:55 +02:00
Vincent Hanquez
5d2b417854 [pubkey] make DSA and ECDSA ByteString free 2015-05-11 14:18:49 +01:00
Vincent Hanquez
db7c3bbb4f [hash] massive overhaul of the hash interface
use the typeclass for the lowest IO impure C bindings definitions,
and define the pure interface as generic on top of this.

At the same time define an Hash.IO interface to allow mutable manipulations
of hash contextes when necessary.

Use HashAlgorithm instead of HashFunction in the [PubKey] sections

Tweak the HMAC, PBKDF2 functions to be more efficient and use the new interface
2015-04-30 06:18:07 +01:00
Vincent Hanquez
b1e222cf3d merge crypto-pubkey-types and crypto-pubkey
adapt CPRG to MonadRandom
2015-04-03 07:33:16 +01:00