Add function to fix quasi-reduction #6375
Labels
component-crypto
Crypto primitives and low-level interfaces
enhancement
size-s
Estimated task size: small (~2d)
Many optimised reduction routines don't give a canonical (least non-negative) representation, only reduce it to the appropriate limb size. We used to do this adjustment in the
ecp
module.However according to our new semantic requirement the new Bignum routines need to return a canonical representative. The task is to add a function to
ecp_curves
that does this step and a unit test to test it:_sub
and then_add_if
based on whether there was a carry).Using this function from optimised reduction routines is out of scope for this task.
The text was updated successfully, but these errors were encountered: