Janos Follath
Janos Follath
**Prerequisites:** #6015 Extract `mbedtls_mpi_core_exp_mod` from the prototype: https://github.com/hanno-arm/mbedtls/blob/ecp_prototype/library/bignum_core.c#L644-L757 Notable differences to the prototype: - The new function shouldn't convert to and from Montgomery form, it is the responsibility of the...
**Prerequisites:** #6018, #6022, #6292, #6226 Add fast reduction dispatch (and a single NIST modulus for testing).
**Prerequisites:** #6023 Implement `mbedtls_mpi_mod_inv`. The task is constrained to prime moduli for now, and this should be documented. This functions should allocate the needed temporary storage and perform necessary pre...
**Prerequisites:** #6017 Implement fixed width modular multiplication. The `_mod_raw` version should take a caller-managed buffer for the temporary buffer. The `_mod` version should allocate, pass and then free the temporary...
**Prerequisites**: #6017 Implement and test `mbedtls_mpi_mod_raw_neg()`. The implementation should follow the prototype: https://github.com/hanno-arm/mbedtls/blob/ecp_prototype/library/bignum_core.c#L436-L447 This function should take the modulus as a modulus struct instead of a raw pointer.
**Prerequisites:** #6017 Extract the Montgomery multiplication based modular reduction from the prototype: https://github.com/hanno-arm/mbedtls/blob/ecp_prototype/library/bignum_core.c#L467-L525 Use this to implement conversion from `mbedtls_mpi` to `mbedtls_mod_residue`. Implement conversion from `mbedtls_mod_residue` to `mbedtls_mpi` as well.
Add the following functions to `bignum_core` and `bignum_mod_raw`: - `_random()`: same as `mbedtls_mpi_random()` just for the new types - `_fill_random()`: same as `mbedtls_mpi_fill_random()` just for the new types The random...
## Description Use `mpi_core_exp_mod()` in bignum. The two algorithms are not equivalent. The original bignum exponentiation was a sliding window algorithm. The one in `mpi_core_exp_mod()` uses a fixed window approach....
See the [design document](https://github.com/Mbed-TLS/mbedtls/blob/a365efc6f13e206d07732261b2156087091fad1c/docs/architecture/psa-thread-safety.md#global-data) for background and this [thread](https://github.com/Mbed-TLS/mbedtls/pull/8306#discussion_r1360861644) for justification. Add a new global mutex and make sure that every function accessing or modifying the `global_data` static variable in...
Once https://github.com/Mbed-TLS/mbedtls/issues/8147 is done most direct RNG calls from Mbed TLS won't be needed anymore and the remaining few should use `psa_generate_random()` as it is confusing and error prone to...