Commit Graph

30 Commits

Author SHA1 Message Date
Vincent Hanquez
6346b8289c
Merge pull request #202 from ocheron/ed25519-arith-negate
Ed25519 arithmetic primitives
2017-12-17 18:12:50 +00:00
Olivier Chéron
45723e3542 Rename to Edwards25519 2017-12-10 21:14:47 +01:00
Olivier Chéron
3aaa89d52e Add missing NFData instances 2017-11-27 20:43:08 +01:00
Olivier Chéron
8567bacc2e Add pointNegate to class EllipticCurveArith 2017-11-20 19:28:17 +01:00
Olivier Chéron
c55dd4d27f Add Curve_Ed25519 2017-11-20 19:28:16 +01: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
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
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
f832c328d0 Use new module name Crypto.PubKey.Curve448 2017-01-19 20:26:25 +01:00
Vincent Hanquez
4b34abe310 add support For Ed448 in Crypto.ECC. fix #121 2016-12-09 06:42:50 +00:00
Kazu Yamamoto
1ba4871032 fixing P256 binary format. 2016-12-05 13:34:33 +09: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
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
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
Kazu Yamamoto
e9ea55ab57 relaxing types of encodePoint and decodePoint. 2016-11-30 15:34:35 +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