Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::ecc::detail Namespace Reference

Classes

class  private_key_impl
 
class  public_key_impl
 

Typedefs

typedef fc::array< char, 37 > chr37
 

Functions

const secp256k1_context_get_context ()
 
void _init_lib ()
 
fc::sha256 _left (const fc::sha512 &v)
 
fc::sha256 _right (const fc::sha512 &v)
 
chr37 _derive_message (const public_key_data &key, int i)
 
const ec_group & get_curve ()
 
const private_key_secretget_curve_order ()
 
const private_key_secretget_half_curve_order ()
 

Typedef Documentation

◆ chr37

typedef fc::array< char, 37 > fc::ecc::detail::chr37

Definition at line 24 of file elliptic_common.cpp.

Function Documentation

◆ _derive_message()

chr37 fc::ecc::detail::_derive_message ( const public_key_data & key,
int i )

Definition at line 59 of file elliptic_common.cpp.

60 {
61 return _derive_message( *key.begin(), key.begin() + 1, i );
62 }

◆ _get_context()

const secp256k1_context * fc::ecc::detail::_get_context ( )

Definition at line 18 of file elliptic_mixed.cpp.

18 {
20 return ctx;
21 }
#define SECP256K1_CONTEXT_SIGN
Definition secp256k1.h:196
SECP256K1_API secp256k1_context * secp256k1_context_create(unsigned int flags) SECP256K1_WARN_UNUSED_RESULT
Definition secp256k1.c:107
#define SECP256K1_CONTEXT_VERIFY
Definition secp256k1.h:195
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _init_lib()

void fc::ecc::detail::_init_lib ( )

Definition at line 23 of file elliptic_mixed.cpp.

23 {
24 static const secp256k1_context_t* ctx = _get_context();
25 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _left()

fc::sha256 fc::ecc::detail::_left ( const fc::sha512 & v)

Definition at line 26 of file elliptic_common.cpp.

27 {
28 fc::sha256 result;
29 memcpy( result.data(), v.data(), 32 );
30 return result;
31 }
char * data()
Definition sha512.cpp:24
memcpy((char *) pInfo->slotDescription, s, l)
Here is the call graph for this function:

◆ _right()

fc::sha256 fc::ecc::detail::_right ( const fc::sha512 & v)

Definition at line 33 of file elliptic_common.cpp.

34 {
35 fc::sha256 result;
36 memcpy( result.data(), v.data() + 32, 32 );
37 return result;
38 }
Here is the call graph for this function:

◆ get_curve()

const ec_group & fc::ecc::detail::get_curve ( )

Definition at line 65 of file elliptic_common.cpp.

66 {
67 static const ec_group secp256k1( EC_GROUP_new_by_curve_name( NID_secp256k1 ) );
68 return secp256k1;
69 }

◆ get_curve_order()

const private_key_secret & fc::ecc::detail::get_curve_order ( )

Definition at line 83 of file elliptic_common.cpp.

84 {
85 static private_key_secret order = _get_curve_order();
86 return order;
87 }

◆ get_half_curve_order()

const private_key_secret & fc::ecc::detail::get_half_curve_order ( )

Definition at line 102 of file elliptic_common.cpp.

103 {
104 static private_key_secret half_order = _get_half_curve_order();
105 return half_order;
106 }