Commit Graph

910 Commits

Author SHA1 Message Date
Olivier Chéron
4723dc0b39 Use Proxy in openBackend
Replaces 'undefined' and fixes #198.
2017-10-23 20:39:00 +02:00
Olivier Chéron
4ef50d8092 Bump dependencies to base >= 4.6
This is needed for GHC.TypeLits.
2017-10-14 11:32:46 +02:00
Vincent Hanquez
ba39c9c18d Merge pull request #190 from haskell-crypto/travis-update
update .travis
2017-09-22 23:29:03 +09:00
Vincent Hanquez
69c194d0fc cleanup 2017-09-18 14:42:00 +01:00
Vincent Hanquez
36575c7a45 update .travis 2017-09-18 13:16:53 +01:00
Vincent Hanquez
2ecbd5c052 Merge pull request #189 from ocheron/cast5-wordarray
CAST5 block cipher
2017-09-18 21:09:49 +09:00
Vincent Hanquez
110ad7b510 Merge pull request #188 from ocheron/hash-tutorial
More content for Crypto.Tutorial
2017-09-18 20:54:40 +09:00
Vincent Hanquez
23e9947d15 Merge pull request #187 from ocheron/decaf-update
Fix link error with OpenBSD
2017-09-18 20:53:53 +09:00
Vincent Hanquez
57fc438c83 typo in documentation 2017-09-18 10:32:21 +01:00
Vincent Hanquez
c8569d871a Fix the old blurb about versioning since it confuses some people.
Reflect what's already been in place for more than a year now regarding
versioning and API stability
2017-09-18 10:29:09 +01:00
Olivier Chéron
cdc1a1aa17 Fix link error with OpenBSD and strip --strip-unneeded
Resolves #186
2017-09-17 18:15:00 +02:00
Olivier Chéron
72c3fa0f6a Update decaf to upstream commit '807a7e6'
* Don't use vector arithmetic in generic arch_32

* fix comments add/subtract
2017-09-17 11:45:26 +02:00
Olivier Chéron
bb2363eea7 Add CAST5 aka CAST-128
Haskell translation of RFC 2144.
2017-09-17 11:28:56 +02:00
Olivier Chéron
c6c715f465 Add note about Digest implementing ByteArrayAccess 2017-08-22 20:39:29 +02:00
Olivier Chéron
007f69c557 Add Crypto.Hash examples to tutorial 2017-08-22 20:39:27 +02:00
Olivier Chéron
80ed642f85 Add introduction to tutorial 2017-08-22 20:39:24 +02:00
Vincent Hanquez
06dc3de5c4 Merge pull request #184 from domenkozar/pthread-gold
Link against pthread on Linux to support gold linker
2017-08-09 09:29:06 +01:00
Domen Kožar
e7c6dcd107
Link against pthread on Linux
Since we're using pthread_join and pthread_create,
to make the gold linker happy on linux we need to explicitly
link against pthread library.
2017-08-02 11:23:01 +02:00
Vincent Hanquez
1992594f82 bump version to 0.24 2017-07-08 08:15:36 +01:00
Vincent Hanquez
2a78dec2ea add CHANGELOG 2017-07-08 08:07:16 +01:00
Vincent Hanquez
9d43c332de fix digest size for nat-typed blake2 2017-07-08 07:58:09 +01:00
Vincent Hanquez
ccc3930072 Merge pull request #182 from haskell-crypto/hash-type-nat
Add HashBlockSize & HashDigestSize & HashInternalContextSize type family
2017-07-07 21:45:22 +01:00
Vincent Hanquez
d13ce585ab add further unrolling of Div8 to match Mod8 2017-07-07 21:44:29 +01:00
Vincent Hanquez
b18ec653b8 rename bitLen -> bitlen. GHC 8.2 is stricted about name of type variables 2017-07-07 19:26:59 +01:00
Vincent Hanquez
b8a8e47b29 Merge pull request #181 from haskell-crypto/remove-76
remove GHC 7.6 from supported list
2017-07-07 19:24:01 +01:00
Vincent Hanquez
23ba060c73 Merge pull request #180 from haskell-crypto/chacha-drg-expose
Expose properly things to create ChaChaDRG
2017-07-07 19:23:46 +01:00
Vincent Hanquez
0dc0f30b86 Add HashBlockSize & HashDigestSize & HashInternalContextSize type family for all Hash algorithms
supercedes PR #158
2017-07-07 18:28:06 +01:00
Vincent Hanquez
fe2fb33acb remove 7.6 from supported list 2017-07-07 18:10:00 +01:00
Vincent Hanquez
664a37c16d [ChaCha] only required byteArrayAccess and add a way to convert from binary 2017-07-07 17:32:09 +01:00
Vincent Hanquez
f559c7bd9d [ChaCha] only need ByteArrayAccess for initialization 2017-07-07 17:31:30 +01:00
Vincent Hanquez
cb293eb6db Merge pull request #175 from jrtc27/unaligned-access
Fix many cases of unaligned accesses
2017-07-07 16:52:17 +01:00
Vincent Hanquez
35c8174dcc Merge pull request #179 from ocheron/ec-point-validation
Validate result of P256.pointFromBinary and EllipticCurveDH.ecdh
2017-07-07 16:38:51 +01:00
Olivier Chéron
5c4458d626 Test ECC functions ecdh and ecdhRaw 2017-07-05 22:24:22 +02:00
Olivier Chéron
9b56689885 Check that ECDH and ECIES result is not point-at-infinity
This guards against invalid public keys when curves have a cofactor.

