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
24
examples/mwe/point.cpp
Normal file
24
examples/mwe/point.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
#include "dpf.hpp"
|
||||
|
||||
// Complete program. Leaf shares are subtractive: reconstruct is share0 - share1.
|
||||
//
|
||||
// c++ -std=c++17 -march=native -I include -I thirdparty examples/mwe/point.cpp
|
||||
int main()
|
||||
{
|
||||
const std::uint8_t alpha = 42;
|
||||
const std::uint64_t beta = 7;
|
||||
auto [k0, k1] = dpf::make_dpf(alpha, beta);
|
||||
|
||||
const std::uint64_t at = dpf::reconstruct(
|
||||
*dpf::eval_point(k0, alpha),
|
||||
*dpf::eval_point(k1, alpha));
|
||||
const std::uint64_t off = dpf::reconstruct(
|
||||
*dpf::eval_point(k0, std::uint8_t{0}),
|
||||
*dpf::eval_point(k1, std::uint8_t{0}));
|
||||
|
||||
std::cout << at << " " << off << "\n";
|
||||
return (at == beta && off == 0) ? 0 : 1;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue