|
purify
C++ Purify implementation with native circuit and BPP support
|
Public-key-agnostic native verifier-circuit template. More...
#include <bulletproof.hpp>
Public Member Functions | |
| Result< bool > | partial_evaluate (const BulletproofAssignmentData &assignment) const |
| Evaluates only the public-key-agnostic base circuit cached inside the template. | |
| Result< bool > | final_evaluate (const BulletproofAssignmentData &assignment, const UInt512 &pubkey) const |
| Evaluates only the late-bound public-key/output constraints against one assignment. | |
| Result< Bytes > | integrity_digest () const |
| Returns a stable digest of the packed base circuit plus late-bound expressions. | |
| Result< NativeBulletproofCircuit::PackedWithSlack > | instantiate_packed (const UInt512 &pubkey) const |
| Result< NativeBulletproofCircuit > | instantiate (const UInt512 &pubkey) const |
Static Public Member Functions | |
| static NativeBulletproofCircuitTemplate | from_parts (NativeBulletproofCircuit::PackedWithSlack base_packed, Expr p1x, Expr p2x, Expr out) |
| Builds a template from a lowered base circuit plus late-bound public expressions. | |
This caches the message/topic-dependent lowering work up to, but not including, the final public-key binding step. Instantiate it with a packed Purify public key when you need the exact native circuit for a specific user.
Definition at line 349 of file bulletproof.hpp.
| Result< bool > purify::NativeBulletproofCircuitTemplate::final_evaluate | ( | const BulletproofAssignmentData & | assignment, |
| const UInt512 & | pubkey | ||
| ) | const |
Definition at line 1926 of file bulletproof.cpp.
References purify::BulletproofAssignmentData::commitments, purify::Expected< T, E >::error(), purify::Expected< T, E >::has_value(), purify::InvalidDimensions, purify::BulletproofAssignmentData::left, purify::BulletproofAssignmentData::output, purify::BulletproofAssignmentData::right, purify::SizeMismatch, purify::FieldElement::try_from_uint256(), purify::unexpected_error(), and purify::unpack_public().
|
static |
Definition at line 1900 of file bulletproof.cpp.
Referenced by purify::verifier_circuit_template().
| Result< NativeBulletproofCircuit > purify::NativeBulletproofCircuitTemplate::instantiate | ( | const UInt512 & | pubkey | ) | const |
Definition at line 2015 of file bulletproof.cpp.
References purify::Expected< T, E >::error(), purify::Expected< T, E >::has_value(), and purify::unexpected_error().
Referenced by purify::puresign_plusplus::api_impl::verify_message_nonce_proof(), and purify::puresign_plusplus::api_impl::verify_topic_nonce_proof().
| Result< NativeBulletproofCircuit::PackedWithSlack > purify::NativeBulletproofCircuitTemplate::instantiate_packed | ( | const UInt512 & | pubkey | ) | const |
Definition at line 1985 of file bulletproof.cpp.
References purify::Symbol::commitment(), purify::Expected< T, E >::error(), purify::Expected< T, E >::has_value(), purify::NativeBulletproofCircuit::PackedWithSlack::reset(), purify::FieldElement::try_from_uint256(), purify::unexpected_error(), purify::unpack_public(), and purify::Expr::variable().
Referenced by purify::puresign::api_impl::verify_message_nonce_proof(), and purify::puresign::api_impl::verify_topic_nonce_proof().
Definition at line 1966 of file bulletproof.cpp.
References purify::TaggedHash::digest(), purify::InvalidDimensions, PURIFY_ASSIGN_OR_RETURN, PURIFY_RETURN_IF_ERROR, and purify::unexpected_error().
Referenced by purify::puresign_plusplus::MessageProofCache::build(), and purify::puresign_plusplus::TopicProofCache::build().
| Result< bool > purify::NativeBulletproofCircuitTemplate::partial_evaluate | ( | const BulletproofAssignmentData & | assignment | ) | const |
Definition at line 1913 of file bulletproof.cpp.
References purify::BulletproofAssignmentData::commitments, purify::InvalidDimensions, purify::BulletproofAssignmentData::left, purify::BulletproofAssignmentData::output, purify::BulletproofAssignmentData::right, purify::SizeMismatch, and purify::unexpected_error().