diff options
author | Crypto City <cryptocity@example.com> | 2020-11-14 03:27:45 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2020-11-24 16:25:35 +0000 |
commit | 17c53703981a007faa80dc47e42ec0396a85008f (patch) | |
tree | bd3e7ed2dfa305b9de196f0446aa69819f53a940 /src | |
parent | Merge pull request #7007 (diff) | |
download | monero-17c53703981a007faa80dc47e42ec0396a85008f.tar.xz |
wallet2: check imported multisig curve points are in main subgroup
Diffstat (limited to 'src')
-rw-r--r-- | src/wallet/wallet2.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/wallet/wallet2.cpp b/src/wallet/wallet2.cpp index a3755ff08..9fc8b306d 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -13377,6 +13377,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)); } |