/optee_os-3.20.0/lib/libmbedtls/mbedtls/library/ |
A D | rsa_internal.c | 108 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, D, E ) ); in mbedtls_rsa_deduce_primes() 109 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &T, &T, 1 ) ); in mbedtls_rsa_deduce_primes() 118 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &T, order ) ); in mbedtls_rsa_deduce_primes() 134 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes() 140 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &K, &K, &T, N, in mbedtls_rsa_deduce_primes() 152 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes() 219 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, P, 1 ) ); in mbedtls_rsa_deduce_private_exponent() 220 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &L, Q, 1 ) ); in mbedtls_rsa_deduce_private_exponent() 223 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( D, &K, &L ) ); in mbedtls_rsa_deduce_private_exponent() 226 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &K, &K, &L ) ); in mbedtls_rsa_deduce_private_exponent() [all …]
|
A D | ecp.c | 187 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( secret, in ecp_drbg_seed() 249 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( secret, in ecp_drbg_seed() 864 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); in mbedtls_ecp_point_read_string() 1192 MBEDTLS_MPI_CHK( grp->modp( N ) ); in ecp_modp() 2128 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &M, m ) ); in ecp_comb_recode_scalar() 2592 MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &RP, P ) ); in ecp_mul_mxz() 2643 MBEDTLS_MPI_CHK( ecp_normalize_mxz( grp, R ) ); in ecp_mul_mxz() 3284 MBEDTLS_MPI_CHK( in mbedtls_ecp_read_key() 3290 MBEDTLS_MPI_CHK( in mbedtls_ecp_read_key() 3422 MBEDTLS_MPI_CHK( in self_test_adjust_exponent() [all …]
|
A D | ecjpake.c | 222 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, in ecjpake_hash() 551 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in ecjpake_ecp_add3() 586 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_read_round_two() 639 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &b, &b, N ) ); in ecjpake_mul_secret() 643 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( R, X, &b ) ); in ecjpake_mul_secret() 645 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( R, R, N ) ); in ecjpake_mul_secret() 685 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_write_round_two() 762 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in mbedtls_ecjpake_derive_secret() 771 MBEDTLS_MPI_CHK( mbedtls_ecp_muladd( &ctx->grp, &K, in mbedtls_ecjpake_derive_secret() 1071 MBEDTLS_MPI_CHK( ecjpake_test_load( &cli, in mbedtls_ecjpake_self_test() [all …]
|
A D | bignum.c | 292 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i ) ); in mbedtls_mpi_copy() 328 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, 1 ) ); in mbedtls_mpi_lset() 502 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, n ) ); in mbedtls_mpi_read_string() 503 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_read_string() 513 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_read_string() 1188 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, j ) ); in mbedtls_mpi_add_abs() 1532 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_mul_mpi() 1584 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( X, A ) ); in mbedtls_mpi_mul_int() 1723 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &X, A ) ); in mbedtls_mpi_div_mpi() 1724 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Y, B ) ); in mbedtls_mpi_div_mpi() [all …]
|
A D | dhm.c | 108 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &U, P, 2 ) ); in dhm_check_range() 160 MBEDTLS_MPI_CHK( mbedtls_mpi_random( R, 3, M, f_rng, p_rng ) ); in dhm_random_below() 161 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( R, R, 1 ) ); in dhm_random_below() 195 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, in dhm_make_common() 350 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &ctx->pX, &ctx->X ) ); in dhm_update_blinding() 351 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vi, 1 ) ); in dhm_update_blinding() 352 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vf, 1 ) ); in dhm_update_blinding() 382 MBEDTLS_MPI_CHK( dhm_random_below( &R, &ctx->P, f_rng, p_rng ) ); in dhm_update_blinding() 422 MBEDTLS_MPI_CHK( dhm_update_blinding( ctx, f_rng, p_rng ) ); in mbedtls_dhm_calc_secret() 427 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &GYb, &ctx->GY ) ); in mbedtls_dhm_calc_secret() [all …]
|
A D | rsa.c | 555 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->E, exponent ) ); in mbedtls_rsa_gen_key() 615 MBEDTLS_MPI_CHK( mbedtls_rsa_check_privkey( ctx ) ); in mbedtls_rsa_gen_key() 944 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &I, &T ) ); in mbedtls_rsa_private() 1014 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T, &TP, &TQ ) ); in mbedtls_rsa_private() 1022 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &T, &TQ, &TP ) ); in mbedtls_rsa_private() 1036 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &C, &T, &ctx->E, in mbedtls_rsa_private() 2325 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); in mbedtls_rsa_copy() 2326 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->E, &src->E ) ); in mbedtls_rsa_copy() 2328 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->D, &src->D ) ); in mbedtls_rsa_copy() 2329 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->P, &src->P ) ); in mbedtls_rsa_copy() [all …]
|
A D | ecdsa.c | 240 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( x, x, &grp->N ) ); in derive_mpi() 349 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_sign_restartable() 361 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, pr, d ) ); in ecdsa_sign_restartable() 362 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); in ecdsa_sign_restartable() 363 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &e, &e, &t ) ); in ecdsa_sign_restartable() 364 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pk, pk, &t ) ); in ecdsa_sign_restartable() 367 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, s, &e ) ); in ecdsa_sign_restartable() 462 MBEDTLS_MPI_CHK( derive_mpi( grp, &h, buf, blen ) ); in ecdsa_sign_det_restartable() 645 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_verify_restartable() 657 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu2, r, &s_inv ) ); in ecdsa_verify_restartable() [all …]
|
A D | ecp_curves.c | 709 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve25519() 715 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &grp->N, in ecp_use_curve25519() 760 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve448() 775 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &Ns, in ecp_use_curve448() 1264 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p521() 1313 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p255() 1367 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &M ) ); in ecp_mod_p448() 1373 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &Q, 224 ) ); in ecp_mod_p448() 1374 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &Q ) ); in ecp_mod_p448() 1383 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &M, 224 ) ); in ecp_mod_p448() [all …]
|
A D | ecdh.c | 84 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) ); in ecdh_gen_public_restartable() 86 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable() 124 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable() 133 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( z, &P.X ) ); in ecdh_compute_shared_restartable()
|
A D | constant_time.c | 562 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_assign() 598 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_swap() 599 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( Y, X->n ) ); in mbedtls_mpi_safe_cond_swap()
|
A D | pk_wrap.c | 347 MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) ); in eckey_verify_rs_wrap() 349 MBEDTLS_MPI_CHK( ecdsa_verify_rs_wrap( &rs->ecdsa_ctx, in eckey_verify_rs_wrap() 372 MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) ); in eckey_sign_rs_wrap() 374 MBEDTLS_MPI_CHK( ecdsa_sign_rs_wrap( &rs->ecdsa_ctx, md_alg, in eckey_sign_rs_wrap()
|
A D | asn1write.c | 145 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); in mbedtls_asn1_write_mpi()
|
A D | pkparse.c | 396 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ref, *id ) ); in pk_group_id_from_group()
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/include/mbedtls/ |
A D | ecp.h | 416 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
|
A D | bignum.h | 55 #define MBEDTLS_MPI_CHK(f) \ macro
|
A D | compat-1.3.h | 743 #define MPI_CHK MBEDTLS_MPI_CHK
|
/optee_os-3.20.0/lib/libmbedtls/mbedtls/ |
A D | ChangeLog | 2338 * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random.
|