Monero
Loading...
Searching...
No Matches
crypto Namespace Reference

crypto namespace. More...

Namespaces

namespace  serialization
namespace  wallet
namespace  ElectrumWords
 Mnemonic seed word generation and wallet restoration helper functions.

Classes

struct  ge_p2
struct  ge_p3
struct  ge_p1p1
struct  ge_precomp
struct  ge_cached
struct  s_comm
struct  s_comm_2_v1
struct  s_comm_2
struct  ec_point_pair
struct  rs_comm
class  crypto_ops
struct  random_device
struct  secret_key_explicit_print_ref
struct  random_poisson_duration
 Generate poisson distributed values in discrete D time units. More...
struct  is_blob_type
 a descriptor for dispatching serialize More...
union  hash_state

Typedefs

typedef int32_t fe[10]
typedef ge_cached ge_dsmp[8]
using secret_key = epee::mlocked<tools::scrubbed<ec_scalar>>
using random_poisson_seconds = random_poisson_duration<std::chrono::seconds>
 Generate random durations with 1 second precision.
using random_poisson_subseconds
 Generate random duration with 1/4 second precision.
typedef int bool
typedef signed char int8_t
typedef signed short int16_t
typedef signed int int32_t
typedef unsigned char uint8_t
typedef unsigned short uint16_t
typedef unsigned int uint32_t
typedef signed __int64 int64_t
typedef unsigned __int64 uint64_t
typedef int8_t int_least8_t
typedef int16_t int_least16_t
typedef int32_t int_least32_t
typedef int64_t int_least64_t
typedef uint8_t uint_least8_t
typedef uint16_t uint_least16_t
typedef uint32_t uint_least32_t
typedef uint64_t uint_least64_t
typedef int8_t int_fast8_t
typedef int16_t int_fast16_t
typedef int32_t int_fast32_t
typedef int64_t int_fast64_t
typedef uint8_t uint_fast8_t
typedef uint16_t uint_fast16_t
typedef uint32_t uint_fast32_t
typedef uint64_t uint_fast64_t
typedef _W64 signed int intptr_t
typedef _W64 unsigned int uintptr_t
typedef int64_t intmax_t
typedef uint64_t uintmax_t

Enumerations

enum  { HASH_SIZE = 32 , HASH_DATA_AREA = 136 }

Functions

void ge_add (ge_p1p1 *, const ge_p3 *, const ge_cached *)
void ge_dsm_precomp (ge_dsmp r, const ge_p3 *s)
void ge_double_scalarmult_base_vartime (ge_p2 *, const unsigned char *, const ge_p3 *, const unsigned char *)
void ge_triple_scalarmult_base_vartime (ge_p2 *, const unsigned char *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp)
void ge_double_scalarmult_base_vartime_p3 (ge_p3 *, const unsigned char *, const ge_p3 *, const unsigned char *)
int ge_frombytes_vartime (ge_p3 *, const unsigned char *)
void ge_p1p1_to_p2 (ge_p2 *, const ge_p1p1 *)
void ge_p1p1_to_p3 (ge_p3 *, const ge_p1p1 *)
void ge_p2_dbl (ge_p1p1 *, const ge_p2 *)
void ge_p3_to_cached (ge_cached *, const ge_p3 *)
void ge_p3_to_p2 (ge_p2 *, const ge_p3 *)
void ge_p3_tobytes (unsigned char *, const ge_p3 *)
void ge_scalarmult_base (ge_p3 *, const unsigned char *)
void ge_tobytes (unsigned char *, const ge_p2 *)
void sc_reduce (unsigned char *)
void ge_scalarmult (ge_p2 *, const unsigned char *, const ge_p3 *)
void ge_scalarmult_p3 (ge_p3 *, const unsigned char *, const ge_p3 *)
void ge_double_scalarmult_precomp_vartime (ge_p2 *, const unsigned char *, const ge_p3 *, const unsigned char *, const ge_dsmp)
void ge_triple_scalarmult_precomp_vartime (ge_p2 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp)
void ge_double_scalarmult_precomp_vartime2 (ge_p2 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp)
void ge_double_scalarmult_precomp_vartime2_p3 (ge_p3 *, const unsigned char *, const ge_dsmp, const unsigned char *, const ge_dsmp)
void ge_mul8 (ge_p1p1 *, const ge_p2 *)
void ge_fromfe_frombytes_vartime (ge_p2 *, const unsigned char *)
void sc_0 (unsigned char *)
void sc_reduce32 (unsigned char *)
void sc_add (unsigned char *, const unsigned char *, const unsigned char *)
void sc_sub (unsigned char *, const unsigned char *, const unsigned char *)
void sc_mulsub (unsigned char *, const unsigned char *, const unsigned char *, const unsigned char *)
void sc_mul (unsigned char *, const unsigned char *, const unsigned char *)
void sc_muladd (unsigned char *s, const unsigned char *a, const unsigned char *b, const unsigned char *c)
int sc_check (const unsigned char *)
int sc_isnonzero (const unsigned char *)
uint64_t load_3 (const unsigned char *in)
uint64_t load_4 (const unsigned char *in)
void ge_sub (ge_p1p1 *r, const ge_p3 *p, const ge_cached *q)
void fe_add (fe h, const fe f, const fe g)
void fe_tobytes (unsigned char *, const fe)
void fe_invert (fe out, const fe z)
int ge_p3_is_point_at_infinity_vartime (const ge_p3 *p)
void generate_random_bytes_not_thread_safe (size_t n, void *result)
void add_extra_entropy_not_thread_safe (const void *ptr, size_t bytes)
static unsigned char * operator& (ec_point &point)
static const unsigned char * operator& (const ec_point &point)
static unsigned char * operator& (ec_scalar &scalar)
static const unsigned char * operator& (const ec_scalar &scalar)
boost::mutex & get_random_lock ()
void generate_random_bytes_thread_safe (size_t N, uint8_t *bytes)
void add_extra_entropy_thread_safe (const void *ptr, size_t bytes)
static bool less32 (const unsigned char *k0, const unsigned char *k1)
void random32_unbiased (unsigned char *bytes)
static void random_scalar (ec_scalar &res)
void hash_to_scalar (const void *data, size_t length, ec_scalar &res)
static void hash_to_ec (const public_key &key, ge_p3 &res)
static POP_WARNINGS size_t rs_comm_size (size_t pubs_count)
 public_key_memsafe (const public_key &original)
void rand (size_t N, uint8_t *bytes)
template<typename T>
T rand ()
template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type rand_range (T range_min, T range_max)
template<typename T>
std::enable_if< std::is_unsigned< T >::value, T >::type rand_idx (T sz)
secret_key generate_keys (public_key &pub, secret_key &sec, const secret_key &recovery_key=secret_key(), bool recover=false)
bool check_key (const public_key &key)
bool secret_key_to_public_key (const secret_key &sec, public_key &pub)
bool generate_key_derivation (const public_key &key1, const secret_key &key2, key_derivation &derivation)
bool derive_public_key (const key_derivation &derivation, std::size_t output_index, const public_key &base, public_key &derived_key)
void derivation_to_scalar (const key_derivation &derivation, size_t output_index, ec_scalar &res)
void derive_secret_key (const key_derivation &derivation, std::size_t output_index, const secret_key &base, secret_key &derived_key)
bool derive_subaddress_public_key (const public_key &out_key, const key_derivation &derivation, std::size_t output_index, public_key &result)
void generate_signature (const hash &prefix_hash, const public_key &pub, const secret_key &sec, signature &sig)
bool check_signature (const hash &prefix_hash, const public_key &pub, const signature &sig)
void generate_tx_proof (const hash &prefix_hash, const public_key &R, const public_key &A, const boost::optional< public_key > &B, const public_key &D, const secret_key &r, signature &sig)
void generate_tx_proof_v1 (const hash &prefix_hash, const public_key &R, const public_key &A, const boost::optional< public_key > &B, const public_key &D, const secret_key &r, signature &sig)
bool check_tx_proof (const hash &prefix_hash, const public_key &R, const public_key &A, const boost::optional< public_key > &B, const public_key &D, const signature &sig, const int version)
void generate_key_image (const public_key &pub, const secret_key &sec, key_image &image)
void generate_ring_signature (const hash &prefix_hash, const key_image &image, const public_key *const *pubs, std::size_t pubs_count, const secret_key &sec, std::size_t sec_index, signature *sig)
bool check_ring_signature (const hash &prefix_hash, const key_image &image, const public_key *const *pubs, std::size_t pubs_count, const signature *sig)
void generate_ring_signature (const hash &prefix_hash, const key_image &image, const std::vector< const public_key * > &pubs, const secret_key &sec, std::size_t sec_index, signature *sig)
bool check_ring_signature (const hash &prefix_hash, const key_image &image, const std::vector< const public_key * > &pubs, const signature *sig)
void derive_view_tag (const key_derivation &derivation, std::size_t output_index, view_tag &vt)
std::ostream & operator<< (std::ostream &o, const crypto::public_key &v)
std::ostream & operator<< (std::ostream &o, const secret_key_explicit_print_ref v)
std::ostream & operator<< (std::ostream &o, const crypto::key_derivation &v)
std::ostream & operator<< (std::ostream &o, const crypto::key_image &v)
std::ostream & operator<< (std::ostream &o, const crypto::signature &v)
std::ostream & operator<< (std::ostream &o, const crypto::view_tag &v)
bool operator< (const public_key &p1, const public_key &p2)
bool operator> (const public_key &p1, const public_key &p2)
template<class Archive, class T>
std::enable_if_t< is_blob_type< T >::type::value, booldo_serialize (Archive &ar, T &v)
 main function for dispatching serialization for a given pair of archive and value types
