6#ifndef __SIGNUTIL__HPP__
7#define __SIGNUTIL__HPP__
13#include <veriblock/pop/blob.hpp>
14#include <veriblock/pop/slice.hpp>
17template <
class ElementType>
22static const size_t PRIVATE_KEY_SIZE = 32;
23static const size_t PUBLIC_KEY_COMPRESSED_SIZE = 33;
24static const size_t PUBLIC_KEY_UNCOMPRESSED_SIZE = 65;
26using PrivateKey = Blob<PRIVATE_KEY_SIZE>;
27using PublicKey = Blob<PUBLIC_KEY_UNCOMPRESSED_SIZE>;
28using Signature = std::vector<uint8_t>;
31using PrivateKeyVbk = std::vector<uint8_t>;
32using PublicKeyVbk = std::vector<uint8_t>;
40PrivateKey privateKeyFromVbk(PrivateKeyVbk key);
48PublicKey publicKeyFromVbk(PublicKeyVbk key);
56PublicKeyVbk publicKeyToVbk(PublicKey key);
64PublicKey derivePublicKey(PrivateKey privateKey);
75Signature sign(Slice<const uint8_t> message, PrivateKey privateKey);
90bool verify(Slice<const uint8_t> message,