BitShares-Core  4.0.0
BitShares blockchain implementation and command-line interface software
Public Member Functions | Static Public Member Functions | Friends | List of all members
fc::ecc::private_key Class Reference

an elliptic curve private key. More...

#include <elliptic.hpp>

Inheritance diagram for fc::ecc::private_key:
fc::ecc::extended_private_key

Public Member Functions

 private_key ()
 
 private_key (private_key &&pk)
 
 private_key (const private_key &pk)
 
 ~private_key ()
 
private_keyoperator= (private_key &&pk)
 
private_keyoperator= (const private_key &pk)
 
private_key child (const fc::sha256 &offset) const
 
private_key_secret get_secret () const
 
 operator private_key_secret () const
 
fc::sha512 get_shared_secret (const public_key &pub) const
 
compact_signature sign_compact (const fc::sha256 &digest, bool require_canonical=true) const
 
public_key get_public_key () const
 
unsigned int fingerprint () const
 

Static Public Member Functions

static private_key generate ()
 
static private_key regenerate (const fc::sha256 &secret)
 
static private_key generate_from_seed (const fc::sha256 &seed, const fc::sha256 &offset=fc::sha256())
 

Friends

bool operator== (const private_key &a, const private_key &b)
 
bool operator!= (const private_key &a, const private_key &b)
 
bool operator< (const private_key &a, const private_key &b)
 

Detailed Description

an elliptic curve private key.

Definition at line 89 of file elliptic.hpp.

Constructor & Destructor Documentation

fc::ecc::private_key::private_key ( )

Definition at line 32 of file elliptic_impl_priv.cpp.

fc::ecc::private_key::private_key ( private_key &&  pk)

Definition at line 36 of file elliptic_impl_priv.cpp.

fc::ecc::private_key::private_key ( const private_key pk)

Definition at line 34 of file elliptic_impl_priv.cpp.

fc::ecc::private_key::~private_key ( )

Definition at line 38 of file elliptic_impl_priv.cpp.

Member Function Documentation

private_key fc::ecc::private_key::child ( const fc::sha256 offset) const

Definition at line 130 of file elliptic_common.cpp.

unsigned int fc::ecc::private_key::fingerprint ( ) const
inline

Definition at line 139 of file elliptic.hpp.

private_key fc::ecc::private_key::generate ( )
static

Definition at line 217 of file elliptic_common.cpp.

private_key fc::ecc::private_key::generate_from_seed ( const fc::sha256 seed,
const fc::sha256 offset = fc::sha256() 
)
static

This method of generation enables creating a new private key in a deterministic manner relative to an initial seed. A public_key created from the seed can be multiplied by the offset to calculate the new public key without having to know the private key.

Definition at line 176 of file elliptic_common.cpp.

public_key fc::ecc::private_key::get_public_key ( ) const

Definition at line 70 of file elliptic_impl_priv.cpp.

fc::sha256 fc::ecc::private_key::get_secret ( ) const

Definition at line 59 of file elliptic_impl_priv.cpp.

fc::sha512 fc::ecc::private_key::get_shared_secret ( const public_key pub) const

Given a public key, calculatse a 512 bit shared secret between that key and this private key.

Definition at line 66 of file elliptic_secp256k1.cpp.

fc::ecc::private_key::operator private_key_secret ( ) const
inline

Definition at line 114 of file elliptic.hpp.

private_key & fc::ecc::private_key::operator= ( private_key &&  pk)

Definition at line 40 of file elliptic_impl_priv.cpp.

private_key & fc::ecc::private_key::operator= ( const private_key pk)

Definition at line 46 of file elliptic_impl_priv.cpp.

private_key fc::ecc::private_key::regenerate ( const fc::sha256 secret)
static

Definition at line 52 of file elliptic_impl_priv.cpp.

compact_signature fc::ecc::private_key::sign_compact ( const fc::sha256 digest,
bool  require_canonical = true 
) const

Definition at line 89 of file elliptic_impl_priv.cpp.

Friends And Related Function Documentation

bool operator!= ( const private_key a,
const private_key b 
)
friend

Definition at line 130 of file elliptic.hpp.

bool operator< ( const private_key a,
const private_key b 
)
friend

Definition at line 134 of file elliptic.hpp.

bool operator== ( const private_key a,
const private_key b 
)
friend

Definition at line 126 of file elliptic.hpp.


The documentation for this class was generated from the following files: