Lines Matching refs:MBEDTLS_MPI_CHK

95     MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&T, D,  E));  in mbedtls_rsa_deduce_primes()
96 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&T, &T, 1)); in mbedtls_rsa_deduce_primes()
104 MBEDTLS_MPI_CHK(mbedtls_mpi_shift_r(&T, order)); in mbedtls_rsa_deduce_primes()
117 MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&K, primes[attempt])); in mbedtls_rsa_deduce_primes()
120 MBEDTLS_MPI_CHK(mbedtls_mpi_gcd(P, &K, N)); in mbedtls_rsa_deduce_primes()
127 MBEDTLS_MPI_CHK(mbedtls_mpi_exp_mod(&K, &K, &T, N, in mbedtls_rsa_deduce_primes()
138 MBEDTLS_MPI_CHK(mbedtls_mpi_add_int(&K, &K, 1)); in mbedtls_rsa_deduce_primes()
139 MBEDTLS_MPI_CHK(mbedtls_mpi_gcd(P, &K, N)); in mbedtls_rsa_deduce_primes()
148 MBEDTLS_MPI_CHK(mbedtls_mpi_div_mpi(Q, NULL, N, P)); in mbedtls_rsa_deduce_primes()
152 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, &K, 1)); in mbedtls_rsa_deduce_primes()
153 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, &K, &K)); in mbedtls_rsa_deduce_primes()
154 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&K, &K, N)); in mbedtls_rsa_deduce_primes()
204 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, P, 1)); in mbedtls_rsa_deduce_private_exponent()
205 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&L, Q, 1)); in mbedtls_rsa_deduce_private_exponent()
208 MBEDTLS_MPI_CHK(mbedtls_mpi_gcd(D, &K, &L)); in mbedtls_rsa_deduce_private_exponent()
211 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, &K, &L)); in mbedtls_rsa_deduce_private_exponent()
212 MBEDTLS_MPI_CHK(mbedtls_mpi_div_mpi(&K, NULL, &K, D)); in mbedtls_rsa_deduce_private_exponent()
215 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(D, E, &K)); in mbedtls_rsa_deduce_private_exponent()
235 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, P, 1)); in mbedtls_rsa_deduce_crt()
236 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(DP, D, &K)); in mbedtls_rsa_deduce_crt()
241 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, Q, 1)); in mbedtls_rsa_deduce_crt()
242 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(DQ, D, &K)); in mbedtls_rsa_deduce_crt()
247 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(QP, Q, P)); in mbedtls_rsa_deduce_crt()
302 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, P, Q)); in mbedtls_rsa_validate_params()
336 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, D, E)); in mbedtls_rsa_validate_params()
337 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, &K, 1)); in mbedtls_rsa_validate_params()
338 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&L, P, 1)); in mbedtls_rsa_validate_params()
339 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&K, &K, &L)); in mbedtls_rsa_validate_params()
346 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, D, E)); in mbedtls_rsa_validate_params()
347 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, &K, 1)); in mbedtls_rsa_validate_params()
348 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&L, Q, 1)); in mbedtls_rsa_validate_params()
349 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&K, &K, &L)); in mbedtls_rsa_validate_params()
389 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, P, 1)); in mbedtls_rsa_validate_crt()
390 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(&L, DP, D)); in mbedtls_rsa_validate_crt()
391 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&L, &L, &K)); in mbedtls_rsa_validate_crt()
406 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, Q, 1)); in mbedtls_rsa_validate_crt()
407 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(&L, DQ, D)); in mbedtls_rsa_validate_crt()
408 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&L, &L, &K)); in mbedtls_rsa_validate_crt()
423 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&K, QP, Q)); in mbedtls_rsa_validate_crt()
424 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(&K, &K, 1)); in mbedtls_rsa_validate_crt()
425 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&K, &K, P)); in mbedtls_rsa_validate_crt()