haskell-crypto / cryptonite

lowlevel set of cryptographic primitives for haskell
Other
226 stars 139 forks source link

Extended ECC type class #299

Closed ocheron closed 5 years ago

ocheron commented 5 years ago

Adds a new ECC type class with extended arithmetic in a prime-order subgroup:

Scalar conversion to/from Integer is also added for convenience and testability. This is useful for example when parsing (R, S) scalars from an ASN.1 signature.

Point equality is added to the context of existing class EllipticCurveArith (incompatible API change for class implementors).

This PR is preliminary work to add an ECDSA implementation using P256 time-constant primitives, and replacing #226.

Resolves #225.