Commit Graph

468 Commits

Author SHA1 Message Date
Vincent Hanquez
67dd8ed7fc [Hash] change Digest to use a foundation UArray that have configurable pinnable memory setting 2017-04-25 14:23:13 +01:00
Vincent Hanquez
a9fd1f079d [Hash] update part of Crypto.Hash.IO to ScopeTypeVariable 2017-04-25 14:22:20 +01:00
Vincent Hanquez
53bd6c13b7 Add missing extension 2017-04-25 14:21:53 +01:00
Vincent Hanquez
ba1dfdf66d [Hash] stylistic improvement using ScopedTypeVariables
remove the inner function with magic argument in favor of direct
call pinning some types with signature
2017-04-25 14:16:11 +01:00
Dimitri DeFigueiredo
4aec5fc98e Fix issue #154 2017-04-21 13:51:52 -06:00
Vincent Hanquez
4f988181c7 Merge pull request #150 from SamProtas/twofish
Twofish
2017-04-12 07:47:19 +01:00
Kazu Yamamoto
697fe61f9b using pointSize in withTempPoint to fix #151. 2017-04-11 20:32:57 +09:00
Sam Protas
04b4c945c0 Add import to fix backwards compatibility 2017-04-10 00:57:49 -04:00
Sam Protas
762d818ec0 Twofish 192 and 256 bit key support 2017-04-10 00:33:54 -04:00
Olivier Chéron
112d2fbb15 Decrease Argon2 maximum output length
Fixes #148.
2017-04-09 17:18:26 +02:00
Sam Protas
b658c8a99b Cleanup and performance 2017-04-04 19:29:40 -04:00
Sam Protas
b1a9c7c047 Performance improvements 2017-04-02 19:36:58 -04:00
Sam Protas
7eedbaa112 Initial implementaiton with passing tests 2017-04-02 18:34:10 -04:00
Vincent Hanquez
2d25b27042 Merge pull request #145 from tdietert/tutorial
Tutorial Improvement
2017-03-26 09:27:58 +01:00
tdietert
f639ac9f0d
Update tutorial based on suggestions 2017-03-26 00:47:02 +00:00
tdietert
fd75eac415 Fix Crypto.Tutorial module name 2017-03-19 00:37:36 +00:00
tdietert
ec49ea659e Move language pragmas inside haddocks 2017-03-19 00:02:07 +00:00
tdietert
c76217f75d Added more comprehensive tutorial 2017-03-18 23:57:24 +00:00
Nicolas DI PRIMA
8b6bd1ed5e check for at least one byte and at most 256 or 512 (blake2s or blake2b) 2017-03-13 18:53:07 +00:00
Nicolas DI PRIMA
f0286281fb add new constraints 2017-03-13 18:52:24 +00:00
Nicolas DI PRIMA
c0c33c5254 Use Nat for the Blake2's digest sizes 2017-03-13 00:24:17 +00:00
Nicolas DI PRIMA
cd552ae5f6 move Nat specific to Cryptonite's insternal module 2017-03-13 00:22:53 +00:00
Vincent Hanquez
c4936ce6d8 remove Typeable 2017-02-24 14:03:33 +00:00
Vincent Hanquez
253bf0cb8b Argon2: add working hash function
* Cleanup argon c files:
  * Remove encoded format and base64 encoder
  * Remove verification code
  * Remove all variants based simple caller
* Add basic hashing function
* Add a simple KAT test
* Define more things at the haskell level
2017-02-24 13:37:40 +00:00
Vincent Hanquez
26237c5c6d remove spurious header modification 2017-02-19 17:17:49 +00:00
Vincent Hanquez
10d72c8779 remove unneeded extensions 2017-02-19 17:17:35 +00:00
Vincent Hanquez
c342d28436 Compatibility with older version 2017-02-14 23:01:18 +00:00
Vincent Hanquez
343b7593b5 add Constraint for divisibility 2017-02-14 23:01:18 +00:00
Vincent Hanquez
eb661e653e add Typeable for SHAKE 2017-02-14 23:01:18 +00:00
Olivier Chéron
d8ed5ce9f1 Add SHAKE128 and SHAKE256 as HashAlgorithm instances
Generalizes SHA-3 code for SHAKE support and uses GHC type-level literals
to keep the output length variable.
2017-02-14 23:01:18 +00: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
550a689faf Merge pull request #133 from haskell-crypto/typeable
add Typeable for all hash algorithms
2017-02-14 10:37:04 +00:00
Vincent Hanquez
7c33fcedb4 add Typeable to hash algorithm 2017-02-14 10:19:44 +00:00
Vincent Hanquez
e3ef0684f9 Merge pull request #132 from NicolasDP/master
Add Fast PBKDF2 for SHA1, SHA256 and SHA512
2017-02-14 09:43:21 +00:00
Nicolas DI PRIMA
002f300021 add fastpbkdf2 with sha512 2017-02-11 14:08:27 +00:00
Nicolas DI PRIMA
4189aa9389 Port Fast PBKDF2 for sha1 and sha256 2017-02-11 14:08:23 +00:00
Vincent Hanquez
d2a8763918 Merge pull request #125 from colatkinson/fix_prime_size
Fix generated primes being too large
2017-02-09 07:48:16 +00:00
Vincent Hanquez
e76bbaa8a7 Merge pull request #63 from tekul/otp
[For Review] HOTP and TOTP implementation
2017-01-29 20:09:29 +00:00
Olivier Chéron
f832c328d0 Use new module name Crypto.PubKey.Curve448 2017-01-19 20:26:25 +01:00
Olivier Chéron
6d4a2bb707 Rename Ed448 to Curve448
This makes the API uniform for both D-H functions, avoids
confusion and leaves the name Ed448 available for EdDSA.
2017-01-19 20:26:25 +01:00
Colin Atkinson
345f4cd141 Fix bug in isProbablyPrime for small numbers
Fix bug in isProbablyPrime where too many iterations were specified for numbers less than 100

Add clause to isProbablyPrime to use hardcoded values <= 2903
2017-01-19 00:11:39 -05:00
Colin Atkinson
0cec622ddf Fix generate(Safe)Prime to guarantee prime size
Add check for size in generatePrime

Add size test in generateSafePrime

Require only that top bit is set, instead of top 2

This is the general standard, see e.g. OpenSSL

Add an error for too few bits being supplied to prime generator, and add documentation

Add some documentation and require highest two bits set

Simplify return syntax in generatePrime and generateSafePrime

Switch exponent to bit-shift for small performance boost
2017-01-19 00:10:50 -05:00
Vincent Hanquez
fab2ab62f3 Merge pull request #118 from tmciver/master
Add key length validation to several AES Ciphers.
2016-12-09 10:59:17 +00:00
Vincent Hanquez
4b34abe310 add support For Ed448 in Crypto.ECC. fix #121 2016-12-09 06:42:50 +00:00
Tim McIver
f5efdee75b Add key length validation to several AES Ciphers. 2016-12-06 22:06:57 -05:00
Kazu Yamamoto
9845734b2b fixing P256 endian. 2016-12-05 13:34:54 +09:00
Kazu Yamamoto
1ba4871032 fixing P256 binary format. 2016-12-05 13:34:33 +09:00
Vincent Hanquez
07bfa10ad7 fix proxy 2016-12-02 21:07:13 +00:00
Vincent Hanquez
6e1d18f6c2 use the correct compat imports 2016-12-02 16:29:49 +00:00