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

#include "crypto_provider.hpp"

Collaboration diagram for shared_model::crypto::CryptoProviderEd25519Ursa:
Collaboration graph

Static Public Member Functions

static std::string sign (const Blob &blob, const Keypair &keypair)
 
static bool verify (shared_model::interface::types::ByteRange signed_data, shared_model::interface::types::ByteRange source, shared_model::interface::types::ByteRange public_key)
 
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 = 512 / 8
 
static constexpr size_t kSignatureLength = 512 / 8
 

Detailed Description

Wrapper class for signing-related stuff.

Member Function Documentation

◆ generateKeypair() [1/3]

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

Generates new keypair with a default seed

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

◆ generateKeypair() [2/3]

Keypair shared_model::crypto::CryptoProviderEd25519Ursa::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::CryptoProviderEd25519Ursa::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:

◆ sign()

std::string shared_model::crypto::CryptoProviderEd25519Ursa::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:

◆ verify()

bool shared_model::crypto::CryptoProviderEd25519Ursa::verify ( shared_model::interface::types::ByteRange  signed_data,
shared_model::interface::types::ByteRange  source,
shared_model::interface::types::ByteRange  public_key 
)
static

Verifies signature.

Parameters
signedData- data to verify
orig- original message
publicKey- public key
Returns
true if verify was OK or false otherwise

Member Data Documentation

◆ kHashLength

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

◆ kPrivateKeyLength

constexpr size_t shared_model::crypto::CryptoProviderEd25519Ursa::kPrivateKeyLength = 512 / 8
static

◆ kPublicKeyLength

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

◆ kSignatureLength

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

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