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
36
examples/evaluation/eval_dpf3_doerner_shelat.cpp
Normal file
36
examples/evaluation/eval_dpf3_doerner_shelat.cpp
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
#include "dpf.hpp"
|
||||
|
||||
/// Dual-spine Doerner–Shelat (2,3) keygen: XOR shares of `α`, same clear `β`
|
||||
/// as honest-dealer `make_dpf3(α, β)`.
|
||||
int main()
|
||||
{
|
||||
using Input = std::uint8_t;
|
||||
const Input alpha = 0x2a;
|
||||
const Input x0 = 0x13;
|
||||
const Input x1 = static_cast<Input>(alpha ^ x0);
|
||||
const dpf::fp61 beta{99};
|
||||
|
||||
//! [eval-dpf3-ds]
|
||||
auto [d1, d2, d3] = dpf::make_dpf3(alpha, beta);
|
||||
auto [s1, s2, s3] = dpf::make_dpf3_doerner_shelat(x0, x1, beta);
|
||||
const dpf::fp61 dealer = dpf::reconstruct(
|
||||
dpf::as_share(d1, dpf::eval_point(d1, alpha)),
|
||||
dpf::as_share(d2, dpf::eval_point(d2, alpha)),
|
||||
dpf::as_share(d3, dpf::eval_point(d3, alpha)));
|
||||
const dpf::fp61 dual = dpf::reconstruct(
|
||||
dpf::as_share(s1, dpf::eval_point(s1, alpha)),
|
||||
dpf::as_share(s2, dpf::eval_point(s2, alpha)),
|
||||
dpf::as_share(s3, dpf::eval_point(s3, alpha)));
|
||||
//! [eval-dpf3-ds]
|
||||
if (dealer != beta || dual != beta)
|
||||
{
|
||||
std::cerr << "dealer vs dual-spine disagree\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::cout << dual.raw() << "\n";
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue