6 #ifndef KAGOME_CORE_CRYPTO_ECDSA_PROVIDER_HPP 7 #define KAGOME_CORE_CRYPTO_ECDSA_PROVIDER_HPP 21 virtual outcome::result<EcdsaKeypairAndSeed>
generate()
const = 0;
23 virtual outcome::result<EcdsaPublicKey>
derive(
26 virtual outcome::result<EcdsaSignature>
sign(
27 gsl::span<const uint8_t> message,
const EcdsaPrivateKey &key)
const = 0;
31 const EcdsaPrivateKey &key)
const = 0;
33 virtual outcome::result<bool>
verify(
34 gsl::span<const uint8_t> message,
36 const EcdsaPublicKey &publicKey)
const = 0;
41 const EcdsaPublicKey &publicKey)
const = 0;
45 #endif // KAGOME_CORE_CRYPTO_ECDSA_PROVIDER_HPP std::vector< uint8_t > EcdsaSignature
virtual outcome::result< EcdsaSignature > sign(gsl::span< const uint8_t > message, const EcdsaPrivateKey &key) const =0
virtual outcome::result< EcdsaSignature > signPrehashed(const EcdsaPrehashedMessage &message, const EcdsaPrivateKey &key) const =0
libp2p::crypto::ecdsa::PrehashedMessage EcdsaPrehashedMessage
virtual outcome::result< EcdsaPublicKey > derive(const EcdsaSeed &seed) const =0
virtual outcome::result< bool > verify(gsl::span< const uint8_t > message, const EcdsaSignature &signature, const EcdsaPublicKey &publicKey) const =0
virtual ~EcdsaProvider()=default
virtual outcome::result< EcdsaKeypairAndSeed > generate() const =0
virtual outcome::result< bool > verifyPrehashed(const EcdsaPrehashedMessage &message, const EcdsaSignature &signature, const EcdsaPublicKey &publicKey) const =0