Electroneum
Loading...
Searching...
No Matches
crypto::crypto_ops Class Reference

#include <crypto.h>

Friends

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)
void derivation_to_scalar (const key_derivation &derivation, size_t output_index, ec_scalar &res)
bool derive_public_key (const key_derivation &derivation, std::size_t output_index, const public_key &base, public_key &derived_key)
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)
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)
void generate_key_image (const public_key &pub, const secret_key &sec, key_image &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 &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)
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 140 of file crypto.h.

◆ addKeys

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

Definition at line 339 of file crypto.h.

339 {
340 return crypto_ops::addKeys(A, B);
341 }

◆ 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 256 of file crypto.h.

256 {
257 return crypto_ops::check_key(key);
258 }
const char * key

◆ 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 333 of file crypto.h.

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

◆ check_signature

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

Definition at line 295 of file crypto.h.

295 {
296 return crypto_ops::check_signature(prefix_hash, pub, sig);
297 }

◆ 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 314 of file crypto.h.

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

◆ create_ed25519_keypair

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

Definition at line 388 of file crypto.h.

388 {
390 }
friend std::vector< std::string > create_ed25519_keypair()
Definition crypto.h:388

◆ derivation_to_scalar

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

Definition at line 279 of file crypto.h.

279 {
280 return crypto_ops::derivation_to_scalar(derivation, output_index, res);
281 }
const char * res

◆ 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 275 of file crypto.h.

276 {
277 return crypto_ops::derive_public_key(derivation, output_index, base, derived_key);
278 }

◆ 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 282 of file crypto.h.

283 {
284 crypto_ops::derive_secret_key(derivation, output_index, base, derived_key);
285 }

◆ 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 286 of file crypto.h.

286 {
287 return crypto_ops::derive_subaddress_public_key(out_key, derivation, output_index, result);
288 }

◆ 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 299 of file crypto.h.

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

◆ generate_key_derivation

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

Definition at line 272 of file crypto.h.

272 {
273 return crypto_ops::generate_key_derivation(key1, key2, derivation);
274 }

◆ generate_key_image

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

Definition at line 324 of file crypto.h.

324 {
325 crypto_ops::generate_key_image(pub, sec, image);
326 }

◆ 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 250 of file crypto.h.

250 {
251 return crypto_ops::generate_keys(pub, sec, recovery_key, recover);
252 }

◆ 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 327 of file crypto.h.

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

◆ generate_signature

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

Definition at line 292 of file crypto.h.

292 {
293 crypto_ops::generate_signature(prefix_hash, pub, sec, sig);
294 }

◆ 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 311 of file crypto.h.

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

◆ secret_key_to_public_key

bool secret_key_to_public_key ( const secret_key & sec,
public_key & pub )
friend

Definition at line 262 of file crypto.h.

262 {
263 return crypto_ops::secret_key_to_public_key(sec, pub);
264 }

◆ sign_message

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

Definition at line 376 of file crypto.h.

376 {
377 return crypto_ops::sign_message(message, privateKey);
378 }
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 303 of file crypto.h.

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

◆ verify_signature [1/2]

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

Definition at line 380 of file crypto.h.

380 {
381 return crypto_ops::verify_signature(message, publicKey, signature);
382 }
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 384 of file crypto.h.

384 {
385 return crypto_ops::verify_signature(message, publicKey, signature);
386 }

The documentation for this class was generated from the following files:
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/crypto/crypto.h
  • /home/abuild/rpmbuild/BUILD/electroneum-5.1.3.1-build/electroneum-5.1.3.1/src/crypto/crypto.cpp