Electroneum
crypto::crypto_ops Class Reference

#include <crypto.h>

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_input_signature (const hash prefix_hash, const uint32_t input_index, const secret_key sec_view, const secret_key sec_spend, signature &sig)
 
bool verify_input_signature (const hash &prefix_hash, const uint32_t input_index, const public_key pub_view, const public_key pub_spend, signature sig)
 
public_key addKeys (const public_key &A, const public_key &B)
 
secret_key addSecretKeys (const secret_key &A, const secret_key &B)
 
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)
 

Detailed Description

Definition at line 138 of file crypto.h.

Friends And Related Function Documentation

◆ addKeys

public_key addKeys ( const public_key A,
const public_key B 
)
friend

Definition at line 337 of file crypto.h.

337  {
338  return crypto_ops::addKeys(A, B);
339  }
Matcher< T > A()

◆ addSecretKeys

secret_key addSecretKeys ( const secret_key A,
const secret_key B 
)
friend

◆ 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

Definition at line 254 of file crypto.h.

254  {
255  return crypto_ops::check_key(key);
256  }
const char * key
Definition: hmac_keccak.cpp:39

◆ 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

Definition at line 331 of file crypto.h.

333  {
334  return crypto_ops::check_ring_signature(prefix_hash, image, pubs, pubs_count, sig);
335  }

◆ check_signature

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

Definition at line 293 of file crypto.h.

293  {
294  return crypto_ops::check_signature(prefix_hash, pub, sig);
295  }

◆ 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

Definition at line 312 of file crypto.h.

312  {
313  return crypto_ops::check_tx_proof(prefix_hash, R, A, B, D, sig);
314  }

◆ create_ed25519_keypair

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

Definition at line 386 of file crypto.h.

386  {
387  return crypto_ops::create_ed25519_keypair();
388  }

◆ derivation_to_scalar

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

Definition at line 277 of file crypto.h.

277  {
278  return crypto_ops::derivation_to_scalar(derivation, output_index, res);
279  }
const char * res
Definition: hmac_keccak.cpp:41

◆ 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

Definition at line 273 of file crypto.h.

274  {
275  return crypto_ops::derive_public_key(derivation, output_index, base, derived_key);
276  }

◆ 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

Definition at line 280 of file crypto.h.

281  {
282  crypto_ops::derive_secret_key(derivation, output_index, base, derived_key);
283  }

◆ 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

Definition at line 284 of file crypto.h.

284  {
285  return crypto_ops::derive_subaddress_public_key(out_key, derivation, output_index, result);
286  }

◆ generate_input_signature

void generate_input_signature ( const hash  prefix_hash,
const uint32_t  input_index,
const secret_key  sec_view,
const secret_key  sec_spend,
signature sig 
)
friend

Definition at line 297 of file crypto.h.

297  {
298  return crypto_ops::generate_input_signature(prefix_hash, input_index, sec_view, sec_spend, sig);
299  }

◆ generate_key_derivation

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

Definition at line 270 of file crypto.h.

270  {
271  return crypto_ops::generate_key_derivation(key1, key2, derivation);
272  }

◆ generate_key_image

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

Definition at line 322 of file crypto.h.

322  {
323  crypto_ops::generate_key_image(pub, sec, image);
324  }

◆ generate_keys

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

Definition at line 248 of file crypto.h.

248  {
249  return crypto_ops::generate_keys(pub, sec, recovery_key, recover);
250  }

◆ 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

Definition at line 325 of file crypto.h.

328  {
329  crypto_ops::generate_ring_signature(prefix_hash, image, pubs, pubs_count, sec, sec_index, sig);
330  }

◆ generate_signature

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

Definition at line 290 of file crypto.h.

290  {
291  crypto_ops::generate_signature(prefix_hash, pub, sec, sig);
292  }

◆ 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

Definition at line 309 of file crypto.h.

309  {
310  crypto_ops::generate_tx_proof(prefix_hash, R, A, B, D, r, sig);
311  }

◆ secret_key_to_public_key

bool secret_key_to_public_key ( const secret_key sec,
public_key pub 
)
friend

Definition at line 260 of file crypto.h.

260  {
261  return crypto_ops::secret_key_to_public_key(sec, pub);
262  }

◆ sign_message

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

Definition at line 374 of file crypto.h.

374  {
375  return crypto_ops::sign_message(message, privateKey);
376  }
std::string privateKey
std::string message("Message requiring signing")

◆ verify_input_signature

bool verify_input_signature ( const hash prefix_hash,
const uint32_t  input_index,
const public_key  pub_view,
const public_key  pub_spend,
signature  sig 
)
friend

Definition at line 301 of file crypto.h.

301  {
302  return crypto_ops::verify_input_signature(prefix_hash, input_index, pub_view, pub_spend, sig);
303  }

◆ verify_signature [1/2]

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

Definition at line 378 of file crypto.h.

378  {
379  return crypto_ops::verify_signature(message, publicKey, signature);
380  }
std::string publicKey
POD_CLASS signature
Definition: crypto.h:108

◆ verify_signature [2/2]

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

Definition at line 382 of file crypto.h.

382  {
383  return crypto_ops::verify_signature(message, publicKey, signature);
384  }

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