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

@ -3,7 +3,11 @@
/// @details A `xor_wrapper` is a struct template that adapts integral
/// types to use bitwise arithmetic; that is, it makes an `N`-bit
/// integer type behave as it it were an element of `GF(2)^N`.
/// Specifically,
/// Specifically, `+` and `-` are XOR, `*` is AND, unary `-` is a
/// no-op, and `++` / `--` flip the low bit. `dpf::xint<N>` is
/// `xor_wrapper<modint<N>>`.
/// @see dpf::modint
/// @see dpf::xint
/// @author Ryan Henry <ryan.henry@ucalgary.ca>
/// @copyright Copyright (c) 2019-2024 Ryan Henry and [others](@ref authors)
/// @license Released under a GNU General Public v2.0 (GPLv2) license;
@ -30,6 +34,13 @@
namespace dpf
{
/// @brief Element of `GF(2)^n` wrapped around `T`.
/// @tparam T integer-like value. `n` is `bitlength_of<T>`.
/// @note `dpf::xint<N>` is `xor_wrapper<modint<N>>`. Use it as a domain when
/// the index is an XOR share. The additive ring of the same width is
/// `modint<N>`.
/// @see dpf::modint
/// @see dpf::xints::xintN_t
template <typename T>
struct xor_wrapper
{
@ -304,12 +315,22 @@ struct xor_wrapper
friend struct utils::mod_pow_2<xor_wrapper>;
};
/// @brief XOR ring of width `Nbits`, `xor_wrapper<modint<Nbits>>`.
/// @tparam Nbits width in bits, 1 through 256
/// @see dpf::modint
/// @see dpf::xints::xintN_t
template <std::size_t Nbits>
using xint = xor_wrapper<dpf::modint<Nbits>>;
namespace xints
{
/// @name xintN_t
/// @{
/// @brief `xintN_t` is `dpf::xint<N>` for N from 1 through 256.
/// @see dpf::xint
/// @see dpf::modint
// 1--9
using xint1_t = xint<1>;
using xint2_t = xint<2>;
@ -593,6 +614,8 @@ using xint254_t = xint<254>;
using xint255_t = xint<255>;
using xint256_t = xint<256>;
/// @}
namespace literals = dpf::literals::xints;
} // namespace xints
@ -603,6 +626,11 @@ namespace literals
namespace xints
{
/// @name xint literals `N_xN`
/// @{
/// @brief Decimal literal for `dpf::xint<N>`. Widths through 64 take an integer; wider widths take a digit string.
/// @see dpf::xints::xintN_t
// 1--9
constexpr static auto operator "" _x1(unsigned long long int x) { return dpf::xints::xint1_t{static_cast<psnip_uint8_t>(x)}; }
constexpr static auto operator "" _x2(unsigned long long int x) { return dpf::xints::xint2_t{static_cast<psnip_uint8_t>(x)}; }
@ -886,6 +914,8 @@ template <char ...digits> constexpr static auto operator "" _x254() { utils::con
template <char ...digits> constexpr static auto operator "" _x255() { utils::constexpr_maybe_throw<std::runtime_error>(!(std::isdigit(digits) && ...), "invalid char"); uint256_t x{0}; ((x = x * 10 + (digits - '0')), ...); return dpf::xints::xint255_t{x}; }
template <char ...digits> constexpr static auto operator "" _x256() { utils::constexpr_maybe_throw<std::runtime_error>(!(std::isdigit(digits) && ...), "invalid char"); uint256_t x{0}; ((x = x * 10 + (digits - '0')), ...); return dpf::xints::xint256_t{x}; }
/// @}
} // namespace xints
} // namespace literals