diff options
author | Jack Lloyd <[email protected]> | 2015-10-15 12:45:01 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-10-15 12:45:01 -0400 |
commit | dcc448d5004653c52dada3d04fd92db3bd08f10e (patch) | |
tree | a5e8810f80e5df33220ab878b03010acb9477b40 /src | |
parent | ecd6d9de95fceba95aaf6e93a0543b05ef6a8369 (diff) |
MSVC build fix
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/pubkey/blinding.h | 4 | ||||
-rw-r--r-- | src/lib/pubkey/elgamal/elgamal.cpp | 15 |
2 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/pubkey/blinding.h b/src/lib/pubkey/blinding.h index 2525276ca..c1999feb7 100644 --- a/src/lib/pubkey/blinding.h +++ b/src/lib/pubkey/blinding.h @@ -34,6 +34,10 @@ class BOTAN_DLL Blinder std::function<BigInt (const BigInt&)> fwd_func, std::function<BigInt (const BigInt&)> inv_func); + Blinder(const Blinder&) = delete; + + Blinder& operator=(const Blinder&) = delete; + private: BigInt blinding_nonce() const; diff --git a/src/lib/pubkey/elgamal/elgamal.cpp b/src/lib/pubkey/elgamal/elgamal.cpp index 4d0344610..5bcdd5689 100644 --- a/src/lib/pubkey/elgamal/elgamal.cpp +++ b/src/lib/pubkey/elgamal/elgamal.cpp @@ -145,16 +145,13 @@ class ElGamal_Decryption_Operation : public PK_Ops::Decryption_with_EME ElGamal_Decryption_Operation::ElGamal_Decryption_Operation(const ElGamal_PrivateKey& key, const std::string& eme) : - PK_Ops::Decryption_with_EME(eme) + PK_Ops::Decryption_with_EME(eme), + powermod_x_p(Fixed_Exponent_Power_Mod(key.get_x(), key.group_p())), + mod_p(Modular_Reducer(key.group_p())), + blinder(key.group_p(), + [](const BigInt& k) { return k; }, + [this](const BigInt& k) { return powermod_x_p(k); }) { - const BigInt& p = key.group_p(); - - powermod_x_p = Fixed_Exponent_Power_Mod(key.get_x(), p); - mod_p = Modular_Reducer(p); - - blinder = Blinder(p, - [](const BigInt& k) { return k; }, - [this](const BigInt& k) { return powermod_x_p(k); }); } secure_vector<byte> |