Extract Secp192r1 fast reduction from the prototype #6026
Labels
component-crypto
Crypto primitives and low-level interfaces
enhancement
size-s
Estimated task size: small (~2d)
Extract Secp192r1 fast reduction from the prototype (replace the pre-existing implementation):
https://github.com/hanno-becker/mbedtls/blob/ecp_prototype/library/ecp_curves.c#L9858-L9948
This function calculates the residue of the input mod secp192r1_p. The result will have the same bitlength as the modulus. (That is, it is not guaranteed that it will be canonical.) This function is intended for reducing the result of a multiplication and therefore the number of input limbs can't be more than twice the limbs in the modulus.
Add unit tests for
ecp_mod_p192_raw()
.Tip for testing: fix up the result to get a canonical value by using #6375.
The text was updated successfully, but these errors were encountered: