Electroneum
Private Member Functions | Static Private Member Functions | Friends | List of all members
crypto::crypto_ops Class Reference

#include <crypto.h>

Private Member Functions

 crypto_ops ()
 
 crypto_ops (const crypto_ops &)
 
void operator= (const crypto_ops &)
 
 ~crypto_ops ()
 

Static Private Member Functions

static secret_key generate_keys (public_key &pub, secret_key &sec, const secret_key &recovery_key=secret_key(), bool recover=false)
 
static bool check_key (const public_key &)
 
static bool secret_key_to_public_key (const secret_key &, public_key &)
 
static bool generate_key_derivation (const public_key &, const secret_key &, key_derivation &)
 
static void derivation_to_scalar (const key_derivation &derivation, size_t output_index, ec_scalar &res)
 
static bool derive_public_key (const key_derivation &, std::size_t, const public_key &, public_key &)
 
static void derive_secret_key (const key_derivation &, std::size_t, const secret_key &, secret_key &)
 
static bool derive_subaddress_public_key (const public_key &, const key_derivation &, std::size_t, public_key &)
 
static void generate_signature (const hash &, const public_key &, const secret_key &, signature &)
 
static bool check_signature (const hash &, const public_key &, const signature &)
 
static void generate_tx_proof (const hash &, const public_key &, const public_key &, const boost::optional< public_key > &, const public_key &, const secret_key &, signature &)
 
static bool check_tx_proof (const hash &, const public_key &, const public_key &, const boost::optional< public_key > &, const public_key &, const signature &)
 
static void generate_key_image (const public_key &, const secret_key &, key_image &)
 
static void generate_ring_signature (const hash &, const key_image &, const public_key *const *, std::size_t, const secret_key &, std::size_t, signature *)
 
static bool check_ring_signature (const hash &, const key_image &, const public_key *const *, std::size_t, const signature *)
 
static std::string sign_message (const std::string &message, const std::string &privateKey)
 
static bool verify_signature (const std::string &message, const std::string &publicKey, const std::string &signature)
 
static bool verify_signature (const std::string &message, std::vector< std::string > publicKey, const std::string &signature)
 
static std::vector< std::string > create_ed25519_keypair ()
 
static std::string base64_decode (std::string val)
 
static std::string base64_encode (std::string val)
 

Friends

secret_key generate_keys (public_key &pub, secret_key &sec, const secret_key &recovery_key, bool recover)
 
bool check_key (const public_key &)
 
bool secret_key_to_public_key (const secret_key &, public_key &)
 
bool generate_key_derivation (const public_key &, const secret_key &, key_derivation &)
 
void derivation_to_scalar (const key_derivation &derivation, size_t output_index, ec_scalar &res)
 
bool derive_public_key (const key_derivation &, std::size_t, const public_key &, public_key &)
 
void derive_secret_key (const key_derivation &, std::size_t, const secret_key &, secret_key &)
 
bool derive_subaddress_public_key (const public_key &, const key_derivation &, std::size_t, public_key &)
 
void generate_signature (const hash &, const public_key &, const secret_key &, signature &)
 
bool check_signature (const hash &, const public_key &, const signature &)
 
void generate_tx_proof (const hash &, const public_key &, const public_key &, const boost::optional< public_key > &, const public_key &, const secret_key &, signature &)
 
bool check_tx_proof (const hash &, const public_key &, const public_key &, const boost::optional< public_key > &, const public_key &, const signature &)
 
void generate_key_image (const public_key &, const secret_key &, key_image &)
 
void generate_ring_signature (const hash &, const key_image &, const public_key *const *, std::size_t, const secret_key &, std::size_t, signature *)
 
bool check_ring_signature (const hash &, const key_image &, const public_key *const *, std::size_t, const signature *)
 
std::string sign_message (const std::string &message, const std::string &privateKey)
 
bool verify_signature (const std::string &message, const std::string &publicKey, const std::string &signature)
 
bool verify_signature (const std::string &message, std::vector< std::string > publicKey, const std::string &signature)
 
std::vector< std::string > create_ed25519_keypair ()
 
std::string base64_decode (std::string val)
 
std::string base64_encode (std::string val)
 

Constructor & Destructor Documentation

◆ crypto_ops() [1/2]

crypto::crypto_ops::crypto_ops ( )
private

◆ crypto_ops() [2/2]

crypto::crypto_ops::crypto_ops ( const crypto_ops )
private

◆ ~crypto_ops()

crypto::crypto_ops::~crypto_ops ( )
private

Member Function Documentation

◆ base64_decode()

static std::string crypto::crypto_ops::base64_decode ( std::string  val)
staticprivate

◆ base64_encode()

static std::string crypto::crypto_ops::base64_encode ( std::string  val)
staticprivate

◆ check_key()

bool crypto::crypto_ops::check_key ( const public_key key)
staticprivate

◆ check_ring_signature()

static bool crypto::crypto_ops::check_ring_signature ( const hash ,
const key_image ,
const public_key *const *  ,
std::size_t  ,
const signature  
)
staticprivate

◆ check_signature()

