diff options
author | Jack Lloyd <[email protected]> | 2016-11-02 15:05:46 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2016-11-03 11:57:10 -0400 |
commit | 8d50c82b43b34b70d19b0faaeab6b37f2eae066c (patch) | |
tree | 9cb7478fb7c37c66e140bc09ca77bf0ede07cc76 /src/tests/test_rsa.cpp | |
parent | b1021ca76bb3c47b1b520421ccece38d772e5907 (diff) |
Remove automatic self-testing of public and private keys
Rarely expected and often causes performance problems, especially for private keys.
Instead applications should call check_key explicitly to validate keys when
necessary.
Note this removal doesn't apply to tests like ECDH on-the-curve tests, where a check
on the public key is required for security of our own key.
Updates most APIs to remove RNG calls, where they are no longer required. Exception
is PKCS8 interface, pending further work there (see GH #685) it just ignores the RNG
argument now.
Diffstat (limited to 'src/tests/test_rsa.cpp')
-rw-r--r-- | src/tests/test_rsa.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tests/test_rsa.cpp b/src/tests/test_rsa.cpp index 0d50193f2..5feb8a14f 100644 --- a/src/tests/test_rsa.cpp +++ b/src/tests/test_rsa.cpp @@ -33,7 +33,7 @@ class RSA_ES_KAT_Tests : public PK_Encryption_Decryption_Test const BigInt q = get_req_bn(vars, "Q"); const BigInt e = get_req_bn(vars, "E"); - std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(Test::rng(), p, q, e)); + std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(p, q, e)); return key; } }; @@ -51,7 +51,7 @@ class RSA_KEM_Tests : public PK_KEM_Test const BigInt q = get_req_bn(vars, "Q"); const BigInt e = get_req_bn(vars, "E"); - std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(Test::rng(), p, q, e)); + std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(p, q, e)); return key; } @@ -75,7 +75,7 @@ class RSA_Signature_KAT_Tests : public PK_Signature_Generation_Test const BigInt q = get_req_bn(vars, "Q"); const BigInt e = get_req_bn(vars, "E"); - std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(Test::rng(), p, q, e)); + std::unique_ptr<Botan::Private_Key> key(new Botan::RSA_PrivateKey(p, q, e)); return key; } }; |