Skip to content

Commit 3942a1c

Browse files
committed
Merge pull request #7044
efca5b8 wallet2: check imported multisig curve points are in main subgroup (moneromooo-monero)
2 parents e4c0cb0 + efca5b8 commit 3942a1c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/wallet/wallet2.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13381,6 +13381,20 @@ size_t wallet2::import_multisig(std::vector<cryptonote::blobdata> blobs)
1338113381
loaded = true;
1338213382
}
1338313383
CHECK_AND_ASSERT_THROW_MES(loaded, "Failed to load output data");
13384+
13385+
for (const auto &e: i)
13386+
{
13387+
for (const auto &lr: e.m_LR)
13388+
{
13389+
CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(lr.m_L), "Multisig value is not in the main subgroup");
13390+
CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(lr.m_R), "Multisig value is not in the main subgroup");
13391+
}
13392+
for (const auto &ki: e.m_partial_key_images)
13393+
{
13394+
CHECK_AND_ASSERT_THROW_MES(rct::isInMainSubgroup(rct::ki2rct(ki)), "Multisig partial key image is not in the main subgroup");
13395+
}
13396+
}
13397+
1338413398
MINFO(boost::format("%u outputs found") % boost::lexical_cast<std::string>(i.size()));
1338513399
info.push_back(std::move(i));
1338613400
}

0 commit comments

Comments
 (0)