mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-05-30 14:17:19 +00:00
Bignum: Remove dead code
Both variables affected by the code are overwritten before their next read.
This commit is contained in:
parent
7a539a57d7
commit
b39740e934
|
@ -2086,15 +2086,6 @@ static int mpi_miller_rabin( const mbedtls_mpi *X,
|
||||||
/*
|
/*
|
||||||
* pick a random A, 1 < A < |X| - 1
|
* pick a random A, 1 < A < |X| - 1
|
||||||
*/
|
*/
|
||||||
MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) );
|
|
||||||
|
|
||||||
if( mbedtls_mpi_cmp_mpi( &A, &W ) >= 0 )
|
|
||||||
{
|
|
||||||
j = mbedtls_mpi_bitlen( &A ) - mbedtls_mpi_bitlen( &W );
|
|
||||||
MBEDTLS_MPI_CHK( mbedtls_mpi_shift_r( &A, j + 1 ) );
|
|
||||||
}
|
|
||||||
A.p[0] |= 3;
|
|
||||||
|
|
||||||
count = 0;
|
count = 0;
|
||||||
do {
|
do {
|
||||||
MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) );
|
MBEDTLS_MPI_CHK( mbedtls_mpi_fill_random( &A, X->n * ciL, f_rng, p_rng ) );
|
||||||
|
|
Loading…
Reference in a new issue