Kei Hibino
fce698b821
[MP] Drop data constructor access.
2016-04-12 14:53:16 +09:00
Kei Hibino
0f241e31db
[MP] drop the accessor in favor of just using the ByteArrayAccess constraint
2016-04-12 11:00:01 +09:00
Kei Hibino
5d96c804ae
Add infered cipher version.
2016-04-08 16:43:55 +09:00
Kei Hibino
3af88f3145
Add smart constructor of MiyaguchiPreneel hash type.
2016-04-08 16:11:17 +09:00
Kei Hibino
285d9fb433
Specify each chunk type.
2016-04-07 14:43:44 +09:00
Kei Hibino
5e4b126fc5
Add implementation of MiyaguchiPreneel.
2016-04-03 05:51:07 +09:00
Kei Hibino
ca0c3830eb
Add implementation of CMAC.
2016-04-01 19:25:04 +09:00
Vincent Hanquez
149bfa6010
[HKDF] document a bit better extractSkip
2016-03-29 07:17:24 +01: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
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
b07a856127
Merge pull request #62 from clinty/dsa-truncate
...
Do DSS truncation on verify
2016-02-11 08:04:32 +00:00
John Galt
a04b56d2a3
Added Ed448-Goldilocks support
2016-02-09 01:22:55 -07:00
Vincent Hanquez
d80a499582
removed bounded names for useless parameter
2016-02-04 07:28:42 +00:00
Clint Adams
4c6b774a3d
Do DSS truncation on verify
...
RFC 4880 and FIPS 186-4 require that DSA signatures truncate the
hash to the size of q. This changes Crypto.PubKey.DSA.verify
to do so in all cases.
2016-01-10 17:05:37 -05:00
Vincent Hanquez
50631d3150
Add support for blake2s(p) 224 bits
2016-01-09 10:09:35 +00:00
Vincent Hanquez
99049cc66e
Merge pull request #53 from kinoru/master
...
[ChaChaPoly1305] fix type error of example code
2016-01-05 17:49:58 +00:00
Vincent Hanquez
43890b1175
Add support for HKDF (RFC 5869)
2015-12-28 14:32:07 +00:00
John Galt
26976b1583
[blake2] Added reference implementation
...
This commit allows the user to select either the portable reference
implementation or the optimized (SSE) implementation.
2015-12-16 07:49:30 -06:00
kinoru
5a2809a0f8
[ChaChaPoly1305] fix type error of example code
...
The example code had a type mismatch.
Couldn't match expected type ‘State’
with actual type ‘CryptoFailable State’
In the second argument of ‘appendAAD’, namely ‘st1’
In the second argument of ‘($)’, namely ‘appendAAD hdr st1’
This is due to the following part:
let st1 = ChaChaPoly1305.initialize key nonce
st2 = ChaChaPoly1305.finalizeAAD $ ChaChaPoly1305.appendAAD hdr st1
`initialize` returns `CryptoFailable State`, not `State`.
This commit fixes the type mismatch, changes the return type of the
example function to `CryptoFailable ByteString`, and makes the code
to be immediately copy-and-paste-able.
2015-12-03 18:05:04 +00:00
Maciej Pietrzak
6020bde0e2
Add support_blake2 flag.
2015-11-30 22:17:21 +01: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
2785a50228
Merge pull request #42 from Rufflewind/master
...
Document the arguments for DH.generateParams
2015-11-18 21:51:53 +00:00
Vincent Hanquez
6ae67d5c91
Merge pull request #46 from centromere/nonce-fix
...
Fix endianness of incrementNonce function for ChaChaPoly1305
2015-11-18 16:52:27 +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
53270f1ef6
Removed unused language extension
2015-11-16 13:13:18 -05:00
John Galt
320186cdd1
Fix endianness of incrementNonce function for ChaChaPoly1305
2015-11-16 12:59:01 -05:00
John Galt
880dfae098
Added BLAKE2 support
2015-11-12 12:33:20 -05:00
Vincent Hanquez
da2f445690
[Poly1305] fix size of Authentication tag creation from Bytestring
2015-11-06 22:00:49 +00:00
Vincent Hanquez
d47ae454d5
[Poly1305] Add a way to create AuthTag from ByteArray.
2015-11-05 15:02:50 +00:00
Vincent Hanquez
7928198923
[doc] Add missing documentation call
2015-11-04 15:18:05 +00:00
Vincent Hanquez
7bd3a8f892
[ChaChaPoly1305] Document everything
2015-11-04 15:17:32 +00:00
Phil Ruffwind
fba0565d78
Document the arguments for DH.generateParams
...
Also fix the formatting in the docs of Serialize.i2ospOf
2015-11-03 20:20:53 +08:00
Vincent Hanquez
2191dddf5b
[Curve25519] use the Crypto.Error api instead of an Either type for parsing types
2015-11-02 11:17:19 +00: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
John Galt
55c6988a6e
Added support for incrementing Nonces
2015-10-05 14:08:08 -04:00
Vincent Hanquez
c94df41f02
[ECC] fix compilation of missing numBits
2015-09-22 17:48:43 +01:00
Vincent Hanquez
b63dc38c49
[ECC] add generate for ECC generic's scalar and point Base Multiplication helper.
2015-09-22 17:23:22 +01:00
Vincent Hanquez
08a8155f12
[P256] add function to generate a new scalar, and to get the base point.
2015-09-22 17:22:13 +01:00
Vincent Hanquez
9a1f06e3e8
[ECC] add curveSizeBits
2015-09-22 17:21:35 +01: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
Vincent Hanquez
71fe77da68
[endianess] fix some issues on non supported arches
2015-08-28 17:10:27 +01:00
Joachim Breitner
507a8f8cea
Use mkLE, not LE
...
to make sure the conversion to little endian is actually happening. This
fixes a test failure in ChaChaPoly1305. Fixes #31 .
2015-08-27 14:52:37 +02:00
Vincent Hanquez
ea8cb2d45a
[blowfish] remove unnecessary list of word32 for the schedule
...
Just use the binary's array directly
2015-08-27 10:57:28 +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
Luke Taylor
2566e46185
Implement the eksBlowfish function
...
This modifies the standard blowfish key schedule function to accept an
optional salt and cost as used in bcrypt and modifies the algorithm
accordingly to implement the "expensive" version.
The standard blowfish version is just the same but with a salt value of
zero and a single call to the expandKey function. See the original
bcrypt paper for more details.
2015-08-26 10:33:35 +01:00
Luke Taylor
08ebde2f09
Modify creation of Blowfish key schedule
...
Changes to create it from an array of Word32, instead of using
mutableArray32FromAddrBE, which seems to reverse the words.
2015-08-26 10:33:35 +01:00