purify
C++ Purify implementation with native circuit and BPP support
Loading...
Searching...
No Matches
core.h File Reference
#include <limits.h>
#include <stdlib.h>
#include <string.h>

Go to the source code of this file.

Data Structures

struct  secp256k1_fast_scalar
struct  secp256k1_bulletproof_wmatrix_entry
struct  secp256k1_bulletproof_wmatrix_row
struct  secp256k1_bulletproof_circuit
struct  secp256k1_bulletproof_circuit_assignment
struct  secp256k1_bulletproof_generators

Macros

#define SECP256K1_BULLETPROOF_MAX_DEPTH   60
#define SECP256K1_BULLETPROOF_MAX_PROOF   (160 + 66 * 32 + 7)
#define secp256k1_scratch_alloc(scratch, size)

Typedefs

typedef secp256k1_callback secp256k1_ecmult_context
typedef struct secp256k1_bulletproof_circuit secp256k1_bulletproof_circuit
typedef struct secp256k1_bulletproof_circuit_assignment secp256k1_bulletproof_circuit_assignment
typedef struct secp256k1_bulletproof_generators secp256k1_bulletproof_generators

Functions

int secp256k1_scratch_allocate_frame (secp256k1_scratch *scratch, size_t n, size_t objects)
void secp256k1_scratch_deallocate_frame (secp256k1_scratch *scratch)
static int purify_checked_mul_size (size_t lhs, size_t rhs, size_t *out)
static int purify_checked_add_size (size_t lhs, size_t rhs, size_t *out)
static secp256k1_bulletproof_generators * secp256k1_bulletproof_generators_create (const secp256k1_context *ctx, const secp256k1_generator *blinding_gen, size_t n, size_t precomp_n)
static void secp256k1_bulletproof_generators_destroy (const secp256k1_context *ctx, secp256k1_bulletproof_generators *gen)
static void secp256k1_scalar_chacha20 (secp256k1_scalar *r1, secp256k1_scalar *r2, const unsigned char *seed, size_t idx)
static SECP256K1_INLINE void secp256k1_pedersen_ecmult_scalar (secp256k1_gej *rj, const secp256k1_scalar *sec, const secp256k1_scalar *value, const secp256k1_ge *value_gen, const secp256k1_ge *blind_gen)

Macro Definition Documentation

◆ SECP256K1_BULLETPROOF_MAX_DEPTH

#define SECP256K1_BULLETPROOF_MAX_DEPTH   60

Definition at line 15 of file core.h.

◆ SECP256K1_BULLETPROOF_MAX_PROOF

#define SECP256K1_BULLETPROOF_MAX_PROOF   (160 + 66 * 32 + 7)

Definition at line 16 of file core.h.

Referenced by secp256k1_bulletproof_relation66_verify_impl().

◆ secp256k1_scratch_alloc

#define secp256k1_scratch_alloc ( scratch,
size )

Typedef Documentation

◆ secp256k1_bulletproof_circuit

typedef struct secp256k1_bulletproof_circuit secp256k1_bulletproof_circuit

Definition at line 33 of file core.h.

◆ secp256k1_bulletproof_circuit_assignment

typedef struct secp256k1_bulletproof_circuit_assignment secp256k1_bulletproof_circuit_assignment

Definition at line 34 of file core.h.

◆ secp256k1_bulletproof_generators

typedef struct secp256k1_bulletproof_generators secp256k1_bulletproof_generators

Definition at line 35 of file core.h.

◆ secp256k1_ecmult_context

typedef secp256k1_callback secp256k1_ecmult_context

Definition at line 18 of file core.h.

Function Documentation

◆ purify_checked_add_size()

int purify_checked_add_size ( size_t lhs,
size_t rhs,
size_t * out )
static

Definition at line 86 of file core.h.

Referenced by secp256k1_bulletproof_generators_create().

◆ purify_checked_mul_size()

int purify_checked_mul_size ( size_t lhs,
size_t rhs,
size_t * out )
static

Definition at line 75 of file core.h.

Referenced by secp256k1_bulletproof_generators_create().

◆ secp256k1_bulletproof_generators_create()

secp256k1_bulletproof_generators * secp256k1_bulletproof_generators_create ( const secp256k1_context * ctx,
const secp256k1_generator * blinding_gen,
size_t n,
size_t precomp_n )
static

◆ secp256k1_bulletproof_generators_destroy()

void secp256k1_bulletproof_generators_destroy ( const secp256k1_context * ctx,
secp256k1_bulletproof_generators * gen )
static

◆ secp256k1_pedersen_ecmult_scalar()

SECP256K1_INLINE void secp256k1_pedersen_ecmult_scalar ( secp256k1_gej * rj,
const secp256k1_scalar * sec,
const secp256k1_scalar * value,
const secp256k1_ge * value_gen,
const secp256k1_ge * blind_gen )
static

Definition at line 220 of file core.h.

Referenced by purify_bulletproof_prove_circuit_impl().

◆ secp256k1_scalar_chacha20()

void secp256k1_scalar_chacha20 ( secp256k1_scalar * r1,
secp256k1_scalar * r2,
const unsigned char * seed,
size_t idx )
static

◆ secp256k1_scratch_allocate_frame()

◆ secp256k1_scratch_deallocate_frame()