elliptic-curves icon indicating copy to clipboard operation
elliptic-curves copied to clipboard

p256::Scalar: implement Reduce<U512>

Open survived opened this issue 1 year ago • 1 comments

I noticed that p256::Scalar does not implement Reduce<U512> trait. Other crates do have that: for instance, k256::Scalar does implement this trait. It makes it difficult to write generic code that uses this trait. Is there a reason for not implementing Reduce<U512> for p256::Scalar?

survived avatar Apr 25 '24 10:04 survived

It's a missing feature: p256 lacks support for wide reductions.

crypto-bigint now contains a generic implementation of modular arithmetic which should make it somewhat straightforward to implement.

tarcieri avatar Apr 25 '24 13:04 tarcieri