UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
Loading...
Searching...
No Matches
secp256k1::CurveContext Struct Reference

#include <context.hpp>

Public Member Functions

std::string_view curve_name () const noexcept
 

Static Public Member Functions

static CurveContext secp256k1_default ()
 
static CurveContext with_generator (const fast::Point &custom_G, const char *label="secp256k1-custom")
 
static CurveContext custom (const fast::Point &G, const std::array< std::uint8_t, 32 > &order_n, std::uint32_t h=1, const char *label="custom")
 

Public Attributes

fast::Point generator
 
std::array< std::uint8_t, 32 > order {}
 
std::uint32_t cofactor = 1
 
char name [32] = {}
 

Detailed Description

Definition at line 39 of file context.hpp.

Member Function Documentation

◆ curve_name()

std::string_view secp256k1::CurveContext::curve_name ( ) const
inlinenoexcept

Definition at line 98 of file context.hpp.

References name.

◆ custom()

static CurveContext secp256k1::CurveContext::custom ( const fast::Point G,
const std::array< std::uint8_t, 32 > &  order_n,
std::uint32_t  h = 1,
const char *  label = "custom" 
)
inlinestatic

Definition at line 84 of file context.hpp.

References cofactor, generator, and order.

◆ secp256k1_default()

static CurveContext secp256k1::CurveContext::secp256k1_default ( )
inlinestatic

Definition at line 58 of file context.hpp.

References cofactor, generator, secp256k1::fast::Point::generator(), and order.

Referenced by with_generator().

◆ with_generator()

static CurveContext secp256k1::CurveContext::with_generator ( const fast::Point custom_G,
const char *  label = "secp256k1-custom" 
)
inlinestatic

Definition at line 74 of file context.hpp.

References generator, and secp256k1_default().

Member Data Documentation

◆ cofactor

std::uint32_t secp256k1::CurveContext::cofactor = 1

Definition at line 49 of file context.hpp.

Referenced by custom(), and secp256k1_default().

◆ generator

fast::Point secp256k1::CurveContext::generator

◆ name

char secp256k1::CurveContext::name[32] = {}

Definition at line 53 of file context.hpp.

Referenced by curve_name().

◆ order

std::array<std::uint8_t, 32> secp256k1::CurveContext::order {}

Definition at line 46 of file context.hpp.

Referenced by custom(), and secp256k1_default().


The documentation for this struct was generated from the following file: