hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::crypto::CryptoProviderEd25519Sha3 Class Reference

#include "crypto_provider.hpp"

Collaboration diagram for shared_model::crypto::CryptoProviderEd25519Sha3:
Collaboration graph

Static Public Member Functions

static std::string sign (const Blob &blob, const Keypair &keypair)
 
static bool verify (shared_model::interface::types::SignatureByteRangeView signature, const Blob &orig, shared_model::interface::types::PublicKeyByteRangeView public_key)
 
static Seed generateSeed ()
 
static Seed generateSeed (const std::string &passphrase)
 
static Keypair generateKeypair ()
 
static Keypair generateKeypair (const Seed &seed)
 
static Keypair generateKeypair (const PrivateKey &key)
 

Static Public Attributes

static constexpr size_t kHashLength = 256 / 8
 
static constexpr size_t kPublicKeyLength = 256 / 8
 
static constexpr size_t kPrivateKeyLength = 256 / 8
 
static constexpr size_t kSignatureLength = 512 / 8
 
static constexpr size_t kSeedLength = 256 / 8
 

Detailed Description

Wrapper class for signing-related stuff.

Member Function Documentation

◆ generateKeypair() [1/3]

Keypair shared_model::crypto::CryptoProviderEd25519Sha3::generateKeypair ( )
static

Generates new keypair with a default seed

Returns
Keypair generated
Here is the caller graph for this function:

◆ generateKeypair() [2/3]

Keypair shared_model::crypto::CryptoProviderEd25519Sha3::generateKeypair ( const Seed seed)
static

Generates new keypair from a provided seed

Parameters
seed- provided seed
Returns
generated keypair
Here is the call graph for this function:

◆ generateKeypair() [3/3]

Keypair shared_model::crypto::CryptoProviderEd25519Sha3::generateKeypair ( const PrivateKey key)
static

Generates new keypair from a provided private key

Parameters
key- private key for the new keypair
Returns
generated keypair
Here is the call graph for this function:

◆ generateSeed() [1/2]

Seed shared_model::crypto::CryptoProviderEd25519Sha3::generateSeed ( )
static

Generates new seed

Returns
Seed generated
Here is the call graph for this function:

◆ generateSeed() [2/2]

Seed shared_model::crypto::CryptoProviderEd25519Sha3::generateSeed ( const std::string &  passphrase)
static

Generates new seed from a provided passphrase

Parameters
passphrase- passphrase to generate seed from
Returns
Seed generated
Here is the call graph for this function:

◆ sign()

std::string shared_model::crypto::CryptoProviderEd25519Sha3::sign ( const Blob blob,
const Keypair keypair 
)
static

Signs the message.

Parameters
blob- blob to sign
keypair- keypair
Returns
hex signature data string
Here is the call graph for this function:
Here is the caller graph for this function:

◆ verify()

bool shared_model::crypto::CryptoProviderEd25519Sha3::verify ( shared_model::interface::types::SignatureByteRangeView  signature,
const Blob orig,
shared_model::interface::types::PublicKeyByteRangeView  public_key 
)
static

Verifies signature.

Parameters
signature- data to verify
orig- original message
public_key- public key
Returns
true if verify was OK or false otherwise
Here is the call graph for this function:

Member Data Documentation

◆ kHashLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Sha3::kHashLength = 256 / 8
static

◆ kPrivateKeyLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Sha3::kPrivateKeyLength = 256 / 8
static

◆ kPublicKeyLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Sha3::kPublicKeyLength = 256 / 8
static

◆ kSeedLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Sha3::kSeedLength = 256 / 8
static

◆ kSignatureLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Sha3::kSignatureLength = 512 / 8
static

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