template<class Archive, class T>
std::enable_if_t< boost::is_integral< T >::value, booldo_serialize (Archive &ar, T &v)
template<class Archive, class T>
auto do_serialize (Archive &ar, T &v) -> decltype(v.member_do_serialize(ar), true)
template<class Archive>
bool do_serialize (Archive &ar, bool &v)
template<template< bool > class Archive>
bool do_serialize (Archive< false > &ar, std::string &str)
template<template< bool > class Archive>
bool do_serialize (Archive< true > &ar, std::string &str)
static uint32_t rol32 (uint32_t x, int r)
static uint64_t rol64 (uint64_t x, int r)
static uint64_t hi_dword (uint64_t val)
static uint64_t lo_dword (uint64_t val)
static uint64_t mul128 (uint64_t multiplier, uint64_t multiplicand, uint64_t *product_hi)
static uint64_t div_with_reminder (uint64_t dividend, uint32_t divisor, uint32_t *remainder)
static uint32_t div128_32 (uint64_t dividend_hi, uint64_t dividend_lo, uint32_t divisor, uint64_t *quotient_hi, uint64_t *quotient_lo)
void div128_64 (uint64_t dividend_hi, uint64_t dividend_lo, uint64_t divisor, uint64_t *quotient_hi, uint64_t *quotient_lo, uint64_t *remainder_hi, uint64_t *remainder_lo)
static void add64clamp (uint64_t *value, uint64_t add)
static void sub64clamp (uint64_t *value, uint64_t sub)
static uint16_t ident16 (uint16_t x)
static uint32_t ident32 (uint32_t x)
static uint64_t ident64 (uint64_t x)
static uint16_t swap16 (uint16_t x)
static uint32_t swap32 (uint32_t x)
static uint64_t swap64 (uint64_t x)
static void mem_inplace_ident (void *mem UNUSED, size_t n UNUSED)
static void mem_inplace_swap16 (void *mem, size_t n)
static void mem_inplace_swap32 (void *mem, size_t n)
static void mem_inplace_swap64 (void *mem, size_t n)
static void memcpy_ident16 (void *dst, const void *src, size_t n)
static void memcpy_ident32 (void *dst, const void *src, size_t n)
static void memcpy_ident64 (void *dst, const void *src, size_t n)
static void memcpy_swap16 (void *dst, const void *src, size_t n)
static void memcpy_swap32 (void *dst, const void *src, size_t n)
static void memcpy_swap64 (void *dst, const void *src, size_t n)
static void * padd (void *p, size_t i)
static const void * cpadd (const void *p, size_t i)
static void place_length (uint8_t *buffer, size_t bufsize, size_t length)
void hash_permutation (union hash_state *state)
void hash_process (union hash_state *state, const uint8_t *buf, size_t count)
void cn_fast_hash (const void *data, size_t length, char *hash)
void cn_slow_hash (const void *data, size_t length, char *hash, int variant, int prehashed, uint64_t height)
void hash_extra_blake (const void *data, size_t length, char *hash)
void hash_extra_groestl (const void *data, size_t length, char *hash)
void hash_extra_jh (const void *data, size_t length, char *hash)
void hash_extra_skein (const void *data, size_t length, char *hash)
void tree_hash (const char(*hashes)[HASH_SIZE], size_t count, char *root_hash)
bool tree_path (size_t count, size_t idx, uint32_t *path)
bool tree_branch (const char(*hashes)[HASH_SIZE], size_t count, const char *hash, char(*branch)[HASH_SIZE], size_t *depth, uint32_t *path)
bool tree_branch_hash (const char hash[HASH_SIZE], const char(*branch)[HASH_SIZE], size_t depth, uint32_t path, char root[HASH_SIZE])
bool is_branch_in_tree (const char hash[HASH_SIZE], const char root[HASH_SIZE], const char(*branch)[HASH_SIZE], size_t depth, uint32_t path)
void rx_slow_hash_allocate_state (void)
void rx_slow_hash_free_state (void)
uint64_t rx_seedheight (const uint64_t height)
void rx_seedheights (const uint64_t height, uint64_t *seed_height, uint64_t *next_height)
void rx_set_main_seedhash (const char *seedhash, size_t max_dataset_init_threads)
void rx_slow_hash (const char *seedhash, const void *data, size_t length, char *result_hash)
void rx_set_miner_thread (uint32_t value, size_t max_dataset_init_threads)
uint32_t rx_get_miner_thread (void)
void cn_fast_hash (const void *data, std::size_t length, hash &hash)
hash cn_fast_hash (const void *data, std::size_t length)
static constexpr void cn_variant1_check (const std::size_t length, const int variant)
void cn_slow_hash (const void *data, std::size_t length, hash &hash, int variant=0, uint64_t height=0)
void cn_slow_hash_prehashed (const void *data, std::size_t length, hash &hash, int variant=0, uint64_t height=0)
void tree_hash (const hash *hashes, std::size_t count, hash &root_hash)
std::ostream & operator<< (std::ostream &o, const crypto::hash &v)
std::ostream & operator<< (std::ostream &o, const crypto::hash8 &v)

Variables

const ge_precomp ge_Bi [8]
const fe fe_sqrtm1
const fe fe_d
const fe fe_d2
const ge_precomp ge_base [32][8]
const fe fe_ma2
const fe fe_ma
const fe fe_fffb1
const fe fe_fffb2
const fe fe_fffb3
const fe fe_fffb4
const ge_p3 ge_p3_identity
const ge_p3 ge_p3_H
const crypto::public_key null_pkey = crypto::public_key{}
const crypto::secret_key null_skey = crypto::secret_key{}
POD_CLASS ec_point
POD_CLASS ec_scalar
POD_CLASS public_key
POD_CLASS public_key_memsafe
POD_CLASS public_keyV
int rows
POD_CLASS secret_keyV
POD_CLASS public_keyM
std::vector< secret_keyVcolumn_vectors
POD_CLASS key_derivation
POD_CLASS key_image
POD_CLASS signature
POD_CLASS view_tag
 PUSH_WARNINGS
