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

#include <anchor_escrow.hpp>

Public Types

using Bytes = bppp::ScalarBytes

Public Member Functions

 AnchorEscrowAuxiliaryScalar ()=delete
 AnchorEscrowAuxiliaryScalar (const AnchorEscrowAuxiliaryScalar &)=delete
AnchorEscrowAuxiliaryScalar & operator= (const AnchorEscrowAuxiliaryScalar &)=delete
 AnchorEscrowAuxiliaryScalar (AnchorEscrowAuxiliaryScalar &&other) noexcept
AnchorEscrowAuxiliaryScalar & operator= (AnchorEscrowAuxiliaryScalar &&other) noexcept
 ~AnchorEscrowAuxiliaryScalar ()

Static Public Member Functions

static Result< AnchorEscrowAuxiliaryScalar > from_bytes (const Bytes &encoded)

Friends

Result< AnchorEscrowRecord > create_anchor_escrow_deterministic (const RecoveryBoundSigningRoster &roster, const UInt512 &advertised_anchor_root, const AnchorPunishmentKey &punishment_key, const AnchorEscrowContextDigest &context_digest, const AnchorEscrowAuxiliaryScalar &auxiliary_scalar, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)

Detailed Description

Canonical nonzero scalar used to make one anchor escrow reproducible.

Applications must derive this scalar with a secret, domain-separated PRF over every field that identifies the escrow. The type validates only the scalar encoding; it cannot establish the input's entropy or provenance.

Definition at line 39 of file anchor_escrow.hpp.

Member Typedef Documentation

◆ Bytes

Constructor & Destructor Documentation

◆ AnchorEscrowAuxiliaryScalar() [1/3]

purify::accountable::AnchorEscrowAuxiliaryScalar::AnchorEscrowAuxiliaryScalar ( )
delete

◆ AnchorEscrowAuxiliaryScalar() [2/3]

purify::accountable::AnchorEscrowAuxiliaryScalar::AnchorEscrowAuxiliaryScalar ( const AnchorEscrowAuxiliaryScalar & )
delete

◆ AnchorEscrowAuxiliaryScalar() [3/3]

purify::accountable::AnchorEscrowAuxiliaryScalar::AnchorEscrowAuxiliaryScalar ( AnchorEscrowAuxiliaryScalar && other)
noexcept

Definition at line 506 of file anchor_escrow.cpp.

References AnchorEscrowAuxiliaryScalar().

◆ ~AnchorEscrowAuxiliaryScalar()

purify::accountable::AnchorEscrowAuxiliaryScalar::~AnchorEscrowAuxiliaryScalar ( )

Definition at line 522 of file anchor_escrow.cpp.

Member Function Documentation

◆ from_bytes()

Result< AnchorEscrowAuxiliaryScalar > purify::accountable::AnchorEscrowAuxiliaryScalar::from_bytes ( const Bytes & encoded)
staticnodiscard

Parse one canonical, nonzero secp256k1 scalar.

Definition at line 531 of file anchor_escrow.cpp.

References AnchorEscrowAuxiliaryScalar(), purify::RangeViolation, purify::FieldElement::try_from_bytes32(), and purify::unexpected_error().

◆ operator=() [1/2]

AnchorEscrowAuxiliaryScalar & purify::accountable::AnchorEscrowAuxiliaryScalar::operator= ( AnchorEscrowAuxiliaryScalar && other)
noexcept

Definition at line 512 of file anchor_escrow.cpp.

References AnchorEscrowAuxiliaryScalar().

◆ operator=() [2/2]

AnchorEscrowAuxiliaryScalar & purify::accountable::AnchorEscrowAuxiliaryScalar::operator= ( const AnchorEscrowAuxiliaryScalar & )
delete

◆ create_anchor_escrow_deterministic

Result< AnchorEscrowRecord > create_anchor_escrow_deterministic ( const RecoveryBoundSigningRoster & roster,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
const AnchorEscrowAuxiliaryScalar & auxiliary_scalar,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
friend

Reproduce one exact anchor escrow from application-derived auxiliary input.

This is the idempotent counterpart to create_anchor_escrow(). The same statement, secret, and auxiliary scalar produce byte-identical ciphertext and proof records. The scalar must be derived from a secret PRF over the complete application context, not accepted as an untrusted protocol field. Purify additionally hedges it with the anchor secret and exact public statement before deriving encryption and proof randomness.

Definition at line 545 of file anchor_escrow.cpp.

References AnchorEscrowAuxiliaryScalar(), and purify::accountable::create_anchor_escrow_with_aux_randomness().


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