mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-25 17:45:37 +01:00
- Found algorithmic bug in mpi_is_prime()
This commit is contained in:
parent
4ed999c4b2
commit
41d13f4af8
@ -12,6 +12,8 @@ Bug fixes
|
||||
certificate in the chain in ssl_write_certificate() and
|
||||
ssl_write_certificate_request() (Found by fatbob)
|
||||
* Added small fixes for compiler warnings on a Mac
|
||||
* Fixed algorithmic bug in mpi_is_prime() (Found by
|
||||
Smbat Tonoyan)
|
||||
|
||||
= Version 0.12.1 released on 2009-10-04
|
||||
Changes
|
||||
|
@ -1720,8 +1720,8 @@ int mpi_is_prime( mpi *X, int (*f_rng)(void *), void *p_rng )
|
||||
* W = |X| - 1
|
||||
* R = W >> lsb( W )
|
||||
*/
|
||||
s = mpi_lsb( &W );
|
||||
MPI_CHK( mpi_sub_int( &W, X, 1 ) );
|
||||
s = mpi_lsb( &W );
|
||||
MPI_CHK( mpi_copy( &R, &W ) );
|
||||
MPI_CHK( mpi_shift_r( &R, s ) );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user