Functions
scalar.c File Reference
#include <openssl/ec.h>
#include <openssl/err.h>
#include <openssl/mem.h>
#include "internal.h"
#include "../bn/internal.h"
#include "../../internal.h"
Include dependency graph for scalar.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int ec_bignum_to_scalar (const EC_GROUP *group, EC_SCALAR *out, const BIGNUM *in)
 
int ec_random_nonzero_scalar (const EC_GROUP *group, EC_SCALAR *out, const uint8_t additional_data[32])
 
void ec_scalar_add (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a, const EC_SCALAR *b)
 
int ec_scalar_equal_vartime (const EC_GROUP *group, const EC_SCALAR *a, const EC_SCALAR *b)
 
int ec_scalar_from_bytes (const EC_GROUP *group, EC_SCALAR *out, const uint8_t *in, size_t len)
 
void ec_scalar_from_montgomery (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
void ec_scalar_inv0_montgomery (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
int ec_scalar_is_zero (const EC_GROUP *group, const EC_SCALAR *a)
 
void ec_scalar_mul_montgomery (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a, const EC_SCALAR *b)
 
void ec_scalar_neg (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
void ec_scalar_reduce (const EC_GROUP *group, EC_SCALAR *out, const BN_ULONG *words, size_t num)
 
void ec_scalar_select (const EC_GROUP *group, EC_SCALAR *out, BN_ULONG mask, const EC_SCALAR *a, const EC_SCALAR *b)
 
void ec_scalar_sub (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a, const EC_SCALAR *b)
 
void ec_scalar_to_bytes (const EC_GROUP *group, uint8_t *out, size_t *out_len, const EC_SCALAR *in)
 
void ec_scalar_to_montgomery (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
int ec_scalar_to_montgomery_inv_vartime (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
void ec_simple_scalar_inv0_montgomery (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 
int ec_simple_scalar_to_montgomery_inv_vartime (const EC_GROUP *group, EC_SCALAR *r, const EC_SCALAR *a)
 

Function Documentation

◆ ec_bignum_to_scalar()

int ec_bignum_to_scalar ( const EC_GROUP group,
EC_SCALAR out,
const BIGNUM in 
)

Definition at line 24 of file scalar.c.

◆ ec_random_nonzero_scalar()

int ec_random_nonzero_scalar ( const EC_GROUP group,
EC_SCALAR out,
const uint8_t  additional_data[32] 
)

Definition at line 48 of file scalar.c.

◆ ec_scalar_add()

void ec_scalar_add ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a,
const EC_SCALAR b 
)

Definition at line 93 of file scalar.c.

◆ ec_scalar_equal_vartime()

int ec_scalar_equal_vartime ( const EC_GROUP group,
const EC_SCALAR a,
const EC_SCALAR b 
)

Definition at line 34 of file scalar.c.

◆ ec_scalar_from_bytes()

int ec_scalar_from_bytes ( const EC_GROUP group,
EC_SCALAR out,
const uint8_t in,
size_t  len 
)

Definition at line 63 of file scalar.c.

◆ ec_scalar_from_montgomery()

void ec_scalar_from_montgomery ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 127 of file scalar.c.

◆ ec_scalar_inv0_montgomery()

void ec_scalar_inv0_montgomery ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 167 of file scalar.c.

◆ ec_scalar_is_zero()

int ec_scalar_is_zero ( const EC_GROUP group,
const EC_SCALAR a 
)

Definition at line 40 of file scalar.c.

◆ ec_scalar_mul_montgomery()

void ec_scalar_mul_montgomery ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a,
const EC_SCALAR b 
)

Definition at line 134 of file scalar.c.

◆ ec_scalar_neg()

void ec_scalar_neg ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 109 of file scalar.c.

◆ ec_scalar_reduce()

void ec_scalar_reduce ( const EC_GROUP group,
EC_SCALAR out,
const BN_ULONG *  words,
size_t  num 
)

Definition at line 84 of file scalar.c.

◆ ec_scalar_select()

void ec_scalar_select ( const EC_GROUP group,
EC_SCALAR out,
BN_ULONG  mask,
const EC_SCALAR a,
const EC_SCALAR b 
)

Definition at line 115 of file scalar.c.

◆ ec_scalar_sub()

void ec_scalar_sub ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a,
const EC_SCALAR b 
)

Definition at line 101 of file scalar.c.

◆ ec_scalar_to_bytes()

void ec_scalar_to_bytes ( const EC_GROUP group,
uint8_t out,
size_t *  out_len,
const EC_SCALAR in 
)

Definition at line 54 of file scalar.c.

◆ ec_scalar_to_montgomery()

void ec_scalar_to_montgomery ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 121 of file scalar.c.

◆ ec_scalar_to_montgomery_inv_vartime()

int ec_scalar_to_montgomery_inv_vartime ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 172 of file scalar.c.

◆ ec_simple_scalar_inv0_montgomery()

void ec_simple_scalar_inv0_montgomery ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 141 of file scalar.c.

◆ ec_simple_scalar_to_montgomery_inv_vartime()

int ec_simple_scalar_to_montgomery_inv_vartime ( const EC_GROUP group,
EC_SCALAR r,
const EC_SCALAR a 
)

Definition at line 148 of file scalar.c.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:30