diff options
author | Alexander Blair <snipa@jagtech.io> | 2020-12-04 13:25:00 -0800 |
---|---|---|
committer | Alexander Blair <snipa@jagtech.io> | 2020-12-04 13:25:01 -0800 |
commit | 6b8db83149a0edeca623e54ea147d6258638dc53 (patch) | |
tree | 7a0edb2c7c5fcbff10974efd112457f182920b29 /src/wallet | |
parent | Merge pull request #7030 (diff) | |
parent | wallet2: check imported multisig curve points are in main subgroup (diff) | |
download | monero-6b8db83149a0edeca623e54ea147d6258638dc53.tar.xz |
Merge pull request #7043
17c537039 wallet2: check imported multisig curve points are in main subgroup (Crypto City)
Diffstat (limited to 'src/wallet')
-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 852867b0c..920e0413c 100644 --- a/src/wallet/wallet2.cpp +++ b/src/wallet/wallet2.cpp @@ -13403,6 +13403,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)); } |