ndn-lite
Data Structures | Macros | Functions | Variables
uECC.c File Reference
#include "uECC.h"
#include "uECC_vli.h"
#include <stdio.h>
#include "platform-specific.inc"
#include "curve-specific.inc"

Data Structures

struct  uECC_Curve_t
 

Macros

#define uECC_RNG_MAX_TRIES   64
 
#define uECC_VLI_API   static
 
#define CONCATX(a, ...)   a ## __VA_ARGS__
 
#define CONCAT(a, ...)   CONCATX(a, __VA_ARGS__)
 
#define STRX(a)   #a
 
#define STR(a)   STRX(a)
 
#define EVAL(...)   EVAL1(EVAL1(EVAL1(EVAL1(__VA_ARGS__))))
 
#define EVAL1(...)   EVAL2(EVAL2(EVAL2(EVAL2(__VA_ARGS__))))
 
#define EVAL2(...)   EVAL3(EVAL3(EVAL3(EVAL3(__VA_ARGS__))))
 
#define EVAL3(...)   EVAL4(EVAL4(EVAL4(EVAL4(__VA_ARGS__))))
 
#define EVAL4(...)   __VA_ARGS__
 
#define DEC_1   0
 
#define DEC_2   1
 
#define DEC_3   2
 
#define DEC_4   3
 
#define DEC_5   4
 
#define DEC_6   5
 
#define DEC_7   6
 
#define DEC_8   7
 
#define DEC_9   8
 
#define DEC_10   9
 
#define DEC_11   10
 
#define DEC_12   11
 
#define DEC_13   12
 
#define DEC_14   13
 
#define DEC_15   14
 
#define DEC_16   15
 
#define DEC_17   16
 
#define DEC_18   17
 
#define DEC_19   18
 
#define DEC_20   19
 
#define DEC_21   20
 
#define DEC_22   21
 
#define DEC_23   22
 
#define DEC_24   23
 
#define DEC_25   24
 
#define DEC_26   25
 
#define DEC_27   26
 
#define DEC_28   27
 
#define DEC_29   28
 
#define DEC_30   29
 
#define DEC_31   30
 
#define DEC_32   31
 
#define DEC(N)   CONCAT(DEC_, N)
 
#define SECOND_ARG(_, val, ...)   val
 
#define SOME_CHECK_0   ~, 0
 
#define GET_SECOND_ARG(...)   SECOND_ARG(__VA_ARGS__, SOME,)
 
#define SOME_OR_0(N)   GET_SECOND_ARG(CONCAT(SOME_CHECK_, N))
 
#define EMPTY(...)
 
#define DEFER(...)   __VA_ARGS__ EMPTY()
 
#define REPEAT_NAME_0()   REPEAT_0
 
#define REPEAT_NAME_SOME()   REPEAT_SOME
 
#define REPEAT_0(...)
 
#define REPEAT_SOME(N, stuff)   DEFER(CONCAT(REPEAT_NAME_, SOME_OR_0(DEC(N))))()(DEC(N), stuff) stuff
 
#define REPEAT(N, stuff)   EVAL(REPEAT_SOME(N, stuff))
 
#define REPEATM_NAME_0()   REPEATM_0
 
#define REPEATM_NAME_SOME()   REPEATM_SOME
 
#define REPEATM_0(...)
 
#define REPEATM_SOME(N, macro)
 
#define REPEATM(N, macro)   EVAL(REPEATM_SOME(N, macro))
 
#define uECC_MAX_WORDS   6 /* Due to the size of curve_n. */
 
#define uECC_MAX_WORDS   6
 
#define uECC_MAX_WORDS   7
 
#define uECC_MAX_WORDS   8
 
#define BITS_TO_WORDS(num_bits)   ((num_bits + ((uECC_WORD_SIZE * 8) - 1)) / (uECC_WORD_SIZE * 8))
 
#define BITS_TO_BYTES(num_bits)   ((num_bits + 7) / 8)
 
#define EVEN(vli)   (!(vli[0] & 1))
 
#define EccPoint_isZero(point, curve)   uECC_vli_isZero((point), (curve)->num_words * 2)
 

Functions

static cmpresult_t uECC_vli_cmp_unsafe (const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
void uECC_set_rng (uECC_RNG_Function rng_function)
 
uECC_RNG_Function uECC_get_rng (void)
 
int uECC_curve_private_key_size (uECC_Curve curve)
 
int uECC_curve_public_key_size (uECC_Curve curve)
 
uECC_VLI_API void uECC_vli_clear (uECC_word_t *vli, wordcount_t num_words)
 
uECC_VLI_API uECC_word_t uECC_vli_isZero (const uECC_word_t *vli, wordcount_t num_words)
 
uECC_VLI_API uECC_word_t uECC_vli_testBit (const uECC_word_t *vli, bitcount_t bit)
 
static wordcount_t vli_numDigits (const uECC_word_t *vli, const wordcount_t max_words)
 
uECC_VLI_API bitcount_t uECC_vli_numBits (const uECC_word_t *vli, const wordcount_t max_words)
 
uECC_VLI_API void uECC_vli_set (uECC_word_t *dest, const uECC_word_t *src, wordcount_t num_words)
 
uECC_VLI_API uECC_word_t uECC_vli_equal (const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
uECC_VLI_API uECC_word_t uECC_vli_sub (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
uECC_VLI_API cmpresult_t uECC_vli_cmp (const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_rshift1 (uECC_word_t *vli, wordcount_t num_words)
 
uECC_VLI_API uECC_word_t uECC_vli_add (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
static void muladd (uECC_word_t a, uECC_word_t b, uECC_word_t *r0, uECC_word_t *r1, uECC_word_t *r2)
 
uECC_VLI_API void uECC_vli_mult (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_modAdd (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, const uECC_word_t *mod, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_modSub (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, const uECC_word_t *mod, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_mmod (uECC_word_t *result, uECC_word_t *product, const uECC_word_t *mod, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_modMult (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, const uECC_word_t *mod, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_modMult_fast (uECC_word_t *result, const uECC_word_t *left, const uECC_word_t *right, uECC_Curve curve)
 
uECC_VLI_API void uECC_vli_modSquare_fast (uECC_word_t *result, const uECC_word_t *left, uECC_Curve curve)
 
static void vli_modInv_update (uECC_word_t *uv, const uECC_word_t *mod, wordcount_t num_words)
 
uECC_VLI_API void uECC_vli_modInv (uECC_word_t *result, const uECC_word_t *input, const uECC_word_t *mod, wordcount_t num_words)
 
static void apply_z (uECC_word_t *X1, uECC_word_t *Y1, const uECC_word_t *const Z, uECC_Curve curve)
 
static void XYcZ_initial_double (uECC_word_t *X1, uECC_word_t *Y1, uECC_word_t *X2, uECC_word_t *Y2, const uECC_word_t *const initial_Z, uECC_Curve curve)
 
static void XYcZ_add (uECC_word_t *X1, uECC_word_t *Y1, uECC_word_t *X2, uECC_word_t *Y2, uECC_Curve curve)
 
static void XYcZ_addC (uECC_word_t *X1, uECC_word_t *Y1, uECC_word_t *X2, uECC_word_t *Y2, uECC_Curve curve)
 
static void EccPoint_mult (uECC_word_t *result, const uECC_word_t *point, const uECC_word_t *scalar, const uECC_word_t *initial_Z, bitcount_t num_bits, uECC_Curve curve)
 
static uECC_word_t regularize_k (const uECC_word_t *const k, uECC_word_t *k0, uECC_word_t *k1, uECC_Curve curve)
 
static uECC_word_t EccPoint_compute_public_key (uECC_word_t *result, uECC_word_t *private_key, uECC_Curve curve)
 
uECC_VLI_API void uECC_vli_nativeToBytes (uint8_t *bytes, int num_bytes, const uECC_word_t *native)
 
uECC_VLI_API void uECC_vli_bytesToNative (uECC_word_t *native, const uint8_t *bytes, int num_bytes)
 
uECC_VLI_API int uECC_generate_random_int (uECC_word_t *random, const uECC_word_t *top, wordcount_t num_words)
 
int uECC_make_key (uint8_t *public_key, uint8_t *private_key, uECC_Curve curve)
 
int uECC_shared_secret (const uint8_t *public_key, const uint8_t *private_key, uint8_t *secret, uECC_Curve curve)
 
void uECC_compress (const uint8_t *public_key, uint8_t *compressed, uECC_Curve curve)
 
void uECC_decompress (const uint8_t *compressed, uint8_t *public_key, uECC_Curve curve)
 
int uECC_valid_point (const uECC_word_t *point, uECC_Curve curve)
 
int uECC_valid_public_key (const uint8_t *public_key, uECC_Curve curve)
 
int uECC_compute_public_key (const uint8_t *private_key, uint8_t *public_key, uECC_Curve curve)
 
static void bits2int (uECC_word_t *native, const uint8_t *bits, unsigned bits_size, uECC_Curve curve)
 
static int uECC_sign_with_k (const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, uECC_word_t *k, uint8_t *signature, uECC_Curve curve)
 
int uECC_sign (const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, uint8_t *signature, uECC_Curve curve)
 
static void HMAC_init (const uECC_HashContext *hash_context, const uint8_t *K)
 
static void HMAC_update (const uECC_HashContext *hash_context, const uint8_t *message, unsigned message_size)
 
static void HMAC_finish (const uECC_HashContext *hash_context, const uint8_t *K, uint8_t *result)
 
static void update_V (const uECC_HashContext *hash_context, uint8_t *K, uint8_t *V)
 
int uECC_sign_deterministic (const uint8_t *private_key, const uint8_t *message_hash, unsigned hash_size, const uECC_HashContext *hash_context, uint8_t *signature, uECC_Curve curve)
 
static bitcount_t smax (bitcount_t a, bitcount_t b)
 
int uECC_verify (const uint8_t *public_key, const uint8_t *message_hash, unsigned hash_size, const uint8_t *signature, uECC_Curve curve)
 

Variables

static uECC_RNG_Function g_rng_function = 0
 

Macro Definition Documentation

◆ BITS_TO_BYTES

#define BITS_TO_BYTES (   num_bits)    ((num_bits + 7) / 8)

◆ BITS_TO_WORDS

#define BITS_TO_WORDS (   num_bits)    ((num_bits + ((uECC_WORD_SIZE * 8) - 1)) / (uECC_WORD_SIZE * 8))

◆ CONCAT

#define CONCAT (   a,
  ... 
)    CONCATX(a, __VA_ARGS__)

◆ CONCATX

#define CONCATX (   a,
  ... 
)    a ## __VA_ARGS__

◆ DEC

#define DEC (   N)    CONCAT(DEC_, N)

◆ DEC_1

#define DEC_1   0

◆ DEC_10

#define DEC_10   9

◆ DEC_11

#define DEC_11   10

◆ DEC_12

#define DEC_12   11

◆ DEC_13

#define DEC_13   12

◆ DEC_14

#define DEC_14   13

◆ DEC_15

#define DEC_15   14

◆ DEC_16

#define DEC_16   15

◆ DEC_17

#define DEC_17   16

◆ DEC_18

#define DEC_18   17

◆ DEC_19

#define DEC_19   18

◆ DEC_2

#define DEC_2   1

◆ DEC_20

#define DEC_20   19

◆ DEC_21

#define DEC_21   20

◆ DEC_22

#define DEC_22   21

◆ DEC_23

#define DEC_23   22

◆ DEC_24

#define DEC_24   23

◆ DEC_25

#define DEC_25   24

◆ DEC_26

#define DEC_26   25

◆ DEC_27

#define DEC_27   26

◆ DEC_28

#define DEC_28   27

◆ DEC_29

#define DEC_29   28

◆ DEC_3

#define DEC_3   2

◆ DEC_30

#define DEC_30   29

◆ DEC_31

#define DEC_31   30

◆ DEC_32

#define DEC_32   31

◆ DEC_4

#define DEC_4   3

◆ DEC_5

#define DEC_5   4

◆ DEC_6

#define DEC_6   5

◆ DEC_7

#define DEC_7   6

◆ DEC_8

#define DEC_8   7

◆ DEC_9

#define DEC_9   8

◆ DEFER

#define DEFER (   ...)    __VA_ARGS__ EMPTY()

◆ EccPoint_isZero

#define EccPoint_isZero (   point,
  curve 
)    uECC_vli_isZero((point), (curve)->num_words * 2)

◆ EMPTY

#define EMPTY (   ...)

◆ EVAL

#define EVAL (   ...)    EVAL1(EVAL1(EVAL1(EVAL1(__VA_ARGS__))))

◆ EVAL1

#define EVAL1 (   ...)    EVAL2(EVAL2(EVAL2(EVAL2(__VA_ARGS__))))

◆ EVAL2

#define EVAL2 (   ...)    EVAL3(EVAL3(EVAL3(EVAL3(__VA_ARGS__))))

◆ EVAL3

#define EVAL3 (   ...)    EVAL4(EVAL4(EVAL4(EVAL4(__VA_ARGS__))))

◆ EVAL4

#define EVAL4 (   ...)    __VA_ARGS__

◆ EVEN

#define EVEN (   vli)    (!(vli[0] & 1))

◆ GET_SECOND_ARG

#define GET_SECOND_ARG (   ...)    SECOND_ARG(__VA_ARGS__, SOME,)

◆ REPEAT

#define REPEAT (   N,
  stuff 
)    EVAL(REPEAT_SOME(N, stuff))

◆ REPEAT_0

#define REPEAT_0 (   ...)

◆ REPEAT_NAME_0

#define REPEAT_NAME_0 ( )    REPEAT_0

◆ REPEAT_NAME_SOME

#define REPEAT_NAME_SOME ( )    REPEAT_SOME

◆ REPEAT_SOME

#define REPEAT_SOME (   N,
  stuff 
)    DEFER(CONCAT(REPEAT_NAME_, SOME_OR_0(DEC(N))))()(DEC(N), stuff) stuff

◆ REPEATM

#define REPEATM (   N,
  macro 
)    EVAL(REPEATM_SOME(N, macro))

◆ REPEATM_0

#define REPEATM_0 (   ...)

◆ REPEATM_NAME_0

#define REPEATM_NAME_0 ( )    REPEATM_0

◆ REPEATM_NAME_SOME

#define REPEATM_NAME_SOME ( )    REPEATM_SOME

◆ REPEATM_SOME

#define REPEATM_SOME (   N,
  macro 
)
Value:
macro(N) \
DEFER(CONCAT(REPEATM_NAME_, SOME_OR_0(DEC(N))))()(DEC(N), macro)
#define DEC(N)
Definition: uECC.c:62
#define CONCAT(a,...)
Definition: uECC.c:18
#define SOME_OR_0(N)
Definition: uECC.c:67

◆ SECOND_ARG

#define SECOND_ARG (   _,
  val,
  ... 
)    val

◆ SOME_CHECK_0

#define SOME_CHECK_0   ~, 0

◆ SOME_OR_0

#define SOME_OR_0 (   N)    GET_SECOND_ARG(CONCAT(SOME_CHECK_, N))

◆ STR

#define STR (   a)    STRX(a)

◆ STRX

#define STRX (   a)    #a

◆ uECC_MAX_WORDS [1/4]

#define uECC_MAX_WORDS   6 /* Due to the size of curve_n. */

◆ uECC_MAX_WORDS [2/4]

#define uECC_MAX_WORDS   6

◆ uECC_MAX_WORDS [3/4]

#define uECC_MAX_WORDS   7

◆ uECC_MAX_WORDS [4/4]

#define uECC_MAX_WORDS   8

◆ uECC_RNG_MAX_TRIES

#define uECC_RNG_MAX_TRIES   64

◆ uECC_VLI_API

#define uECC_VLI_API   static

Function Documentation

◆ apply_z()

static void apply_z ( uECC_word_t X1,
uECC_word_t Y1,
const uECC_word_t *const  Z,
uECC_Curve  curve 
)
static

◆ bits2int()

static void bits2int ( uECC_word_t native,
const uint8_t *  bits,
unsigned  bits_size,
uECC_Curve  curve 
)
static

◆ EccPoint_compute_public_key()

static uECC_word_t EccPoint_compute_public_key ( uECC_word_t result,
uECC_word_t private_key,
uECC_Curve  curve 
)
static

◆ EccPoint_mult()

static void EccPoint_mult ( uECC_word_t result,
const uECC_word_t point,
const uECC_word_t scalar,
const uECC_word_t initial_Z,
bitcount_t  num_bits,
uECC_Curve  curve 
)
static

◆ HMAC_finish()

static void HMAC_finish ( const uECC_HashContext hash_context,
const uint8_t *  K,
uint8_t *  result 
)
static

◆ HMAC_init()

static void HMAC_init ( const uECC_HashContext hash_context,
const uint8_t *  K 
)
static

◆ HMAC_update()

static void HMAC_update ( const uECC_HashContext hash_context,
const uint8_t *  message,
unsigned  message_size 
)
static

◆ muladd()

static void muladd ( uECC_word_t  a,
uECC_word_t  b,
uECC_word_t r0,
uECC_word_t r1,
uECC_word_t r2 
)
static

◆ regularize_k()

static uECC_word_t regularize_k ( const uECC_word_t *const  k,
uECC_word_t k0,
uECC_word_t k1,
uECC_Curve  curve 
)
static

◆ smax()

static bitcount_t smax ( bitcount_t  a,
bitcount_t  b 
)
static

◆ uECC_compress()

void uECC_compress ( const uint8_t *  public_key,
uint8_t *  compressed,
uECC_Curve  curve 
)

◆ uECC_compute_public_key()

int uECC_compute_public_key ( const uint8_t *  private_key,
uint8_t *  public_key,
uECC_Curve  curve 
)

◆ uECC_curve_private_key_size()

int uECC_curve_private_key_size ( uECC_Curve  curve)

◆ uECC_curve_public_key_size()

int uECC_curve_public_key_size ( uECC_Curve  curve)

◆ uECC_decompress()

void uECC_decompress ( const uint8_t *  compressed,
uint8_t *  public_key,
uECC_Curve  curve 
)

◆ uECC_generate_random_int()

uECC_VLI_API int uECC_generate_random_int ( uECC_word_t random,
const uECC_word_t top,
wordcount_t  num_words 
)

◆ uECC_get_rng()

uECC_RNG_Function uECC_get_rng ( void  )

◆ uECC_make_key()

int uECC_make_key ( uint8_t *  public_key,
uint8_t *  private_key,
uECC_Curve  curve 
)

◆ uECC_set_rng()

void uECC_set_rng ( uECC_RNG_Function  rng_function)

◆ uECC_shared_secret()

int uECC_shared_secret ( const uint8_t *  public_key,
const uint8_t *  private_key,
uint8_t *  secret,
uECC_Curve  curve 
)

◆ uECC_sign()

int uECC_sign ( const uint8_t *  private_key,
const uint8_t *  message_hash,
unsigned  hash_size,
uint8_t *  signature,
uECC_Curve  curve 
)

◆ uECC_sign_deterministic()

int uECC_sign_deterministic ( const uint8_t *  private_key,
const uint8_t *  message_hash,
unsigned  hash_size,
const uECC_HashContext hash_context,
uint8_t *  signature,
uECC_Curve  curve 
)

◆ uECC_sign_with_k()

static int uECC_sign_with_k ( const uint8_t *  private_key,
const uint8_t *  message_hash,
unsigned  hash_size,
uECC_word_t k,
uint8_t *  signature,
uECC_Curve  curve 
)
static

◆ uECC_valid_point()

int uECC_valid_point ( const uECC_word_t point,
uECC_Curve  curve 
)

◆ uECC_valid_public_key()

int uECC_valid_public_key ( const uint8_t *  public_key,
uECC_Curve  curve 
)

◆ uECC_verify()

int uECC_verify ( const uint8_t *  public_key,
const uint8_t *  message_hash,
unsigned  hash_size,
const uint8_t *  signature,
uECC_Curve  curve 
)

◆ uECC_vli_add()

uECC_VLI_API uECC_word_t uECC_vli_add ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)

◆ uECC_vli_bytesToNative()

uECC_VLI_API void uECC_vli_bytesToNative ( uECC_word_t native,
const uint8_t *  bytes,
int  num_bytes 
)

◆ uECC_vli_clear()

uECC_VLI_API void uECC_vli_clear ( uECC_word_t vli,
wordcount_t  num_words 
)

◆ uECC_vli_cmp()

uECC_VLI_API cmpresult_t uECC_vli_cmp ( const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)

◆ uECC_vli_cmp_unsafe()

static cmpresult_t uECC_vli_cmp_unsafe ( const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)
static

◆ uECC_vli_equal()

uECC_VLI_API uECC_word_t uECC_vli_equal ( const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)

◆ uECC_vli_isZero()

uECC_VLI_API uECC_word_t uECC_vli_isZero ( const uECC_word_t vli,
wordcount_t  num_words 
)

◆ uECC_vli_mmod()

uECC_VLI_API void uECC_vli_mmod ( uECC_word_t result,
uECC_word_t product,
const uECC_word_t mod,
wordcount_t  num_words 
)

◆ uECC_vli_modAdd()

uECC_VLI_API void uECC_vli_modAdd ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
const uECC_word_t mod,
wordcount_t  num_words 
)

