Checkpoint the party/runtime stack before share-program and malicious-mode work.
Ship the TLS mesh, composer, Beaver/Yao/leaf MPC, prep/online paths, apps, and docs so the tree is pushable before elevating share_expr, security_mode, and prep resume. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
695f8e84f7
commit
0d22946a0e
1835 changed files with 170291 additions and 2849 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include <gtest/gtest.h>
|
||||
#include <tuple>
|
||||
|
||||
#include "dpf.hpp"
|
||||
|
||||
|
|
@ -113,8 +114,8 @@ TEST(Ic, MemoizerAgrees)
|
|||
{
|
||||
const uint8_t r = 40, p = 7, q = 90;
|
||||
auto keys = dpf::make_dpf(r, dpf::ic(p, q, uint32_t{11}, uint32_t{2}));
|
||||
dpf::basic_path_memoizer<decltype(keys.first.key)> memo0;
|
||||
dpf::basic_path_memoizer<decltype(keys.second.key)> memo1;
|
||||
dpf::basic_path_memoizer<decltype(keys.first.dpf_key)> memo0;
|
||||
dpf::basic_path_memoizer<decltype(keys.second.dpf_key)> memo1;
|
||||
for (int x = 0; x < 256; ++x)
|
||||
{
|
||||
const auto a = dpf::eval_point(dpf::ic, keys.first, static_cast<uint8_t>(x), memo0);
|
||||
|
|
@ -131,7 +132,7 @@ TEST(Ic, IntervalAndSequenceBuffers)
|
|||
auto keys = dpf::make_dpf(r, dpf::ic(p, q, uint16_t{9}));
|
||||
auto buf0 = dpf::make_output_buffer(dpf::ic, keys.first, uint8_t{3}, uint8_t{18});
|
||||
auto buf1 = dpf::make_output_buffer(dpf::ic, keys.second, uint8_t{3}, uint8_t{18});
|
||||
dpf::basic_path_memoizer<decltype(keys.first.key)> memo;
|
||||
dpf::basic_path_memoizer<decltype(keys.first.dpf_key)> memo;
|
||||
dpf::eval_interval(dpf::ic, keys.first, uint8_t{3}, uint8_t{18}, buf0, memo);
|
||||
dpf::eval_interval(dpf::ic, keys.second, uint8_t{3}, uint8_t{18}, buf1);
|
||||
for (std::size_t i = 0; i < buf0.size(); ++i)
|
||||
|
|
@ -226,6 +227,7 @@ TEST(Ic, Geneval)
|
|||
rngs, dpf::ic(p, q, beta));
|
||||
ASSERT_EQ(opened.party0.size(), 7u);
|
||||
ASSERT_EQ(opened.live_levels, 8u);
|
||||
EXPECT_TRUE(dpf::verify(opened.proof0, opened.proof1));
|
||||
const uint8_t r = static_cast<uint8_t>(r0 ^ r1);
|
||||
for (std::size_t i = 0; i < 7; ++i)
|
||||
{
|
||||
|
|
@ -239,8 +241,7 @@ TEST(Ic, Geneval)
|
|||
|
||||
TEST(Ic, RejectsWrappedBounds)
|
||||
{
|
||||
EXPECT_THROW(dpf::make_dpf(uint8_t{1}, dpf::ic(uint8_t{9}, uint8_t{2}, uint32_t{1})),
|
||||
std::invalid_argument);
|
||||
EXPECT_THROW(dpf::make_dpf(uint8_t{1}, dpf::ic(uint8_t{9}, uint8_t{2}, uint32_t{1})), std::invalid_argument);
|
||||
}
|
||||
|
||||
TEST(Ic, BitPayload)
|
||||
|
|
@ -334,14 +335,14 @@ TEST(Ic, AdditiveGeneval)
|
|||
std::begin(none), std::begin(none), ic_rng(), dpf::ic(p, q, beta));
|
||||
EXPECT_TRUE(empty.party0.empty());
|
||||
EXPECT_EQ(empty.live_levels, 0u);
|
||||
// Empty-range tokens stay zero and must not verify as a matching pair.
|
||||
EXPECT_FALSE(dpf::verify(empty.proof0, empty.proof1));
|
||||
}
|
||||
|
||||
TEST(Ic, IntervalRejectsDescendingEndpoints)
|
||||
{
|
||||
auto keys = dpf::make_dpf(uint8_t{4}, dpf::ic(uint8_t{1}, uint8_t{6}, uint32_t{1}));
|
||||
auto buf = dpf::make_output_buffer(dpf::ic, keys.first, 1);
|
||||
EXPECT_THROW(dpf::eval_interval(dpf::ic, keys.first, uint8_t{9}, uint8_t{2}, buf),
|
||||
std::invalid_argument);
|
||||
EXPECT_THROW(dpf::make_output_buffer(dpf::ic, keys.first, uint8_t{9}, uint8_t{2}),
|
||||
std::invalid_argument);
|
||||
EXPECT_THROW(dpf::eval_interval(dpf::ic, keys.first, uint8_t{9}, uint8_t{2}, buf), std::invalid_argument);
|
||||
EXPECT_THROW(dpf::make_output_buffer(dpf::ic, keys.first, uint8_t{9}, uint8_t{2}), std::invalid_argument);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue