hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
ed25519_impl.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_CRYPTO_HPP
7 #define IROHA_CRYPTO_HPP
8 
9 #include <string>
10 
11 #include "crypto/keypair.hpp"
12 
13 namespace iroha {
14 
23  sig_t sign(const uint8_t *msg,
24  size_t msgsize,
25  const pubkey_t &pub,
26  const privkey_t &priv);
27 
28  sig_t sign(const std::string &msg,
29  const pubkey_t &pub,
30  const privkey_t &priv);
31 
40  bool verify(const uint8_t *msg,
41  size_t msgsize,
42  const pubkey_t &pub,
43  const sig_t &sig);
44 
45  bool verify(const std::string &msg, const pubkey_t &pub, const sig_t &sig);
46 
50  blob_t<32> create_seed();
51 
57  blob_t<32> create_seed(std::string passphrase);
58 
64  keypair_t create_keypair(blob_t<32> seed);
65 
70  keypair_t create_keypair();
71 
72 } // namespace iroha
73 #endif // IROHA_CRYPTO_HPP
blob_t< 32 > create_seed()
Definition: ed25519_impl.cpp:61
blob_t< 32 > pubkey_t
Definition: keypair.hpp:14
sig_t sign(const uint8_t *msg, size_t msgsize, const pubkey_t &pub, const privkey_t &priv)
Definition: ed25519_impl.cpp:16
bool verify(const uint8_t *msg, size_t msgsize, const pubkey_t &pub, const sig_t &sig)
Definition: ed25519_impl.cpp:39
blob_t< 64 > sig_t
Definition: keypair.hpp:13
Definition: block_query.hpp:16
blob_t< 32 > privkey_t
Definition: keypair.hpp:15
keypair_t create_keypair(blob_t< 32 > seed)
Definition: ed25519_impl.cpp:79