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

#include <recovery_root.hpp>

Public Member Functions

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

Static Public Member Functions

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

Static Public Attributes

static constexpr unsigned char kSerializationVersion = 2
static constexpr std::size_t kNormProofSize = 844
static constexpr std::size_t kSerializedSize = 163 + kNormProofSize

Friends

class RecoveryRootSetupAccumulator
Result< RecoveryRootSetupProof > prove_recovery_root_setup (const NonceHostBoundSigningRoster &roster, const UInt512 &recovery_root, const FieldElement &signing_scalar, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< RecoveryBoundSigningRoster > verify_recovery_root_setup (NonceHostBoundSigningRoster roster, const UInt512 &recovery_root, const RecoveryRootSetupProof &proof, purify_secp_context *secp_context)

Detailed Description

Transparent proof linking the aggregate signing scalar to a recovery root.

Definition at line 273 of file recovery_root.hpp.

Constructor & Destructor Documentation

◆ RecoveryRootSetupProof() [1/2]

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

◆ RecoveryRootSetupProof() [2/2]

purify::accountable::RecoveryRootSetupProof::RecoveryRootSetupProof ( RecoveryRootSetupProof && )
defaultnoexcept

Member Function Documentation

◆ deserialize()

Result< RecoveryRootSetupProof > purify::accountable::RecoveryRootSetupProof::deserialize ( std::span< const unsigned char > encoded,
purify_secp_context * secp_context )
staticnodiscard

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ serialize()

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

Definition at line 1099 of file recovery_root.cpp.

References kSerializationVersion, kSerializedSize, and PURIFY_RETURN_IF_ERROR.

Referenced by operator=().

◆ prove_recovery_root_setup

Result< RecoveryRootSetupProof > prove_recovery_root_setup ( const NonceHostBoundSigningRoster & roster,
const UInt512 & recovery_root,
const FieldElement & signing_scalar,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
friend

Construct the transparent setup proof for a known aggregate signing scalar.

This centralized API is also the reference relation for a future MPC prover. It proves that the exact even-Y aggregate point and registered recovery root are both derived from signing_scalar. Proof randomness is derived from the secret witness and is never caller supplied. A future MPC implementation must jointly derive and keep the equivalent prover seed secret.

Definition at line 1171 of file recovery_root.cpp.

References purify::BindingMismatch, purify::accountable::derive_recovery_root(), purify::TaggedHash::digest_many(), purify::FieldElement::is_zero(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify_scalar_get_b32(), purify::RangeViolation, purify::detail::FieldElementAccess::raw(), RecoveryRootSetupProof(), purify::require_secp_context(), and purify::unexpected_error().

◆ RecoveryRootSetupAccumulator

friend class RecoveryRootSetupAccumulator
friend

Definition at line 311 of file recovery_root.hpp.

References RecoveryRootSetupAccumulator.

Referenced by RecoveryRootSetupAccumulator.

◆ verify_recovery_root_setup

Result< RecoveryBoundSigningRoster > verify_recovery_root_setup ( NonceHostBoundSigningRoster roster,
const UInt512 & recovery_root,
const RecoveryRootSetupProof & proof,
purify_secp_context * secp_context )
friend

Verify aggregate-key knowledge and the recovery-root relation.

The circuit wrapper's external-commitment proof establishes knowledge of the exact final aggregate signing scalar. The root relation derives the exact registered companion root from that same witness. This is the centralized constructor for RecoveryBoundSigningRoster; distributed contribution verification supplies the other constructor. Member consent is separate application policy.

Definition at line 1298 of file recovery_root.cpp.

Field Documentation

◆ kNormProofSize

std::size_t purify::accountable::RecoveryRootSetupProof::kNormProofSize = 844
staticconstexpr

◆ kSerializationVersion

unsigned char purify::accountable::RecoveryRootSetupProof::kSerializationVersion = 2
staticconstexpr

Definition at line 275 of file recovery_root.hpp.

Referenced by deserialize(), and serialize().

◆ kSerializedSize

std::size_t purify::accountable::RecoveryRootSetupProof::kSerializedSize = 163 + kNormProofSize
staticconstexpr

Definition at line 277 of file recovery_root.hpp.

Referenced by deserialize(), and serialize().


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