Adds a new ECC type class with extended arithmetic in a prime-order subgroup:
scalar multiplication with the basepoint
scalar arithmetic modulo the curve order (addition, multiplication)
scalar encoding/decoding to a fixed-size bytearray (documented in big-endian format)
number of bits in a reduced scalar
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.
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.