commit | b0af56334c2259d242f406173c5f14ab233ac25c | [log] [tgz] |
---|---|---|
author | Paul Bakker <p.j.bakker@polarssl.org> | Wed Apr 30 13:33:35 2014 +0200 |
committer | Paul Bakker <p.j.bakker@polarssl.org> | Tue Jul 08 18:28:36 2014 +0200 |
tree | f682fc62824d80a25b373cefdc1a59b8eaf077cf | |
parent | 3dfa07b401e5b14e14456708c138ee22e354c969 [diff] [blame] |
rsa_check_pubkey() now allows an E up to N
diff --git a/library/rsa.c b/library/rsa.c index 616f5d9..98d7770 100644 --- a/library/rsa.c +++ b/library/rsa.c
@@ -149,7 +149,7 @@ return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED ); if( mpi_msb( &ctx->E ) < 2 || - mpi_msb( &ctx->E ) > 64 ) + mpi_cmp_mpi( &ctx->E, &ctx->N ) >= 0 ) return( POLARSSL_ERR_RSA_KEY_CHECK_FAILED ); return( 0 );