mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-07-30 22:43:08 +03:00
Check that 1 < D, E < N in mbedtls_rsa_validate_params
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user