Fixes #178
2017-07-05 22:24:22 +02:00
Olivier Chéron
aec6af5de4 Add note about P256 encoding of point-at-infinity 2017-07-05 22:24:22 +02:00
Olivier Chéron
adc192ac17 Add constAllZero 2017-07-05 22:24:22 +02:00
Olivier Chéron
8e274f8e60 Validate output point when calling P256.pointFromBinary
Function unsafePointFromBinary is added when validation is not needed.
2017-07-05 22:24:22 +02:00
Olivier Chéron
099f3405cb Add ECC tests to Other-modules 2017-07-02 18:41:44 +02:00
Vincent Hanquez
88c2bc9b7a Update README.md 2017-06-26 14:58:55 +01:00
Fraser Tweedale
f6c1f21e59 clarify padding requirements for PKCS15 encrypt/decrypt
The types do not say whether it is necessary to apply pad/unpad to
the input/output of the PKCS15 encrypt/decrypt functions.  Add
comments to clarify that it is not necessary to manually pad/unpad
the message.
2017-06-26 15:30:01 +02:00
James Clarke
2b43be4d84 Fix many cases of unaligned accesses 2017-06-25 18:10:55 +01:00
Olivier Chéron
bc72179d89 Merge pull request #174 from vorlonofportland/master
Actually process unaligned data through trampoline buffer
2017-06-24 09:07:21 +02:00
Steve Langasek
7f0f5bd3fa Actually process unaligned data through trampoline buffer
Follow-on to commit ba10930, which implemented a trampoline buffer but then
used the unaligned input character array instead.  This commit /actually/
fixes #108, having been tested on an affected architecture :)
2017-06-23 21:46:43 -07:00
Olivier Chéron
c80df7ffc3 Merge pull request #173 from remove-blake2-sse-flag 2017-06-22 21:26:48 +02:00
Olivier Chéron
bf0a476187 Update decaf to upstream commit 'b29565f'
Fix assertion on x448(0)
2017-06-19 21:15:03 +02:00
John Galt
1cb7bdfc5f Remove support_blake2_sse flag in favor of support_sse 2017-06-19 08:57:26 -04:00
Vincent Hanquez
1bcfa2e087 Merge pull request #167 from ocheron/eddsa-minimal
Improve Curve448 and add Ed448
2017-06-19 13:49:07 +01:00
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