mbedtls
mbedtls copied to clipboard
Bignum: add random generation for the new MPI types
Add the following functions to bignum_core
and bignum_mod_raw
:
-
_random()
: same asmbedtls_mpi_random()
just for the new types -
_fill_random()
: same asmbedtls_mpi_fill_random()
just for the new types
The random bytes are converted to a number in a very particular way, following standards. This behaviour should be kept.
The _core
functions should be reused by the legacy functions as usual.