aboutsummaryrefslogtreecommitdiff
path: root/src/multisig/multisig.cpp
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2018-09-04 13:16:04 -0500
committerluigi1111 <luigi1111w@gmail.com>2018-09-04 13:16:04 -0500
commit5f1bbe3bced3d73bf2996e39b86dc4e871422813 (patch)
tree903a2c9e481445d98b8381b731a030d4dcdc462f /src/multisig/multisig.cpp
parentMerge pull request #4264 (diff)
parentDo memwipe for critical secret keys copied to rct::key (diff)
downloadmonero-5f1bbe3bced3d73bf2996e39b86dc4e871422813.tar.xz
Merge pull request #4268
1f2409e Do memwipe for critical secret keys copied to rct::key (stoffu)
Diffstat (limited to 'src/multisig/multisig.cpp')
-rw-r--r--src/multisig/multisig.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/multisig/multisig.cpp b/src/multisig/multisig.cpp
index d85c47772..a0a788b7d 100644
--- a/src/multisig/multisig.cpp
+++ b/src/multisig/multisig.cpp
@@ -47,9 +47,12 @@ namespace cryptonote
crypto::secret_key get_multisig_blinded_secret_key(const crypto::secret_key &key)
{
rct::keyV data;
+ data.reserve(2);
data.push_back(rct::sk2rct(key));
data.push_back(multisig_salt);
- return rct::rct2sk(rct::hash_to_scalar(data));
+ crypto::secret_key result = rct::rct2sk(rct::hash_to_scalar(data));
+ memwipe(&data[0], sizeof(rct::key));
+ return result;
}
//-----------------------------------------------------------------
void generate_multisig_N_N(const account_keys &keys, const std::vector<crypto::public_key> &spend_keys, std::vector<crypto::secret_key> &multisig_keys, rct::key &spend_skey, rct::key &spend_pkey)