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:
Ryan Henry 2026-09-28 05:59:19 -06:00
parent 695f8e84f7
commit 0d22946a0e
1835 changed files with 170291 additions and 2849 deletions

View file

@ -1,10 +1,14 @@
#include <gtest/gtest.h>
#include <cstdint>
#include <cstring>
#include <limits>
#include <sstream>
#include "simde/simde/x86/avx2.h"
#include "dpf/fp61.hpp"
#include "dpf/leaf_arithmetic.hpp"
namespace
{
@ -55,3 +59,26 @@ TEST(Fp61, StreamPrintsTheReducedValue)
os << fp61{fp61_mod + 4};
EXPECT_EQ(os.str(), "4");
}
TEST(Fp61, FromSeedMersenneFoldsWideWords)
{
std::uint64_t words[2] = {fp61_mod - 1, 1};
const auto a = fp61::from_seed(words, sizeof(words));
// (p-1) + 8·1 (since 2^64 ≡ 8), then reduce — not a 61-bit mask of the lo word.
EXPECT_NE(a.raw(), 0u);
EXPECT_EQ(a.raw(), fp61::reduce((fp61_mod - 1) + 8));
}
TEST(Fp61, LeafAddReducesNearModulus)
{
alignas(16) std::uint64_t left[2] = {fp61_mod - 1, fp61_mod - 2};
alignas(16) std::uint64_t right[2] = {3, 5};
alignas(16) std::uint64_t out[2]{};
simde__m128i a{}, b{};
std::memcpy(&a, left, sizeof(left));
std::memcpy(&b, right, sizeof(right));
const auto sum = dpf::leaf_arithmetic::add_t<fp61, simde__m128i>{}(a, b);
std::memcpy(out, &sum, sizeof(out));
EXPECT_EQ(out[0], 2u);
EXPECT_EQ(out[1], 3u);
}