|
purify
C++ Purify implementation with native circuit and BPP support
|
#include <stdatomic.h>#include <stdlib.h>#include <string.h>#include "third_party/secp256k1-zkp/src/scratch_impl.h"Go to the source code of this file.
Data Structures | |
| struct | purify_bulletproof_scratch_frames |
Typedefs | |
| typedef struct purify_bulletproof_scratch_frames | purify_bulletproof_scratch_frames |
Functions | |
| static void | purify_bulletproof_scratch_frames_acquire_lock (void) |
| static void | purify_bulletproof_scratch_frames_release_lock (void) |
| static purify_bulletproof_scratch_frames * | purify_bulletproof_scratch_frames_find (secp256k1_scratch *scratch, purify_bulletproof_scratch_frames **prev_out) |
| int | secp256k1_scratch_allocate_frame (secp256k1_scratch *scratch, size_t n, size_t objects) |
| void | secp256k1_scratch_deallocate_frame (secp256k1_scratch *scratch) |
Variables | |
| static atomic_flag | purify_bulletproof_scratch_frames_lock = ATOMIC_FLAG_INIT |
| static purify_bulletproof_scratch_frames * | purify_bulletproof_scratch_frames_head = NULL |
|
static |
Definition at line 25 of file scratch_frames.c.
References purify_bulletproof_scratch_frames_lock.
Referenced by secp256k1_scratch_allocate_frame(), and secp256k1_scratch_deallocate_frame().
|
static |
Definition at line 34 of file scratch_frames.c.
References purify_bulletproof_scratch_frames::next, purify_bulletproof_scratch_frames_head, and purify_bulletproof_scratch_frames::scratch.
Referenced by secp256k1_scratch_allocate_frame(), and secp256k1_scratch_deallocate_frame().
|
static |
Definition at line 30 of file scratch_frames.c.
References purify_bulletproof_scratch_frames_lock.
Referenced by secp256k1_scratch_allocate_frame(), and secp256k1_scratch_deallocate_frame().
| int secp256k1_scratch_allocate_frame | ( | secp256k1_scratch * | scratch, |
| size_t | n, | ||
| size_t | objects | ||
| ) |
Definition at line 51 of file scratch_frames.c.
References purify_bulletproof_scratch_frames::checkpoints, purify_bulletproof_scratch_frames::depth, purify_bulletproof_scratch_frames::next, purify_bulletproof_scratch_frames_acquire_lock(), purify_bulletproof_scratch_frames_find(), purify_bulletproof_scratch_frames_head, purify_bulletproof_scratch_frames_release_lock(), and purify_bulletproof_scratch_frames::scratch.
Referenced by secp256k1_bulletproof_inner_product_prove_impl(), secp256k1_bulletproof_inner_product_verify_impl(), secp256k1_bulletproof_pf_compressed_circuit_allocate_frame(), secp256k1_bulletproof_relation66_verify_impl(), and secp256k1_bulletproof_vfy_compressed_circuit_allocate_frame().
| void secp256k1_scratch_deallocate_frame | ( | secp256k1_scratch * | scratch | ) |
Definition at line 83 of file scratch_frames.c.
References purify_bulletproof_scratch_frames::checkpoints, purify_bulletproof_scratch_frames::depth, purify_bulletproof_scratch_frames::next, purify_bulletproof_scratch_frames_acquire_lock(), purify_bulletproof_scratch_frames_find(), purify_bulletproof_scratch_frames_head, purify_bulletproof_scratch_frames_release_lock(), and purify_bulletproof_scratch_frames::scratch.
Referenced by secp256k1_bulletproof_inner_product_prove_impl(), secp256k1_bulletproof_inner_product_verify_impl(), secp256k1_bulletproof_relation66_prove_impl(), and secp256k1_bulletproof_relation66_verify_impl().
|
static |
Definition at line 23 of file scratch_frames.c.
Referenced by purify_bulletproof_scratch_frames_find(), secp256k1_scratch_allocate_frame(), and secp256k1_scratch_deallocate_frame().
|
static |
Definition at line 22 of file scratch_frames.c.
Referenced by purify_bulletproof_scratch_frames_acquire_lock(), and purify_bulletproof_scratch_frames_release_lock().