Kagome
Polkadot Runtime Engine in C++17
|
#include <crypto_suites.hpp>
Public Types | |
using | PublicKey = PublicKeyT |
using | PrivateKey = PrivateKeyT |
using | Keypair = KeypairT |
using | KeypairAndSeed = KeypairAndSeedT |
using | Seed = SeedT |
Public Member Functions | |
virtual | ~CryptoSuite ()=default |
virtual outcome::result< Keypair > | generateKeypair (const Seed &seed) const noexcept=0 |
virtual outcome::result< KeypairAndSeed > | generateRandomKeypair () const noexcept=0 |
virtual Keypair | composeKeypair (PublicKey pub, PrivateKey priv) const noexcept=0 |
virtual std::pair< PublicKey, PrivateKey > | decomposeKeypair (const Keypair &kp) const noexcept=0 |
virtual outcome::result< PublicKey > | toPublicKey (gsl::span< const uint8_t > bytes) const noexcept=0 |
virtual outcome::result< Seed > | toSeed (gsl::span< const uint8_t > bytes) const noexcept=0 |
Combination of several crypto primitives belonging to one algorithm
Definition at line 24 of file crypto_suites.hpp.
using kagome::crypto::CryptoSuite< PublicKeyT, PrivateKeyT, KeypairT, KeypairAndSeedT, SeedT >::Keypair = KeypairT |
Definition at line 27 of file crypto_suites.hpp.
using kagome::crypto::CryptoSuite< PublicKeyT, PrivateKeyT, KeypairT, KeypairAndSeedT, SeedT >::KeypairAndSeed = KeypairAndSeedT |
Definition at line 28 of file crypto_suites.hpp.
using kagome::crypto::CryptoSuite< PublicKeyT, PrivateKeyT, KeypairT, KeypairAndSeedT, SeedT >::PrivateKey = PrivateKeyT |
Definition at line 26 of file crypto_suites.hpp.
using kagome::crypto::CryptoSuite< PublicKeyT, PrivateKeyT, KeypairT, KeypairAndSeedT, SeedT >::PublicKey = PublicKeyT |
Definition at line 25 of file crypto_suites.hpp.
using kagome::crypto::CryptoSuite< PublicKeyT, PrivateKeyT, KeypairT, KeypairAndSeedT, SeedT >::Seed = SeedT |
Definition at line 29 of file crypto_suites.hpp.
|
virtualdefault |
|
pure virtualnoexcept |
Create a keypair from a public key and a private key
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.
|
pure virtualnoexcept |
Extrace the private key and the public key from a keypair
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.
|
pure virtualnoexcept |
Genereate a keypair from
seed | (mind that in some algorithms a seed is a private key) |
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.
|
pure virtualnoexcept |
Generate a random keypair (randomness source is determined by an underlying crypto provider)
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.
|
pure virtualnoexcept |
Create a public key from its bytes
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.
|
pure virtualnoexcept |
Create a seed from its bytes
Implemented in kagome::crypto::Sr25519Suite, kagome::crypto::Ed25519Suite, and kagome::crypto::EcdsaSuite.