Document the new DPF surfaces in one command set, and test the field, half-tree, and multipoint edges.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Ryan Henry 2026-09-24 23:18:10 -06:00
parent 0d8a5a8131
commit 0dff6df8ed
250 changed files with 12199 additions and 1981 deletions

View file

@ -1,6 +1,5 @@
/// @file dpf/leaf_wrapper.hpp
/// @brief
/// @details
/// @brief A concrete or wildcard leaf and the slot for its Beaver triple.
/// @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;
@ -167,7 +166,11 @@ struct leaf_wrapper<wildcard_value<ConcreteOutputT>, NodeT>
return blinded_output_share;
}
/// Accept a party-tagged share; convert to additive before Beaver math.
/// @brief Accept a party-tagged share; convert to additive before Beaver math.
/// @tparam Party party index, `0` or `1`
/// @tparam Scheme scheme
/// @param output_share the `output_share`
/// @return the returned `const output_type`
template <std::size_t Party, sharing Scheme>
const output_type compute_and_get_blinded_output_share(
const secret_share<output_type, Party, Scheme> & output_share)
@ -212,6 +215,32 @@ struct leaf_wrapper<wildcard_value<ConcreteOutputT>, NodeT>
HEDLEY_NO_THROW
const beaver_type & beaver() const noexcept { return beaver_; }
/// @brief Output share captured during Beaver blinding, if any.
/// @return the output share
HEDLEY_ALWAYS_INLINE
HEDLEY_NO_THROW
const output_type & output_share() const noexcept { return output_share_; }
/// @brief `leaf_status` as a byte, for serialization.
/// @return the status byte
HEDLEY_ALWAYS_INLINE
HEDLEY_PURE
HEDLEY_NO_THROW
constexpr std::uint8_t state() const noexcept
{
return static_cast<std::uint8_t>(leaf_state_);
}
/// @brief Restore a serialized blinding share and status byte.
/// @param share the output share
/// @param state the status byte
HEDLEY_ALWAYS_INLINE
void restore_state(output_type share, std::uint8_t state) noexcept
{
output_share_ = std::move(share);
leaf_state_ = static_cast<leaf_status>(state);
}
private:
enum class leaf_status : psnip_uint8_t { ready = 0, waiting = 1, computing = 2, blinded = 3, notset = 4 };