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

Namespaces

namespace  detail
namespace  testing

Data Structures

struct  ConflictContext
 Public context shared by conflicting statements in one slashable slot. More...
class  ScalarSignature
 Canonical 32-byte scalar response; carries no nonce or proof. More...
struct  PartialResponse
class  VerifiedCoalitionNonceSet
class  VerifiedScalarResponse
class  ExposedCoalitionKey
struct  SigningRosterMember
 An ordered individual signing key and its normalized public weight. More...
class  SigningRoster
 Experimental public key aggregation for one ordered coalition roster. More...
class  NonceHostBoundSigningRoster
 An ordered signing roster bound to one core and nonce-host list. More...
class  RecoveryBoundSigningRoster
 A nonce-host-bound roster with an authorized recovery-root relation. More...
class  AnchorEscrowAuxiliaryScalar
class  AnchorPunishmentPublicKey
class  AnchorPunishmentKey
struct  AnchorEscrowCiphertext
class  AnchorEscrowRecord
struct  BitcoinOutpoint
struct  CoalitionFormationInput
class  CoalitionFormation
struct  ConstructionLeafParentConstants
class  PreparedConstructionLeaf
class  ConstructionLeafAccumulator
struct  ConstructionParentSetupWitness
struct  ConstructionParentAnchorWitness
class  VerifiedConstructionReceipt
class  ConstructionParentVerifier
class  ResolvedConstructionSetupDigest
 Immutable registry-record digest selected by a recovery root. More...
struct  ConstructionReceiptSetupEntry
struct  ConstructionReceiptAnchorEntry
class  ConstructionReceiptPayload
 Canonical public payload for a coalition construction receipt. More...
struct  ResolvedConstructionReceiptEntry
 Registry-resolved public inputs for one ordered anchor entry. More...
class  ResolvedConstructionSetup
class  ConstructionReceiptAccumulator
class  ConstructionReceiptEnvelope
class  RecoveryRootShare
class  RecoveryRootShareAggregate
class  RecoveryRootContribution
class  VerifiedDistributedRecoverySetup
class  RecoveryRootSetupProof
class  RecoveryRootSetupAccumulator
struct  AnchorEscrowCircuitShape
class  WipeOnDestruction

Typedefs

using NonceHostCommitment = std::array<unsigned char, 32>
using AnchorEscrowContextDigest = std::array<unsigned char, 32>
using BitcoinGenesisHash = std::array<unsigned char, 32>
using BitcoinTransactionId = std::array<unsigned char, 32>
using CoalitionDeploymentId = std::array<unsigned char, 32>
using CoalitionManifestDigest = std::array<unsigned char, 32>
using CoalitionCoreDigest = std::array<unsigned char, 32>
using CoalitionPermitId = std::array<unsigned char, 32>
using AnchorReference = std::array<unsigned char, 32>
using ConstructionReceiptStatementDigest = std::array<unsigned char, 32>
using ResolvedConstructionSetupDigestBytes

Functions

Result< std::array< unsigned char, 32 > > nonce_evaluation_input (const ConflictContext &context, purify_secp_context *secp_context)
 Derive the candidate deterministic Purify input from the registered slot.
Result< FieldElement > signature_challenge (const ConflictContext &context, std::span< const unsigned char > canonical_body, purify_secp_context *secp_context)
 Compute the versioned Q/U/core/T/body challenge, without a nonce point.
Result< std::array< unsigned char, 33 > > reconstruct_nonce (const ConflictContext &context, std::span< const unsigned char > canonical_body, const ScalarSignature &signature, purify_secp_context *secp_context)
 Reconstruct the full nonce point as sigma*G - e*Q, rejecting infinity.
Result< std::array< unsigned char, 32 > > recover_same_slot_key (const ConflictContext &context, std::span< const unsigned char > first_body, const ScalarSignature &first_signature, std::span< const unsigned char > second_body, const ScalarSignature &second_signature, purify_secp_context *secp_context)
 Recover the exact signing scalar exposed by two same-slot responses.
