aboutsummaryrefslogtreecommitdiffstats
path: root/src/pubkey/rsa/rsa.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pubkey/rsa/rsa.cpp')
-rw-r--r--src/pubkey/rsa/rsa.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/pubkey/rsa/rsa.cpp b/src/pubkey/rsa/rsa.cpp
index 200e92821..e27b2056d 100644
--- a/src/pubkey/rsa/rsa.cpp
+++ b/src/pubkey/rsa/rsa.cpp
@@ -9,6 +9,7 @@
#include <botan/parsing.h>
#include <botan/numthry.h>
#include <botan/keypair.h>
+#include <future>
namespace Botan {
@@ -89,8 +90,9 @@ BigInt RSA_Private_Operation::private_op(const BigInt& m) const
if(m >= n)
throw Invalid_Argument("RSA private op - input is too large");
- BigInt j1 = powermod_d1_p(m);
+ auto future_j1 = std::async(std::launch::async, powermod_d1_p, m);
BigInt j2 = powermod_d2_q(m);
+ BigInt j1 = future_j1.get();
j1 = mod_p.reduce(sub_mul(j1, j2, c));