mbedtls
mbedtls copied to clipboard
Implement utility functions for the new Bignum types
Prerequisites: #6017
Add the following functions to bignum_mod
and bignum_mod_raw
-
_copy()
: Takes two MPIs and a modulus as parameters and copies one to the other -
_set_zero()
: Takes an MPI as an argument and sets it to zero -
_set_one()
: Takes an MPI and a modulus as an argument and sets it to zero in the appropriate representation -
_length()
: Takes an MPI as an argument and returns the length of the canonical representative (_mod
version will need conversions) in bytes (without leading zeroes)