Home
last modified time | relevance | path

Searched refs:MBEDTLS_MPI_CHK (Results 1 – 20 of 20) sorted by relevance

/AliOS-Things-master/components/mbedtls/library/
A Drsa_internal.c114 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &T, D, E ) ); in mbedtls_rsa_deduce_primes()
115 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &T, &T, 1 ) ); in mbedtls_rsa_deduce_primes()
124 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &T, order ) ); in mbedtls_rsa_deduce_primes()
140 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
146 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &K, &K, &T, N, in mbedtls_rsa_deduce_primes()
158 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( P, &K, N ) ); in mbedtls_rsa_deduce_primes()
225 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &K, P, 1 ) ); in mbedtls_rsa_deduce_private_exponent()
226 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &L, Q, 1 ) ); in mbedtls_rsa_deduce_private_exponent()
229 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( D, &K, &L ) ); in mbedtls_rsa_deduce_private_exponent()
232 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &K, &K, &L ) ); in mbedtls_rsa_deduce_private_exponent()
[all …]
A Decp.c725 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); in mbedtls_ecp_point_read_string()
824 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z, 1 ) ); in mbedtls_ecp_point_read_binary()
1016 MBEDTLS_MPI_CHK( grp->modp( N ) ); in ecp_modp()
1113 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z, 1 ) ); in ecp_normalize_jac()
1652 MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &T[0], P ) ); in ecp_precompute_comb()
1878 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &M, m ) ); in ecp_comb_recode_scalar()
1938 MBEDTLS_MPI_CHK( ecp_normalize_jac( grp, RR ) ); in ecp_mul_comb_after_precomp()
2144 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); in ecp_normalize_mxz()
2274 MBEDTLS_MPI_CHK( mbedtls_ecp_copy( &RP, P ) );
2307 MBEDTLS_MPI_CHK( ecp_normalize_mxz( grp, R ) );
[all …]
A Dbignum.c216 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i ) ); in mbedtls_mpi_copy()
259 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_assign()
293 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_swap()
294 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( Y, X->n ) ); in mbedtls_mpi_safe_cond_swap()
320 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, 1 ) ); in mbedtls_mpi_lset()
738 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_read_binary()
1002 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, j ) ); in mbedtls_mpi_add_abs()
1303 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_mul_mpi()
1456 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &X, A ) ); in mbedtls_mpi_div_mpi()
1457 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &Y, B ) ); in mbedtls_mpi_div_mpi()
[all …]
A Decjpake.c232 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, in ecjpake_hash()
561 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in ecjpake_ecp_add3()
596 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_read_round_two()
649 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &b, &b, N ) ); in ecjpake_mul_secret()
653 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( R, X, &b ) ); in ecjpake_mul_secret()
655 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( R, R, N ) ); in ecjpake_mul_secret()
695 MBEDTLS_MPI_CHK( ecjpake_ecp_add3( &ctx->grp, &G, in mbedtls_ecjpake_write_round_two()
772 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &one, 1 ) ); in mbedtls_ecjpake_derive_secret()
781 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 Ddhm.c113 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &L, 2 ) ); in dhm_check_range()
114 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &U, P, 2 ) ); in dhm_check_range()
185 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); in mbedtls_dhm_make_params()
195 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, in mbedtls_dhm_make_params()
303 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); in mbedtls_dhm_make_public()
343 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &ctx->pX, &ctx->X ) ); in dhm_update_blinding()
344 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vi, 1 ) ); in dhm_update_blinding()
345 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vf, 1 ) ); in dhm_update_blinding()
376 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->Vi, 1 ) ); in dhm_update_blinding()
421 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &GYb, &ctx->GY ) ); in mbedtls_dhm_calc_secret()
[all …]
A Drsa.c557 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->E, exponent ) ); in mbedtls_rsa_gen_key()
617 MBEDTLS_MPI_CHK( mbedtls_rsa_check_privkey( ctx ) ); in mbedtls_rsa_gen_key()
918 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &I, &T ) ); in mbedtls_rsa_private()
988 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( &T, &TP, &TQ ) ); in mbedtls_rsa_private()
996 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &T, &TQ, &TP ) ); in mbedtls_rsa_private()
1010 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &C, &T, &ctx->E, in mbedtls_rsa_private()
2449 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->N, &src->N ) ); in mbedtls_rsa_copy()
2450 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->E, &src->E ) ); in mbedtls_rsa_copy()
2452 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->D, &src->D ) ); in mbedtls_rsa_copy()
2453 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &dst->P, &src->P ) ); in mbedtls_rsa_copy()
[all …]
A Decdsa.c346 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_sign_restartable()
357 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, pr, d ) ); in ecdsa_sign_restartable()
358 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); in ecdsa_sign_restartable()
359 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &e, &e, &t ) ); in ecdsa_sign_restartable()
360 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pk, pk, &t ) ); in ecdsa_sign_restartable()
362 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, s, &e ) ); in ecdsa_sign_restartable()
440 MBEDTLS_MPI_CHK( derive_mpi( grp, &h, buf, blen ) ); in ecdsa_sign_det_restartable()
536 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in ecdsa_verify_restartable()
545 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu1, &e, &s_inv ) ); in ecdsa_verify_restartable()
548 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( pu2, r, &s_inv ) ); in ecdsa_verify_restartable()
[all …]
A Decp_curves.c678 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve25519()
720 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve448()
735 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &Ns, 16, in ecp_use_curve448()
1041 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, C, N ) ); in fix_negative()
1212 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p521()
1261 MBEDTLS_MPI_CHK( mbedtls_mpi_add_abs( N, N, &M ) ); in ecp_mod_p255()
1315 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &M ) ); in ecp_mod_p448()
1321 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &Q, 224 ) ); in ecp_mod_p448()
1322 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( N, N, &Q ) ); in ecp_mod_p448()
1331 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &M, 224 ) ); in ecp_mod_p448()
[all …]
A Decdh.c72 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_privkey( grp, d, f_rng, p_rng ) ); in ecdh_gen_public_restartable()
74 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, Q, d, &grp->G, in ecdh_gen_public_restartable()
112 MBEDTLS_MPI_CHK( mbedtls_ecp_mul_restartable( grp, &P, d, Q, in ecdh_compute_shared_restartable()
121 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( z, &P.X ) ); in ecdh_compute_shared_restartable()
A Dpk_wrap.c342 MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) ); in eckey_verify_rs_wrap()
344 MBEDTLS_MPI_CHK( ecdsa_verify_rs_wrap( &rs->ecdsa_ctx, in eckey_verify_rs_wrap()
367 MBEDTLS_MPI_CHK( mbedtls_ecdsa_from_keypair( &rs->ecdsa_ctx, ctx ) ); in eckey_sign_rs_wrap()
369 MBEDTLS_MPI_CHK( ecdsa_sign_rs_wrap( &rs->ecdsa_ctx, md_alg, in eckey_sign_rs_wrap()
A Dasn1write.c145 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); in mbedtls_asn1_write_mpi()
A Dpkparse.c401 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ref, *id ) ); in pk_group_id_from_group()
/AliOS-Things-master/components/mbedtls/programs/pkey/
A Dmpi_demo.c75 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P, 10, "2789" ) ); in main()
76 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &Q, 10, "3203" ) ); in main()
77 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &E, 10, "257" ) ); in main()
78 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); in main()
89 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P, &P, 1 ) ); in main()
90 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q, &Q, 1 ) ); in main()
91 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P, &Q ) ); in main()
92 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &D, &E, &H ) ); in main()
99 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &X, 10, "55555" ) ); in main()
100 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &Y, &X, &E, &N, NULL ) ); in main()
[all …]
A Dkey_app.c224 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "N: ", &N, 16, NULL ) ); in main()
225 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "E: ", &E, 16, NULL ) ); in main()
226 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "D: ", &D, 16, NULL ) ); in main()
227 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "P: ", &P, 16, NULL ) ); in main()
228 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "Q: ", &Q, 16, NULL ) ); in main()
229 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "DP: ", &DP, 16, NULL ) ); in main()
230 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "DQ: ", &DQ, 16, NULL ) ); in main()
231 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "QP: ", &QP, 16, NULL ) ); in main()
239 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "Q(X): ", &ecp->Q.X, 16, NULL ) ); in main()
281 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( "N: ", &N, 16, NULL ) ); in main()
[all …]
/AliOS-Things-master/hardware/chip/rtl872xd/sdk/component/common/drivers/wlan/realtek/src/core/option/
A Drtw_opt_crypto_ssl.c115 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(a,&ecc->A)); in rtw_crypto_ecc_get_param_a()
140 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(b,&ecc->B)); in rtw_crypto_ecc_get_param_b()
164 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(n,&ecc->N)); in rtw_crypto_ecc_get_param_order()
412 MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&one,1)); in rtw_crypto_ecc_point_add_point()
487 MBEDTLS_MPI_CHK(mbedtls_mpi_copy(X,Y)); in rtw_crypto_bignum_copy()
655 MBEDTLS_MPI_CHK(mbedtls_mpi_add_mpi(X,A,B)); in rtw_crypto_bignum_add_bignum()
679 MBEDTLS_MPI_CHK(mbedtls_mpi_add_int(X,A,b)); in rtw_crypto_bignum_add_int()
702 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_mpi(X,A,B)); in rtw_crypto_bignum_sub_bignum()
726 MBEDTLS_MPI_CHK(mbedtls_mpi_sub_int(X,A,b)); in rtw_crypto_bignum_sub_int()
775 MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(X,A,N)); in rtw_crypto_bignum_mod_bignum()
[all …]
/AliOS-Things-master/components/mbedtls/platform/yoc/
A Drsa_alt.c606 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->N, N, N_len ) ); in mbedtls_rsa_import_raw()
611 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->P, P, P_len ) ); in mbedtls_rsa_import_raw()
614 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->Q, Q, Q_len ) ); in mbedtls_rsa_import_raw()
617 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->D, D, D_len ) ); in mbedtls_rsa_import_raw()
620 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->E, E, E_len ) ); in mbedtls_rsa_import_raw()
/AliOS-Things-master/components/mbedtls/include/mbedtls/
A Decp.h244 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
A Dbignum.h49 #define MBEDTLS_MPI_CHK(f) do { if( ( ret = f ) != 0 ) goto cleanup; } while( 0 ) macro
A Dcompat-1.3.h739 #define MPI_CHK MBEDTLS_MPI_CHK
/AliOS-Things-master/components/mbedtls/
A DChangeLog898 * Add MBEDTLS_MPI_CHK to check for error value of mbedtls_mpi_fill_random.

Completed in 60 milliseconds