13 namespace crypto {
namespace r1 {
26 int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig,
const unsigned char *msg,
int msglen,
int recid,
int check);
184 void to_variant(
const crypto::r1::private_key& var, variant& vo );
185 void from_variant(
const variant& var, crypto::r1::private_key& vo );
186 void to_variant(
const crypto::r1::public_key& var, variant& vo );
187 void from_variant(
const variant& var, crypto::r1::public_key& vo );
191 template<
typename Stream>
199 template<
typename Stream>
205 template<
typename Stream>
213 template<
typename Stream>
an elliptic curve private key.
friend bool operator<(const private_key &a, const private_key &b)
bool verify(const fc::sha256 &digest, const signature &sig)
signature sign(const fc::sha256 &digest) const
friend bool operator!=(const private_key &a, const private_key &b)
static private_key generate_from_seed(const fc::sha256 &seed, const fc::sha256 &offset=fc::sha256())
private_key_secret get_secret() const
public_key get_public_key() const
fc::sha512 get_shared_secret(const public_key &pub) const
compact_signature sign_compact(const fc::sha256 &digest) const
static private_key regenerate(const fc::sha256 &secret)
static private_key generate()
private_key & operator=(private_key &&pk)
friend bool operator==(const private_key &a, const private_key &b)
contains only the public point of an elliptic curve key.
public_key & operator=(public_key &&pk)
bool verify(const fc::sha256 &digest, const signature &sig)
public_key add(const fc::sha256 &offset) const
static public_key from_base58(const std::string &b58)
friend compact_signature signature_from_ecdsa(const EC_KEY *key, const public_key_data &pub_data, fc::ecdsa_sig &sig, const fc::sha256 &d)
public_key_data serialize() 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)
public_key mult(const fc::sha256 &offset)
Used to forward declare value types.
Concept for reading and writing characters.
fc::array< char, 33 > public_key_data
int ECDSA_SIG_recover_key_GFp(EC_KEY *eckey, ECDSA_SIG *ecsig, const unsigned char *msg, int msglen, int recid, int check)
compact_signature signature_from_ecdsa(const EC_KEY *key, const public_key_data &pub, fc::ecdsa_sig &sig, const fc::sha256 &d)
fc::array< char, 65 > public_key_point_data
the full non-compressed version of the ECC point
fc::array< char, 72 > signature
fc::array< unsigned char, 65 > compact_signature
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.
public_key_shim public_key_type
signature_shim signature_type
public_key_type get_public_key() const
signature_type sign(const sha256 &digest, bool require_canonical=true) const
static private_key_shim generate()
sha512 generate_shared_secret(const public_key_type &pub_key) const
public_key_shim public_key_type
public_key_type recover(const sha256 &digest, bool check_canonical) const
const data_type & serialize() const