purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
purify::accountable::RecoveryRootShare Class Reference

#include <recovery_root.hpp>

Public Member Functions

Bytes serialize () const
const AffinePoint & first () const noexcept
const AffinePoint & second () const noexcept

Static Public Member Functions

static Result< RecoveryRootShare > deserialize (std::span< const unsigned char > encoded)

Static Public Attributes

static constexpr std::size_t kSerializedSize = 66

Friends

Result< RecoveryRootContribution > prove_recovery_root_contribution (const NonceHostBoundSigningRoster &roster, const CoalitionFormation &formation, std::size_t member_index, const FieldElement &member_secret, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< RecoveryRootShare > derive_recovery_root_share (const SigningRoster &roster, std::size_t member_index, const FieldElement &member_secret, purify_secp_context *secp_context)

Detailed Description

Exact signed companion-curve points for one normalized MuSig share.

Definition at line 23 of file recovery_root.hpp.

Member Function Documentation

◆ deserialize()

Result< RecoveryRootShare > purify::accountable::RecoveryRootShare::deserialize ( std::span< const unsigned char > encoded)
staticnodiscard

◆ first()

const AffinePoint & purify::accountable::RecoveryRootShare::first ( ) const
inlinenodiscardnoexcept

Definition at line 31 of file recovery_root.hpp.

Referenced by derive_recovery_root_share, and deserialize().

◆ second()

const AffinePoint & purify::accountable::RecoveryRootShare::second ( ) const
inlinenodiscardnoexcept

Definition at line 35 of file recovery_root.hpp.

Referenced by derive_recovery_root_share, and deserialize().

◆ serialize()

Bytes purify::accountable::RecoveryRootShare::serialize ( ) const
nodiscard

Definition at line 477 of file recovery_root.cpp.

References kSerializedSize.

◆ derive_recovery_root_share

Result< RecoveryRootShare > derive_recovery_root_share ( const SigningRoster & roster,
std::size_t member_index,
const FieldElement & member_secret,
purify_secp_context * secp_context )
friend

Derive one deterministic public recovery share before formation.

This operation needs only the ordered MuSig roster and the member's own secret. Members may publish these shares, aggregate the recovery root, and commit that root in a formation manifest. The later formation-bound proof recomputes this exact share; this operation neither proves authorization nor reveals or aggregates member secrets.

Definition at line 505 of file recovery_root.cpp.

References purify::BindingMismatch, purify::curve1(), purify::curve2(), first(), purify::generator1(), purify::generator2(), purify::IndexOutOfRange, purify::FieldElement::is_zero(), purify::accountable::SigningRoster::members(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::RangeViolation, purify::require_secp_context(), second(), and purify::unexpected_error().

◆ prove_recovery_root_contribution

Field Documentation

◆ kSerializedSize

std::size_t purify::accountable::RecoveryRootShare::kSerializedSize = 66
staticconstexpr

The documentation for this class was generated from the following files: