Kagome
Polkadot Runtime Engine in C++17
|
#include <crypto_extension.hpp>
Static Public Attributes | |
static constexpr uint32_t | kVerifyBatchSuccess = 1 |
static constexpr uint32_t | kVerifyBatchFail = 0 |
static constexpr uint32_t | kVerifySuccess = 1 |
static constexpr uint32_t | kVerifyFail = 0 |
Private Member Functions | |
common::Blob< 32 > | deriveSeed (std::string_view content) |
runtime::Memory & | getMemory () const |
Private Attributes | |
std::shared_ptr< const runtime::MemoryProvider > | memory_provider_ |
std::shared_ptr< const crypto::Sr25519Provider > | sr25519_provider_ |
std::shared_ptr< const crypto::EcdsaProvider > | ecdsa_provider_ |
std::shared_ptr< const crypto::Ed25519Provider > | ed25519_provider_ |
std::shared_ptr< const crypto::Secp256k1Provider > | secp256k1_provider_ |
std::shared_ptr< const crypto::Hasher > | hasher_ |
std::shared_ptr< crypto::CryptoStore > | crypto_store_ |
std::shared_ptr< const crypto::Bip39Provider > | bip39_provider_ |
log::Logger | logger_ |
Implements extension functions related to cryptography
Definition at line 33 of file crypto_extension.hpp.
kagome::host_api::CryptoExtension::CryptoExtension | ( | std::shared_ptr< const runtime::MemoryProvider > | memory_provider, |
std::shared_ptr< const crypto::Sr25519Provider > | sr25519_provider, | ||
std::shared_ptr< const crypto::EcdsaProvider > | ecdsa_provider, | ||
std::shared_ptr< const crypto::Ed25519Provider > | ed25519_provider, | ||
std::shared_ptr< const crypto::Secp256k1Provider > | secp256k1_provider, | ||
std::shared_ptr< const crypto::Hasher > | hasher, | ||
std::shared_ptr< crypto::CryptoStore > | crypto_store, | ||
std::shared_ptr< const crypto::Bip39Provider > | bip39_provider | ||
) |
Definition at line 63 of file crypto_extension.cpp.
|
private |
Definition at line 196 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_crypto_ecdsa_generate_version_1 | ( | runtime::WasmSize | key_type_id, |
runtime::WasmSpan | seed | ||
) | const |
Definition at line 668 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_ecdsa_public_keys_version_1 | ( | runtime::WasmSize | key_type | ) |
Definition at line 573 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_ecdsa_sign_prehashed_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmPointer | key, | ||
runtime::WasmSpan | msg | ||
) |
Definition at line 630 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_ecdsa_sign_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmPointer | key, | ||
runtime::WasmSpan | msg | ||
) |
Definition at line 595 of file crypto_extension.cpp.
int32_t kagome::host_api::CryptoExtension::ext_crypto_ecdsa_verify_prehashed_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmSpan | msg, | ||
runtime::WasmPointer | key | ||
) | const |
Definition at line 729 of file crypto_extension.cpp.
int32_t kagome::host_api::CryptoExtension::ext_crypto_ecdsa_verify_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmSpan | msg, | ||
runtime::WasmPointer | key | ||
) | const |
Definition at line 704 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_crypto_ed25519_generate_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmSpan | seed | ||
) |
Definition at line 235 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_ed25519_public_keys_version_1 | ( | runtime::WasmSize | key_type | ) |
Definition at line 175 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_ed25519_sign_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmPointer | key, | ||
runtime::WasmSpan | msg | ||
) |
Definition at line 267 of file crypto_extension.cpp.
runtime::WasmSize kagome::host_api::CryptoExtension::ext_crypto_ed25519_verify_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmSpan | msg, | ||
runtime::WasmPointer | pubkey_data | ||
) |
Definition at line 304 of file crypto_extension.cpp.
runtime::WasmSize kagome::host_api::CryptoExtension::ext_crypto_finish_batch_verify_version_1 | ( | ) |
Definition at line 170 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_secp256k1_ecdsa_recover_compressed_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmPointer | msg | ||
) |
Definition at line 542 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_secp256k1_ecdsa_recover_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmPointer | msg | ||
) |
Definition at line 501 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_crypto_sr25519_generate_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmSpan | seed | ||
) |
Definition at line 358 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_sr25519_public_keys_version_1 | ( | runtime::WasmSize | key_type | ) |
Definition at line 336 of file crypto_extension.cpp.
runtime::WasmSpan kagome::host_api::CryptoExtension::ext_crypto_sr25519_sign_version_1 | ( | runtime::WasmSize | key_type, |
runtime::WasmPointer | key, | ||
runtime::WasmSpan | msg | ||
) |
Definition at line 394 of file crypto_extension.cpp.
int32_t kagome::host_api::CryptoExtension::ext_crypto_sr25519_verify_version_1 | ( | runtime::WasmPointer | sig, |
runtime::WasmSpan | msg, | ||
runtime::WasmPointer | pubkey_data | ||
) |
Definition at line 434 of file crypto_extension.cpp.
int32_t kagome::host_api::CryptoExtension::ext_crypto_sr25519_verify_version_2 | ( | runtime::WasmPointer | sig, |
runtime::WasmSpan | msg, | ||
runtime::WasmPointer | pubkey_data | ||
) |
Definition at line 466 of file crypto_extension.cpp.
void kagome::host_api::CryptoExtension::ext_crypto_start_batch_verify_version_1 | ( | ) |
Definition at line 165 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_blake2_128_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 115 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_blake2_256_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 125 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_keccak_256_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 94 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_sha2_256_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 105 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_twox_128_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 145 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_twox_256_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 155 of file crypto_extension.cpp.
runtime::WasmPointer kagome::host_api::CryptoExtension::ext_hashing_twox_64_version_1 | ( | runtime::WasmSpan | data | ) |
Definition at line 135 of file crypto_extension.cpp.
|
inlineprivate |
Definition at line 215 of file crypto_extension.hpp.
|
private |
Definition at line 226 of file crypto_extension.hpp.
|
private |
Definition at line 225 of file crypto_extension.hpp.
|
private |
Definition at line 221 of file crypto_extension.hpp.
|
private |
Definition at line 222 of file crypto_extension.hpp.
|
private |
Definition at line 224 of file crypto_extension.hpp.
|
static |
Definition at line 36 of file crypto_extension.hpp.
|
static |
Definition at line 35 of file crypto_extension.hpp.
|
static |
Definition at line 38 of file crypto_extension.hpp.
|
static |
Definition at line 37 of file crypto_extension.hpp.
|
private |
Definition at line 227 of file crypto_extension.hpp.
|
private |
Definition at line 219 of file crypto_extension.hpp.
|
private |
Definition at line 223 of file crypto_extension.hpp.
|
private |
Definition at line 220 of file crypto_extension.hpp.