Lines Matching refs:MBEDTLS_MPI_CHK
150 MBEDTLS_MPI_CHK(mbedtls_ecp_check_budget(grp, ECDSA_RS_ECP, ops));
210 MBEDTLS_MPI_CHK(mbedtls_mpi_read_binary(x, buf, use_size)); in derive_mpi()
212 MBEDTLS_MPI_CHK(mbedtls_mpi_shift_r(x, use_size * 8 - grp->nbits)); in derive_mpi()
217 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(x, x, &grp->N)); in derive_mpi()
308 MBEDTLS_MPI_CHK(mbedtls_ecp_gen_privkey(grp, pk, f_rng, p_rng)); in mbedtls_ecdsa_sign_restartable()
317 MBEDTLS_MPI_CHK(mbedtls_ecp_mul_restartable(grp, &R, pk, &grp->G, in mbedtls_ecdsa_sign_restartable()
321 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(pr, &R.X, &grp->N)); in mbedtls_ecdsa_sign_restartable()
340 MBEDTLS_MPI_CHK(derive_mpi(grp, &e, buf, blen)); in mbedtls_ecdsa_sign_restartable()
346 MBEDTLS_MPI_CHK(mbedtls_ecp_gen_privkey(grp, &t, f_rng_blind, in mbedtls_ecdsa_sign_restartable()
352 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(s, pr, d)); in mbedtls_ecdsa_sign_restartable()
353 MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(&e, &e, s)); in mbedtls_ecdsa_sign_restartable()
354 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(&e, &e, &t)); in mbedtls_ecdsa_sign_restartable()
355 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(pk, pk, &t)); in mbedtls_ecdsa_sign_restartable()
356 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(pk, pk, &grp->N)); in mbedtls_ecdsa_sign_restartable()
357 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(s, pk, &grp->N)); in mbedtls_ecdsa_sign_restartable()
358 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(s, s, &e)); in mbedtls_ecdsa_sign_restartable()
359 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(s, s, &grp->N)); in mbedtls_ecdsa_sign_restartable()
364 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(r, pr)); in mbedtls_ecdsa_sign_restartable()
435 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(d, data, grp_len)); in mbedtls_ecdsa_sign_det_restartable()
436 MBEDTLS_MPI_CHK(derive_mpi(grp, &h, buf, blen)); in mbedtls_ecdsa_sign_det_restartable()
437 MBEDTLS_MPI_CHK(mbedtls_mpi_write_binary(&h, data + grp_len, grp_len)); in mbedtls_ecdsa_sign_det_restartable()
438 MBEDTLS_MPI_CHK(mbedtls_hmac_drbg_seed_buf(p_rng, md_info, data, 2 * grp_len)); in mbedtls_ecdsa_sign_det_restartable()
536 MBEDTLS_MPI_CHK(derive_mpi(grp, &e, buf, blen)); in mbedtls_ecdsa_verify_restartable()
543 MBEDTLS_MPI_CHK(mbedtls_mpi_inv_mod(&s_inv, s, &grp->N)); in mbedtls_ecdsa_verify_restartable()
545 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(pu1, &e, &s_inv)); in mbedtls_ecdsa_verify_restartable()
546 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(pu1, pu1, &grp->N)); in mbedtls_ecdsa_verify_restartable()
548 MBEDTLS_MPI_CHK(mbedtls_mpi_mul_mpi(pu2, r, &s_inv)); in mbedtls_ecdsa_verify_restartable()
549 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(pu2, pu2, &grp->N)); in mbedtls_ecdsa_verify_restartable()
561 MBEDTLS_MPI_CHK(mbedtls_ecp_muladd_restartable(grp, in mbedtls_ecdsa_verify_restartable()
573 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&R.X, &R.X, &grp->N)); in mbedtls_ecdsa_verify_restartable()
657 MBEDTLS_MPI_CHK(mbedtls_ecdsa_sign_det_restartable(&ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
666 MBEDTLS_MPI_CHK(mbedtls_ecdsa_sign(&ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
670 MBEDTLS_MPI_CHK(mbedtls_ecdsa_sign_restartable(&ctx->grp, &r, &s, &ctx->d, in mbedtls_ecdsa_write_signature_restartable()
676 MBEDTLS_MPI_CHK(ecdsa_signature_to_asn1(&r, &s, sig, sig_size, slen)); in mbedtls_ecdsa_write_signature_restartable()