Commit Graph

30 Commits

Author SHA1 Message Date
Vincent Hanquez
84e96d2fa3 Update context size for Blake2bp and Blake2sp
Also fix Blake2bp to not use blake2sp functions
2017-10-02 21:05:30 +01:00
Vincent Hanquez
74f1c1872b [BLAKE2] update context size on the haskell to the latest code 2017-10-02 20:44:51 +01:00
Vincent Hanquez
0dc0f30b86 Add HashBlockSize & HashDigestSize & HashInternalContextSize type family for all Hash algorithms
supercedes PR #158
2017-07-07 18:28:06 +01:00
Vincent Hanquez
7378fe3f45 add some missing blake2 modes 2017-02-14 16:26:44 +00:00
Vincent Hanquez
634768b2fa add Data also to Hash algorithms 2017-02-14 12:02:26 +00:00
Vincent Hanquez
9227ab9225 add Typeable to template 2017-02-14 10:15:58 +00:00
Vincent Hanquez
93fad940e4 Improve context memory usage of Keccak and SHA3
saves up to 72 bytes per context for SHA3-512
2016-03-26 10:29:33 +00:00
Vincent Hanquez
50631d3150 Add support for blake2s(p) 224 bits 2016-01-09 10:09:35 +00:00
Vincent Hanquez
812b5d1aed [blake2] uncapitalize the modules and types as it's not abbreviation. 2015-11-19 14:24:54 +00:00
Vincent Hanquez
fae5f084cf [Blake2] define the algorithm as a multiple algorithm so that the output digest size is explicit in the digest types. 2015-11-19 12:10:14 +00:00
Vincent Hanquez
69f9d225eb [hash] trim hash algorithm with multiple output size.
The output size is now passed by parameter to the finalize function
instead of being stored in the context. that simplify quite a
bit the passing of this parameter
2015-11-19 11:52:21 +00:00
Vincent Hanquez
ad285be68c [Hash] tweak internal C API to have the hashlen 2015-11-19 11:37:38 +00:00
Vincent Hanquez
f51fdf23ca [Gen] make sure it's harder to confuse bits and bytes, and add safer display operation 2015-11-19 11:08:51 +00:00
Vincent Hanquez
3fc6dd17a9 Separate multiples/simple hash at the type level 2015-11-19 11:00:56 +00:00
Vincent Hanquez
f3edfc70f1 improve the generator code documentation, and be more consitent with the bytes/bits 2015-11-19 10:40:38 +00:00
Vincent Hanquez
093f1af8e4 Merge pull request #41 from kinoru/master
Fix typo: Kekkak -> Keccak
2015-11-18 15:38:19 +00:00
John Galt
880dfae098 Added BLAKE2 support 2015-11-12 12:33:20 -05:00
kinoru
558c21491e Fix typo: Kekkak -> Keccak
The SHA-3 winning algorithm's name is Keccak (pronounced "catch-ack"),
not Kekkak.

- <http://keccak.noekeon.org/>
- <http://www.nist.gov/itl/csd/sha-100212.cfm>
- <https://en.wikipedia.org/wiki/SHA-3>
2015-10-27 14:56:42 +00:00
Vincent Hanquez
393b159d5f [hash] add haddock documentation 2015-05-19 11:51:18 +01:00
Vincent Hanquez
b45e8e2c2c [HASH] update template to not put the deprecated foreign header 2015-05-06 07:55:37 +01:00
Vincent Hanquez
81e335cfff [HASH] re-enable SHA512t 2015-05-06 07:53:51 +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
1c8d966d71 [Hash] remove unnecessary modules and not used template 2015-04-28 11:37:42 +01:00
Vincent Hanquez
6722a02a74 move lowlevel implementation of hashes to byteArrays 2015-04-24 13:30:58 +01:00
Vincent Hanquez
684e0ea42a cleanup extensions needed in hash templates 2015-04-05 07:46:51 +01:00
Vincent Hanquez
d9183b7d9b missing template from previous commit 2015-03-08 15:18:45 +08:00
Vincent Hanquez
95160dee56 update modules to use more efficient byte array memory allocation and representation for contextes 2015-03-08 15:18:28 +08:00
Vincent Hanquez
bbbbdc4b39 use directly compat module instead of Crypto.Hash.Internal 2015-02-15 00:39:34 +00:00
Vincent Hanquez
b5dbc9caae add internalUpdateUnsafe to process data more efficiently at the expense of threads.
internalUpdateUnsafe, just like internalUpdate update the context, but
does it using the unsafe key word for the ffi binding
2015-02-14 23:39:06 +00:00
Vincent Hanquez
4652fd99a7 add template for hash generation and the little program associated with it 2015-02-08 12:04:05 +00:00