BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
defines the keys used to derive the shared secret More...
#include <memo.hpp>
Public Member Functions | |
void | set_message (const fc::ecc::private_key &priv, const fc::ecc::public_key &pub, const string &msg, uint64_t custom_nonce=0) |
std::string | get_message (const fc::ecc::private_key &priv, const fc::ecc::public_key &pub) const |
Public Attributes | |
public_key_type | from |
public_key_type | to |
uint64_t | nonce = 0 |
vector< char > | message |
defines the keys used to derive the shared secret
Because account authorities and keys can change at any time, each memo must capture the specific keys used to derive the shared secret. In order to read the cipher message you will need one of the two private keys.
If from == to and from == 0 then no encryption is used, the memo is public. If from == to and from != 0 then invalid memo data
string graphene::protocol::memo_data::get_message | ( | const fc::ecc::private_key & | priv, |
const fc::ecc::public_key & | pub | ||
) | const |
void graphene::protocol::memo_data::set_message | ( | const fc::ecc::private_key & | priv, |
const fc::ecc::public_key & | pub, | ||
const string & | msg, | ||
uint64_t | custom_nonce = 0 |
||
) |
public_key_type graphene::protocol::memo_data::from |
vector<char> graphene::protocol::memo_data::message |
This field contains the AES encrypted packed memo_message
uint64_t graphene::protocol::memo_data::nonce = 0 |
64 bit nonce format: [ 8 bits | 56 bits ] [ entropy | timestamp ] Timestamp is number of microseconds since the epoch Entropy is a byte taken from the hash of a new private key
This format is not mandated or verified; it is chosen to ensure uniqueness of key-IV pairs only. This should be unique with high probability as long as the generating host has a high-resolution clock OR a strong source of entropy for generating private keys.
public_key_type graphene::protocol::memo_data::to |