POD_CLASS hash
POD_CLASS hash8
static constexpr crypto::hash null_hash = {}
static constexpr crypto::hash8 null_hash8 = {}

Detailed Description

crypto namespace.

Typedef Documentation

◆ bool

typedef int crypto::bool

◆ fe

typedef int32_t crypto::fe[10]

◆ ge_dsmp

typedef ge_cached crypto::ge_dsmp[8]

◆ int16_t

typedef signed short crypto::int16_t

◆ int32_t

typedef signed int crypto::int32_t

◆ int64_t

typedef signed __int64 crypto::int64_t

◆ int8_t

typedef signed char crypto::int8_t

◆ int_fast16_t

◆ int_fast32_t

◆ int_fast64_t

◆ int_fast8_t

◆ int_least16_t

◆ int_least32_t

◆ int_least64_t

◆ int_least8_t

◆ intmax_t

◆ intptr_t

typedef _W64 signed int crypto::intptr_t

◆ random_poisson_seconds

Generate random durations with 1 second precision.

◆ random_poisson_subseconds

Initial value:
Generate poisson distributed values in discrete D time units.
Definition duration.h:40

Generate random duration with 1/4 second precision.

◆ secret_key

using crypto::secret_key = epee::mlocked<tools::scrubbed<ec_scalar>>

◆ uint16_t

typedef unsigned short crypto::uint16_t

◆ uint32_t

typedef unsigned int crypto::uint32_t

◆ uint64_t

typedef unsigned __int64 crypto::uint64_t

◆ uint8_t

typedef unsigned char crypto::uint8_t

◆ uint_fast16_t

◆ uint_fast32_t

◆ uint_fast64_t

◆ uint_fast8_t

◆ uint_least16_t

◆ uint_least32_t

◆ uint_least64_t

◆ uint_least8_t

◆ uintmax_t

◆ uintptr_t

typedef _W64 unsigned int crypto::uintptr_t

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
HASH_SIZE 
HASH_DATA_AREA 

Function Documentation

◆ add64clamp()

void crypto::add64clamp ( uint64_t * value,
uint64_t add )
inlinestatic

◆ add_extra_entropy_not_thread_safe()

void crypto::add_extra_entropy_not_thread_safe ( const void * ptr,
size_t bytes )

◆ add_extra_entropy_thread_safe()

void crypto::add_extra_entropy_thread_safe ( const void * ptr,
size_t bytes )

◆ check_key()

bool crypto::check_key ( const public_key & key)
inline

◆ check_ring_signature() [1/2]

bool crypto::check_ring_signature ( const hash & prefix_hash,
const key_image & image,
const public_key *const * pubs,
std::size_t pubs_count,
const signature * sig )
inline

◆ check_ring_signature() [2/2]

bool crypto::check_ring_signature ( const hash & prefix_hash,
const key_image & image,
const std::vector< const public_key * > & pubs,
const signature * sig )
inline

◆ check_signature()

bool crypto::check_signature ( const hash & prefix_hash,
const public_key & pub,
const signature & sig )
inline

◆ check_tx_proof()

bool crypto::check_tx_proof ( const hash & prefix_hash,
const public_key & R,
const public_key & A,
const boost::optional< public_key > & B,
const public_key & D,
const signature & sig,
const int version )
inline

◆ cn_fast_hash() [1/3]

void crypto::cn_fast_hash ( const void * data,
size_t length,
char * hash )

◆ cn_fast_hash() [2/3]

hash crypto::cn_fast_hash ( const void * data,
std::size_t length )
inline

◆ cn_fast_hash() [3/3]

void crypto::cn_fast_hash ( const void * data,
std::size_t length,
hash & hash )
inline

◆ cn_slow_hash() [1/2]

void crypto::cn_slow_hash ( const void * data,
size_t length,
char * hash,
int variant,
int prehashed,
uint64_t height )

◆ cn_slow_hash() [2/2]

void crypto::cn_slow_hash ( const void * data,
std::size_t length,
hash & hash,
int variant = 0,
uint64_t height = 0 )
inline

◆ cn_slow_hash_prehashed()

void crypto::cn_slow_hash_prehashed ( const void * data,
std::size_t length,
hash & hash,
int variant = 0,
uint64_t height = 0 )
inline

◆ cn_variant1_check()

constexpr void crypto::cn_variant1_check ( const std::size_t length,
const int variant )
staticconstexpr

◆ cpadd()

const void * crypto::cpadd ( const void * p,
size_t i )
inlinestatic

◆ derivation_to_scalar()

void crypto::derivation_to_scalar ( const key_derivation & derivation,
size_t output_index,
ec_scalar & res )
inline

◆ derive_public_key()

bool crypto::derive_public_key ( const key_derivation & derivation,
std::size_t output_index,
const public_key & base,
public_key & derived_key )
inline

◆ derive_secret_key()

void crypto::derive_secret_key ( const key_derivation & derivation,
std::size_t output_index,
const secret_key & base,
secret_key & derived_key )
inline

◆ derive_subaddress_public_key()

bool crypto::derive_subaddress_public_key ( const public_key & out_key,
const key_derivation & derivation,
std::size_t output_index,
public_key & result )
inline

◆ derive_view_tag()

void crypto::derive_view_tag ( const key_derivation & derivation,
std::size_t output_index,
view_tag & vt )
inline

◆ div128_32()

uint32_t crypto::div128_32 ( uint64_t dividend_hi,
uint64_t dividend_lo,
uint32_t divisor,
uint64_t * quotient_hi,
uint64_t * quotient_lo )
inlinestatic

◆ div128_64()

void crypto::div128_64 ( uint64_t dividend_hi,
uint64_t dividend_lo,
uint64_t divisor,
uint64_t * quotient_hi,
uint64_t * quotient_lo,
uint64_t * remainder_hi,
uint64_t * remainder_lo )

◆ div_with_reminder()

uint64_t crypto::div_with_reminder ( uint64_t dividend,
uint32_t divisor,
uint32_t * remainder )
inlinestatic

◆ do_serialize() [1/6]

template<class Archive>
bool crypto::do_serialize ( Archive & ar,
bool & v )
inline

◆ do_serialize() [2/6]

template<class Archive, class T>
std::enable_if_t< boost::is_integral< T >::value, bool > crypto::do_serialize ( Archive & ar,
T & v )
inline

◆ do_serialize() [3/6]

template<class Archive, class T>
std::enable_if_t< is_blob_type< T >::type::value, bool > crypto::do_serialize ( Archive & ar,
T & v )
inline

main function for dispatching serialization for a given pair of archive and value types

Types marked true with is_blob_type<T> will be serialized as a blob, integral types will be serialized as integers, and types who have a member_do_serialize method will be serialized using that method. Booleans are serialized like blobs.

◆ do_serialize() [4/6]

template<class Archive, class T>
auto crypto::do_serialize ( Archive & ar,
T & v ) -> decltype(v.member_do_serialize(ar), true)
inline

◆ do_serialize() [5/6]

template<template< bool > class Archive>
bool crypto::do_serialize ( Archive< false > & ar,
std::string & str )
inline

◆ do_serialize() [6/6]

template<template< bool > class Archive>
bool crypto::do_serialize ( Archive< true > & ar,
std::string & str )
inline

◆ fe_add()

void crypto::fe_add ( fe h,
const fe f,
const fe g )

◆ fe_invert()

void crypto::fe_invert ( fe out,
const fe z )

◆ fe_tobytes()

void crypto::fe_tobytes ( unsigned char * ,
const fe  )

◆ ge_add()

void crypto::ge_add ( ge_p1p1 * ,
const ge_p3 * ,
const ge_cached *  )

◆ ge_double_scalarmult_base_vartime()

void crypto::ge_double_scalarmult_base_vartime ( ge_p2 * ,
const unsigned char * ,
const ge_p3 * ,
const unsigned char *  )

◆ ge_double_scalarmult_base_vartime_p3()

void crypto::ge_double_scalarmult_base_vartime_p3 ( ge_p3 * ,
const unsigned char * ,
const ge_p3 * ,
const unsigned char *  )

◆ ge_double_scalarmult_precomp_vartime()

void crypto::ge_double_scalarmult_precomp_vartime ( ge_p2 * ,
const unsigned char * ,
const ge_p3 * ,
const unsigned char * ,
const ge_dsmp  )

◆ ge_double_scalarmult_precomp_vartime2()

void crypto::ge_double_scalarmult_precomp_vartime2 ( ge_p2 * ,
const unsigned char * ,
const ge_dsmp ,
const unsigned char * ,
const ge_dsmp  )

◆ ge_double_scalarmult_precomp_vartime2_p3()

void crypto::ge_double_scalarmult_precomp_vartime2_p3 ( ge_p3 * ,
const unsigned char * ,
const ge_dsmp ,
const unsigned char * ,
const ge_dsmp  )

◆ ge_dsm_precomp()

void crypto::ge_dsm_precomp ( ge_dsmp r,
const ge_p3 * s )

◆ ge_frombytes_vartime()

int crypto::ge_frombytes_vartime ( ge_p3 * ,
const unsigned char *  )

◆ ge_fromfe_frombytes_vartime()

void crypto::ge_fromfe_frombytes_vartime ( ge_p2 * ,
const unsigned char *  )

◆ ge_mul8()

void crypto::ge_mul8 ( ge_p1p1 * ,
const ge_p2 *  )

◆ ge_p1p1_to_p2()

void crypto::ge_p1p1_to_p2 ( ge_p2 * ,
const ge_p1p1 *  )

◆ ge_p1p1_to_p3()

void crypto::ge_p1p1_to_p3 ( ge_p3 * ,
const ge_p1p1 *  )

◆ ge_p2_dbl()

void crypto::ge_p2_dbl ( ge_p1p1 * ,
const ge_p2 *  )

◆ ge_p3_is_point_at_infinity_vartime()

int crypto::ge_p3_is_point_at_infinity_vartime ( const ge_p3 * p)

◆ ge_p3_to_cached()

void crypto::ge_p3_to_cached ( ge_cached * ,
const ge_p3 *  )

◆ ge_p3_to_p2()

void crypto::ge_p3_to_p2 ( ge_p2 * ,
const ge_p3 *  )

◆ ge_p3_tobytes()

void crypto::ge_p3_tobytes ( unsigned char * ,
const ge_p3 *  )

◆ ge_scalarmult()

void crypto::ge_scalarmult ( ge_p2 * ,
const unsigned char * ,
const ge_p3 *  )

◆ ge_scalarmult_base()

void crypto::ge_scalarmult_base ( ge_p3 * ,
const unsigned char *  )

◆ ge_scalarmult_p3()

void crypto::ge_scalarmult_p3 ( ge_p3 * ,
const unsigned char * ,
const ge_p3 *  )

◆ ge_sub()

void crypto::ge_sub ( ge_p1p1 * r,
const ge_p3 * p,
const ge_cached * q )

◆ ge_tobytes()

void crypto::ge_tobytes ( unsigned char * ,
const ge_p2 *  )

◆ ge_triple_scalarmult_base_vartime()

void crypto::ge_triple_scalarmult_base_vartime ( ge_p2 * ,
const unsigned char * ,
const unsigned char * ,
const ge_dsmp ,
const unsigned char * ,
const ge_dsmp  )

◆ ge_triple_scalarmult_precomp_vartime()

void crypto::ge_triple_scalarmult_precomp_vartime ( ge_p2 * ,
const unsigned char * ,
const ge_dsmp ,
const unsigned char * ,
const ge_dsmp ,
const unsigned char * ,
const ge_dsmp  )

◆ generate_key_derivation()

bool crypto::generate_key_derivation ( const public_key & key1,
const secret_key & key2,
key_derivation & derivation )
inline

◆ generate_key_image()

void crypto::generate_key_image ( const public_key & pub,
const secret_key & sec,
key_image & image )
inline

◆ generate_keys()

secret_key crypto::generate_keys ( public_key & pub,
secret_key & sec,
const secret_key & recovery_key = secret_key(),
bool recover = false )
inline

◆ generate_random_bytes_not_thread_safe()

void crypto::generate_random_bytes_not_thread_safe ( size_t n,
void * result )

◆ generate_random_bytes_thread_safe()

void crypto::generate_random_bytes_thread_safe ( size_t N,
uint8_t * bytes )

◆ generate_ring_signature() [1/2]

void crypto::generate_ring_signature ( const hash & prefix_hash,
const key_image & image,
const public_key *const * pubs,
std::size_t pubs_count,
const secret_key & sec,
std::size_t sec_index,
signature * sig )
inline

◆ generate_ring_signature() [2/2]

void crypto::generate_ring_signature ( const hash & prefix_hash,
const key_image & image,
const std::vector< const public_key * > & pubs,
const secret_key & sec,
std::size_t sec_index,
signature * sig )
inline

◆ generate_signature()

void crypto::generate_signature ( const hash & prefix_hash,
const public_key & pub,
const secret_key & sec,
signature & sig )
inline

◆ generate_tx_proof()

void crypto::generate_tx_proof ( const hash & prefix_hash,
const public_key & R,
const public_key & A,
const boost::optional< public_key > & B,
const public_key & D,
const secret_key & r,
signature & sig )
inline

◆ generate_tx_proof_v1()

void crypto::generate_tx_proof_v1 ( const hash & prefix_hash,
const public_key & R,
const public_key & A,
const boost::optional< public_key > & B,
const public_key & D,
const secret_key & r,
signature & sig )
inline

◆ get_random_lock()

boost::mutex & crypto::get_random_lock ( )

◆ hash_extra_blake()

void crypto::hash_extra_blake ( const void * data,
size_t length,
char * hash )

◆ hash_extra_groestl()

void crypto::hash_extra_groestl ( const void * data,
size_t length,
char * hash )

◆ hash_extra_jh()

void crypto::hash_extra_jh ( const void * data,
size_t length,
char * hash )

◆ hash_extra_skein()

void crypto::hash_extra_skein ( const void * data,
size_t length,
char * hash )

◆ hash_permutation()

void crypto::hash_permutation ( union hash_state * state)

◆ hash_process()

void crypto::hash_process ( union hash_state * state,
const uint8_t * buf,
size_t count )

◆ hash_to_ec()

void crypto::hash_to_ec ( const public_key & key,
ge_p3 & res )
static

◆ hash_to_scalar()

void crypto::hash_to_scalar ( const void * data,
size_t length,
ec_scalar & res )

◆ hi_dword()

uint64_t crypto::hi_dword ( uint64_t val)
inlinestatic

◆ ident16()

uint16_t crypto::ident16 ( uint16_t x)
inlinestatic

◆ ident32()

uint32_t crypto::ident32 ( uint32_t x)
inlinestatic

◆ ident64()

uint64_t crypto::ident64 ( uint64_t x)
inlinestatic

◆ is_branch_in_tree()

bool crypto::is_branch_in_tree ( const char hash[HASH_SIZE],
const char root[HASH_SIZE],
const char(*) branch[HASH_SIZE],
size_t depth,
uint32_t path )