◆ uECC_vli_modInv()

uECC_VLI_API void uECC_vli_modInv ( uECC_word_t result,
const uECC_word_t input,
const uECC_word_t mod,
wordcount_t  num_words 
)

◆ uECC_vli_modMult()

uECC_VLI_API void uECC_vli_modMult ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
const uECC_word_t mod,
wordcount_t  num_words 
)

◆ uECC_vli_modMult_fast()

uECC_VLI_API void uECC_vli_modMult_fast ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
uECC_Curve  curve 
)

◆ uECC_vli_modSquare_fast()

uECC_VLI_API void uECC_vli_modSquare_fast ( uECC_word_t result,
const uECC_word_t left,
uECC_Curve  curve 
)

◆ uECC_vli_modSub()

uECC_VLI_API void uECC_vli_modSub ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
const uECC_word_t mod,
wordcount_t  num_words 
)

◆ uECC_vli_mult()

uECC_VLI_API void uECC_vli_mult ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)

◆ uECC_vli_nativeToBytes()

uECC_VLI_API void uECC_vli_nativeToBytes ( uint8_t *  bytes,
int  num_bytes,
const uECC_word_t native 
)

◆ uECC_vli_numBits()

uECC_VLI_API bitcount_t uECC_vli_numBits ( const uECC_word_t vli,
const wordcount_t  max_words 
)

