class
KesVerificationKeyA KES verification key used by stake pools to verify block signatures.
Base classes
- class cardano::KesPublicKey
Constructors, destructors, conversion operators
-
KesVerificationKey(std::
span<const uint8_t, 32> pub) explicit - Construct a verification key object from a span of key bytes.
Public functions
- auto asEd25519() const → ed25519::PublicKey
- Convert to an Ed25519 public key.
- auto bytes() const → const std::array< uint8_t, size > & -> auto constexpr
- Return a constant reference to the public key bytes.
- auto hash_pair(const KesPublicKey& other) const → KesPublicKey
- Hash two public keys using Blake2b.
-
void saveToFile(std::
string_view fpath) const - Export the key to a file in the cardano node JSON format.
-
auto verifySignature(uint32_t period,
std::
span<const uint8_t> msg, std:: span<const uint8_t, STAKE_ POOL_ KES_ SIGNATURE_ SIZE> sig) const → bool - Verify a signature using the KES verification key.
Function documentation
cardano:: stake_pool:: KesVerificationKey:: KesVerificationKey(std:: span<const uint8_t, 32> pub) explicit
Construct a verification key object from a span of key bytes.
Parameters | |
---|---|
pub | A span of 32 bytes that will be copied into the object. |
void cardano:: stake_pool:: KesVerificationKey:: saveToFile(std:: string_view fpath) const
Export the key to a file in the cardano node JSON format.
Parameters | |
---|---|
fpath | Path to the file to be (over)written. |
bool cardano:: stake_pool:: KesVerificationKey:: verifySignature(uint32_t period,
std:: span<const uint8_t> msg,
std:: span<const uint8_t, STAKE_ POOL_ KES_ SIGNATURE_ SIZE> sig) const
Verify a signature using the KES verification key.
Parameters | |
---|---|
period | The KES key period. |
msg | A span of bytes (uint8_t) representing the original message. |
sig | A span of 448 bytes (uint8_t) representing the signature. |