◆ less32()

bool crypto::less32 ( const unsigned char * k0,
const unsigned char * k1 )
inlinestatic

◆ lo_dword()

uint64_t crypto::lo_dword ( uint64_t val)
inlinestatic

◆ load_3()

uint64_t crypto::load_3 ( const unsigned char * in)

◆ load_4()

uint64_t crypto::load_4 ( const unsigned char * in)

◆ mem_inplace_ident()

void crypto::mem_inplace_ident ( void *mem UNUSED,
size_t n UNUSED )
inlinestatic

◆ mem_inplace_swap16()

void crypto::mem_inplace_swap16 ( void * mem,
size_t n )
inlinestatic

◆ mem_inplace_swap32()

void crypto::mem_inplace_swap32 ( void * mem,
size_t n )
inlinestatic

◆ mem_inplace_swap64()

void crypto::mem_inplace_swap64 ( void * mem,
size_t n )
inlinestatic

◆ memcpy_ident16()

void crypto::memcpy_ident16 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ memcpy_ident32()

void crypto::memcpy_ident32 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ memcpy_ident64()

void crypto::memcpy_ident64 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ memcpy_swap16()

void crypto::memcpy_swap16 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ memcpy_swap32()

void crypto::memcpy_swap32 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ memcpy_swap64()

void crypto::memcpy_swap64 ( void * dst,
const void * src,
size_t n )
inlinestatic

◆ mul128()

uint64_t crypto::mul128 ( uint64_t multiplier,
uint64_t multiplicand,
uint64_t * product_hi )
inlinestatic

◆ operator&() [1/4]

const unsigned char * crypto::operator& ( const ec_point & point)
inlinestatic

◆ operator&() [2/4]

const unsigned char * crypto::operator& ( const ec_scalar & scalar)
inlinestatic

◆ operator&() [3/4]

unsigned char * crypto::operator& ( ec_point & point)
inlinestatic

◆ operator&() [4/4]

unsigned char * crypto::operator& ( ec_scalar & scalar)
inlinestatic

◆ operator<()

bool crypto::operator< ( const public_key & p1,
const public_key & p2 )
inline

◆ operator<<() [1/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::hash & v )
inline

◆ operator<<() [2/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::hash8 & v )
inline

◆ operator<<() [3/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::key_derivation & v )
inline

◆ operator<<() [4/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::key_image & v )
inline

◆ operator<<() [5/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::public_key & v )
inline

◆ operator<<() [6/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::signature & v )
inline

◆ operator<<() [7/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const crypto::view_tag & v )
inline

◆ operator<<() [8/8]

std::ostream & crypto::operator<< ( std::ostream & o,
const secret_key_explicit_print_ref v )
inline

◆ operator>()

bool crypto::operator> ( const public_key & p1,
const public_key & p2 )
inline

◆ padd()

void * crypto::padd ( void * p,
size_t i )
inlinestatic

◆ place_length()

void crypto::place_length ( uint8_t * buffer,
size_t bufsize,
size_t length )
inlinestatic

◆ public_key_memsafe()

crypto::public_key_memsafe ( const public_key & original)

◆ rand() [1/2]

template<typename T>
T crypto::rand ( )

◆ rand() [2/2]

void crypto::rand ( size_t N,
uint8_t * bytes )
inline

◆ rand_idx()

template<typename T>
std::enable_if< std::is_unsigned< T >::value, T >::type crypto::rand_idx ( T sz)

◆ rand_range()

template<typename T>
std::enable_if< std::is_integral< T >::value, T >::type crypto::rand_range ( T range_min,
T range_max )

◆ random32_unbiased()

void crypto::random32_unbiased ( unsigned char * bytes)

◆ random_scalar()

void crypto::random_scalar ( ec_scalar & res)
inlinestatic

◆ rol32()

uint32_t crypto::rol32 ( uint32_t x,
int r )
inlinestatic

◆ rol64()

uint64_t crypto::rol64 ( uint64_t x,
int r )
inlinestatic

◆ rs_comm_size()

POP_WARNINGS size_t crypto::rs_comm_size ( size_t pubs_count)
inlinestatic

◆ rx_get_miner_thread()

uint32_t crypto::rx_get_miner_thread ( void )

◆ rx_seedheight()

uint64_t crypto::rx_seedheight ( const uint64_t height)

◆ rx_seedheights()

void crypto::rx_seedheights ( const uint64_t height,
uint64_t * seed_height,
uint64_t * next_height )

◆ rx_set_main_seedhash()

void crypto::rx_set_main_seedhash ( const char * seedhash,
size_t max_dataset_init_threads )

◆ rx_set_miner_thread()

void crypto::rx_set_miner_thread ( uint32_t value,
size_t max_dataset_init_threads )

◆ rx_slow_hash()

void crypto::rx_slow_hash ( const char * seedhash,
const void * data,
size_t length,
char * result_hash )

◆ rx_slow_hash_allocate_state()

void crypto::rx_slow_hash_allocate_state ( void )

◆ rx_slow_hash_free_state()

void crypto::rx_slow_hash_free_state ( void )

