mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-23 15:55:10 +01:00
Check that 1 < D, E < N in mbedtls_rsa_validate_params
This commit is contained in:
parent
c6fc878eda
commit
b5beaa8995
2 changed files with 26 additions and 11 deletions
|
|
@ -174,12 +174,13 @@ int mbedtls_rsa_deduce_crt( const mbedtls_mpi *P, const mbedtls_mpi *Q,
|
|||
* \param p_rng PRNG context for f_rng, or NULL
|
||||
*
|
||||
* \return
|
||||
* - 0 if the following conditions are satisfied:
|
||||
* - N = PQ if N,P,Q != NULL
|
||||
* - 0 if the following conditions are satisfied
|
||||
* if all relevant parameters are provided:
|
||||
* - P prime if f_rng != NULL
|
||||
* - Q prime if f_rng != NULL
|
||||
* - 1 < N = PQ
|
||||
* - 1 < D, E < N
|
||||
* - D and E are modular inverses modulo P-1 and Q-1
|
||||
* if D,E,P,Q != NULL
|
||||
* - P prime if f_rng, P != NULL
|
||||
* - Q prime if f_rng, Q != NULL
|
||||
* - A non-zero error code otherwise.
|
||||
*
|
||||
* \note The function can be used with a restricted set of arguments
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue