aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorluigi1111 <luigi1111w@gmail.com>2020-11-25 09:31:25 -0600
committerluigi1111 <luigi1111w@gmail.com>2020-11-25 09:31:25 -0600
commit3942a1cd043bb103ca05184057aea5c86e3137e5 (patch)
tree5042ea33c98b709fb4e38b10c6ae389468845f1c /src
parentMerge pull request #7039 (diff)
parentwallet2: check imported multisig curve points are in main subgroup (diff)
downloadmonero-3942a1cd043bb103ca05184057aea5c86e3137e5.tar.xz
Merge pull request #7044v0.17.1.5
efca5b8 wallet2: check imported multisig curve points are in main subgroup (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r--src/wallet/wallet2.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp
index 7cbb4a910..65411e392 100644
--- a/src/wallet/wallet2.cpp
+++ b/src/wallet/wallet2.cpp
@@ -13381,6 +13381,20 @@ size_t wallet2::import_multisig(std::vector<cryptonote::blobdata> blobs)
loaded = true;
}
CHECK_AND_ASSERT_THROW_MES(loaded, "Failed to load output data");
+
+ for (const auto &e: i)
+ {
+ for (const auto &lr: e.m_LR)
+ {
+ CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(lr.m_L), "Multisig value is not in the main subgroup");
+ CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(lr.m_R), "Multisig value is not in the main subgroup");
+ }
+ for (const auto &ki: e.m_partial_key_images)
+ {
+ CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(rct::ki2rct(ki)), "Multisig partial key image is not in the main subgroup");
+ }
+ }
+
MINFO(boost::format("%u outputs found") % boost::lexical_cast<std::string>(i.size()));
info.push_back(std::move(i));
}