Commit Graph

1031 Commits

Author SHA1 Message Date
Crockett
c71a6733dd Unified DSA and ECDSA truncate&hash function. 2019-02-03 13:30:56 -08:00
Crockett
d5003a46a6 Fixed hash truncation bug in DSA; added more KATs from RFC 6979. 2019-01-26 15:15:34 -08:00
Olivier Chéron
69ef95b0de Use GHC 8.6.3 for CI and bump versions 2019-01-19 08:54:31 +01:00
Olivier Chéron
f81c08c089 Merge pull request #262 from ocheron/rsapss-any-length
RSA-PSS with arbitrary key size
2019-01-19 08:49:38 +01:00
Olivier Chéron
1d5947f055 Use any instead of not all 2019-01-15 21:24:31 +01:00
Olivier Chéron
ae0e9c0f3e Remove commented example 10 2019-01-12 17:43:49 +01:00
Olivier Chéron
8eb8d01577 RSASSA-PSS vectors with key size 1025, 1026, 1031 2019-01-12 17:43:49 +01:00
Olivier Chéron
f9ae52327c RSASSA-PSS with key of arbitrary length
Instead of public_size / private_size which are in bytes only, this
uses function numBits to recover the effective length of the modulus
in bits.  The patch also handles removal of unneeded initial byte when
the length is 1 modulo 8.
2019-01-12 17:43:49 +01:00
Olivier Chéron
274911c608 Accept hlint suggestions 2019-01-12 17:43:49 +01:00
Olivier Chéron
d964064d80 Use heterogeneous equality 2019-01-12 17:43:49 +01:00
Vincent Hanquez
3de65a43a1 fix QA building command 2019-01-06 16:08:48 +00:00
Vincent Hanquez
7fc7acb38b
Merge pull request #247 from crodriguezvega/master
Add Rabin (and variants) cryptosystem
2018-12-18 21:44:44 +00:00
Carlos Rodriguez
ddfdbbd4be Removed unnecessary reference to random. 2018-12-18 20:19:14 +01:00
Carlos Rodriguez
cc18bf41ee
Corrected value boundaries in description of function. 2018-11-11 17:14:23 +01:00
Carlos Rodriguez
95f0f3d0c9 Fixed typos in name. 2018-11-03 21:17:46 +01:00
Carlos Rodriguez
3165027840
Fixed typo in name. 2018-11-03 21:12:53 +01:00
Carlos Rodriguez
314a9caba7 Merge branch 'master' of https://github.com/haskell-crypto/cryptonite
# Conflicts:
#	cryptonite.cabal
#	tests/KAT_PubKey.hs
2018-11-03 20:23:25 +01:00
Olivier Chéron
9847554392 Fixed comment about expSafe 2018-11-01 09:08:39 +01:00
Olivier Chéron
8da892da5d Merge pull request #258 from ocheron/pkcs1_5-padding
Correction to PKCS#1 v1.5 padding
2018-11-01 09:06:57 +01:00
Olivier Chéron
01faa66fd4 Add tests for RSA signature and verification
This includes tests for SignatureTooLong edge cases.
2018-10-29 20:43:07 +01:00
Olivier Chéron
f4e094aacb Fix PKCS#1 v1.5 padding
The padding string is at least 8 bytes long + 3 other bytes,
so it should be 11.
2018-10-29 20:43:02 +01:00
Olivier Chéron
0f43451b4f Merge pull request #257 from ocheron/hash-shake-truncate
SHAKE with output length not divisible by 8
2018-10-29 19:09:40 +01:00
Olivier Chéron
d4bd9287f2 Test with GHC 8.4.4 2018-10-28 17:52:36 +01:00
Olivier Chéron
ee9c485a4d Update tested-with 2018-10-26 18:31:29 +02:00
Olivier Chéron
77bc512a87 Add a default stack.yaml
Will be useful for the weeder build in CI.
2018-10-24 21:25:41 +02:00
Olivier Chéron
6a7594d2be Add GHC 8.6 to CI and bump LTS versions 2018-10-24 06:28:39 +02:00
Olivier Chéron
455504b8e2 Implement SHAKE output not divisible by 8 bits 2018-10-23 06:59:07 +02:00
Olivier Chéron
0ab1c41ac8 Add missing Data instances 2018-10-23 06:59:07 +02:00
Olivier Chéron
e10ef06885 Remove unnecessary language extension 2018-10-23 06:59:07 +02:00
Carlos Rodriguez
c285d7f527 Added OAEP scheme and created test vectors for Rabin cryptosystem. 2018-10-06 16:53:22 +02:00
Vincent Hanquez
a8875e462d
Merge pull request #242 from LeifW/derive_data_digest
Derive a Data instance for Digest.
2018-09-13 14:31:56 +01:00
Carlos Rodriguez
aa745ba250 Replaced tab with spaces. 2018-09-06 20:48:15 +02:00
Carlos Rodriguez
e7b3abebf8 Implemented Rabin cryptosystem and some of its variations (including Rabin-Williams). 2018-09-06 20:27:32 +02:00
Carlos Rodriguez
95320826f9
Merge pull request #1 from haskell-crypto/master
Fix typo in bcrypt example
2018-09-06 14:13:48 +02:00
tom-bop
1288127d8e Fix typo in bcrypt example 2018-08-30 17:47:59 +01:00
Leif Warner
8a61d8e5e2 Derive a Data instance for Digest. 2018-06-18 00:20:48 -07:00
Olivier Chéron
4622e5fc8e Fix ECC failures on arm64
Resolves #234.
2018-05-01 08:23:08 +02:00
Olivier Chéron
74463d1bf1 Merge pull request #235 from ocheron/powModSecInteger
Enable powModSecInteger again
2018-05-01 07:47:47 +02:00
Olivier Chéron
d0ac50c1af Additional QA clean-up 2018-04-29 10:43:55 +02:00
Olivier Chéron
b3a1506d82 Remove conditionals related to SHAKE and Blake2
Not needed anymore now that GHC > 8.0.
2018-04-28 08:09:25 +02:00
Olivier Chéron
1fa6c35c35 Update tested-with 2018-04-28 08:08:43 +02:00
Olivier Chéron
9d961e92e9 Comment about not having Show instance for HMAC
Closes #232.
2018-04-22 19:44:29 +02:00
Olivier Chéron
a2a2372412 Use newer GHC and lts for CI 2018-04-22 19:44:29 +02:00
Olivier Chéron
15f63fd849 Enable powModSecInteger with integer-gmp >= 1.0.2.0 2018-04-20 20:40:53 +02:00
Luke Taylor
d27d464627 Fix cost parsing for bcrypt
The tens value was wrong for values of 20+, as reported in #230.
It should be 10*costTens not 10^costTens. This wasn't detected because
the values are the same when costTens is 1, and using high cost values
is rare with bcrypt because of the performance hit.

Also added a simple hash and validate test since the KAT tests only do
validation. This doesn't cover this bug since the cost value is too
high to include in the test. It allows similar issues to be tested
locally though.
2018-04-17 13:51:04 +01:00
Chris Martin
d2da00445d fix spelling of "exponent" 2018-04-05 21:44:40 -04:00
Vincent Hanquez
8b508302eb
Merge pull request #223 from haskell-crypto/dropold
Drop GHC 7.8 and GHC 7.10 support, refer to pkg-guidelines
2018-03-26 10:19:00 +01:00
Vincent Hanquez
dfd8ff7e8d
Merge pull request #219 from ocheron/digest-read-basement
Add Read instance for Digest type
2018-03-12 08:41:38 +00:00
Vincent Hanquez
467ed66c16 Drop GHC 7.8 and GHC 7.10 support, refer to pkg-guidelines 2018-03-12 08:35:49 +00:00
Olivier Chéron
3e5be5fdf3 Add Read instance for Digest type 2018-02-11 09:15:05 +01:00