template <size_t Depth>
cardano::SumKesCompactSignature class

KES signature in compact form.

Template parameters
Depth The depth of the KES key used to create the signature.

Public static variables

static size_t size constexpr
Size of the signature in bytes.

Constructors, destructors, conversion operators

SumKesCompactSignature(std::span<const uint8_t> bytes) explicit
Create a signature object from a span of bytes.

Public functions

auto bytes() const →  const std::array< uint8_t, SumKesCompactSignature< Depth >::size > & -> auto constexpr
Return a constant reference to the signature bytes.
auto recompute(uint32_t period, std::span<const uint8_t> msg) const →  KesPublicKey
Recompute the root of the subtree, and verify ed25519 if on a leaf.
auto verify(uint32_t period, const KesPublicKey& pk, std::span<const uint8_t> msg) const →  bool
Verify the KES compact signature.
auto verify(uint32_t period, const KesPublicKey& pk, std::string_view msg) const →  bool
Verify the KES signature.

Function documentation

template <size_t Depth>
cardano::SumKesCompactSignature::SumKesCompactSignature(std::span<const uint8_t> bytes) explicit

Create a signature object from a span of bytes.

Parameters
bytes The signature byte string.

template <size_t Depth>
KesPublicKey cardano::SumKesCompactSignature::recompute(uint32_t period, std::span<const uint8_t> msg) const

Recompute the root of the subtree, and verify ed25519 if on a leaf.

Parameters
period The KES period of the signature.
msg The message used to create the signature (bytes).

template <size_t Depth>
bool cardano::SumKesCompactSignature::verify(uint32_t period, const KesPublicKey& pk, std::span<const uint8_t> msg) const

Verify the KES compact signature.

Parameters
period The KES period of the signature.
pk The KES public key.
msg The message used to create the signature (bytes).

template <size_t Depth>
bool cardano::SumKesCompactSignature::verify(uint32_t period, const KesPublicKey& pk, std::string_view msg) const

Verify the KES signature.

Parameters
period The KES period of the signature.
pk The KES public key.
msg The message used to create the signature (string).