Commit Graph

715 Commits

Author SHA1 Message Date
Vincent Hanquez
07bfa10ad7 fix proxy 2016-12-02 21:07:13 +00:00
Vincent Hanquez
6e1d18f6c2 use the correct compat imports 2016-12-02 16:29:49 +00:00
Vincent Hanquez
a9b722b492 Add missing compatibility modules 2016-12-02 15:48:05 +00:00
Vincent Hanquez
f627bf437a make a faster and more secure related to memory blits of pointDh for P256 2016-12-02 15:47:51 +00:00
Vincent Hanquez
5e52a7ffa2 use binary serializer for P256 instead of going through the simple point layer 2016-12-02 15:28:36 +00:00
Vincent Hanquez
052417e5b1 properly check for point validity before making a point 2016-12-02 15:28:03 +00:00
Vincent Hanquez
922bed5ac5 add some documentation to ECIES 2016-12-02 15:03:19 +00:00
Vincent Hanquez
8b5a36f44e fix ECIES to work with the rewrite 2016-12-02 15:03:08 +00:00
Vincent Hanquez
7e6d7ccb1c complete rewrite of the type class
Now there's no type created by associated type, it just become a routing type class,
however this has a cost, since the associated type are not injective,
requiring more witness for the curve than before.
2016-12-02 15:02:48 +00:00
Vincent Hanquez
955f010bff add internal proxy type to create witnesses 2016-12-02 15:00:05 +00:00
Vincent Hanquez
11e42a256d add the binding to get the size by bytes 2016-12-02 14:59:46 +00:00
Vincent Hanquez
422c5fdb09 remove reference to the old api in the documentation 2016-12-02 11:36:48 +00:00
Vincent Hanquez
07b6e80b6d Rewrite EC primitive and types to have the curve as type 2016-12-01 16:56:28 +00:00
Vincent Hanquez
f1ebbff464 fixup haddock markup 2016-12-01 16:55:17 +00:00
Vincent Hanquez
f37d0b79ec remove arithmetic on Curve25519. it's mathematically not possible 2016-12-01 12:53:56 +00:00
Vincent Hanquez
55f385a136 change point decoding to be able to fail explicitely instead of async error call. 2016-12-01 12:51:26 +00:00
Vincent Hanquez
a9e3917334 fix Curve25519 generate secret key to work in the MonadRandom instead of IO 2016-12-01 12:50:31 +00:00
Vincent Hanquez
d80a87da48 add new EC errors 2016-12-01 12:50:10 +00:00
Vincent Hanquez
a5fb2ee23a don't export function that replace existing functionality and by-pass errors handling 2016-12-01 12:50:01 +00:00
Kazu Yamamoto
e9ea55ab57 relaxing types of encodePoint and decodePoint. 2016-11-30 15:34:35 +09:00
Kazu Yamamoto
58151b9965 making PRK an instance of ByteArrayAccess and removing fromPRK/toPRK. 2016-11-30 15:10:48 +09:00
Kazu Yamamoto
f84aa5d7ce documentation & relaxing types. 2016-11-30 14:48:49 +09:00
Kazu Yamamoto
be6bf11138 using ScrubbedBytes directly. 2016-11-30 14:41:01 +09:00
Kazu Yamamoto
3a2eb3c631 using ByteArray(Access) instead of ByteString. 2016-11-30 14:19:39 +09:00
Kazu Yamamoto
39ecb3597a removing a trailing space / a warning. 2016-11-30 14:06:21 +09:00
Kazu Yamamoto
2b9dce2c8a Dropping Show from PRK. 2016-11-28 19:23:20 +09:00
Kazu Yamamoto
c0b0846232 implmenting encodePoint and decodePoint for TLS. 2016-11-17 13:08:21 +09:00
Kazu Yamamoto
a6f177352a Eq and Show for Point and Scalar. 2016-11-16 16:53:43 +09:00
Kazu Yamamoto
aa33c00855 adding Curve_X25519. 2016-11-16 13:10:57 +09:00
Kazu Yamamoto
dea0469c61 adding Curve_P384R1. 2016-11-16 10:02:00 +09:00
Kazu Yamamoto
9a0ec9166a implementing ecdh fpr P256 and P521. 2016-11-15 15:41:00 +09:00
Vincent Hanquez
c29fa82417 add a note about scalarInverse 2016-11-15 15:05:58 +09:00
Vincent Hanquez
f3255c2fa0 fix imports on older versions 2016-11-15 15:05:58 +09:00
Vincent Hanquez
7c833eddfd improve description 2016-11-15 15:05:58 +09:00
Vincent Hanquez
60bb2cacb4 [ECC] Improve the code base to allow multiples different implementations
* Use TypeFamilies; need to see what to do for older GHC versions
* Start implementing some API related to ECIES
2016-11-15 15:05:58 +09:00
Kazu Yamamoto
e00c89fb25 adding toByteString and fromByteString to PRK. 2016-11-15 15:04:06 +09:00
Vincent Hanquez
47cb6ebdea Merge pull request #104 from brandonhamilton/master
Correct XSalsa20 initialization when using 8/12 rounds
2016-11-07 14:27:48 +00:00
Brandon Hamilton
bfaf1d324d Correct XSalsa20 initialization when using 8/12 rounds 2016-10-09 22:26:37 +02:00
Vincent Hanquez
ba39567eb6 Merge pull request #103 from brandonhamilton/xsalsa
Implement the XSalsa20 stream cipher
2016-10-09 20:29:29 +01:00
Brandon Hamilton
548cbb6f79 Implement the XSalsa20 stream cipher 2016-10-09 15:25:31 +02:00
Vincent Hanquez
3c087f0f44 bump version to 0.20 2016-09-15 21:22:18 +01:00
Vincent Hanquez
9b64192d0b update CHANGELOG 2016-09-15 21:11:50 +01:00
Vincent Hanquez
15cfb0642b Merge branch 'master' of https://github.com/haskell-crypto/cryptonite 2016-09-15 21:09:16 +01:00
Vincent Hanquez
01892ac494 Merge pull request #102 from ocheron/shamirs-trick
Implement Shamir's trick
2016-09-15 21:08:48 +01:00
Vincent Hanquez
571486be00 don't use rdrand on windows
fix #99
2016-09-15 20:50:55 +01:00
Vincent Hanquez
32e77e6f66 Merge pull request #101 from ocheron/ecc-bitsize-fixes
Fix ECDH/ECDSA when scalar and coordinate bit sizes differ
2016-09-15 20:18:15 +01:00
Olivier Chéron
5630efb5f9 Decreased QuickCheck iterations 2016-09-11 18:37:10 +02:00
Olivier Chéron
ff0c976891 Removed redundant imports 2016-09-10 12:08:34 +02:00
Olivier Chéron
114116f087 Benchmark showing pointAddTwoMuls speed increase 2016-09-10 12:07:41 +02:00
Olivier Chéron
43233cb911 Double-scalar multiplication using Shamir's trick 2016-09-10 12:05:46 +02:00