|
purify
C++ Purify implementation with native circuit and BPP support
|
High-level Purify API implementations, including key generation and proof helpers. More...
#include "purify/api.hpp"#include <algorithm>#include <cassert>#include "purify.h"#include "error_bridge.hpp"Go to the source code of this file.
Namespaces | |
| namespace | purify |
Functions | |
| Status | purify::fill_secure_random (std::span< unsigned char > bytes) noexcept |
| Fills a buffer with operating-system randomness. | |
| Result< UInt512 > | purify::random_below (const UInt512 &range) |
| Samples a uniformly random packed secret below a range using the built-in OS RNG. | |
| Result< GeneratedKey > | purify::generate_key () |
| Generates a random Purify keypair using the built-in OS RNG. | |
| Result< GeneratedKey > | purify::generate_key (KeySeed seed) |
| Deterministically derives a Purify keypair from seed material. | |
| Result< GeneratedKey > | purify::derive_key (const SecretKey &secret) |
| Derives the packed public key corresponding to a packed secret. | |
| Result< GeneratedKey > | purify::derive_key (SecretKey &&secret) |
| Derives the packed public key corresponding to a packed secret. | |
| Result< Bip340Key > | purify::derive_bip340_key (const SecretKey &secret, purify_secp_context *secp_context) |
| Derives a canonical BIP340 signing keypair from an owned Purify secret. | |
| Result< FieldElement > | purify::eval (const SecretKey &secret, const Bytes &message) |
| Evaluates the Purify PRF for an owned secret key and message. | |
| Result< std::string > | purify::verifier (const Bytes &message, const UInt512 &pubkey) |
| Builds the legacy serialized verifier description for a message and public key. | |
| Result< NativeBulletproofCircuit > | purify::verifier_circuit (const Bytes &message, const UInt512 &pubkey) |
| Builds the native verifier circuit for a message and public key. | |
| Result< NativeBulletproofCircuitTemplate > | purify::verifier_circuit_template (const Bytes &message) |
| Builds a reusable public-key-agnostic verifier-circuit template for a message. | |
| Result< BulletproofWitnessData > | purify::prove_assignment_data (const Bytes &message, const SecretKey &secret) |
| Computes the native Purify witness for a message and secret. | |
| Result< bool > | purify::evaluate_verifier_circuit (const Bytes &message, const BulletproofWitnessData &witness) |
| Evaluates the generated verifier circuit against an explicit witness. | |
| Result< bool > | purify::evaluate_verifier_circuit (const Bytes &message, const SecretKey &secret) |
| Evaluates the generated verifier circuit using a witness derived from a secret. | |
| Result< Bytes > | purify::prove_assignment (const Bytes &message, const SecretKey &secret) |
| Serializes the witness assignment produced for a message and secret. | |