Vincent Hanquez
8c39200e00
Merge pull request #172 from trofi/master
...
fix build failure with -f-support_deepseq disabled
2017-06-19 13:28:26 +01:00
Sergei Trofimovich
d911a34258
fix build failure with -f-support_deepseq disabled
...
How to reproduce:
```
$ cabal configure -f-support_deepseq
Resolving dependencies...
Configuring cryptonite-0.23...
$ cabal build
Building cryptonite-0.23...
Preprocessing library cryptonite-0.23...
[114 of 120] Compiling Crypto.PubKey.RSA.Types ( Crypto/PubKey/RSA/Types.hs, dist/build/Crypto/PubKey/RSA/Types
Crypto/PubKey/RSA/Types.hs:48:30: error:
• No instance for (NFData Integer) arising from a use of ‘rnf’
• In the first argument of ‘seq’, namely ‘rnf n’
In the expression: rnf n `seq` rnf e `seq` sz `seq` ()
In an equation for ‘rnf’:
rnf (PublicKey sz n e) = rnf n `seq` rnf e `seq` sz `seq` ()
```
The fix is to inctoruce 'NFData Integer' instance to `Crypto/Internal/DeepSeq`.
Closes: https://github.com/haskell-crypto/cryptonite/issues/171
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
2017-06-19 10:37:23 +01:00
Vincent Hanquez
588c61406e
Merge pull request #168 from ocheron/decode-p256
...
Validate P256 point when decoding
2017-06-18 07:43:52 +01:00
Olivier Chéron
b0d207c77b
Test point encoding/decoding with Crypto.ECC
2017-06-10 14:33:37 +02:00
Olivier Chéron
e71d9b135c
Derive Show,Data,Typeable when defining curve singletons
2017-06-10 14:26:59 +02:00
Olivier Chéron
5c2988716e
Validate P256 point when decoding
...
Fixes #165 .
2017-06-10 14:26:59 +02:00
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