Functions
hash_to_curve.c File Reference
#include <openssl/ec.h>
#include <openssl/digest.h>
#include <openssl/err.h>
#include <openssl/nid.h>
#include <openssl/type_check.h>
#include <assert.h>
#include "internal.h"
#include "../fipsmodule/bn/internal.h"
#include "../fipsmodule/ec/internal.h"
#include "../internal.h"
Include dependency graph for hash_to_curve.c:

Go to the source code of this file.

Functions

static void big_endian_to_words (BN_ULONG *out, size_t num_words, const uint8_t *in, size_t len)
 
int ec_hash_to_curve_p384_xmd_sha512_sswu_draft07 (const EC_GROUP *group, EC_RAW_POINT *out, const uint8_t *dst, size_t dst_len, const uint8_t *msg, size_t msg_len)
 
int ec_hash_to_scalar_p384_xmd_sha512_draft07 (const EC_GROUP *group, EC_SCALAR *out, const uint8_t *dst, size_t dst_len, const uint8_t *msg, size_t msg_len)
 
static int expand_message_xmd (const EVP_MD *md, uint8_t *out, size_t out_len, const uint8_t *msg, size_t msg_len, const uint8_t *dst, size_t dst_len)
 
static int felem_from_u8 (const EC_GROUP *group, EC_FELEM *out, uint8_t a)
 
static int hash_to_curve (const EC_GROUP *group, const EVP_MD *md, const EC_FELEM *Z, const EC_FELEM *c2, unsigned k, EC_RAW_POINT *out, const uint8_t *dst, size_t dst_len, const uint8_t *msg, size_t msg_len)
 
static int hash_to_field2 (const EC_GROUP *group, const EVP_MD *md, EC_FELEM *out1, EC_FELEM *out2, const uint8_t *dst, size_t dst_len, unsigned k, const uint8_t *msg, size_t msg_len)
 
static int hash_to_scalar (const EC_GROUP *group, const EVP_MD *md, EC_SCALAR *out, const uint8_t *dst, size_t dst_len, unsigned k, const uint8_t *msg, size_t msg_len)
 
static int map_to_curve_simple_swu (const EC_GROUP *group, const EC_FELEM *Z, const BN_ULONG *c1, size_t num_c1, const EC_FELEM *c2, EC_RAW_POINT *out, const EC_FELEM *u)
 
static void mul_A (const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *in)
 
static void mul_minus_A (const EC_GROUP *group, EC_FELEM *out, const EC_FELEM *in)
 
static int num_bytes_to_derive (size_t *out, const BIGNUM *modulus, unsigned k)
 
static BN_ULONG sgn0_le (const EC_GROUP *group, const EC_FELEM *a)
 

Function Documentation

◆ big_endian_to_words()

static void big_endian_to_words ( BN_ULONG *  out,
size_t  num_words,
const uint8_t in,
size_t  len 
)
static

Definition at line 157 of file hash_to_curve.c.

◆ ec_hash_to_curve_p384_xmd_sha512_sswu_draft07()

int ec_hash_to_curve_p384_xmd_sha512_sswu_draft07 ( const EC_GROUP group,
EC_RAW_POINT out,
const uint8_t dst,
size_t  dst_len,
const uint8_t msg,
size_t  msg_len 
)

Definition at line 339 of file hash_to_curve.c.

◆ ec_hash_to_scalar_p384_xmd_sha512_draft07()

int ec_hash_to_scalar_p384_xmd_sha512_draft07 ( const EC_GROUP group,
EC_SCALAR out,
const uint8_t dst,
size_t  dst_len,
const uint8_t msg,
size_t  msg_len 
)

Definition at line 375 of file hash_to_curve.c.

◆ expand_message_xmd()

static int expand_message_xmd ( const EVP_MD md,
uint8_t out,
size_t  out_len,
const uint8_t msg,
size_t  msg_len,
const uint8_t dst,
size_t  dst_len 
)
static

Definition at line 54 of file hash_to_curve.c.

◆ felem_from_u8()

static int felem_from_u8 ( const EC_GROUP group,
EC_FELEM out,
uint8_t  a 
)
static

Definition at line 332 of file hash_to_curve.c.

◆ hash_to_curve()

static int hash_to_curve ( const EC_GROUP group,
const EVP_MD md,
const EC_FELEM Z,
const EC_FELEM c2,
unsigned  k,
EC_RAW_POINT out,
const uint8_t dst,
size_t  dst_len,
const uint8_t msg,
size_t  msg_len 
)
static

Definition at line 304 of file hash_to_curve.c.

◆ hash_to_field2()

static int hash_to_field2 ( const EC_GROUP group,
const EVP_MD md,
EC_FELEM out1,
EC_FELEM out2,
const uint8_t dst,
size_t  dst_len,
unsigned  k,
const uint8_t msg,
size_t  msg_len 
)
static

Definition at line 171 of file hash_to_curve.c.

◆ hash_to_scalar()

static int hash_to_scalar ( const EC_GROUP group,
const EVP_MD md,
EC_SCALAR out,
const uint8_t dst,
size_t  dst_len,
unsigned  k,
const uint8_t msg,
size_t  msg_len 
)
static

Definition at line 192 of file hash_to_curve.c.

◆ map_to_curve_simple_swu()

static int map_to_curve_simple_swu ( const EC_GROUP group,
const EC_FELEM Z,
const BN_ULONG *  c1,
size_t  num_c1,
const EC_FELEM c2,
EC_RAW_POINT out,
const EC_FELEM u 
)
static

Definition at line 238 of file hash_to_curve.c.

◆ mul_A()

static void mul_A ( const EC_GROUP group,
EC_FELEM out,
const EC_FELEM in 
)
inlinestatic

Definition at line 209 of file hash_to_curve.c.

◆ mul_minus_A()

static void mul_minus_A ( const EC_GROUP group,
EC_FELEM out,
const EC_FELEM in 
)
inlinestatic

Definition at line 218 of file hash_to_curve.c.

◆ num_bytes_to_derive()

static int num_bytes_to_derive ( size_t *  out,
const BIGNUM modulus,
unsigned  k 
)
static

Definition at line 137 of file hash_to_curve.c.

◆ sgn0_le()

static BN_ULONG sgn0_le ( const EC_GROUP group,
const EC_FELEM a 
)
static

Definition at line 228 of file hash_to_curve.c.



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