mbedtls icon indicating copy to clipboard operation
mbedtls copied to clipboard

Implement utility functions for the new Bignum types

Open yanesca opened this issue 2 years ago • 0 comments

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)

yanesca avatar Jul 04 '22 12:07 yanesca