|
purify
C++ Purify implementation with native circuit and BPP support
|
Mutable transcript used to record symbolic multiplication, division, and boolean constraints. More...
#include <expr.hpp>
Data Structures | |
| struct | MulConstraint |
| One multiplicative relation emitted by the symbolic transcript. More... | |
Public Member Functions | |
| Expr | secret (const std::optional< FieldElement > &value) |
| Allocates a new secret witness variable, optionally with a known concrete value. | |
| Expr | mul (const Expr &lhs, const Expr &rhs) |
Allocates or reuses a multiplication witness enforcing lhs * rhs = out. | |
| Expr | div (const Expr &lhs, const Expr &rhs) |
Allocates or reuses a division witness enforcing out * rhs = lhs. | |
| Expr | boolean (const Expr &expr) |
Constrains an expression to be boolean by adding x * (x - 1) = 0. | |
| void | equal (const Expr &lhs, const Expr &rhs) |
| Records a linear equality constraint between two expressions. | |
| std::optional< FieldElement > | evaluate (const Expr &expr) const |
| Evaluates an expression against the transcript's current witness vector. | |
| const WitnessAssignments & | varmap () const |
| Returns the underlying witness assignment vector. | |
| const std::vector< MulConstraint > & | muls () const |
| Returns the multiplication and division constraints accumulated so far. | |
| const std::vector< Expr > & | eqs () const |
| Returns the linear equality constraints accumulated so far. | |
Definition at line 428 of file expr.cpp.
References purify::Expr::evaluate().
Referenced by purify::circuit_main().
Definition at line 409 of file expr.cpp.
References purify::Expr::evaluate().
Referenced by purify::circuit_combine(), purify::circuit_ec_add(), and purify::circuit_ec_add_x().
|
inline |
Definition at line 251 of file expr.hpp.
Referenced by purify::BulletproofTranscript::from_transcript().
Definition at line 442 of file expr.cpp.
References purify::Expr::evaluate().
| std::optional< FieldElement > purify::Transcript::evaluate | ( | const Expr & | expr | ) | const |
Definition at line 451 of file expr.cpp.
References purify::Expr::evaluate().
Referenced by purify::prove_assignment_data().
Definition at line 386 of file expr.cpp.
References purify::Expr::evaluate().
Referenced by purify::circuit_2bit(), purify::circuit_3bit(), purify::circuit_combine(), purify::circuit_ec_add(), purify::circuit_ec_add_x(), and purify::circuit_optionally_negate_ec().
|
inline |
Definition at line 246 of file expr.hpp.
Referenced by purify::BulletproofTranscript::from_transcript().
| Expr purify::Transcript::secret | ( | const std::optional< FieldElement > & | value | ) |
Definition at line 378 of file expr.cpp.
Referenced by purify::circuit_main().
|
inline |
Definition at line 234 of file expr.hpp.
Referenced by purify::BulletproofTranscript::from_transcript(), and purify::prove_assignment_data().