| /OK3568_Linux_fs/external/security/librkcrypto/test/c_mode/ |
| H A D | ecp.c | 368 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->X, &Q->X ) ); in mbedtls_ecp_copy() 369 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Y, &Q->Y ) ); in mbedtls_ecp_copy() 370 MBEDTLS_MPI_CHK( mbedtls_mpi_copy( &P->Z, &Q->Z ) ); in mbedtls_ecp_copy() 391 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->X , 1 ) ); in mbedtls_ecp_set_zero() 392 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Y , 1 ) ); in mbedtls_ecp_set_zero() 393 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &pt->Z , 0 ) ); in mbedtls_ecp_set_zero() 431 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->X, radix, x ) ); in mbedtls_ecp_point_read_string() 432 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &P->Y, radix, y ) ); in mbedtls_ecp_point_read_string() 433 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &P->Z, 1 ) ); in mbedtls_ecp_point_read_string() 477 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( &P->X, buf + 1, plen ) ); in mbedtls_ecp_point_write_binary() [all …]
|
| H A D | rsa.c | 67 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &ctx->E, exponent ) ); in mbedtls_rsa_gen_key() 71 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->P, nbits >> 1, 0, in mbedtls_rsa_gen_key() 74 MBEDTLS_MPI_CHK( mbedtls_mpi_gen_prime( &ctx->Q, nbits >> 1, 0, in mbedtls_rsa_gen_key() 80 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &ctx->N, &ctx->P, &ctx->Q ) ); in mbedtls_rsa_gen_key() 87 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &P1, &ctx->P, 1 ) ); in mbedtls_rsa_gen_key() 88 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &Q1, &ctx->Q, 1 ) ); in mbedtls_rsa_gen_key() 89 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( &H, &P1, &Q1 ) ); in mbedtls_rsa_gen_key() 90 MBEDTLS_MPI_CHK( mbedtls_mpi_gcd( &G, &ctx->E, &H ) ); in mbedtls_rsa_gen_key() 100 MBEDTLS_MPI_CHK( mbedtls_mpi_inv_mod( &ctx->D , &ctx->E, &H ) ); in mbedtls_rsa_gen_key() 101 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( &ctx->DP, &ctx->D, &P1 ) ); in mbedtls_rsa_gen_key() [all …]
|
| H A D | bignum.c | 201 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 …]
|
| H A D | ecdsa.c | 55 MBEDTLS_MPI_CHK( mbedtls_mpi_read_binary( x, buf, use_size ) ); in derive_mpi() 57 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( x, use_size * 8 - grp->nbits ) ); in derive_mpi() 61 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_mpi( x, x, &grp->N ) ); in derive_mpi() 96 MBEDTLS_MPI_CHK( mbedtls_ecp_gen_keypair( grp, &k, &R, f_rng, p_rng ) ); in mbedtls_ecdsa_sign() 97 MBEDTLS_MPI_CHK( mbedtls_mpi_mod_mpi( r, &R.X, &grp->N ) ); in mbedtls_ecdsa_sign() 110 MBEDTLS_MPI_CHK( derive_mpi( grp, &e, buf, blen ) ); in mbedtls_ecdsa_sign() 120 MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &t, n_size, f_rng, p_rng ) ); in mbedtls_ecdsa_sign() 121 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &t, 8 * n_size - grp->nbits ) ); in mbedtls_ecdsa_sign() 133 MBEDTLS_MPI_CHK( mbedtls_mpi_mul_mpi( s, r, d ) ); in mbedtls_ecdsa_sign() 134 MBEDTLS_MPI_CHK( mbedtls_mpi_add_mpi( &e, &e, s ) ); in mbedtls_ecdsa_sign() [all …]
|
| H A D | ecp_curves.c | 657 MBEDTLS_MPI_CHK( mbedtls_mpi_read_string( &grp->A, 16, "01DB42" ) ); in ecp_use_curve25519() 660 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->P, 1 ) ); in ecp_use_curve25519() 661 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_l( &grp->P, 255 ) ); in ecp_use_curve25519() 662 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_int( &grp->P, &grp->P, 19 ) ); in ecp_use_curve25519() 667 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.X, 9 ) ); in ecp_use_curve25519() 668 MBEDTLS_MPI_CHK( mbedtls_mpi_lset( &grp->G.Z, 1 ) ); in ecp_use_curve25519() 832 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, 6 * WIDTH ) ); in ecp_mod_p192() 929 MBEDTLS_MPI_CHK( mbedtls_mpi_grow( N, b * 2 / 8 / sizeof( mbedtls_mpi_uint ) ) ); \ 965 MBEDTLS_MPI_CHK( mbedtls_mpi_sub_abs( N, C, N ) ); in fix_negative() 1128 MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &M, 521 % ( 8 * sizeof( mbedtls_mpi_uint ) ) ) ); in ecp_mod_p521() [all …]
|
| H A D | asn1write.c | 142 MBEDTLS_MPI_CHK( mbedtls_mpi_write_binary( X, *p, len ) ); in mbedtls_asn1_write_mpi()
|
| /OK3568_Linux_fs/external/security/librkcrypto/test/include/c_mode/ |
| H A D | bignum.h | 43 #define MBEDTLS_MPI_CHK(f) do { if( ( ret = f ) != 0 ){goto cleanup; }} while( 0 ) macro
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/host_include/mbedtls/ |
| H A D | ecp.h | 323 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
|
| H A D | bignum.h | 49 #define MBEDTLS_MPI_CHK(f) \ macro
|
| H A D | compat-1.3.h | 745 #define MPI_CHK MBEDTLS_MPI_CHK
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm32/include/mbedtls/ |
| H A D | ecp.h | 323 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
|
| H A D | bignum.h | 49 #define MBEDTLS_MPI_CHK(f) \ macro
|
| H A D | compat-1.3.h | 745 #define MPI_CHK MBEDTLS_MPI_CHK
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/include/mbedtls/ |
| H A D | ecp.h | 323 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
|
| H A D | bignum.h | 49 #define MBEDTLS_MPI_CHK(f) \ macro
|
| H A D | compat-1.3.h | 745 #define MPI_CHK MBEDTLS_MPI_CHK
|
| /OK3568_Linux_fs/external/security/rk_tee_user/v2/export-ta_arm64/host_include/mbedtls/ |
| H A D | ecp.h | 323 MBEDTLS_MPI_CHK( mbedtls_ecp_check_budget( grp, rs_ctx, \
|
| H A D | bignum.h | 49 #define MBEDTLS_MPI_CHK(f) \ macro
|
| H A D | compat-1.3.h | 745 #define MPI_CHK MBEDTLS_MPI_CHK
|