iPXE
Data Fields
elliptic_curve Struct Reference

An elliptic curve. More...

#include <crypto.h>

Data Fields

const char * name
 Curve name. More...
 
size_t pointsize
 Point (and public key) size. More...
 
size_t keysize
 Scalar (and private key) size. More...
 
const void * base
 Generator base point. More...
 
const void * order
 Order of the generator (if prime) More...
 
int(* is_infinity )(const void *point)
 Check if this is the point at infinity. More...
 
int(* multiply )(const void *base, const void *scalar, void *result)
 Multiply scalar by curve point. More...
 
int(* add )(const void *addend, const void *augend, void *result)
 Add curve points (as a one-off operation) More...
 

Detailed Description

An elliptic curve.

Definition at line 177 of file crypto.h.

Field Documentation

◆ name

const char* elliptic_curve::name

Curve name.

Definition at line 179 of file crypto.h.

Referenced by ecdhe_key(), and tls_send_client_key_exchange_ecdhe().

◆ pointsize

size_t elliptic_curve::pointsize

◆ keysize

size_t elliptic_curve::keysize

◆ base

const void* elliptic_curve::base

Generator base point.

Definition at line 185 of file crypto.h.

Referenced by ecdhe_key(), ecdsa_sign_rs(), ecdsa_verify_rs(), elliptic_curve_okx(), and elliptic_multiply_okx().

◆ order

const void* elliptic_curve::order

Order of the generator (if prime)

Definition at line 187 of file crypto.h.

Referenced by ecdsa_init_values(), and elliptic_curve_okx().

◆ is_infinity

int( * elliptic_curve::is_infinity) (const void *point)

Check if this is the point at infinity.

Parameters
pointCurve point
Return values
is_infinityThis is the point at infinity

The point at infinity cannot be represented in affine coordinates. Each curve must choose a representation of the point at infinity (e.g. all zeroes).

Definition at line 197 of file crypto.h.

Referenced by elliptic_is_infinity().

◆ multiply

int( * elliptic_curve::multiply) (const void *base, const void *scalar, void *result)

Multiply scalar by curve point.

Parameters
baseBase point
scalarScalar multiple
resultResult point to fill in
Return values
rcReturn status code

Definition at line 205 of file crypto.h.

Referenced by elliptic_multiply().

◆ add

int( * elliptic_curve::add) (const void *addend, const void *augend, void *result)

Add curve points (as a one-off operation)

Parameters
addendCurve point to add
augendCurve point to add
resultCurve point to hold result
Return values
rcReturn status code

Definition at line 214 of file crypto.h.

Referenced by elliptic_add().


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