Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
fc::em::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 ()
 
chr37 _derive_message (const public_key_data &key, int i)
 
fc::sha256 _left (const fc::sha512 &v)
 
fc::sha256 _right (const fc::sha512 &v)
 
const ec_group & get_curve ()
 
const private_key_secret & get_curve_order ()
 
const private_key_secret & get_half_curve_order ()
 

Typedef Documentation

◆ chr37

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

Definition at line 55 of file elliptic_em.cpp.

Function Documentation

◆ _derive_message()

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

Definition at line 60 of file elliptic_em_common.cpp.

61 {
62 return _derive_message( *key.begin(), key.begin() + 1, i );
63 }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _get_context()

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

Definition at line 28 of file elliptic_em.cpp.

28 {
30 return ctx;
31 }
#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::em::detail::_init_lib ( )

Definition at line 33 of file elliptic_em.cpp.

33 {
34 static const secp256k1_context* ctx = _get_context();
35 (void)ctx;
36 }
const secp256k1_context * _get_context()
Here is the call graph for this function:
Here is the caller graph for this function:

◆ _left()

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

Definition at line 27 of file elliptic_em_common.cpp.

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

◆ _right()

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

Definition at line 34 of file elliptic_em_common.cpp.

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

◆ get_curve()

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

Definition at line 66 of file elliptic_em_common.cpp.

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

◆ get_curve_order()

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

Definition at line 84 of file elliptic_em_common.cpp.

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

◆ get_half_curve_order()

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

Definition at line 103 of file elliptic_em_common.cpp.

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