mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2025-12-28 18:27:11 +01:00
Bignum: Deprecate mbedtls_mpi_is_prime()
When using a primality testing function the tolerable error rate depends on the scheme in question, the required security strength and wether it is used for key generation or parameter validation. To support all use cases we need more flexibility than what the old API provides.
This commit is contained in:
parent
da31fa137a
commit
a0b67c2f3e
6 changed files with 70 additions and 18 deletions
|
|
@ -156,7 +156,7 @@ int main( int argc, char **argv )
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if( ( ret = mbedtls_mpi_is_prime( &Q, mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 )
|
||||
if( ( ret = mbedtls_mpi_is_prime_ext( &Q, 50, mbedtls_ctr_drbg_random, &ctr_drbg ) ) != 0 )
|
||||
{
|
||||
mbedtls_printf( " failed\n ! mbedtls_mpi_is_prime returned %d\n\n", ret );
|
||||
goto exit;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue