Kagome
Polkadot Runtime Engine in C++17
ecdsa_types.hpp
Go to the documentation of this file.
1 
6 #ifndef KAGOME_CORE_CRYPTO_ECDSA_TYPES_HPP
7 #define KAGOME_CORE_CRYPTO_ECDSA_TYPES_HPP
8 
9 #include <cstdint>
10 
11 #include <libp2p/crypto/ecdsa_types.hpp>
12 
13 #include "common/blob.hpp"
14 
15 namespace kagome::crypto {
16  namespace constants::ecdsa {
17  enum {
18  PRIVKEY_SIZE = sizeof(libp2p::crypto::ecdsa::PrivateKey),
20  SIGNATURE_SIZE = 65, // As according to spec in D.3.14.
22  };
23  }
24 } // namespace kagome::crypto
25 
27  EcdsaPrivateKey,
30  EcdsaPublicKey,
32 
33 namespace kagome::crypto {
34 
35  struct EcdsaKeypair {
36  EcdsaPrivateKey secret_key;
37  EcdsaPublicKey public_key;
38 
39  bool operator==(const EcdsaKeypair &other) const;
40  bool operator!=(const EcdsaKeypair &other) const;
41  };
42 
43  using EcdsaSignature = std::vector<uint8_t>;
45  using EcdsaPrehashedMessage = libp2p::crypto::ecdsa::PrehashedMessage;
46 
49  };
50 } // namespace kagome::crypto
51 
52 #endif // KAGOME_CORE_CRYPTO_ECDSA_TYPES_HPP
std::vector< uint8_t > EcdsaSignature
Definition: ecdsa_types.hpp:43
common::Blob< constants::kGeneralPublicKeySize > PublicKey
libp2p::crypto::ecdsa::PrehashedMessage EcdsaPrehashedMessage
Definition: ecdsa_types.hpp:45
bool operator==(const Unused< N > &, const Unused< N > &)
Definition: unused.hpp:27
KAGOME_BLOB_STRICT_TYPEDEF(kagome::crypto, EcdsaPrivateKey, constants::ecdsa::PRIVKEY_SIZE)