◆ uECC_vli_rshift1()

uECC_VLI_API void uECC_vli_rshift1 ( uECC_word_t vli,
wordcount_t  num_words 
)

◆ uECC_vli_set()

uECC_VLI_API void uECC_vli_set ( uECC_word_t dest,
const uECC_word_t src,
wordcount_t  num_words 
)

◆ uECC_vli_sub()

uECC_VLI_API uECC_word_t uECC_vli_sub ( uECC_word_t result,
const uECC_word_t left,
const uECC_word_t right,
wordcount_t  num_words 
)

◆ uECC_vli_testBit()

uECC_VLI_API uECC_word_t uECC_vli_testBit ( const uECC_word_t vli,
bitcount_t  bit 
)

◆ update_V()

static void update_V ( const uECC_HashContext hash_context,
uint8_t *  K,
uint8_t *  V 
)
static

◆ vli_modInv_update()

static void vli_modInv_update ( uECC_word_t uv,
const uECC_word_t mod,
wordcount_t  num_words 
)
static

◆ vli_numDigits()

static wordcount_t vli_numDigits ( const uECC_word_t vli,
const wordcount_t  max_words 
)
static

◆ XYcZ_add()

static void XYcZ_add ( uECC_word_t X1,
uECC_word_t Y1,
uECC_word_t X2,
uECC_word_t Y2,
uECC_Curve  curve 
)
static

◆ XYcZ_addC()

static void XYcZ_addC ( uECC_word_t X1,
uECC_word_t Y1,
uECC_word_t X2,
uECC_word_t Y2,
uECC_Curve  curve 
)
static

◆ XYcZ_initial_double()

static void XYcZ_initial_double ( uECC_word_t X1,
uECC_word_t Y1,
uECC_word_t X2,
uECC_word_t Y2,
const uECC_word_t *const  initial_Z,
uECC_Curve  curve 
)
static

Variable Documentation

◆ g_rng_function

uECC_RNG_Function g_rng_function = 0
static