|
purify
C++ Purify implementation with native circuit and BPP support
|
C ABI bridging Purify C++ code to secp256k1-zkp BPPP functionality. More...
Go to the source code of this file.
Data Structures | |
| struct | purify_bulletproof_row_view |
| struct | purify_bulletproof_circuit_view |
| struct | purify_bulletproof_assignment_view |
Typedefs | |
| typedef struct purify_bppp_backend_resources | purify_bppp_backend_resources |
| typedef struct purify_bulletproof_row_view | purify_bulletproof_row_view |
| typedef struct purify_bulletproof_circuit_view | purify_bulletproof_circuit_view |
| typedef struct purify_bulletproof_assignment_view | purify_bulletproof_assignment_view |
| typedef struct purify_bulletproof_backend_resources | purify_bulletproof_backend_resources |
Functions | |
| size_t | purify_bppp_required_proof_size (size_t n_vec_len, size_t c_vec_len) |
| Computes the maximum serialized size of a BPPP norm proof. | |
| int | purify_bppp_base_generator (purify_secp_context *context, unsigned char out33[33]) |
| Serializes the secp256k1 base generator into compressed form. | |
| int | purify_bppp_value_generator_h (purify_secp_context *context, unsigned char out33[33]) |
| Serializes the alternate value generator used by Pedersen commitments. | |
| int | purify_bppp_create_generators (purify_secp_context *context, size_t count, unsigned char *out, size_t *out_len) |
| Expands the generator list required by the BPPP prover and verifier. | |
| purify_bppp_backend_resources * | purify_bppp_backend_resources_create (purify_secp_context *context, const unsigned char *generators33, size_t generators_count) |
| purify_bppp_backend_resources * | purify_bppp_backend_resources_clone (const purify_bppp_backend_resources *resources) |
| void | purify_bppp_backend_resources_destroy (purify_bppp_backend_resources *resources) |
| int | purify_bppp_commit_norm_arg (purify_secp_context *context, const unsigned char rho32[32], const unsigned char *generators33, size_t generators_count, const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, unsigned char commitment_out33[33]) |
| int | purify_bppp_commit_norm_arg_with_resources (purify_bppp_backend_resources *resources, const unsigned char rho32[32], const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, unsigned char commitment_out33[33]) |
| int | purify_bppp_commit_witness_only (purify_secp_context *context, const unsigned char *generators33, size_t generators_count, const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, unsigned char commitment_out33[33]) |
| int | purify_bppp_commit_witness_only_with_resources (purify_bppp_backend_resources *resources, const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, unsigned char commitment_out33[33]) |
| int | purify_bppp_offset_commitment (purify_secp_context *context, const unsigned char commitment33[33], const unsigned char scalar32[32], unsigned char commitment_out33[33]) |
| int | purify_point_scale (purify_secp_context *context, const unsigned char point33[33], const unsigned char scalar32[32], unsigned char out33[33]) |
| int | purify_point_add (purify_secp_context *context, const unsigned char lhs33[33], const unsigned char rhs33[33], unsigned char out33[33]) |
| int | purify_pedersen_commit_char (purify_secp_context *context, const unsigned char blind32[32], const unsigned char value32[32], const unsigned char value_gen33[33], const unsigned char blind_gen33[33], unsigned char commitment_out33[33]) |
| Computes a Pedersen commitment to an arbitrary 32-byte scalar value. | |
| int | purify_bppp_prove_norm_arg (purify_secp_context *context, const unsigned char rho32[32], const unsigned char *generators33, size_t generators_count, const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| Produces a standalone BPPP norm argument. | |
| int | purify_bppp_prove_norm_arg_with_resources (purify_bppp_backend_resources *resources, const unsigned char rho32[32], const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bppp_prove_norm_arg_to_commitment (purify_secp_context *context, const unsigned char rho32[32], const unsigned char *generators33, size_t generators_count, const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, const unsigned char commitment33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bppp_prove_norm_arg_to_commitment_with_resources (purify_bppp_backend_resources *resources, const unsigned char rho32[32], const unsigned char *n_vec32, size_t n_vec_len, const unsigned char *l_vec32, size_t l_vec_len, const unsigned char *c_vec32, size_t c_vec_len, const unsigned char commitment33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bppp_verify_norm_arg (purify_secp_context *context, const unsigned char rho32[32], const unsigned char *generators33, size_t generators_count, const unsigned char *c_vec32, size_t c_vec_len, size_t n_vec_len, const unsigned char commitment33[33], const unsigned char *proof, size_t proof_len) |
| Verifies a standalone BPPP norm argument. | |
| int | purify_bppp_verify_norm_arg_with_resources (purify_bppp_backend_resources *resources, const unsigned char rho32[32], const unsigned char *c_vec32, size_t c_vec_len, size_t n_vec_len, const unsigned char commitment33[33], const unsigned char *proof, size_t proof_len) |
| size_t | purify_bulletproof_required_proof_size (size_t n_gates) |
| purify_bulletproof_backend_resources * | purify_bulletproof_backend_resources_create (purify_secp_context *context, size_t n_gates) |
| purify_bulletproof_backend_resources * | purify_bulletproof_backend_resources_clone (const purify_bulletproof_backend_resources *resources) |
| void | purify_bulletproof_backend_resources_destroy (purify_bulletproof_backend_resources *resources) |
| int | purify_bulletproof_prove_circuit (purify_secp_context *context, const purify_bulletproof_circuit_view *circuit, const purify_bulletproof_assignment_view *assignment, const unsigned char *blind32, const unsigned char value_gen33[33], const unsigned char nonce32[32], const unsigned char *extra_commit, size_t extra_commit_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bulletproof_prove_circuit_with_resources (purify_bulletproof_backend_resources *resources, const purify_bulletproof_circuit_view *circuit, const purify_bulletproof_assignment_view *assignment, const unsigned char *blind32, const unsigned char value_gen33[33], const unsigned char nonce32[32], const unsigned char *extra_commit, size_t extra_commit_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bulletproof_prove_circuit_assume_valid (purify_secp_context *context, const purify_bulletproof_circuit_view *circuit, const purify_bulletproof_assignment_view *assignment, const unsigned char *blind32, const unsigned char value_gen33[33], const unsigned char nonce32[32], const unsigned char *extra_commit, size_t extra_commit_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bulletproof_prove_circuit_assume_valid_with_resources (purify_bulletproof_backend_resources *resources, const purify_bulletproof_circuit_view *circuit, const purify_bulletproof_assignment_view *assignment, const unsigned char *blind32, const unsigned char value_gen33[33], const unsigned char nonce32[32], const unsigned char *extra_commit, size_t extra_commit_len, unsigned char commitment_out33[33], unsigned char *proof_out, size_t *proof_len) |
| int | purify_bulletproof_verify_circuit (purify_secp_context *context, const purify_bulletproof_circuit_view *circuit, const unsigned char commitment33[33], const unsigned char value_gen33[33], const unsigned char *extra_commit, size_t extra_commit_len, const unsigned char *proof, size_t proof_len) |
| int | purify_bulletproof_verify_circuit_with_resources (purify_bulletproof_backend_resources *resources, const purify_bulletproof_circuit_view *circuit, const unsigned char commitment33[33], const unsigned char value_gen33[33], const unsigned char *extra_commit, size_t extra_commit_len, const unsigned char *proof, size_t proof_len) |
| typedef struct purify_bppp_backend_resources purify_bppp_backend_resources |
Definition at line 20 of file bppp_bridge.h.
Definition at line 189 of file bppp_bridge.h.
| typedef struct purify_bulletproof_circuit_view purify_bulletproof_circuit_view |
| typedef struct purify_bulletproof_row_view purify_bulletproof_row_view |
| purify_bppp_backend_resources * purify_bppp_backend_resources_clone | ( | const purify_bppp_backend_resources * | resources | ) |
Definition at line 336 of file bppp_bridge.c.
References purify_bppp_backend_resources::ctx, purify_bppp_backend_resources::generators_count, purify_bppp_backend_resources::gens, purify_bppp_backend_resources::gens_scratch, purify_bppp_backend_resources_destroy(), purify_bppp_generators_clone(), purify_bridge_checked_mul_size(), purify_malloc_array(), and purify_bppp_backend_resources::scratch.
Referenced by purify::bppp::ExperimentalCircuitCache::clone_line_for_thread().
| purify_bppp_backend_resources * purify_bppp_backend_resources_create | ( | purify_secp_context * | context, |
| const unsigned char * | generators33, | ||
| size_t | generators_count | ||
| ) |
Definition at line 292 of file bppp_bridge.c.
References purify_bppp_backend_resources::ctx, purify_bppp_backend_resources::generators_count, purify_bppp_backend_resources::gens, purify_bppp_backend_resources::gens_scratch, purify_bppp_backend_resources_destroy(), purify_bridge_checked_mul_size(), purify_context_handle(), purify_malloc_array(), and purify_bppp_backend_resources::scratch.
| void purify_bppp_backend_resources_destroy | ( | purify_bppp_backend_resources * | resources | ) |
Definition at line 374 of file bppp_bridge.c.
References purify_bppp_backend_resources::ctx, purify_bppp_backend_resources::gens, purify_bppp_backend_resources::gens_scratch, and purify_bppp_backend_resources::scratch.
Referenced by purify::bppp::BpppBackendResourcesDeleter::operator()(), purify_bppp_backend_resources_clone(), and purify_bppp_backend_resources_create().
| int purify_bppp_base_generator | ( | purify_secp_context * | context, |
| unsigned char | out33[33] | ||
| ) |
Definition at line 1514 of file bppp_bridge.c.
References purify_context_handle().
Referenced by purify::bppp::base_generator().
| int purify_bppp_commit_norm_arg | ( | purify_secp_context * | context, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | generators33, | ||
| size_t | generators_count, | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| unsigned char | commitment_out33[33] | ||
| ) |
Definition at line 1665 of file bppp_bridge.c.
References purify_bppp_commit_norm_arg_impl().
Referenced by purify::bppp::commit_norm_arg_with_cache().
| int purify_bppp_commit_norm_arg_with_resources | ( | purify_bppp_backend_resources * | resources, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| unsigned char | commitment_out33[33] | ||
| ) |
Definition at line 1674 of file bppp_bridge.c.
References purify_bppp_backend_resources::generators_count, and purify_bppp_commit_norm_arg_impl().
Referenced by purify::bppp::commit_norm_arg_with_cache().
| int purify_bppp_commit_witness_only | ( | purify_secp_context * | context, |
| const unsigned char * | generators33, | ||
| size_t | generators_count, | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| unsigned char | commitment_out33[33] | ||
| ) |
Definition at line 1756 of file bppp_bridge.c.
References purify_bppp_commit_witness_only_impl().
| int purify_bppp_commit_witness_only_with_resources | ( | purify_bppp_backend_resources * | resources, |
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| unsigned char | commitment_out33[33] | ||
| ) |
Definition at line 1764 of file bppp_bridge.c.
References purify_bppp_backend_resources::generators_count, and purify_bppp_commit_witness_only_impl().
| int purify_bppp_create_generators | ( | purify_secp_context * | context, |
| size_t | count, | ||
| unsigned char * | out, | ||
| size_t * | out_len | ||
| ) |
| count | Number of generators requested. |
| out | Output buffer for count compressed points. |
| out_len | In/out serialized byte length. |
Definition at line 1539 of file bppp_bridge.c.
References purify_bridge_checked_mul_size(), and purify_context_handle().
Referenced by purify::bppp::create_generators().
| int purify_bppp_offset_commitment | ( | purify_secp_context * | context, |
| const unsigned char | commitment33[33], | ||
| const unsigned char | scalar32[32], | ||
| unsigned char | commitment_out33[33] | ||
| ) |
Definition at line 1773 of file bppp_bridge.c.
References purify_context_handle(), purify_parse_point_as_ge(), purify_parse_scalar(), purify_serialize_point(), and scalar.
| int purify_bppp_prove_norm_arg | ( | purify_secp_context * | context, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | generators33, | ||
| size_t | generators_count, | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
| rho32 | Fiat-Shamir seed. |
| generators33 | Serialized generator list. |
| generators_count | Number of generators in generators33. |
| n_vec32 | Serialized n vector. |
| n_vec_len | Length of the n vector. |
| l_vec32 | Serialized l vector. |
| l_vec_len | Length of the l vector. |
| c_vec32 | Serialized c vector. |
| c_vec_len | Length of the c vector. |
| commitment_out33 | Commitment output used by the proof. |
| proof_out | Output buffer for the serialized proof. |
| proof_len | In/out proof buffer length. |
Definition at line 1937 of file bppp_bridge.c.
References purify_bppp_prove_norm_arg_impl().
| int purify_bppp_prove_norm_arg_to_commitment | ( | purify_secp_context * | context, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | generators33, | ||
| size_t | generators_count, | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| const unsigned char | commitment33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 2052 of file bppp_bridge.c.
References purify_bppp_prove_norm_arg_to_commitment_impl().
Referenced by purify::bppp::prove_norm_arg_to_commitment_with_cache().
| int purify_bppp_prove_norm_arg_to_commitment_with_resources | ( | purify_bppp_backend_resources * | resources, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| const unsigned char | commitment33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 2062 of file bppp_bridge.c.
References purify_bppp_backend_resources::generators_count, and purify_bppp_prove_norm_arg_to_commitment_impl().
Referenced by purify::bppp::prove_norm_arg_to_commitment_with_cache().
| int purify_bppp_prove_norm_arg_with_resources | ( | purify_bppp_backend_resources * | resources, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | n_vec32, | ||
| size_t | n_vec_len, | ||
| const unsigned char * | l_vec32, | ||
| size_t | l_vec_len, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 1947 of file bppp_bridge.c.
References purify_bppp_backend_resources::generators_count, and purify_bppp_prove_norm_arg_impl().
| size_t purify_bppp_required_proof_size | ( | size_t | n_vec_len, |
| size_t | c_vec_len | ||
| ) |
| n_vec_len | Length of the n vector. |
| c_vec_len | Length of the c vector. |
Definition at line 1499 of file bppp_bridge.c.
References purify_bridge_checked_add_size(), and purify_bridge_checked_mul_size().
Referenced by purify::bppp::prove_norm_arg_to_commitment_with_cache(), purify_bppp_prove_norm_arg_impl(), and purify_bppp_prove_norm_arg_to_commitment_impl().
| int purify_bppp_value_generator_h | ( | purify_secp_context * | context, |
| unsigned char | out33[33] | ||
| ) |
Definition at line 1528 of file bppp_bridge.c.
References purify_context_handle().
Referenced by purify::bppp::value_generator_h().
| int purify_bppp_verify_norm_arg | ( | purify_secp_context * | context, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | generators33, | ||
| size_t | generators_count, | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| size_t | n_vec_len, | ||
| const unsigned char | commitment33[33], | ||
| const unsigned char * | proof, | ||
| size_t | proof_len | ||
| ) |
| rho32 | Fiat-Shamir seed. |
| generators33 | Serialized generator list. |
| generators_count | Number of generators in generators33. |
| c_vec32 | Serialized c vector. |
| c_vec_len | Length of the c vector. |
| n_vec_len | Length of the hidden n vector. |
| commitment33 | Serialized compressed commitment point. |
| proof | Serialized proof bytes. |
| proof_len | Proof length in bytes. |
Definition at line 2133 of file bppp_bridge.c.
References purify_bppp_verify_norm_arg_impl().
Referenced by purify::bppp::verify_norm_arg_with_cache().
| int purify_bppp_verify_norm_arg_with_resources | ( | purify_bppp_backend_resources * | resources, |
| const unsigned char | rho32[32], | ||
| const unsigned char * | c_vec32, | ||
| size_t | c_vec_len, | ||
| size_t | n_vec_len, | ||
| const unsigned char | commitment33[33], | ||
| const unsigned char * | proof, | ||
| size_t | proof_len | ||
| ) |
Definition at line 2141 of file bppp_bridge.c.
References purify_bppp_backend_resources::generators_count, and purify_bppp_verify_norm_arg_impl().
Referenced by purify::bppp::verify_norm_arg_with_cache().
| purify_bulletproof_backend_resources * purify_bulletproof_backend_resources_clone | ( | const purify_bulletproof_backend_resources * | resources | ) |
Definition at line 249 of file bppp_bridge.c.
References purify_bulletproof_backend_resources::ctx, generator_count, purify_bulletproof_backend_resources::gens, secp256k1_bulletproof_generators::n, purify_bulletproof_backend_resources::n_gates, purify_bridge_checked_mul_size(), purify_bulletproof_backend_resources_destroy(), purify_bulletproof_backend_resources::scratch, and secp256k1_bulletproof_generators_create().
Referenced by purify::ExperimentalBulletproofBackendCache::clone_for_thread().
| purify_bulletproof_backend_resources * purify_bulletproof_backend_resources_create | ( | purify_secp_context * | context, |
| size_t | n_gates | ||
| ) |
Definition at line 213 of file bppp_bridge.c.
References purify_bulletproof_backend_resources::ctx, generator_count, purify_bulletproof_backend_resources::gens, secp256k1_bulletproof_generators::n, purify_bulletproof_backend_resources::n_gates, purify_bridge_checked_mul_size(), purify_bulletproof_backend_resources_destroy(), purify_context_handle(), purify_bulletproof_backend_resources::scratch, and secp256k1_bulletproof_generators_create().
Referenced by purify::ExperimentalBulletproofBackendCache::get_or_create(), main(), purify_bulletproof_prove_circuit_impl(), and purify_bulletproof_verify_circuit_impl().
| void purify_bulletproof_backend_resources_destroy | ( | purify_bulletproof_backend_resources * | resources | ) |
Definition at line 279 of file bppp_bridge.c.
References purify_bulletproof_backend_resources::ctx, purify_bulletproof_backend_resources::gens, purify_bulletproof_backend_resources::scratch, and secp256k1_bulletproof_generators_destroy().
Referenced by main(), purify::BulletproofBackendResourceDeleter::operator()(), purify_bulletproof_backend_resources_clone(), purify_bulletproof_backend_resources_create(), purify_bulletproof_prove_circuit_impl(), and purify_bulletproof_verify_circuit_impl().
| int purify_bulletproof_prove_circuit | ( | purify_secp_context * | context, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const purify_bulletproof_assignment_view * | assignment, | ||
| const unsigned char * | blind32, | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char | nonce32[32], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 1228 of file bppp_bridge.c.
References purify_bulletproof_prove_circuit_impl().
| int purify_bulletproof_prove_circuit_assume_valid | ( | purify_secp_context * | context, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const purify_bulletproof_assignment_view * | assignment, | ||
| const unsigned char * | blind32, | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char | nonce32[32], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 1260 of file bppp_bridge.c.
References purify_bulletproof_prove_circuit_impl().
| int purify_bulletproof_prove_circuit_assume_valid_with_resources | ( | purify_bulletproof_backend_resources * | resources, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const purify_bulletproof_assignment_view * | assignment, | ||
| const unsigned char * | blind32, | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char | nonce32[32], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 1276 of file bppp_bridge.c.
References purify_bulletproof_prove_circuit_impl().
| int purify_bulletproof_prove_circuit_with_resources | ( | purify_bulletproof_backend_resources * | resources, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const purify_bulletproof_assignment_view * | assignment, | ||
| const unsigned char * | blind32, | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char | nonce32[32], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| unsigned char | commitment_out33[33], | ||
| unsigned char * | proof_out, | ||
| size_t * | proof_len | ||
| ) |
Definition at line 1244 of file bppp_bridge.c.
References purify_bulletproof_prove_circuit_impl().
| size_t purify_bulletproof_required_proof_size | ( | size_t | n_gates | ) |
Definition at line 1099 of file bppp_bridge.c.
References purify_bridge_checked_add_size(), and secp256k1_bulletproof_innerproduct_proof_length().
| int purify_bulletproof_verify_circuit | ( | purify_secp_context * | context, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const unsigned char | commitment33[33], | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| const unsigned char * | proof, | ||
| size_t | proof_len | ||
| ) |
Definition at line 1302 of file bppp_bridge.c.
References purify_bulletproof_verify_circuit_impl().
Referenced by purify::verify_experimental_circuit(), and purify::verify_experimental_circuit().
| int purify_bulletproof_verify_circuit_with_resources | ( | purify_bulletproof_backend_resources * | resources, |
| const purify_bulletproof_circuit_view * | circuit, | ||
| const unsigned char | commitment33[33], | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char * | extra_commit, | ||
| size_t | extra_commit_len, | ||
| const unsigned char * | proof, | ||
| size_t | proof_len | ||
| ) |
Definition at line 1406 of file bppp_bridge.c.
References purify_bulletproof_verify_circuit_impl().
Referenced by purify::verify_experimental_circuit(), and purify::verify_experimental_circuit().
| int purify_pedersen_commit_char | ( | purify_secp_context * | context, |
| const unsigned char | blind32[32], | ||
| const unsigned char | value32[32], | ||
| const unsigned char | value_gen33[33], | ||
| const unsigned char | blind_gen33[33], | ||
| unsigned char | commitment_out33[33] | ||
| ) |
| blind32 | Blinding factor in big-endian scalar form. |
| value32 | Committed value in big-endian scalar form. |
| value_gen33 | Compressed generator for the value term. |
| blind_gen33 | Compressed generator for the blind term. |
| commitment_out33 | Serialized compressed commitment output. |
Definition at line 1565 of file bppp_bridge.c.
References purify_context_handle(), purify_parse_scalar(), and purify_serialize_point().
Referenced by purify::bppp::pedersen_commit_char().
| int purify_point_add | ( | purify_secp_context * | context, |
| const unsigned char | lhs33[33], | ||
| const unsigned char | rhs33[33], | ||
| unsigned char | out33[33] | ||
| ) |
Definition at line 1825 of file bppp_bridge.c.
References purify_context_handle(), purify_parse_point_as_ge(), and purify_serialize_point().
| int purify_point_scale | ( | purify_secp_context * | context, |
| const unsigned char | point33[33], | ||
| const unsigned char | scalar32[32], | ||
| unsigned char | out33[33] | ||
| ) |
Definition at line 1800 of file bppp_bridge.c.
References purify_context_handle(), purify_parse_point_as_ge(), purify_parse_scalar(), purify_serialize_point(), and scalar.