diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-06-09 17:38:17 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2017-06-09 17:38:17 +0700 |
commit | c8354a4635bc66c4878eca13b0c0ebc9da266839 (patch) | |
tree | fab5a7deb4540a01a30c05b4d051ff66b2983567 /crypto/test | |
parent | Add validation to DH public key constructor (diff) | |
download | BouncyCastle.NET-ed25519-c8354a4635bc66c4878eca13b0c0ebc9da266839.tar.xz |
Add validation to RSA public key constructor
Diffstat (limited to 'crypto/test')
-rw-r--r-- | crypto/test/src/crypto/test/RsaTest.cs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/test/src/crypto/test/RsaTest.cs b/crypto/test/src/crypto/test/RsaTest.cs index d0cbedace..e3fc18d02 100644 --- a/crypto/test/src/crypto/test/RsaTest.cs +++ b/crypto/test/src/crypto/test/RsaTest.cs @@ -563,7 +563,7 @@ namespace Org.BouncyCastle.Crypto.Tests } genParam = new RsaKeyGenerationParameters( - BigInteger.ValueOf(0x11), new SecureRandom(), 16, 25); + BigInteger.ValueOf(0x11), new SecureRandom(), 128, 25); pGen.Init(genParam); for (int i = 0; i < 100; ++i) @@ -572,7 +572,7 @@ namespace Org.BouncyCastle.Crypto.Tests RsaPrivateCrtKeyParameters privKey = (RsaPrivateCrtKeyParameters) pair.Private; BigInteger pqDiff = privKey.P.Subtract(privKey.Q).Abs(); - if (pqDiff.BitLength < 5) + if (pqDiff.BitLength < 42) { Fail("P and Q too close in RSA key pair"); } |