Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
0d8a5a8131
commit
0dff6df8ed
250 changed files with 12199 additions and 1981 deletions
|
|
@ -392,7 +392,10 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
dpf::root_sampler_t<dpf::prg::aes128>{take_root}, y);
|
||||
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto on = dpf::geneval_point(x0, x1, alpha, dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
expect_live_words(keys.first, on);
|
||||
EXPECT_TRUE(on.leaf_live);
|
||||
EXPECT_EQ(opened(on.party0[0], on.party1[0]), y);
|
||||
|
|
@ -401,8 +404,11 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
|
||||
const in_t neighbor = static_cast<in_t>(alpha ^ 1u);
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto lane = dpf::geneval_point(x0, x1, neighbor,
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_TRUE(lane.leaf_live);
|
||||
expect_live_words(keys.first, lane);
|
||||
EXPECT_EQ(opened(lane.party0[0], lane.party1[0]), out_t{});
|
||||
|
|
@ -410,7 +416,10 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
|
||||
const in_t far = 200;
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto off = dpf::geneval_point(x0, x1, far, dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_FALSE(off.leaf_live);
|
||||
EXPECT_LT(off.live_levels, off.correction_words.size());
|
||||
expect_live_words(keys.first, off);
|
||||
|
|
@ -418,8 +427,11 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
EXPECT_NE(off.party0[0], ev(keys.first, far));
|
||||
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto iv = dpf::geneval_interval(x0, x1, in_t{41}, in_t{50},
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_TRUE(iv.leaf_live);
|
||||
expect_live_words(keys.first, iv);
|
||||
ASSERT_EQ(iv.party0.size(), 10u);
|
||||
|
|
@ -427,7 +439,10 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
EXPECT_EQ(opened(iv.party0[i], iv.party1[i]), out_t{});
|
||||
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto full = dpf::geneval_full(x0, x1, dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_EQ(full.party0.size(), 256u);
|
||||
EXPECT_TRUE(full.leaf_live);
|
||||
expect_live_words(keys.first, full);
|
||||
|
|
@ -440,8 +455,11 @@ TEST(LaneBlast, GenevalMatchesKeyOnPackedLanes)
|
|||
|
||||
const in_t seq[] = {0, 255, alpha, neighbor, alpha};
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto sq = dpf::geneval_sequence(x0, x1, std::begin(seq), std::end(seq),
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_TRUE(sq.leaf_live);
|
||||
expect_live_words(keys.first, sq);
|
||||
for (std::size_t i = 0; i < 5; ++i)
|
||||
|
|
@ -463,15 +481,21 @@ TEST(LaneBlast, GenevalNybleArithAndSigned)
|
|||
auto keys = dpf::make_dpf(secret,
|
||||
dpf::root_sampler_t<dpf::prg::aes128>{take_root}, y);
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto g = dpf::geneval_point(dpf::arith_input, a0, a1, secret,
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_TRUE(g.leaf_live);
|
||||
expect_live_words(keys.first, g);
|
||||
EXPECT_EQ(opened(g.party0[0], g.party1[0]), y);
|
||||
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto miss = dpf::geneval_point(dpf::arith_input, a0, a1, in_t{250},
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_EQ(opened(miss.party0[0], miss.party1[0]), out_t{});
|
||||
expect_live_words(keys.first, miss);
|
||||
}
|
||||
|
|
@ -484,7 +508,10 @@ TEST(LaneBlast, GenevalNybleArithAndSigned)
|
|||
auto keys = dpf::make_dpf(alpha,
|
||||
dpf::root_sampler_t<dpf::prg::aes128>{take_root}, y);
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto full = dpf::geneval_full(x0, x1, dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
EXPECT_EQ(full.party0.size(), 256u);
|
||||
EXPECT_TRUE(full.leaf_live);
|
||||
expect_live_words(keys.first, full);
|
||||
|
|
@ -497,8 +524,11 @@ TEST(LaneBlast, GenevalNybleArithAndSigned)
|
|||
EXPECT_EQ(full.party0[i], ev(keys.first, v));
|
||||
}
|
||||
reset_roots();
|
||||
HEDLEY_PRAGMA(GCC diagnostic push)
|
||||
HEDLEY_PRAGMA(GCC diagnostic ignored "-Wignored-attributes")
|
||||
auto iv = dpf::geneval_interval(x0, x1, in_t{-2}, in_t{2},
|
||||
dpf::ds_randomness<simde__m128i (*)(), Pad>{take_root, Pad{}}, y);
|
||||
HEDLEY_PRAGMA(GCC diagnostic pop)
|
||||
ASSERT_EQ(iv.party0.size(), 5u);
|
||||
for (int q = -2; q <= 2; ++q)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue