|
purify
C++ Purify implementation with native circuit and BPP support
|
#include <anchor_escrow.hpp>
Public Member Functions | |
| AnchorEscrowRecord (const AnchorEscrowRecord &)=default | |
| AnchorEscrowRecord & | operator= (const AnchorEscrowRecord &)=default |
| AnchorEscrowRecord (AnchorEscrowRecord &&) noexcept=default | |
| AnchorEscrowRecord & | operator= (AnchorEscrowRecord &&) noexcept=default |
| const AnchorEscrowCiphertext & | ciphertext () const noexcept |
| Result< Bytes > | serialize (purify_secp_context *secp_context) const |
Static Public Member Functions | |
| static Result< AnchorEscrowRecord > | deserialize (std::span< const unsigned char > encoded, purify_secp_context *secp_context) |
Static Public Attributes | |
| static constexpr unsigned char | kSerializationVersion = 4 |
| static constexpr std::size_t | kNormProofSize = 974 |
| static constexpr std::size_t | kProofPayloadSize = 1136 |
| static constexpr std::size_t | kSerializedSize |
Fixed-size proof that one exact BIP340 punishment scalar is encrypted to a recovery-bound coalition. Record version 4 fixes Purify's modern tagged field-hash suite; legacy-hash builds reject proof construction and verification. Parsing is syntax only.
Definition at line 149 of file anchor_escrow.hpp.
|
default |
References AnchorEscrowRecord().
Referenced by AnchorEscrowRecord(), AnchorEscrowRecord(), create_anchor_escrow_with_aux_randomness, deserialize(), operator=(), operator=(), and verify_anchor_escrow.
|
defaultnoexcept |
References AnchorEscrowRecord().
|
inlinenodiscardnoexcept |
Definition at line 162 of file anchor_escrow.hpp.
References ciphertext().
Referenced by ciphertext(), create_anchor_escrow_with_aux_randomness, purify::accountable::recover_distributed_escrowed_anchor(), and purify::accountable::recover_escrowed_anchor().
|
staticnodiscard |
Definition at line 439 of file anchor_escrow.cpp.
References AnchorEscrowRecord(), purify::accountable::AnchorEscrowCiphertext::ephemeral_key, purify::BigUInt< 8 >::from_bytes_be(), purify::InvalidFixedSize, kSerializationVersion, kSerializedSize, purify::accountable::AnchorEscrowCiphertext::masked_scalar, PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::FieldElement::try_from_bytes32(), purify::unexpected_error(), and purify::UnsupportedSymbol.
|
defaultnoexcept |
References AnchorEscrowRecord().
|
default |
References AnchorEscrowRecord().
|
nodiscard |
Definition at line 418 of file anchor_escrow.cpp.
References kSerializationVersion, kSerializedSize, and PURIFY_RETURN_IF_ERROR.
|
friend |
Definition at line 202 of file anchor_escrow.hpp.
References ConstructionLeafAccumulator.
Referenced by ConstructionLeafAccumulator.
|
friend |
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.
References purify::accountable::create_anchor_escrow_with_aux_randomness(), purify::fill_secure_random(), PURIFY_RETURN_IF_ERROR, and purify::require_secp_context().
|
friend |
Internal deterministic hedged constructor used by security-vector tests.
Definition at line 558 of file anchor_escrow.cpp.
References AnchorEscrowRecord(), purify::accountable::AnchorPunishmentKey::bip340_key(), ciphertext(), purify::generate_key(), purify::accountable::AnchorPunishmentKey::public_key(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::accountable::RecoveryBoundSigningRoster::recovery_root(), purify::require_secp_context(), purify::Bip340Key::seckey, and purify::FieldElement::try_from_bytes32().
|
friend |
Verify the exact public statement carried by an anchor escrow.
Definition at line 658 of file anchor_escrow.cpp.
References AnchorEscrowRecord(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::accountable::RecoveryBoundSigningRoster::recovery_root(), purify::require_secp_context(), and purify::bppp::candidate::verify_circuit_zk_norm_arg_v4_with_public_commitments().
|
staticconstexpr |
Definition at line 152 of file anchor_escrow.hpp.
Referenced by purify::accountable::ConstructionLeafAccumulator::create().
|
staticconstexpr |
Definition at line 153 of file anchor_escrow.hpp.
|
staticconstexpr |
Definition at line 151 of file anchor_escrow.hpp.
Referenced by deserialize(), and serialize().
|
staticconstexpr |
Definition at line 154 of file anchor_escrow.hpp.
Referenced by deserialize(), serialize(), and purify::accountable::serialize_accepted_construction_parent_witness().