bool crypto::crypto_ops::check_signature ( const hash prefix_hash,
const public_key pub,
const signature sig 
)
staticprivate

◆ check_tx_proof()

bool crypto::crypto_ops::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 
)
staticprivate

◆ create_ed25519_keypair()

std::vector< std::string > crypto::crypto_ops::create_ed25519_keypair ( )
staticprivate

◆ derivation_to_scalar()

void crypto::crypto_ops::derivation_to_scalar ( const key_derivation derivation,
size_t  output_index,
ec_scalar res 
)
staticprivate

◆ derive_public_key()

static bool crypto::crypto_ops::derive_public_key ( const key_derivation ,
std::size_t  ,
const public_key ,
public_key  
)
staticprivate

◆ derive_secret_key()

static void crypto::crypto_ops::derive_secret_key ( const key_derivation ,
std::size_t  ,
const secret_key ,
secret_key  
)
staticprivate

◆ derive_subaddress_public_key()

bool crypto::crypto_ops::derive_subaddress_public_key ( const public_key out_key,
const key_derivation derivation,
std::size_t  output_index,
public_key derived_key 
)
staticprivate

◆ generate_key_derivation()

bool crypto::crypto_ops::generate_key_derivation ( const public_key key1,
const secret_key key2,
key_derivation derivation 
)
staticprivate

◆ generate_key_image()

void crypto::crypto_ops::generate_key_image ( const public_key pub,
const secret_key sec,
key_image image 
)
staticprivate

◆ generate_keys()

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

◆ generate_ring_signature()

static void crypto::crypto_ops::generate_ring_signature ( const hash ,
const key_image ,
const public_key *const *  ,
std::size_t  ,
const secret_key ,
std::size_t  ,
signature  
)
staticprivate

◆ generate_signature()

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

◆ generate_tx_proof()

void crypto::crypto_ops::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 
)
staticprivate

◆ operator=()

void crypto::crypto_ops::operator= ( const crypto_ops )
private

◆ secret_key_to_public_key()

bool crypto::crypto_ops::secret_key_to_public_key ( const secret_key sec,
public_key pub 
)
staticprivate

◆ sign_message()

std::string crypto::crypto_ops::sign_message ( const std::string &  message,
const std::string &  privateKey 
)
staticprivate

◆ verify_signature() [1/2]

bool crypto::crypto_ops::verify_signature ( const std::string &  message,
const std::string &  publicKey,
const std::string &  signature 
)
staticprivate

◆ verify_signature() [2/2]

bool crypto::crypto_ops::verify_signature ( const std::string &  message,
std::vector< std::string >  publicKey,
const std::string &  signature 
)
staticprivate

Friends And Related Function Documentation

◆ base64_decode

std::string base64_decode ( std::string  val)
friend

◆ base64_encode

std::string base64_encode ( std::string  val)
friend

◆ check_key

bool check_key ( const public_key key)
friend

◆ check_ring_signature

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 
)
friend

◆ check_signature

bool check_signature ( const hash prefix_hash,
const public_key pub,
const signature sig 
)
friend

◆ check_tx_proof

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 
)
friend

◆ create_ed25519_keypair

std::vector<std::string> create_ed25519_keypair ( )
friend

◆ derivation_to_scalar

void derivation_to_scalar ( const key_derivation derivation,
size_t  output_index,
ec_scalar res 
)
friend

◆ derive_public_key

bool derive_public_key ( const key_derivation derivation,
std::size_t  output_index,
const public_key base,
public_key derived_key 
)
friend

◆ derive_secret_key

void derive_secret_key ( const key_derivation derivation,
std::size_t  output_index,
const secret_key base,
secret_key derived_key 
)
friend

◆ derive_subaddress_public_key

bool derive_subaddress_public_key ( const public_key out_key,
const key_derivation derivation,
std::size_t  output_index,
public_key result 
)
friend

◆ generate_key_derivation

bool generate_key_derivation ( const public_key key1,
const secret_key key2,
key_derivation derivation 
)
friend

◆ generate_key_image

void generate_key_image ( const public_key pub,
const secret_key sec,
key_image image 
)
friend

◆ generate_keys

secret_key generate_keys ( public_key pub,
secret_key sec,
const secret_key recovery_key = secret_key(),
bool  recover = false 
)
friend

◆ generate_ring_signature

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 
)
friend

◆ generate_signature

void generate_signature ( const hash prefix_hash,
const public_key pub,
const secret_key sec,
signature sig 
)
friend

◆ generate_tx_proof

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 
)
friend

◆ secret_key_to_public_key

bool secret_key_to_public_key ( const secret_key sec,
public_key pub 
)
friend

◆ sign_message

std::string sign_message ( const std::string &  message,
const std::string &  privateKey 
)
friend

◆ verify_signature [1/2]

bool verify_signature ( const std::string &  message,
const std::string &  publicKey,
const std::string &  signature 
)
friend

◆ verify_signature [2/2]

bool verify_signature ( const std::string &  message,
std::vector< std::string >  publicKey,
const std::string &  signature 
)
friend

The documentation for this class was generated from the following files: