Home
last modified time | relevance | path

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

/net-tools-3.7.0/mbedtls-2.4.0/library/
Decp.c367 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); in mbedtls_ecp_copy()
368 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) ); in mbedtls_ecp_copy()
369 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Z, &Q->Z ) ); in mbedtls_ecp_copy()
390 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->X , 1 ) ); in mbedtls_ecp_set_zero()
391 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Y , 1 ) ); in mbedtls_ecp_set_zero()
392 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z , 0 ) ); in mbedtls_ecp_set_zero()
430 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->X, radix, x ) ); in mbedtls_ecp_point_read_string()
431 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->Y, radix, y ) ); in mbedtls_ecp_point_read_string()
432 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); in mbedtls_ecp_point_read_string()
476 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &P->X, buf + 1, plen ) ); in mbedtls_ecp_point_write_binary()
[all …]
Dbignum.c201 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, i ) ); in mbedtls_mpi_copy()
236 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_assign()
268 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, Y->n ) ); in mbedtls_mpi_safe_cond_swap()
269 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( Y, X->n ) ); in mbedtls_mpi_safe_cond_swap()
294 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, 1 ) ); in mbedtls_mpi_lset()
333 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, off + 1 ) ); in mbedtls_mpi_set_bit()
445 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( X, n ) ); in mbedtls_mpi_read_string()
446 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_read_string()
456 MBEDTLS_MPI_CHK( mpi_get_digit( &d, radix, s[i - 1] ) ); in mbedtls_mpi_read_string()
462 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( X, 0 ) ); in mbedtls_mpi_read_string()
[all …]
Decdsa.c56 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( x, buf, use_size ) ); in derive_mpi()
58 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); in derive_mpi()
62 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( x, x, &grp->N ) ); in derive_mpi()
97 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair( grp, &k, &R, f_rng, p_rng ) ); in mbedtls_ecdsa_sign()
98 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( r, &R.X, &grp->N ) ); in mbedtls_ecdsa_sign()
111 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in mbedtls_ecdsa_sign()
121 MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &t, n_size, f_rng, p_rng ) ); in mbedtls_ecdsa_sign()
122 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &t, 8 * n_size - grp->nbits ) ); in mbedtls_ecdsa_sign()
134 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, r, d ) ); in mbedtls_ecdsa_sign()
135 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); in mbedtls_ecdsa_sign()
[all …]
Decjpake.c112 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ctx->grp, curve ) ); in mbedtls_ecjpake_setup()
114 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->s, secret, len ) ); in mbedtls_ecjpake_setup()
195 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, G ) ); in ecjpake_hash()
196 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, V ) ); in ecjpake_hash()
197 MBEDTLS_MPI_CHK( ecjpake_write_len_point( &p, end, grp, pf, X ) ); in ecjpake_hash()
217 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( h, hash, in ecjpake_hash()
219 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( h, h, &grp->N ) ); in ecjpake_hash()
256 MBEDTLS_MPI_CHK( mbedtls_ecp_tls_read_point( grp, &V, p, end - *p ) ); in ecjpake_zkp_read()
272 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &r, *p, r_len ) ); in ecjpake_zkp_read()
278 MBEDTLS_MPI_CHK( ecjpake_hash( md_info, grp, pf, G, &V, X, id, &h ) ); in ecjpake_zkp_read()
[all …]
Drsa.c115 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->E, exponent ) ); in mbedtls_rsa_gen_key()
119 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, 0, in mbedtls_rsa_gen_key()
122 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, 0, in mbedtls_rsa_gen_key()
128 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, &ctx->Q ) ); in mbedtls_rsa_gen_key()
135 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); in mbedtls_rsa_gen_key()
136 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); in mbedtls_rsa_gen_key()
137 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) ); in mbedtls_rsa_gen_key()
138 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G, &ctx->E, &H ) ); in mbedtls_rsa_gen_key()
148 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->D , &ctx->E, &H ) ); in mbedtls_rsa_gen_key()
149 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->DP, &ctx->D, &P1 ) ); in mbedtls_rsa_gen_key()
[all …]
Ddhm.c107 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &L, 2 ) ); in dhm_check_range()
108 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &U, P, 2 ) ); in dhm_check_range()
171 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); in mbedtls_dhm_make_params()
181 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, in mbedtls_dhm_make_params()
191 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, p + 2, n ) ); \ in mbedtls_dhm_make_params()
257 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &ctx->X, 1 ) ); in mbedtls_dhm_make_public()
264 MBEDTLS_MPI_CHK( mbedtls_mpi_exp_mod( &ctx->GX, &ctx->G, &ctx->X, in mbedtls_dhm_make_public()
270 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &ctx->GX, output, olen ) ); in mbedtls_dhm_make_public()
297 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &ctx->pX, &ctx->X ) ); in dhm_update_blinding()
298 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->Vi, 1 ) ); in dhm_update_blinding()
[all …]
Decp_curves.c663 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &grp->A, 16, "01DB42" ) ); in ecp_use_curve25519()
666 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve25519()
667 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &grp->P, 255 ) ); in ecp_use_curve25519()
668 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); in ecp_use_curve25519()
673 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.X, 9 ) ); in ecp_use_curve25519()
674 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.Z, 1 ) ); in ecp_use_curve25519()
838 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, 6 * WIDTH ) ); in ecp_mod_p192()
935 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, b * 2 / 8 / sizeof( mbedtls_mpi_uint ) ) ); \
971 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, C, N ) ); in fix_negative()
1134 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 521 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); in ecp_mod_p521()
[all …]
Decdh.c67 MBEDTLS_MPI_CHK( mbedtls_ecp_check_pubkey( grp, Q ) ); in mbedtls_ecdh_compute_shared()
69 MBEDTLS_MPI_CHK( mbedtls_ecp_mul( grp, &P, d, Q, f_rng, p_rng ) ); in mbedtls_ecdh_compute_shared()
77 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( z, &P.X ) ); in mbedtls_ecdh_compute_shared()
Dasn1write.c141 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); in mbedtls_asn1_write_mpi()
Dpkparse.c382 MBEDTLS_MPI_CHK( mbedtls_ecp_group_load( &ref, *id ) ); in pk_group_id_from_group()
/net-tools-3.7.0/mbedtls-2.4.0/programs/pkey/
Dmpi_demo.c57 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P, 10, "2789" ) ); in main()
58 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &Q, 10, "3203" ) ); in main()
59 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &E, 10, "257" ) ); in main()
60 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &N, &P, &Q ) ); in main()
63 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " N = ", &N, 10, NULL ) ); in main()
64 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " E = ", &E, 10, NULL ) ); in main()
67 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " P = ", &P, 10, NULL ) ); in main()
68 MBEDTLS_MPI_CHK( mbedtls_mpi_write_file( " Q = ", &Q, 10, NULL ) ); in main()
71 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P, &P, 1 ) ); in main()
72 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q, &Q, 1 ) ); in main()
[all …]
/net-tools-3.7.0/mbedtls-2.4.0/tests/suites/
Dtest_suite_ecjpake.function76 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm1, xm1, len_xm1 ) );
77 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( &ctx->xm2, xm2, len_xm2 ) );
79 MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp,
81 MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp,
83 MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp,
85 MBEDTLS_MPI_CHK( mbedtls_ecp_point_read_binary( &ctx->grp,
/net-tools-3.7.0/mbedtls-2.4.0/include/mbedtls/
Dbignum.h48 #define MBEDTLS_MPI_CHK(f) do { if( ( ret = f ) != 0 ) goto cleanup; } while( 0 ) macro
Dcompat-1.3.h760 #define MPI_CHK MBEDTLS_MPI_CHK
/net-tools-3.7.0/mbedtls-2.4.0/scripts/data_files/
Drename-1.3-2.0.txt100 MPI_CHK MBEDTLS_MPI_CHK