9 namespace fc {
namespace ecc {
20 this->
_key = cpy._key;
42 my = std::move( pk.my );
55 self.my->_key = secret;
76 (
unsigned char*) my->_key.data(), 1 ) );
81 static int extended_nonce_function(
unsigned char *nonce32,
const unsigned char *msg32,
82 const unsigned char *key32,
unsigned int attempt,
84 unsigned int* extra = (
unsigned int*) data;
86 return secp256k1_nonce_function_default( nonce32, msg32, key32, *extra,
nullptr );
94 unsigned int counter = 0;
98 result.data() + 1, (
unsigned char*) my->_key.data(),
99 extended_nonce_function, &counter, &recid ));
100 }
while( require_canonical && !public_key::is_canonical( result ) );
101 result.data()[0] = 27 + 4 + recid;
const secp256k1_context_t * _get_context()
public_key get_public_key() const
private_key & operator=(private_key &&pk)
compact_signature sign_compact(const fc::sha256 &digest, bool require_canonical=true) const
fc::sha256 digest(const T &value)
contains only the public point of an elliptic curve key.
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
static private_key regenerate(const fc::sha256 &secret)
private_key_secret get_secret() const
private_key_impl & operator=(const private_key_impl &pk) BOOST_NOEXCEPT
an elliptic curve private key.
private_key_impl() BOOST_NOEXCEPT