diff --git a/blockchain_integration/pi_network/dapi/crypto/hash_based/crypto.h b/blockchain_integration/pi_network/dapi/crypto/hash_based/crypto.h new file mode 100644 index 000000000..b1713cceb --- /dev/null +++ b/blockchain_integration/pi_network/dapi/crypto/hash_based/crypto.h @@ -0,0 +1,27 @@ +#ifndef CRYPTO_H +#define CRYPTO_H + +#include +#include +#include +#include + +class Crypto { +public: + Crypto(); + ~Crypto(); + + // Hash functions + std::vector sha256(const std::vector& input); + std::vector keccak256(const std::vector& input); + + // Digital signatures + std::vector sign(const std::vector& message, const NTL::ZZ& privateKey); + bool verify(const std::vector& message, const std::vector& signature, const NTL::ZZ& publicKey); + +private: + NTL::ZZ privateKey_; + NTL::ZZ publicKey_; +}; + +#endif // CRYPTO_H