BitShares-Core  7.0.2
BitShares blockchain node software and command-line wallet 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

◆ private_key() [1/3]

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

Definition at line 32 of file elliptic_impl_priv.cpp.

◆ private_key() [2/3]

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

Definition at line 36 of file elliptic_impl_priv.cpp.

◆ private_key() [3/3]

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

Definition at line 34 of file elliptic_impl_priv.cpp.

◆ ~private_key()

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

Definition at line 38 of file elliptic_impl_priv.cpp.

Member Function Documentation

◆ child()

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

Definition at line 130 of file elliptic_common.cpp.

◆ fingerprint()

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

Definition at line 139 of file elliptic.hpp.

◆ generate()

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

Definition at line 217 of file elliptic_common.cpp.

◆ generate_from_seed()

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.

◆ get_public_key()

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

Definition at line 70 of file elliptic_impl_priv.cpp.

◆ get_secret()

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

Definition at line 59 of file elliptic_impl_priv.cpp.

◆ get_shared_secret()

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.

◆ operator private_key_secret()

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

Definition at line 114 of file elliptic.hpp.

◆ operator=() [1/2]

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

Definition at line 46 of file elliptic_impl_priv.cpp.

◆ operator=() [2/2]

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

Definition at line 40 of file elliptic_impl_priv.cpp.

◆ regenerate()

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

Definition at line 52 of file elliptic_impl_priv.cpp.

◆ sign_compact()

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

◆ operator!=

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

Definition at line 130 of file elliptic.hpp.

◆ operator<

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

Definition at line 134 of file elliptic.hpp.

◆ operator==

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: