Home
last modified time | relevance | path

Searched refs:mbedtls_mpi_cmp_int (Results 1 – 25 of 33) sorted by relevance

12

/external/mbedtls/library/
Drsa_alt_helpers.c91 if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || in mbedtls_rsa_deduce_primes()
92 mbedtls_mpi_cmp_int( D, 1 ) <= 0 || in mbedtls_rsa_deduce_primes()
94 mbedtls_mpi_cmp_int( E, 1 ) <= 0 || in mbedtls_rsa_deduce_primes()
135 if( mbedtls_mpi_cmp_int( P, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
148 if( mbedtls_mpi_cmp_int( &K, 1 ) == 0 ) in mbedtls_rsa_deduce_primes()
154 if( mbedtls_mpi_cmp_int( P, 1 ) == 1 && in mbedtls_rsa_deduce_primes()
178 if( mbedtls_mpi_cmp_int( &K, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
205 if( D == NULL || mbedtls_mpi_cmp_int( D, 0 ) != 0 ) in mbedtls_rsa_deduce_private_exponent()
208 if( mbedtls_mpi_cmp_int( P, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
209 mbedtls_mpi_cmp_int( Q, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
[all …]
Drsa.c153 if( mbedtls_mpi_cmp_int( &ctx->N, 0 ) <= 0 || in rsa_check_context()
164 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
166 mbedtls_mpi_cmp_int( &ctx->Q, 0 ) <= 0 || in rsa_check_context()
178 if( mbedtls_mpi_cmp_int( &ctx->E, 0 ) <= 0 ) in rsa_check_context()
184 if( is_priv && mbedtls_mpi_cmp_int( &ctx->D, 0 ) <= 0 ) in rsa_check_context()
188 ( mbedtls_mpi_cmp_int( &ctx->DP, 0 ) <= 0 || in rsa_check_context()
189 mbedtls_mpi_cmp_int( &ctx->DQ, 0 ) <= 0 ) ) in rsa_check_context()
200 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
201 mbedtls_mpi_cmp_int( &ctx->Q, 0 ) <= 0 ) ) in rsa_check_context()
211 mbedtls_mpi_cmp_int( &ctx->QP, 0 ) <= 0 ) in rsa_check_context()
[all …]
Dbignum.c475 } while( mbedtls_mpi_cmp_int( X, 0 ) != 0 ); in mpi_write_hlp()
861 int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z ) in mbedtls_mpi_cmp_int() function
1287 if( mbedtls_mpi_cmp_int( B, 0 ) == 0 ) in mbedtls_mpi_div_mpi()
1368 if( mbedtls_mpi_cmp_int( &X, 0 ) < 0 ) in mbedtls_mpi_div_mpi()
1389 if( mbedtls_mpi_cmp_int( R, 0 ) == 0 ) in mbedtls_mpi_div_mpi()
1431 if( mbedtls_mpi_cmp_int( B, 0 ) < 0 ) in mbedtls_mpi_mod_mpi()
1436 while( mbedtls_mpi_cmp_int( R, 0 ) < 0 ) in mbedtls_mpi_mod_mpi()
1605 if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || ( N->p[0] & 1 ) == 0 ) in mbedtls_mpi_exp_mod()
1608 if( mbedtls_mpi_cmp_int( E, 0 ) < 0 ) in mbedtls_mpi_exp_mod()
1957 while( mbedtls_mpi_cmp_int( &TA, 0 ) != 0 ) in mbedtls_mpi_gcd()
[all …]
Decp.c651 return( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 ); in mbedtls_ecp_is_zero()
718 if( mbedtls_mpi_cmp_int( &P->Z, 0 ) == 0 ) in mbedtls_ecp_point_write_binary()
974 if( ( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) || in ecp_modp()
983 while( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) in ecp_modp()
1038 while( (N)->s < 0 && mbedtls_mpi_cmp_int( (N), 0 ) != 0 ) \
1162 mbedtls_mpi_cmp_int( X, c )
1176 unsigned char nonzero = mbedtls_mpi_cmp_int( (X), 0 ) != 0; \
2604 if( mbedtls_mpi_cmp_int( &pt->X, 0 ) < 0 || in ecp_check_pubkey_sw()
2605 mbedtls_mpi_cmp_int( &pt->Y, 0 ) < 0 || in ecp_check_pubkey_sw()
2658 if( mbedtls_mpi_cmp_int( m, 0 ) == 0 ) in mbedtls_ecp_mul_shortcuts()
[all …]
Decdsa.c259 if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ) in ecdsa_sign_restartable()
320 while( mbedtls_mpi_cmp_int( pr, 0 ) == 0 ); in ecdsa_sign_restartable()
358 while( mbedtls_mpi_cmp_int( s, 0 ) == 0 ); in ecdsa_sign_restartable()
534 if( mbedtls_mpi_cmp_int( r, 1 ) < 0 || mbedtls_mpi_cmp_mpi( r, &grp->N ) >= 0 || in ecdsa_verify_restartable()
535 mbedtls_mpi_cmp_int( s, 1 ) < 0 || mbedtls_mpi_cmp_mpi( s, &grp->N ) >= 0 ) in ecdsa_verify_restartable()
Ddhm.c97 if( mbedtls_mpi_cmp_int( param, 2 ) < 0 || in dhm_check_range()
195 if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) in dhm_make_common()
368 if( mbedtls_mpi_cmp_int( &ctx->Vi, 1 ) != 0 ) in dhm_update_blinding()
/external/openthread/third_party/mbedtls/repo/library/
Drsa_internal.c91 if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || in mbedtls_rsa_deduce_primes()
92 mbedtls_mpi_cmp_int( D, 1 ) <= 0 || in mbedtls_rsa_deduce_primes()
94 mbedtls_mpi_cmp_int( E, 1 ) <= 0 || in mbedtls_rsa_deduce_primes()
135 if( mbedtls_mpi_cmp_int( P, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
148 if( mbedtls_mpi_cmp_int( &K, 1 ) == 0 ) in mbedtls_rsa_deduce_primes()
154 if( mbedtls_mpi_cmp_int( P, 1 ) == 1 && in mbedtls_rsa_deduce_primes()
178 if( mbedtls_mpi_cmp_int( &K, 1 ) != 0 ) in mbedtls_rsa_deduce_primes()
205 if( D == NULL || mbedtls_mpi_cmp_int( D, 0 ) != 0 ) in mbedtls_rsa_deduce_private_exponent()
208 if( mbedtls_mpi_cmp_int( P, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
209 mbedtls_mpi_cmp_int( Q, 1 ) <= 0 || in mbedtls_rsa_deduce_private_exponent()
[all …]
Drsa.c162 if( mbedtls_mpi_cmp_int( &ctx->N, 0 ) <= 0 || in rsa_check_context()
173 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
175 mbedtls_mpi_cmp_int( &ctx->Q, 0 ) <= 0 || in rsa_check_context()
187 if( mbedtls_mpi_cmp_int( &ctx->E, 0 ) <= 0 ) in rsa_check_context()
193 if( is_priv && mbedtls_mpi_cmp_int( &ctx->D, 0 ) <= 0 ) in rsa_check_context()
197 ( mbedtls_mpi_cmp_int( &ctx->DP, 0 ) <= 0 || in rsa_check_context()
198 mbedtls_mpi_cmp_int( &ctx->DQ, 0 ) <= 0 ) ) in rsa_check_context()
209 ( mbedtls_mpi_cmp_int( &ctx->P, 0 ) <= 0 || in rsa_check_context()
210 mbedtls_mpi_cmp_int( &ctx->Q, 0 ) <= 0 ) ) in rsa_check_context()
220 mbedtls_mpi_cmp_int( &ctx->QP, 0 ) <= 0 ) in rsa_check_context()
[all …]
Dbignum.c515 } while( mbedtls_mpi_cmp_int( X, 0 ) != 0 ); in mpi_write_hlp()
1098 int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z ) in mbedtls_mpi_cmp_int() function
1653 if( mbedtls_mpi_cmp_int( B, 0 ) == 0 ) in mbedtls_mpi_div_mpi()
1734 if( mbedtls_mpi_cmp_int( &X, 0 ) < 0 ) in mbedtls_mpi_div_mpi()
1755 if( mbedtls_mpi_cmp_int( R, 0 ) == 0 ) in mbedtls_mpi_div_mpi()
1797 if( mbedtls_mpi_cmp_int( B, 0 ) < 0 ) in mbedtls_mpi_mod_mpi()
1802 while( mbedtls_mpi_cmp_int( R, 0 ) < 0 ) in mbedtls_mpi_mod_mpi()
2024 if( mbedtls_mpi_cmp_int( N, 0 ) <= 0 || ( N->p[0] & 1 ) == 0 ) in mbedtls_mpi_exp_mod()
2027 if( mbedtls_mpi_cmp_int( E, 0 ) < 0 ) in mbedtls_mpi_exp_mod()
2310 while( mbedtls_mpi_cmp_int( &TA, 0 ) != 0 ) in mbedtls_mpi_gcd()
[all …]
Decp.c825 return( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 ); in mbedtls_ecp_is_zero()
902 if( mbedtls_mpi_cmp_int( &P->Z, 0 ) == 0 ) in mbedtls_ecp_point_write_binary()
1182 if( ( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) || in ecp_modp()
1191 while( N->s < 0 && mbedtls_mpi_cmp_int( N, 0 ) != 0 ) in ecp_modp()
1245 while( (N).s < 0 && mbedtls_mpi_cmp_int( &(N), 0 ) != 0 ) \
1320 if( mbedtls_mpi_cmp_int( &pt->Z, 0 ) == 0 ) in ecp_normalize_jac()
1476 nonzero = mbedtls_mpi_cmp_int( &Q->Y, 0 ) != 0; in ecp_safe_invert_jac()
1536 if( mbedtls_mpi_cmp_int( &grp->A, 0 ) != 0 ) in ecp_double_jac()
1620 if( mbedtls_mpi_cmp_int( &P->Z, 0 ) == 0 ) in ecp_add_mixed()
1623 if( Q->Z.p != NULL && mbedtls_mpi_cmp_int( &Q->Z, 0 ) == 0 ) in ecp_add_mixed()
[all …]
Decdsa.c271 if( mbedtls_mpi_cmp_int( d, 1 ) < 0 || mbedtls_mpi_cmp_mpi( d, &grp->N ) >= 0 ) in ecdsa_sign_restartable()
332 while( mbedtls_mpi_cmp_int( pr, 0 ) == 0 ); in ecdsa_sign_restartable()
370 while( mbedtls_mpi_cmp_int( s, 0 ) == 0 ); in ecdsa_sign_restartable()
635 if( mbedtls_mpi_cmp_int( r, 1 ) < 0 || mbedtls_mpi_cmp_mpi( r, &grp->N ) >= 0 || in ecdsa_verify_restartable()
636 mbedtls_mpi_cmp_int( s, 1 ) < 0 || mbedtls_mpi_cmp_mpi( s, &grp->N ) >= 0 ) in ecdsa_verify_restartable()
Ddhm.c110 if( mbedtls_mpi_cmp_int( param, 2 ) < 0 || in dhm_check_range()
173 if( mbedtls_mpi_cmp_int( &ctx->P, 0 ) == 0 ) in dhm_make_common()
361 if( mbedtls_mpi_cmp_int( &ctx->Vi, 1 ) != 0 ) in dhm_update_blinding()
/external/mbedtls/tests/suites/
Dtest_suite_bignum.function448 TEST_ASSERT( mbedtls_mpi_cmp_int( &X, input_A ) == result_CMP);
696 TEST_ASSERT( mbedtls_mpi_cmp_int( &X, 0 ) == 0 );
1349 TEST_ASSERT( mbedtls_mpi_cmp_int( &result, min ) >= 0 );
1431 TEST_ASSERT( mbedtls_mpi_cmp_int( &result, min ) >= 0 );
1498 /* Test mbedtls_mpi_cmp_int(): -p == -p */
1499 TEST_EQUAL( mbedtls_mpi_cmp_int( &A, most_negative ), 0 );
1501 /* Test mbedtls_mpi_cmp_int(): -(p+1) < -p */
1503 TEST_EQUAL( mbedtls_mpi_cmp_int( &A, most_negative ), -1 );
1505 /* Test mbedtls_mpi_cmp_int(): -(p-1) > -p */
1507 TEST_EQUAL( mbedtls_mpi_cmp_int( &A, most_negative ), 1 );
[all …]
Dtest_suite_dhm.function62 TEST_ASSERT( mbedtls_mpi_cmp_int( &ctx->X, 1 ) > 0 );
65 TEST_ASSERT( mbedtls_mpi_cmp_int( &ctx->GX, 1 ) > 0 );
Dtest_suite_bignum.misc.data175 Base test mbedtls_mpi_cmp_int #1
178 Base test mbedtls_mpi_cmp_int #2
181 Base test mbedtls_mpi_cmp_int #3
184 Base test mbedtls_mpi_cmp_int (Negative values) #1
187 Base test mbedtls_mpi_cmp_int (Negative values) #2
190 Base test mbedtls_mpi_cmp_int (Negative values) #3
Dtest_suite_ecp.function636 TEST_ASSERT( mbedtls_mpi_cmp_int( &Y, 0 ) == 0 );
638 TEST_ASSERT( mbedtls_mpi_cmp_int( &Z, 1 ) == 0 );
639 TEST_ASSERT( mbedtls_mpi_cmp_int( &P.Z, 1 ) == 0 );
/external/openthread/third_party/mbedtls/repo/tests/suites/
Dtest_suite_mpi.data166 Base test mbedtls_mpi_cmp_int #1
167 mbedtls_mpi_cmp_int:693:693:0
169 Base test mbedtls_mpi_cmp_int #2
170 mbedtls_mpi_cmp_int:693:692:1
172 Base test mbedtls_mpi_cmp_int #3
173 mbedtls_mpi_cmp_int:693:694:-1
175 Base test mbedtls_mpi_cmp_int (Negative values) #1
176 mbedtls_mpi_cmp_int:-2:-2:0
178 Base test mbedtls_mpi_cmp_int (Negative values) #2
179 mbedtls_mpi_cmp_int:-2:-3:1
[all …]
Dtest_suite_dhm.function45 TEST_ASSERT( mbedtls_mpi_cmp_int( &ctx->X, 1 ) > 0 );
48 TEST_ASSERT( mbedtls_mpi_cmp_int( &ctx->GX, 1 ) > 0 );
Dtest_suite_mpi.function236 mbedtls_mpi_cmp_int( NULL, 42 ) );
648 void mbedtls_mpi_cmp_int( int input_X, int input_A, int result_CMP )
654 TEST_ASSERT( mbedtls_mpi_cmp_int( &X, input_A ) == result_CMP);
903 TEST_ASSERT( mbedtls_mpi_cmp_int( &X, 0 ) == 0 );
1527 TEST_ASSERT( mbedtls_mpi_cmp_int( &result, min ) >= 0 );
1609 TEST_ASSERT( mbedtls_mpi_cmp_int( &result, min ) >= 0 );
Dtest_suite_ecp.function905 TEST_ASSERT( mbedtls_mpi_cmp_int( &Y, 0 ) == 0 );
907 TEST_ASSERT( mbedtls_mpi_cmp_int( &Z, 1 ) == 0 );
908 TEST_ASSERT( mbedtls_mpi_cmp_int( &P.Z, 1 ) == 0 );
/external/openthread/third_party/mbedtls/repo/programs/fuzz/
Dfuzz_pubkey.c57 if( mbedtls_mpi_cmp_int( &ecp->d, 0 ) != 0 ) in LLVMFuzzerTestOneInput()
/external/mbedtls/programs/fuzz/
Dfuzz_pubkey.c59 if( mbedtls_mpi_cmp_int( &ecp->d, 0 ) != 0 ) in LLVMFuzzerTestOneInput()
/external/mbedtls/include/mbedtls/
Dbignum.h668 int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z );
/external/mbedtls/tests/src/
Dhelpers.c427 if( mbedtls_mpi_cmp_int( X, 0 ) == 0 ) in mbedtls_test_read_mpi()
/external/openthread/third_party/mbedtls/repo/include/mbedtls/
Dbignum.h631 int mbedtls_mpi_cmp_int( const mbedtls_mpi *X, mbedtls_mpi_sint z );

12