Commit Graph

38 Commits

Author SHA1 Message Date
Luke Taylor
5e354f9bfc Use "2b" version prefix in bcrypt hashes
Makes docs and code consistent - the code now generates hashes
with the "2b" prefix instead of "2a". Shouldn't make any difference
in practice since previously generated hashes should still validate.
2017-11-27 15:19:23 +00:00
Vincent Hanquez
57fc438c83 typo in documentation 2017-09-18 10:32:21 +01:00
Elliot Cameron
8971458e06 Fix docs for Argon variants 2017-05-17 17:11:00 -04:00
Olivier Chéron
112d2fbb15 Decrease Argon2 maximum output length
Fixes #148.
2017-04-09 17:18:26 +02: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
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
Kazu Yamamoto
58151b9965 making PRK an instance of ByteArrayAccess and removing fromPRK/toPRK. 2016-11-30 15:10:48 +09:00
Kazu Yamamoto
3a2eb3c631 using ByteArray(Access) instead of ByteString. 2016-11-30 14:19:39 +09:00
Kazu Yamamoto
39ecb3597a removing a trailing space / a warning. 2016-11-30 14:06:21 +09:00
Kazu Yamamoto
2b9dce2c8a Dropping Show from PRK. 2016-11-28 19:23:20 +09:00
Kazu Yamamoto
e00c89fb25 adding toByteString and fromByteString to PRK. 2016-11-15 15:04:06 +09:00
Luke Taylor
de17b66e31 Fix buffer length in scrypt
The temporary XY buffer passed to the scrypt_smix C function should be
256r+64 bytes in length, but the Haskell code was only allocating 256r
bytes, causing the additional 64 to be written past the end of the
buffer.

See #91.
2016-06-13 21:08:06 +01:00
Vincent Hanquez
149bfa6010 [HKDF] document a bit better extractSkip 2016-03-29 07:17:24 +01:00
Vincent Hanquez
f362d50d46 [bcrypt] make the haddock comment reflect what happens to the cost value.
also fix a tpyo
2016-02-25 07:48:30 +00:00
Vincent Hanquez
43890b1175 Add support for HKDF (RFC 5869) 2015-12-28 14:32:07 +00:00
Luke Taylor
6d33b66245 BCrypt module doc updates
- Add doctest style example usage
- List most relevant functions
- Reformat comments
- Minor corrections and additions
2015-09-01 15:22:58 +01:00
Luke Taylor
f346c46243 Add BCrypt module doc and a validatePasswordEither fn 2015-08-26 10:33:36 +01:00
Luke Taylor
39d5eb13fe Add bcrypt password hashing and validation API 2015-08-26 10:33:36 +01:00
Vincent Hanquez
ead424f793 [Scrypt] reduce line size of comment 2015-07-29 10:03:43 +01:00
Vincent Hanquez
02956f9ef0 [KDF] move PBKDF2 and Scrypt to not be pinned to ByteString 2015-05-22 15:19:42 +01:00
Vincent Hanquez
30b7b6412a align module imports 2015-05-11 09:34:26 +01:00
Vincent Hanquez
9ae9e38ce2 move to memory stuff 2015-05-09 14:23:32 +01:00
Vincent Hanquez
937b5d08dd [scrypt] cleanup module / extensiotn 2015-05-03 14:31:14 +01:00
Vincent Hanquez
c23ddb2eaa [PBKDF2] make the code more friendly to a future mutable PRF.
Prevent doing B.take . B.concat by allocating only once the output buffer
2015-05-03 08:17:03 +01:00
Vincent Hanquez
4cde4f9311 [scrypt] remove the need for byteable by using the more generic bytearray 2015-05-02 15:44:33 +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
969daf5af1 move more compat things into Internal.Compat. 2015-04-05 07:46:34 +01:00
Vincent Hanquez
7c6adacef9 add signature to compat popCount 2015-02-08 14:41:07 +00:00
Vincent Hanquez
d2a119d1ad add popCount for old version 2015-02-08 13:30:10 +00:00
Vincent Hanquez
a98b7548b2 fix integral type for older version of memcpy. fix ghc 7.4.x 2014-11-09 14:15:55 +00:00
Vincent Hanquez
022f16eeef While it's probably safe, don't use a "pure" bytestring as a buffer.
reallocate a new buffer and copy the old thing inside.
2014-10-04 22:37:31 +01:00
Vincent Hanquez
1f9d7af56f add a working implementation of scrypt. 2014-08-23 16:36:29 +01:00
Vincent Hanquez
c84acf079e add Scrypt placeholder 2014-07-27 11:09:45 -07:00
Vincent Hanquez
04912a180a correct a typo in PBKDF2 2014-07-27 11:07:59 -07:00
Vincent Hanquez
480ff26a34 cleanup in PBKDF2 2014-07-23 05:58:22 -07:00
Vincent Hanquez
a0ce598e37 add PBKDF2 2014-07-18 15:26:01 +01:00