Result< NonceHostCommitment > nonce_host_commitment (const SigningRoster &roster, std::span< const puresign_plusplus::PublicKey > ordered_hosts, purify_secp_context *secp_context)
Result< NonceHostCommitment > nonce_host_commitment (const NonceHostBoundSigningRoster &roster, std::span< const puresign_plusplus::PublicKey > ordered_hosts, purify_secp_context *secp_context)
Result< VerifiedCoalitionNonceSet > verify_coalition_nonce_set (const NonceHostBoundSigningRoster &roster, const ConflictContext &context, std::span< const puresign_plusplus::PublicKey > ordered_hosts, std::span< const puresign_plusplus::NonceProof > ordered_proofs, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Status verify_partial_response (const NonceHostBoundSigningRoster &roster, const VerifiedCoalitionNonceSet &nonce_set, std::size_t member_index, const ConflictContext &context, std::span< const unsigned char > canonical_body, const PartialResponse &partial, purify_secp_context *secp_context)
Result< VerifiedScalarResponse > aggregate_responses (const NonceHostBoundSigningRoster &roster, const VerifiedCoalitionNonceSet &nonce_set, const ConflictContext &context, std::span< const unsigned char > canonical_body, std::span< const PartialResponse > partials, purify_secp_context *secp_context)
Result< VerifiedScalarResponse > verify_scalar_response (const NonceHostBoundSigningRoster &roster, const VerifiedCoalitionNonceSet &nonce_set, const ConflictContext &context, std::span< const unsigned char > canonical_body, const ScalarSignature &response, purify_secp_context *secp_context)
Result< ExposedCoalitionKey > recover_verified_same_slot_key (const VerifiedScalarResponse &first, const VerifiedScalarResponse &second, purify_secp_context *secp_context)
Result< NonceHostBoundSigningRoster > bind_formation_nonce_hosts (SigningRoster roster, const CoalitionFormation &formation, std::span< const puresign_plusplus::PublicKey > ordered_hosts, purify_secp_context *secp_context)
Result< NonceHostBoundSigningRoster > bind_nonce_hosts (SigningRoster roster, const CoalitionCoreDigest &coalition_core_digest, std::span< const puresign_plusplus::PublicKey > ordered_hosts, purify_secp_context *secp_context)
Result< RecoveryBoundSigningRoster > verify_recovery_root_setup (NonceHostBoundSigningRoster roster, const UInt512 &recovery_root, const RecoveryRootSetupProof &proof, purify_secp_context *secp_context)
Result< AnchorEscrowRecord > create_anchor_escrow (const RecoveryBoundSigningRoster &roster, const UInt512 &advertised_anchor_root, const AnchorPunishmentKey &punishment_key, const AnchorEscrowContextDigest &context_digest, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
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)
Result< bool > verify_anchor_escrow (const RecoveryBoundSigningRoster &roster, const UInt512 &advertised_anchor_root, const AnchorPunishmentPublicKey &punishment_key, const AnchorEscrowContextDigest &context_digest, const AnchorEscrowRecord &record, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< AnchorPunishmentKey > recover_escrowed_anchor (const RecoveryBoundSigningRoster &roster, const FieldElement &exposed_signing_scalar, const UInt512 &advertised_anchor_root, const AnchorPunishmentPublicKey &punishment_key, const AnchorEscrowContextDigest &context_digest, const AnchorEscrowRecord &record, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< AnchorPunishmentKey > recover_distributed_escrowed_anchor (const VerifiedDistributedRecoverySetup &setup, const FieldElement &exposed_signing_scalar, const UInt512 &advertised_anchor_root, const AnchorPunishmentPublicKey &punishment_key, const AnchorEscrowContextDigest &context_digest, const AnchorEscrowRecord &record, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< Bytes > serialize_accepted_construction_parent_witness (const ResolvedConstructionSetup &resolved_setup, const VerifiedDistributedRecoverySetup &verified_setup, const ConstructionReceiptPayload &payload, std::span< const ResolvedConstructionReceiptEntry > resolved_entries, std::span< const ConstructionParentSetupWitness > setup_witnesses, std::span< const ConstructionParentAnchorWitness > anchor_witnesses, const ConstructionReceiptAccumulator &accumulator, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< ConstructionReceiptStatementDigest > construction_receipt_statement_digest (const ConstructionReceiptPayload &payload, const ResolvedConstructionSetupDigest &resolved_setup, std::span< const ResolvedConstructionReceiptEntry > resolved_entries)
 Bind a canonical payload to its ordered, resolved anchor inputs.
Result< RecoveryRootShare > derive_recovery_root_share (const SigningRoster &roster, std::size_t member_index, const FieldElement &member_secret, purify_secp_context *secp_context)
Result< RecoveryRootShareAggregate > aggregate_recovery_root_shares (std::span< const RecoveryRootShare > ordered_shares)
Result< GeneratedKey > recover_aggregated_recovery_root (const NonceHostBoundSigningRoster &roster, const RecoveryRootShareAggregate &aggregate, const FieldElement &exposed_signing_scalar, purify_secp_context *secp_context)
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)
Result< VerifiedDistributedRecoverySetup > verify_distributed_recovery_setup (NonceHostBoundSigningRoster roster, const CoalitionFormation &formation, std::span< const RecoveryRootContribution > ordered_contributions, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< GeneratedKey > derive_recovery_root (const FieldElement &signing_scalar)
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< GeneratedKey > recover_registered_root (const RecoveryBoundSigningRoster &roster, const FieldElement &exposed_signing_scalar, purify_secp_context *secp_context)
Result< AnchorEscrowCircuitShape > anchor_escrow_circuit_shape_for_testing (const UInt512 &recipient, const AnchorEscrowCiphertext &ciphertext)
Result< AnchorEscrowRecord > create_anchor_escrow_with_aux_randomness (const RecoveryBoundSigningRoster &roster, const UInt512 &advertised_anchor_root, const AnchorPunishmentKey &punishment_key, const AnchorEscrowContextDigest &context_digest, const bppp::ScalarBytes &auxiliary_randomness, purify_secp_context *secp_context, bppp::ExperimentalCircuitBackend *cache=nullptr)
Result< AnchorPunishmentKey > recover_authenticated_anchor_ciphertext (const GeneratedKey &recovered_recipient, const AnchorPunishmentPublicKey &punishment_key, const AnchorEscrowCiphertext &ciphertext, purify_secp_context *secp_context)

Typedef Documentation

◆ AnchorEscrowContextDigest

using purify::accountable::AnchorEscrowContextDigest = std::array<unsigned char, 32>

Digest of the application statement protected by one anchor escrow.

Applications must commit the anchor/member identity, contract or bond, purpose, and any domain or epoch fields that distinguish this escrow. The digest must not include the escrow record itself.

Definition at line 30 of file anchor_escrow.hpp.

◆ AnchorReference

using purify::accountable::AnchorReference = std::array<unsigned char, 32>

Definition at line 17 of file construction_receipt.hpp.

◆ BitcoinGenesisHash

using purify::accountable::BitcoinGenesisHash = std::array<unsigned char, 32>

Raw Bitcoin uint256 bytes in consensus serialization order.

Definition at line 20 of file coalition_formation.hpp.

◆ BitcoinTransactionId

using purify::accountable::BitcoinTransactionId = std::array<unsigned char, 32>

Definition at line 21 of file coalition_formation.hpp.

◆ CoalitionCoreDigest

using purify::accountable::CoalitionCoreDigest = std::array<unsigned char, 32>

Immutable coalition core bound by every accountable proof and response.

Definition at line 37 of file coalition_formation.hpp.

◆ CoalitionDeploymentId

using purify::accountable::CoalitionDeploymentId = std::array<unsigned char, 32>

Application-defined identifier for one Char protocol deployment.

Definition at line 24 of file coalition_formation.hpp.

◆ CoalitionManifestDigest

using purify::accountable::CoalitionManifestDigest = std::array<unsigned char, 32>

Digest of the acyclic, immutable coalition manifest.

The manifest must exclude the formation transaction ID and every proof, ciphertext, content hash, or receipt derived using the resulting coalition core. It normally commits member identities, management keys, lifecycle policy, and protocol versions not bound separately by Purify.

Definition at line 34 of file coalition_formation.hpp.

◆ CoalitionPermitId

using purify::accountable::CoalitionPermitId = std::array<unsigned char, 32>

Stable registry key for one deployment's claim on one Bitcoin output.

Definition at line 40 of file coalition_formation.hpp.

◆ ConstructionReceiptStatementDigest

using purify::accountable::ConstructionReceiptStatementDigest = std::array<unsigned char, 32>

Definition at line 18 of file construction_receipt.hpp.

◆ NonceHostCommitment

using purify::accountable::NonceHostCommitment = std::array<unsigned char, 32>

Digest of the immutable ordered Purify nonce-host registration.

Definition at line 24 of file accountable_roster.hpp.

◆ ResolvedConstructionSetupDigestBytes

Initial value:
std::array<unsigned char, 32>

Definition at line 19 of file construction_receipt.hpp.

Function Documentation

◆ aggregate_recovery_root_shares()

Result< RecoveryRootShareAggregate > purify::accountable::aggregate_recovery_root_shares ( std::span< const RecoveryRootShare > ordered_shares)
nodiscard

Sum exact signed shares after their proofs were checked in roster order.

Point addition cannot detect a duplicate, omission, or reordering. The accepting parent must verify every contribution at its exact roster index before using this nonauthorizing aggregate.

Definition at line 555 of file recovery_root.cpp.

Referenced by purify::accountable::detail::resolve_construction_parent_public_inputs(), and purify::accountable::VerifiedDistributedRecoverySetup::verify_distributed_recovery_setup.

◆ aggregate_responses()

Result< VerifiedScalarResponse > purify::accountable::aggregate_responses ( const NonceHostBoundSigningRoster & roster,
const VerifiedCoalitionNonceSet & nonce_set,
const ConflictContext & context,
std::span< const unsigned char > canonical_body,
std::span< const PartialResponse > partials,
purify_secp_context * secp_context )
nodiscard

Definition at line 332 of file accountable_responses.cpp.

◆ anchor_escrow_circuit_shape_for_testing()

Result< AnchorEscrowCircuitShape > purify::accountable::anchor_escrow_circuit_shape_for_testing ( const UInt512 & recipient,
const AnchorEscrowCiphertext & ciphertext )
nodiscard

◆ bind_formation_nonce_hosts()

Result< NonceHostBoundSigningRoster > purify::accountable::bind_formation_nonce_hosts ( SigningRoster roster,
const CoalitionFormation & formation,
std::span< const puresign_plusplus::PublicKey > ordered_hosts,
purify_secp_context * secp_context )
nodiscard

Validate nonce hosts and bind them to a one-shot Bitcoin formation.

Char registration should use this entry point after validating that the enclosing transaction consumes formation.permit().

Definition at line 188 of file accountable_responses.cpp.

References bind_nonce_hosts(), and purify::accountable::CoalitionFormation::core_digest().

◆ bind_nonce_hosts()

Result< NonceHostBoundSigningRoster > purify::accountable::bind_nonce_hosts ( SigningRoster roster,
const CoalitionCoreDigest & coalition_core_digest,
std::span< const puresign_plusplus::PublicKey > ordered_hosts,
purify_secp_context * secp_context )
nodiscard

Validate and bind nonce hosts to an already authenticated generic core.

This lower-level boundary supports non-Bitcoin protocols and verification of already resolved registry data. It does not establish formation replay resistance. New Char registration must use bind_formation_nonce_hosts.

Definition at line 197 of file accountable_responses.cpp.

Referenced by bind_formation_nonce_hosts().

◆ construction_receipt_statement_digest()

Result< ConstructionReceiptStatementDigest > purify::accountable::construction_receipt_statement_digest ( const ConstructionReceiptPayload & payload,
const ResolvedConstructionSetupDigest & resolved_setup,
std::span< const ResolvedConstructionReceiptEntry > resolved_entries )
nodiscard

◆ create_anchor_escrow()

Result< AnchorEscrowRecord > purify::accountable::create_anchor_escrow ( const RecoveryBoundSigningRoster & roster,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Encrypt an anchor's existing punishment scalar to a verified coalition root.

Operating-system auxiliary randomness is hedged with the punishment secret and exact roster, root, and context statement. Separately tagged derivations produce the ephemeral key and proof seed. The proof binds the exact advertised anchor root, canonical punishment key, ciphertext, recovery-bound roster, and application context. The advertised anchor root must differ from the coalition recovery root so exposure cannot directly reconstruct the advertised anchor key.

Definition at line 485 of file anchor_escrow.cpp.

◆ create_anchor_escrow_deterministic()

Result< AnchorEscrowRecord > purify::accountable::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 )
nodiscard

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.

◆ create_anchor_escrow_with_aux_randomness()

Result< AnchorEscrowRecord > purify::accountable::create_anchor_escrow_with_aux_randomness ( const RecoveryBoundSigningRoster & roster,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
const bppp::ScalarBytes & auxiliary_randomness,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Internal deterministic hedged constructor used by security-vector tests.

Definition at line 558 of file anchor_escrow.cpp.

Referenced by purify::accountable::AnchorEscrowRecord::create_anchor_escrow, and purify::accountable::AnchorEscrowAuxiliaryScalar::create_anchor_escrow_deterministic.

◆ derive_recovery_root()

Result< GeneratedKey > purify::accountable::derive_recovery_root ( const FieldElement & signing_scalar)
nodiscard

◆ derive_recovery_root_share()

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

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.

Referenced by purify::accountable::RecoveryRootShare::prove_recovery_root_contribution.

◆ nonce_evaluation_input()

◆ nonce_host_commitment() [1/2]

Result< NonceHostCommitment > purify::accountable::nonce_host_commitment ( const NonceHostBoundSigningRoster & roster,
std::span< const puresign_plusplus::PublicKey > ordered_hosts,
purify_secp_context * secp_context )
nodiscard

Definition at line 180 of file accountable_responses.cpp.

◆ nonce_host_commitment() [2/2]

Result< NonceHostCommitment > purify::accountable::nonce_host_commitment ( const SigningRoster & roster,
std::span< const puresign_plusplus::PublicKey > ordered_hosts,
purify_secp_context * secp_context )
nodiscard

Hash the exact ordered signing roster and registered PureSign++ hosts.

Definition at line 172 of file accountable_responses.cpp.

Referenced by purify::accountable::NonceHostBoundSigningRoster::bind_nonce_hosts, and purify::accountable::VerifiedCoalitionNonceSet::verify_coalition_nonce_set.

◆ prove_recovery_root_contribution()

Result< RecoveryRootContribution > purify::accountable::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 )
nodiscard

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

Definition at line 817 of file recovery_root.cpp.

◆ prove_recovery_root_setup()

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

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.

◆ reconstruct_nonce()

Result< std::array< unsigned char, 33 > > purify::accountable::reconstruct_nonce ( const ConflictContext & context,
std::span< const unsigned char > canonical_body,
const ScalarSignature & signature,
purify_secp_context * secp_context )
nodiscard

This is NOT signature verification. A reviewed nonce proof must accept this exact compressed point and authenticated context before an endorsement counts. The nonce proof transcript must bind the point even though the challenge omits it.

Definition at line 85 of file accountable.cpp.

References purify::InternalMismatch, PURIFY_ASSIGN_OR_RETURN, purify_bppp_offset_commitment(), purify_point_scale(), purify::RangeViolation, purify::accountable::ScalarSignature::serialize(), signature_challenge(), purify::accountable::ConflictContext::signing_key, and purify::unexpected_error().

Referenced by purify::puresign_plusplus::CertificateNonceParentPublicInputs::create(), and purify::accountable::VerifiedCoalitionNonceSet::verify_scalar_response.

◆ recover_aggregated_recovery_root()

Result< GeneratedKey > purify::accountable::recover_aggregated_recovery_root ( const NonceHostBoundSigningRoster & roster,
const RecoveryRootShareAggregate & aggregate,
const FieldElement & exposed_signing_scalar,
purify_secp_context * secp_context )
nodiscard

◆ recover_authenticated_anchor_ciphertext()

Result< AnchorPunishmentKey > purify::accountable::recover_authenticated_anchor_ciphertext ( const GeneratedKey & recovered_recipient,
const AnchorPunishmentPublicKey & punishment_key,
const AnchorEscrowCiphertext & ciphertext,
purify_secp_context * secp_context )
nodiscard

Recover one ciphertext whose complete escrow relation was authenticated by a stronger proof capability.

This deliberately remains private to the library. Public callers must use either recover_escrowed_anchor(), which verifies the child proof, or a VerifiedConstructionReceipt, which authenticates the same relation through its construction parent.

Definition at line 912 of file anchor_escrow.cpp.

References PURIFY_RETURN_IF_ERROR.

Referenced by purify::accountable::VerifiedConstructionReceipt::recover_anchor(), recover_distributed_escrowed_anchor(), and recover_escrowed_anchor().

◆ recover_distributed_escrowed_anchor()

Result< AnchorPunishmentKey > purify::accountable::recover_distributed_escrowed_anchor ( const VerifiedDistributedRecoverySetup & setup,
const FieldElement & exposed_signing_scalar,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentPublicKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
const AnchorEscrowRecord & record,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

◆ recover_escrowed_anchor()

Result< AnchorPunishmentKey > purify::accountable::recover_escrowed_anchor ( const RecoveryBoundSigningRoster & roster,
const FieldElement & exposed_signing_scalar,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentPublicKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
const AnchorEscrowRecord & record,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

After a coalition scalar is exposed, recover the anchor punishment key.

This centralized path first checks that the scalar recovers the roster's registered root, then verifies the escrow proof, decrypts the punishment scalar, and checks its normalized even-Y BIP340 key against the exact advertised punishment key. Distributed receipts use the separately typed aggregate-bound recovery operation below.

Definition at line 847 of file anchor_escrow.cpp.

References purify::accountable::AnchorEscrowRecord::ciphertext(), purify::EquationMismatch, PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, recover_authenticated_anchor_ciphertext(), recover_registered_root(), purify::unexpected_error(), and verify_anchor_escrow().

◆ recover_registered_root()

Result< GeneratedKey > purify::accountable::recover_registered_root ( const RecoveryBoundSigningRoster & roster,
const FieldElement & exposed_signing_scalar,
purify_secp_context * secp_context )
nodiscard

◆ recover_same_slot_key()

Result< std::array< unsigned char, 32 > > purify::accountable::recover_same_slot_key ( const ConflictContext & context,
std::span< const unsigned char > first_body,
const ScalarSignature & first_signature,
std::span< const unsigned char > second_body,
const ScalarSignature & second_signature,
purify_secp_context * secp_context )
nodiscard

Both responses are interpreted under one supplied Q/U/core/T context. Rejects equal challenges, a recovered scalar whose full public point differs from the even-Y signing key, and a common nonce at infinity. The result is derived entirely from public input, so it is returned as ordinary scalar bytes.

This is NOT certificate or conflict verification. Before using the result for enforcement, the caller must validate both nonce proofs, authenticate each endorsement's context, and establish the application conflict/liability rules. Successful recovery alone does not authorize a penalty.

Definition at line 108 of file accountable.cpp.

References purify::BindingMismatch, purify::EquationMismatch, purify::FieldElement::from_bytes32(), purify::InternalMismatch, is_zero(), PURIFY_ASSIGN_OR_RETURN, purify_point_scale(), purify::RangeViolation, purify::accountable::ScalarSignature::serialize(), signature_challenge(), purify::accountable::ConflictContext::signing_key, and purify::unexpected_error().

Referenced by purify::accountable::VerifiedScalarResponse::recover_verified_same_slot_key.

◆ recover_verified_same_slot_key()

Result< ExposedCoalitionKey > purify::accountable::recover_verified_same_slot_key ( const VerifiedScalarResponse & first,
const VerifiedScalarResponse & second,
purify_secp_context * secp_context )
nodiscard

Definition at line 370 of file accountable_responses.cpp.

◆ serialize_accepted_construction_parent_witness()

Result< Bytes > purify::accountable::serialize_accepted_construction_parent_witness ( const ResolvedConstructionSetup & resolved_setup,
const VerifiedDistributedRecoverySetup & verified_setup,
const ConstructionReceiptPayload & payload,
std::span< const ResolvedConstructionReceiptEntry > resolved_entries,
std::span< const ConstructionParentSetupWitness > setup_witnesses,
std::span< const ConstructionParentAnchorWitness > anchor_witnesses,
const ConstructionReceiptAccumulator & accumulator,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Serialize the exact accepted public witness consumed by the parent prover.

Every leaf proof is reconstructed from the typed registry context, reduced, accumulated in payload order, and discharged by native decide() before bytes are returned. The caller cannot supply descriptors, precommitments, public witness points, or a final root independently.

Wit4 validates each complete typed record, then emits its type version and proof transcript. The share or ciphertext already bound by the descriptor and construction statement is not repeated in the prover witness.

The returned witness contains no coalition, member, nonce-host, anchor, or punishment secret. It is nevertheless bound to the verified distributed setup capability required to prepare the anchor leaves.

Definition at line 136 of file construction_parent_prover_input.cpp.

References purify::accountable::VerifiedDistributedRecoverySetup::aggregate(), purify::accountable::ConstructionReceiptPayload::anchor_entries(), purify::accountable::ConstructionLeafAccumulator::basis(), purify::BindingMismatch, purify::accountable::ResolvedConstructionSetupDigest::bytes(), purify::checked_add_size(), purify::checked_mul_size(), purify::bppp::accumulation::decide(), purify::accountable::ResolvedConstructionSetup::formation(), purify::InternalMismatch, purify::accountable::ConstructionReceiptAccumulator::kRootClaimSerializedSize, purify::accountable::AnchorEscrowRecord::kSerializedSize, purify::accountable::RecoveryRootContribution::kSerializedSize, purify::accountable::ConstructionReceiptAccumulator::leaves(), purify::Overflow, purify::bppp::accumulation::parse_root_claim(), purify::accountable::ConstructionLeafAccumulator::prepare(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::accountable::RecoveryBoundSigningRoster::recovery_root(), purify::accountable::RecoveryRootShareAggregate::recovery_root(), purify::accountable::ResolvedConstructionSetup::recovery_root(), purify::require_secp_context(), purify::accountable::detail::resolve_construction_parent_public_inputs(), purify::accountable::ResolvedConstructionSetup::resolved_digest(), purify::accountable::ResolvedConstructionSetup::roster(), purify::accountable::VerifiedDistributedRecoverySetup::roster(), purify::bppp::accumulation::serialize_algebraic_norm_reduction(), purify::bppp::accumulation::serialize_algebraic_step(), purify::bppp::accumulation::serialize_root_claim(), purify::accountable::ConstructionReceiptPayload::setup_entries(), purify::SizeMismatch, purify::BigUInt< Words >::to_bytes_be(), purify::unexpected_error(), purify::bppp::accumulation::verify_algebraic_norm_reduction(), and purify::bppp::accumulation::verify_algebraic_step().

◆ signature_challenge()

◆ verify_anchor_escrow()

Result< bool > purify::accountable::verify_anchor_escrow ( const RecoveryBoundSigningRoster & roster,
const UInt512 & advertised_anchor_root,
const AnchorPunishmentPublicKey & punishment_key,
const AnchorEscrowContextDigest & context_digest,
const AnchorEscrowRecord & record,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Verify the exact public statement carried by an anchor escrow.

Definition at line 658 of file anchor_escrow.cpp.

Referenced by recover_distributed_escrowed_anchor(), and recover_escrowed_anchor().

◆ verify_coalition_nonce_set()

Result< VerifiedCoalitionNonceSet > purify::accountable::verify_coalition_nonce_set ( const NonceHostBoundSigningRoster & roster,
const ConflictContext & context,
std::span< const puresign_plusplus::PublicKey > ordered_hosts,
std::span< const puresign_plusplus::NonceProof > ordered_proofs,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Definition at line 210 of file accountable_responses.cpp.

◆ verify_distributed_recovery_setup()

Result< VerifiedDistributedRecoverySetup > purify::accountable::verify_distributed_recovery_setup ( NonceHostBoundSigningRoster roster,
const CoalitionFormation & formation,
std::span< const RecoveryRootContribution > ordered_contributions,
purify_secp_context * secp_context,
bppp::ExperimentalCircuitBackend * cache = nullptr )
nodiscard

Verify one contribution at every roster index and authorize its aggregate.

Count and formation mismatches are rejected before proof verification. This is the distributed counterpart to verify_recovery_root_setup.

Definition at line 931 of file recovery_root.cpp.

◆ verify_partial_response()

Status purify::accountable::verify_partial_response ( const NonceHostBoundSigningRoster & roster,
const VerifiedCoalitionNonceSet & nonce_set,
std::size_t member_index,
const ConflictContext & context,
std::span< const unsigned char > canonical_body,
const PartialResponse & partial,
purify_secp_context * secp_context )
nodiscard

Definition at line 284 of file accountable_responses.cpp.

◆ verify_recovery_root_contribution()

Result< bool > purify::accountable::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 )
nodiscard

Verify one ordered, formation-bound member contribution.

Definition at line 886 of file recovery_root.cpp.

Referenced by purify::accountable::VerifiedDistributedRecoverySetup::verify_distributed_recovery_setup.

◆ verify_recovery_root_setup()

Result< RecoveryBoundSigningRoster > purify::accountable::verify_recovery_root_setup ( NonceHostBoundSigningRoster roster,
const UInt512 & recovery_root,
const RecoveryRootSetupProof & proof,
purify_secp_context * secp_context )
nodiscard

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.

◆ verify_scalar_response()

Result< VerifiedScalarResponse > purify::accountable::verify_scalar_response ( const NonceHostBoundSigningRoster & roster,
const VerifiedCoalitionNonceSet & nonce_set,
const ConflictContext & context,
std::span< const unsigned char > canonical_body,
const ScalarSignature & response,
purify_secp_context * secp_context )
nodiscard