diff options
author | luigi1111 <luigi1111w@gmail.com> | 2018-09-04 13:16:04 -0500 |
---|---|---|
committer | luigi1111 <luigi1111w@gmail.com> | 2018-09-04 13:16:04 -0500 |
commit | 5f1bbe3bced3d73bf2996e39b86dc4e871422813 (patch) | |
tree | 903a2c9e481445d98b8381b731a030d4dcdc462f /src/wallet/wallet2.cpp | |
parent | Merge pull request #4264 (diff) | |
parent | Do memwipe for critical secret keys copied to rct::key (diff) | |
download | monero-5f1bbe3bced3d73bf2996e39b86dc4e871422813.tar.xz |
Merge pull request #4268
1f2409e Do memwipe for critical secret keys copied to rct::key (stoffu)
Diffstat (limited to 'src/wallet/wallet2.cpp')
-rw-r--r-- | src/wallet/wallet2.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index e14c1f501..bd86ae075 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -3388,6 +3388,7 @@ void wallet2::generate(const std::string& wallet_, const epee::wipeable_string& for (const auto &msk: multisig_keys) sc_add(skey.bytes, skey.bytes, rct::sk2rct(msk).bytes); THROW_WALLET_EXCEPTION_IF(!(rct::rct2sk(skey) == spend_secret_key), error::invalid_multisig_seed); + memwipe(&skey, sizeof(rct::key)); m_account.make_multisig(view_secret_key, spend_secret_key, spend_public_key, multisig_keys); m_account.finalize_multisig(spend_public_key); @@ -3750,6 +3751,7 @@ std::string wallet2::make_multisig(const epee::wipeable_string &password, MINFO("Creating multisig address..."); CHECK_AND_ASSERT_THROW_MES(m_account.make_multisig(view_skey, rct::rct2sk(spend_skey), rct::rct2pk(spend_pkey), multisig_keys), "Failed to create multisig wallet due to bad keys"); + memwipe(&spend_skey, sizeof(rct::key)); m_account_public_address = m_account.get_keys().m_account_address; m_watch_only = false; |