|
purify
C++ Purify implementation with native circuit and BPP support
|
#include <recovery_root.hpp>
Public Member Functions | |
| Bytes | serialize () const |
| const AffinePoint & | first () const noexcept |
| const AffinePoint & | second () const noexcept |
Static Public Member Functions | |
| static Result< RecoveryRootShare > | deserialize (std::span< const unsigned char > encoded) |
Static Public Attributes | |
| static constexpr std::size_t | kSerializedSize = 66 |
Friends | |
| 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< RecoveryRootShare > | derive_recovery_root_share (const SigningRoster &roster, std::size_t member_index, const FieldElement &member_secret, purify_secp_context *secp_context) |
Exact signed companion-curve points for one normalized MuSig share.
Definition at line 23 of file recovery_root.hpp.
|
staticnodiscard |
Definition at line 486 of file recovery_root.cpp.
References purify::curve1(), purify::curve2(), first(), purify::InvalidFixedSize, kSerializedSize, PURIFY_ASSIGN_OR_RETURN, second(), and purify::unexpected_error().
Referenced by purify::accountable::ConstructionReceiptPayload::deserialize(), and purify::accountable::RecoveryRootContribution::deserialize().
|
inlinenodiscardnoexcept |
Definition at line 31 of file recovery_root.hpp.
Referenced by derive_recovery_root_share, and deserialize().
|
inlinenodiscardnoexcept |
Definition at line 35 of file recovery_root.hpp.
Referenced by derive_recovery_root_share, and deserialize().
|
nodiscard |
Definition at line 477 of file recovery_root.cpp.
References kSerializedSize.
|
friend |
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.
References purify::BindingMismatch, purify::curve1(), purify::curve2(), first(), purify::generator1(), purify::generator2(), purify::IndexOutOfRange, purify::FieldElement::is_zero(), purify::accountable::SigningRoster::members(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify::RangeViolation, purify::require_secp_context(), second(), and purify::unexpected_error().
|
friend |
Prove one member's exact effective share on secp and both Purify curves.
Definition at line 817 of file recovery_root.cpp.
References purify::accountable::derive_recovery_root_share(), purify::TaggedHash::digest_many(), purify::accountable::NonceHostBoundSigningRoster::members(), PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, purify_scalar_get_b32(), purify::detail::FieldElementAccess::raw(), purify::require_secp_context(), and purify::accountable::NonceHostBoundSigningRoster::signing_roster().
|
staticconstexpr |
Definition at line 25 of file recovery_root.hpp.
Referenced by purify::accountable::ConstructionReceiptPayload::deserialize(), purify::accountable::RecoveryRootContribution::deserialize(), deserialize(), and serialize().