Commit Graph

840 Commits

Author SHA1 Message Date
Olivier Chéron
b3b2e86b53 Merge pull request #164 from ocheron/iv-arith
Fix ivAdd overflow behaviour
2017-06-01 21:04:55 +02:00
Olivier Chéron
edd5d94bd4 Make ivAdd more constant-time
All IV bytes are processed even if accumulator is zero.
2017-05-31 23:31:29 +02:00
Olivier Chéron
07592ab237 Fix ivAdd overflow behaviour 2017-05-26 09:59:54 +02:00
Olivier Chéron
8fb59dfc19 Test IV arithmetic
With emphasis on ivAdd overflow behaviour.
2017-05-26 09:59:54 +02:00
Olivier Chéron
c6caba88ed Merge pull request #159 from wangbj/patch-1
Allow sign/verify digest directly
2017-05-26 09:52:53 +02:00
Baojun Wang
a8902fe119 remove redundant condition test on `hashLen /= B.length mHash` 2017-05-18 21:00:14 -07:00
Olivier Chéron
a32489ce32 Merge pull request #162 from 3noch/patch-1
Fix docs for Argon variants
2017-05-18 20:40:34 +02:00
Elliot Cameron
8971458e06 Fix docs for Argon variants 2017-05-17 17:11:00 -04:00
Baojun Wang
4270f00277 Use `Digest hash` to represent message digest 2017-05-16 10:54:31 -07:00
Baojun Wang
f9a0bc3c53 Allow sign/verify digest directly
currently sign/verify works on message directly, it would be nice if PSS could sign/verify digest directly. This is useful for:

  1) for some signing server it only has a digest (without message)
  2) message could be very large, for cases when client need request a singing server to sign, it may make more sense for the client to compute digest, then ask server to (PSS) sign the digest
  3) openSSL pkeyutl (PSS) sign operation signs with digest only, not the message, it would be nice to work with openSSL more easily 

*openSSL command line:
```shell
openssl pkeyutl -pkeyopt rsa_padding_mode:pss -pkeyopt rsa_pss_saltlen:-1  -pkeyopt digest:sha256 -sign -inkey "pri.key" -in hmac.bin > sig.bin
openssl pkeyutl -pkeyopt rsa_padding_mode:pss -pkeyopt rsa_pss_saltlen:-1  -pkeyopt digest:sha256 -verify -inkey "pri.key" -in hmac.bin -sigfile sig.bin
```
2017-05-15 19:42:19 -07:00
Olivier Chéron
554f0fc701 Restore Haddock comment in tutorial module
Need to use ordinary comments instead of nested comments
because LANGUAGE pragmas were removed otherwise.

Also adds a table of contents.  We may have other examples
in the future.
2017-05-05 07:21:52 +02:00
Vincent Hanquez
8a9bd75dc7 Merge pull request #157 from ixmatus/parnell/adding-ed25519-seckey-generator
ed25519: Adding generateSecretKey and a unit test
2017-05-03 04:32:48 +01:00
Parnell Springmeyer
94d67ad86d
ed25519: Adding generateSecretKey and a unit test 2017-05-02 16:18:26 -05:00
Vincent Hanquez
f26c02278f bump version to 0.23 2017-04-25 17:21:14 +01:00
Vincent Hanquez
274c422be2 update CHANGELOG 2017-04-25 17:19:31 +01:00
Vincent Hanquez
737959dc76 Merge pull request #156 from haskell-crypto/hash-update
Hash update
2017-04-25 17:15:44 +01:00
Vincent Hanquez
468d8fe582 require memory at least 0.14.5 2017-04-25 16:06:49 +01:00
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
Olivier Chéron
30bb81a307 Merge pull request #155 from dimitri-xyz/master
Fix issue #154: `generateBetween` excludes upper bound if lower bound is 1
2017-04-23 08:50:14 +02: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
Olivier Chéron
a64f0b2e1c Merge pull request #152 from kazu-yamamoto/fix-p256
using pointSize in withTempPoint to fix #151.
2017-04-11 19:54:50 +02: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
67e9a0d187 Merge pull request #1 from SamProtas/twofish-256
Twofish 192 and 256 bit key support
2017-04-10 00:36:24 -04:00
Sam Protas
762d818ec0 Twofish 192 and 256 bit key support 2017-04-10 00:33:54 -04:00
Olivier Chéron
79aa6fb957 Merge pull request #149 from ocheron/hash-bench
Hash benchmarks
2017-04-09 17:27:13 +02: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
Olivier Chéron
d65fc88477 Benchmark for hash algorithms
A first step in the direction of #144.
2017-03-29 11:38:32 +02:00
Olivier Chéron
762f2d9032 Consolidate cryptonite benchmark code
Enables `cabal bench' or `stack bench' to run benchmarks
that depend only on cryptonite.
2017-03-29 11:38:32 +02: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
Vincent Hanquez
666eb4e58e Merge pull request #140 from NicolasDP/master
Blake2: add modern interface using Nat
2017-03-18 14:12:02 +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
653e67d221 add tests for the new digest sizes 2017-03-13 00:25:04 +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
Olivier Chéron
f9b593520f Fixed test suite when base < 4.7
ExistentialQuantification is needed for HashAlg.
2017-02-26 16:27:55 +01:00
Vincent Hanquez
6440a7ebab bump version to 0.22 2017-02-24 18:11:31 +00:00
Vincent Hanquez
9b0e2538f1 reinstall ghc 7.6 2017-02-24 16:47:14 +00:00