169 25, 69, 116, 104, 101, 114, 101,
170 117, 109, 32, 83, 105, 103, 110,
171 101, 100, 32, 77, 101, 115, 115,
172 97, 103, 101, 58, 10, 51, 50
177 unsigned char eth_prefixed_msg_raw[28 + 32];
178 std::copy(std::begin(eth_prefix), std::end(eth_prefix), std::begin(eth_prefixed_msg_raw));
179 std::copy((
unsigned char*)
digest.
data(), (
unsigned char*)
digest.
data() + 32, std::begin(eth_prefixed_msg_raw) + 28);
186 unsigned char msg_digest_result[32];
222 void to_variant(
const em::private_key& var, variant& vo );
223 void from_variant(
const variant& var, em::private_key& vo );
224 void to_variant(
const em::public_key& var, variant& vo );
225 void from_variant(
const variant& var, em::public_key& vo );
229 template<
typename Stream>
237 template<
typename Stream>
243 template<
typename Stream>
251 template<
typename Stream>
an elliptic curve private key.
static private_key generate_from_seed(const fc::sha256 &seed, const fc::sha256 &offset=fc::sha256())
friend bool operator<(const private_key &a, const private_key &b)
friend bool operator!=(const private_key &a, const private_key &b)
public_key get_public_key() const
private_key_secret get_secret() const
static private_key regenerate(const fc::sha256 &secret)
private_key & operator=(private_key &&pk)
static private_key generate()
fc::sha512 get_shared_secret(const public_key &pub) const
unsigned int fingerprint() const
private_key child(const fc::sha256 &offset) const
compact_signature sign_compact(const fc::sha256 &digest, bool require_canonical=true) const
friend bool operator==(const private_key &a, const private_key &b)
contains only the public point of an elliptic curve key.
unsigned int fingerprint() const
friend bool operator==(const public_key &a, const public_key &b)
std::string to_base58() const
Allows to convert current public key object into base58 number.
friend bool operator!=(const public_key &a, const public_key &b)
static public_key from_base58(const std::string &b58)
public_key child(const fc::sha256 &offset) const
public_key & operator=(public_key &&pk)
public_key_point_data serialize_ecc_point() const
public_key_data serialize() const
Used to forward declare value types.
const char * data() const
Concept for reading and writing characters.
void keccak_init(SHA3_CTX *ctx)
void keccak_update(SHA3_CTX *ctx, const unsigned char *msg, uint16_t size)
void keccak_final(SHA3_CTX *ctx, unsigned char *result)
fc::array< char, 33 > public_key_data
fc::array< char, 72 > signature
fc::array< char, 65 > public_key_point_data
the full non-compressed version of the ECC point
fc::array< unsigned char, 65 > compact_signature
fc::array< char, 78 > extended_key_data
fc::array< char, 33 > commitment_type
void unpack(Stream &s, std::deque< T > &value)
void pack(Stream &s, const std::deque< T > &value)
fc::sha256 digest(const T &value)
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
const GenericPointer< typename T::ValueType > T2 T::AllocatorType & a
#define FC_REFLECT_TYPENAME(TYPE)
#define FC_REFLECT_DERIVED(TYPE, INHERITS, MEMBERS)
Specializes fc::reflector for TYPE where type inherits other reflected classes.
const data_type & serialize() const
static private_key_shim generate()
signature_type sign(const sha256 &digest, bool require_canonical=true) const
public_key_type get_public_key() const
public_key_shim public_key_type
sha512 generate_shared_secret(const public_key_type &pub_key) const
signature_shim signature_type
public_key_shim public_key_type
public_key_type recover(const sha256 &digest, bool check_canonical) const