Monero
Loading...
Searching...
No Matches
bulletproofs.cc File Reference
#include <stdlib.h>
#include <boost/thread/mutex.hpp>
#include <boost/thread/lock_guard.hpp>
#include "misc_log_ex.h"
#include "span.h"
#include "common/perf_timer.h"
#include "cryptonote_config.h"
#include "crypto/crypto-ops.h"
#include "rctOps.h"
#include "multiexp.h"
#include "bulletproofs.h"
Include dependency graph for bulletproofs.cc:

Classes

struct  rct::proof_data_t

Namespaces

namespace  rct

Macros

#define MONERO_DEFAULT_LOG_CATEGORY   "bulletproofs"
#define PERF_TIMER_START_BP(x)
#define PERF_TIMER_STOP_BP(x)
#define STRAUS_SIZE_LIMIT   232
#define PIPPENGER_SIZE_LIMIT   0

Functions

static rct::key rct::vector_exponent (const rct::keyV &a, const rct::keyV &b)
static rct::keyV rct::vector_powers (const rct::key &x, size_t n)
static rct::keyV rct::vector_dup (const rct::key &x, size_t n)
static rct::key rct::inner_product (const rct::keyV &a, const rct::keyV &b)
static rct::key rct::multiexp (const std::vector< MultiexpData > &data, size_t HiGi_size)
static bool rct::is_reduced (const rct::key &scalar)
static rct::key rct::get_exponent (const rct::key &base, size_t idx)
static void rct::init_exponents ()
static rct::key rct::cross_vector_exponent8 (size_t size, const std::vector< ge_p3 > &A, size_t Ao, const std::vector< ge_p3 > &B, size_t Bo, const rct::keyV &a, size_t ao, const rct::keyV &b, size_t bo, const rct::keyV *scale, const ge_p3 *extra_point, const rct::key *extra_scalar)
static rct::key rct::vector_power_sum (rct::key x, size_t n)
static rct::key rct::inner_product (const epee::span< const rct::key > &a, const epee::span< const rct::key > &b)
static rct::keyV rct::hadamard (const rct::keyV &a, const rct::keyV &b)
static void rct::hadamard_fold (std::vector< ge_p3 > &v, const rct::keyV *scale, const rct::key &a, const rct::key &b)
static rct::keyV rct::vector_add (const rct::keyV &a, const rct::keyV &b)
static rct::keyV rct::vector_add (const rct::keyV &a, const rct::key &b)
static rct::keyV rct::vector_subtract (const rct::keyV &a, const rct::key &b)
static rct::keyV rct::vector_scalar (const epee::span< const rct::key > &a, const rct::key &x)
static rct::keyV rct::vector_scalar (const rct::keyV &a, const rct::key &x)
static rct::key rct::sm (rct::key y, int n, const rct::key &x)
static rct::key rct::invert (const rct::key &x)
static rct::keyV rct::invert (rct::keyV x)
static epee::span< const rct::keyrct::slice (const rct::keyV &a, size_t start, size_t stop)
static rct::key rct::hash_cache_mash (rct::key &hash_cache, const rct::key &mash0, const rct::key &mash1)
static rct::key rct::hash_cache_mash (rct::key &hash_cache, const rct::key &mash0, const rct::key &mash1, const rct::key &mash2)
static rct::key rct::hash_cache_mash (rct::key &hash_cache, const rct::key &mash0, const rct::key &mash1, const rct::key &mash2, const rct::key &mash3)
Bulletproof rct::bulletproof_PROVE (const rct::key &sv, const rct::key &gamma)
Bulletproof rct::bulletproof_PROVE (uint64_t v, const rct::key &gamma)
Bulletproof rct::bulletproof_PROVE (const rct::keyV &sv, const rct::keyV &gamma)
Bulletproof rct::bulletproof_PROVE (const std::vector< uint64_t > &v, const rct::keyV &gamma)
bool rct::bulletproof_VERIFY (const std::vector< const Bulletproof * > &proofs)
bool rct::bulletproof_VERIFY (const std::vector< Bulletproof > &proofs)
bool rct::bulletproof_VERIFY (const Bulletproof &proof)

Variables

static constexpr size_t rct::maxN = 64
static constexpr size_t rct::maxM = BULLETPROOF_MAX_OUTPUTS
static ge_p3 rct::Hi_p3 [maxN *maxM]
static ge_p3 rct::Gi_p3 [maxN *maxM]
static std::shared_ptr< straus_cached_datarct::straus_HiGi_cache
static std::shared_ptr< pippenger_cached_datarct::pippenger_HiGi_cache
static const constexpr rct::key rct::TWO = { {0x02, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 , 0x00, 0x00, 0x00,0x00 } }
static const constexpr rct::key rct::MINUS_ONE = { { 0xec, 0xd3, 0xf5, 0x5c, 0x1a, 0x63, 0x12, 0x58, 0xd6, 0x9c, 0xf7, 0xa2, 0xde, 0xf9, 0xde, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10 } }
static const constexpr rct::key rct::MINUS_INV_EIGHT = { { 0x74, 0xa4, 0x19, 0x7a, 0xf0, 0x7d, 0x0b, 0xf7, 0x05, 0xc2, 0xda, 0x25, 0x2b, 0x5c, 0x0b, 0x0d, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0a } }
static const rct::keyV rct::oneN = vector_dup(rct::identity(), maxN)
static const rct::keyV rct::twoN = vector_powers(TWO, maxN)
static const rct::key rct::ip12 = inner_product(oneN, twoN)
static boost::mutex rct::init_mutex

Macro Definition Documentation

◆ MONERO_DEFAULT_LOG_CATEGORY

#define MONERO_DEFAULT_LOG_CATEGORY   "bulletproofs"

◆ PERF_TIMER_START_BP

#define PERF_TIMER_START_BP ( x)
Value:
((void)0)

◆ PERF_TIMER_STOP_BP

#define PERF_TIMER_STOP_BP ( x)
Value:
((void)0)

◆ PIPPENGER_SIZE_LIMIT

#define PIPPENGER_SIZE_LIMIT   0

◆ STRAUS_SIZE_LIMIT

#define STRAUS_SIZE_LIMIT   232