◆ sc_0()

void crypto::sc_0 ( unsigned char * )

◆ sc_add()

void crypto::sc_add ( unsigned char * ,
const unsigned char * ,
const unsigned char *  )

◆ sc_check()

int crypto::sc_check ( const unsigned char * )

◆ sc_isnonzero()

int crypto::sc_isnonzero ( const unsigned char * )

◆ sc_mul()

void crypto::sc_mul ( unsigned char * ,
const unsigned char * ,
const unsigned char *  )

◆ sc_muladd()

void crypto::sc_muladd ( unsigned char * s,
const unsigned char * a,
const unsigned char * b,
const unsigned char * c )

◆ sc_mulsub()

void crypto::sc_mulsub ( unsigned char * ,
const unsigned char * ,
const unsigned char * ,
const unsigned char *  )

◆ sc_reduce()

void crypto::sc_reduce ( unsigned char * )

◆ sc_reduce32()

void crypto::sc_reduce32 ( unsigned char * )

◆ sc_sub()

void crypto::sc_sub ( unsigned char * ,
const unsigned char * ,
const unsigned char *  )

◆ secret_key_to_public_key()

bool crypto::secret_key_to_public_key ( const secret_key & sec,
public_key & pub )
inline

◆ sub64clamp()

void crypto::sub64clamp ( uint64_t * value,
uint64_t sub )
inlinestatic

◆ swap16()

uint16_t crypto::swap16 ( uint16_t x)
inlinestatic

◆ swap32()

uint32_t crypto::swap32 ( uint32_t x)
inlinestatic

◆ swap64()

uint64_t crypto::swap64 ( uint64_t x)
inlinestatic

◆ tree_branch()

bool crypto::tree_branch ( const char(*) hashes[HASH_SIZE],
size_t count,
const char * hash,
char(*) branch[HASH_SIZE],
size_t * depth,
uint32_t * path )

◆ tree_branch_hash()

bool crypto::tree_branch_hash ( const char hash[HASH_SIZE],
const char(*) branch[HASH_SIZE],
size_t depth,
uint32_t path,
char root[HASH_SIZE] )

◆ tree_hash() [1/2]

void crypto::tree_hash ( const char(*) hashes[HASH_SIZE],
size_t count,
char * root_hash )

◆ tree_hash() [2/2]

void crypto::tree_hash ( const hash * hashes,
std::size_t count,
hash & root_hash )
inline

◆ tree_path()

bool crypto::tree_path ( size_t count,
size_t idx,
uint32_t * path )

Variable Documentation

◆ column_vectors

std::vector<secret_keyV> crypto::column_vectors

◆ ec_point

POD_CLASS crypto::ec_point
Initial value:
{
char data[32]
std::string data
Definition base58.cpp:37

◆ ec_scalar

POD_CLASS crypto::ec_scalar
Initial value:
{
char data[32]

◆ fe_d

const fe crypto::fe_d
extern

◆ fe_d2

const fe crypto::fe_d2
extern

◆ fe_fffb1

const fe crypto::fe_fffb1
extern

◆ fe_fffb2

const fe crypto::fe_fffb2
extern

◆ fe_fffb3

const fe crypto::fe_fffb3
extern

◆ fe_fffb4

const fe crypto::fe_fffb4
extern

◆ fe_ma

const fe crypto::fe_ma
extern

◆ fe_ma2

const fe crypto::fe_ma2
extern

◆ fe_sqrtm1

const fe crypto::fe_sqrtm1
extern

◆ ge_base

const ge_precomp crypto::ge_base[32][8]
extern

◆ ge_Bi

const ge_precomp crypto::ge_Bi[8]
extern

◆ ge_p3_H

const ge_p3 crypto::ge_p3_H
extern

◆ ge_p3_identity

const ge_p3 crypto::ge_p3_identity
extern

◆ hash

POD_CLASS crypto::hash
Initial value:
{
@ HASH_SIZE
Definition hash.h:77

◆ hash8

POD_CLASS crypto::hash8
Initial value:
{
char data[8]

◆ key_derivation

POD_CLASS crypto::key_derivation

◆ key_image

POD_CLASS crypto::key_image

◆ null_hash

crypto::hash crypto::null_hash = {}
staticconstexpr

◆ null_hash8

crypto::hash8 crypto::null_hash8 = {}
staticconstexpr

◆ null_pkey

◆ null_skey

◆ public_key

POD_CLASS crypto::public_key

◆ public_key_memsafe

POD_CLASS crypto::public_key_memsafe

◆ public_keyM

POD_CLASS crypto::public_keyM
Initial value:
{
int cols

◆ public_keyV

POD_CLASS crypto::public_keyV
Initial value:
{
std::vector<public_key> keys

◆ PUSH_WARNINGS

crypto::PUSH_WARNINGS

◆ rows

int crypto::rows

◆ secret_keyV

POD_CLASS crypto::secret_keyV
Initial value:
{
std::vector<secret_key> keys

◆ signature

POD_CLASS crypto::signature
Initial value:
{
ec_scalar c, r
POD_CLASS ec_scalar
Definition crypto.h:59

◆ view_tag

POD_CLASS crypto::view_tag
Initial value:
{
char data