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

#include <recovery_root.hpp>

Public Member Functions

 RecoveryRootContribution (const RecoveryRootContribution &)=default
RecoveryRootContribution & operator= (const RecoveryRootContribution &)=default
 RecoveryRootContribution (RecoveryRootContribution &&) noexcept=default
RecoveryRootContribution & operator= (RecoveryRootContribution &&) noexcept=default
const RecoveryRootShare & share () const noexcept
Result< Bytes > serialize (purify_secp_context *secp_context) const

Static Public Member Functions

static Result< RecoveryRootContribution > deserialize (std::span< const unsigned char > encoded, purify_secp_context *secp_context)

Static Public Attributes

static constexpr unsigned char kSerializationVersion = 1
static constexpr std::size_t kNormProofSize = 974
static constexpr std::size_t kProofSerializedSize
static constexpr std::size_t kSerializedSize

Friends

class ConstructionLeafAccumulator
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< bool > verify_recovery_root_contribution (const NonceHostBoundSigningRoster &roster, const CoalitionFormation &formation, std::size_t member_index, const RecoveryRootContribution &contribution, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)

Detailed Description

Transparent mapping proof for one formation-bound effective MuSig share.

Record version 1 fixes the modern tagged field-hash suite. Legacy-hash builds may parse its fixed transport syntax but reject proving and verification.

Definition at line 142 of file recovery_root.hpp.

Constructor & Destructor Documentation

◆ RecoveryRootContribution() [1/2]

purify::accountable::RecoveryRootContribution::RecoveryRootContribution ( const RecoveryRootContribution & )
default

◆ RecoveryRootContribution() [2/2]

purify::accountable::RecoveryRootContribution::RecoveryRootContribution ( RecoveryRootContribution && )
defaultnoexcept

Member Function Documentation

◆ deserialize()

◆ operator=() [1/2]

RecoveryRootContribution & purify::accountable::RecoveryRootContribution::operator= ( const RecoveryRootContribution & )
default

◆ operator=() [2/2]

RecoveryRootContribution & purify::accountable::RecoveryRootContribution::operator= ( RecoveryRootContribution && )
defaultnoexcept

◆ serialize()

Result< Bytes > purify::accountable::RecoveryRootContribution::serialize ( purify_secp_context * secp_context) const
nodiscard

Definition at line 712 of file recovery_root.cpp.

References kSerializationVersion, kSerializedSize, and PURIFY_RETURN_IF_ERROR.

◆ share()

const RecoveryRootShare & purify::accountable::RecoveryRootContribution::share ( ) const
inlinenodiscardnoexcept

Definition at line 158 of file recovery_root.hpp.

References share().

Referenced by deserialize(), and share().

◆ ConstructionLeafAccumulator

friend class ConstructionLeafAccumulator
friend

Definition at line 192 of file recovery_root.hpp.

References ConstructionLeafAccumulator.

Referenced by ConstructionLeafAccumulator.

◆ prove_recovery_root_contribution

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 )
friend

Prove one member's exact effective share on secp and both Purify curves.

Definition at line 817 of file recovery_root.cpp.

◆ verify_recovery_root_contribution

Result< bool > verify_recovery_root_contribution ( const NonceHostBoundSigningRoster & roster,
const CoalitionFormation & formation,
std::size_t member_index,
const RecoveryRootContribution & contribution,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
friend

Field Documentation

◆ kNormProofSize

std::size_t purify::accountable::RecoveryRootContribution::kNormProofSize = 974
staticconstexpr

◆ kProofSerializedSize

std::size_t purify::accountable::RecoveryRootContribution::kProofSerializedSize
staticconstexpr
Initial value:
=

Definition at line 146 of file recovery_root.hpp.

◆ kSerializationVersion

unsigned char purify::accountable::RecoveryRootContribution::kSerializationVersion = 1
staticconstexpr

Definition at line 144 of file recovery_root.hpp.

Referenced by deserialize(), and serialize().

◆ kSerializedSize

std::size_t purify::accountable::RecoveryRootContribution::kSerializedSize
staticconstexpr

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