diff options
Diffstat (limited to 'src/pubkey/if_algo/if_op.cpp')
-rw-r--r-- | src/pubkey/if_algo/if_op.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/pubkey/if_algo/if_op.cpp b/src/pubkey/if_algo/if_op.cpp index 27aef453e..99f68400d 100644 --- a/src/pubkey/if_algo/if_op.cpp +++ b/src/pubkey/if_algo/if_op.cpp @@ -1,12 +1,13 @@ /* -* IF (RSA/RW) Operation -* (C) 1999-2007 Jack Lloyd +* Integer Factorization Scheme (RSA/RW) Operation +* (C) 1999-2009 Jack Lloyd * * Distributed under the terms of the Botan license */ #include <botan/if_op.h> #include <botan/numthry.h> +#include <future> namespace Botan { @@ -38,8 +39,10 @@ BigInt Default_IF_Op::private_op(const BigInt& i) const if(q == 0) throw Internal_Error("Default_IF_Op::private_op: No private key"); - BigInt j1 = powermod_d1_p(i); + auto future_j1 = std::async(std::launch::async, powermod_d1_p, i); BigInt j2 = powermod_d2_q(i); + BigInt j1 = future_j1.get(); + j1 = reducer.reduce(sub_mul(j1, j2, c)); return mul_add(j1, q, j2); } |