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
38
examples/applications/hushmap_add.cpp
Normal file
38
examples/applications/hushmap_add.cpp
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
#include "dpf/online_session.hpp"
|
||||
#include "dpf/prep_source.hpp"
|
||||
|
||||
// Hushmap KHM ADD: dealer tape + two online opens on async round sinks,
|
||||
// then a real prep shipment (deal_views over async streams).
|
||||
//
|
||||
// c++ -std=c++17 -pthread -I include -I thirdparty \
|
||||
// examples/applications/hushmap_add.cpp
|
||||
|
||||
int main()
|
||||
{
|
||||
constexpr std::size_t layers = 3;
|
||||
try
|
||||
{
|
||||
dpf::session::drive_hushmap_add(layers);
|
||||
dpf::prep::demand d;
|
||||
d.ring_triples = static_cast<std::uint32_t>(layers);
|
||||
const auto shipped = dpf::session::ship_prep(d);
|
||||
std::uint8_t a0[8]{}, b0[8]{}, c0[8]{};
|
||||
std::uint8_t a1[8]{}, b1[8]{}, c1[8]{};
|
||||
auto c0p = shipped.party0;
|
||||
auto c1p = shipped.party1;
|
||||
c0p.take_ring(a0, b0, c0);
|
||||
c1p.take_ring(a1, b1, c1);
|
||||
std::cout << "hushmap_add layers=" << layers
|
||||
<< " rounds=" << (layers + 2)
|
||||
<< " prep_bytes=" << shipped.bytes0 << "\n";
|
||||
}
|
||||
catch (const std::exception & ex)
|
||||
{
|
||||
std::cerr << "hushmap_add: " << ex.what() << "\n";
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue