webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Functions
curve25519.c File Reference
#include <openssl/curve25519.h>
#include <string.h>
#include <openssl/cpu.h>
#include <openssl/mem.h>
#include <openssl/rand.h>
#include <openssl/sha.h>
#include "internal.h"

Functions

void x25519_ge_tobytes (uint8_t *s, const ge_p2 *h)
 
int x25519_ge_frombytes_vartime (ge_p3 *h, const uint8_t *s)
 
void x25519_ge_p3_to_cached (ge_cached *r, const ge_p3 *p)
 
void x25519_ge_p1p1_to_p2 (ge_p2 *r, const ge_p1p1 *p)
 
void x25519_ge_p1p1_to_p3 (ge_p3 *r, const ge_p1p1 *p)
 
void x25519_ge_add (ge_p1p1 *r, const ge_p3 *p, const ge_cached *q)
 
void x25519_ge_sub (ge_p1p1 *r, const ge_p3 *p, const ge_cached *q)
 
void x25519_ge_scalarmult_small_precomp (ge_p3 *h, const uint8_t a[32], const uint8_t precomp_table[15 *2 *32])
 
void x25519_ge_scalarmult_base (ge_p3 *h, const uint8_t *a)
 
void x25519_ge_scalarmult (ge_p2 *r, const uint8_t *scalar, const ge_p3 *A)
 
void x25519_sc_reduce (uint8_t *s)
 
void ED25519_keypair (uint8_t out_public_key[32], uint8_t out_private_key[64])
 
int ED25519_sign (uint8_t *out_sig, const uint8_t *message, size_t message_len, const uint8_t private_key[64])
 
int ED25519_verify (const uint8_t *message, size_t message_len, const uint8_t signature[64], const uint8_t public_key[32])
 
void X25519_keypair (uint8_t out_public_value[32], uint8_t out_private_key[32])
 
int X25519 (uint8_t out_shared_key[32], const uint8_t private_key[32], const uint8_t peer_public_value[32])
 
void X25519_public_from_private (uint8_t out_public_value[32], const uint8_t private_key[32])
 

Function Documentation

◆ ED25519_keypair()

void ED25519_keypair ( uint8_t  out_public_key[32],
uint8_t  out_private_key[64] 
)

◆ ED25519_sign()

int ED25519_sign ( uint8_t out_sig,
const uint8_t message,
size_t  message_len,
const uint8_t  private_key[64] 
)

◆ ED25519_verify()

int ED25519_verify ( const uint8_t message,
size_t  message_len,
const uint8_t  signature[64],
const uint8_t  public_key[32] 
)

◆ X25519()

int X25519 ( uint8_t  out_shared_key[32],
const uint8_t  private_key[32],
const uint8_t  peer_public_value[32] 
)

◆ x25519_ge_add()

void x25519_ge_add ( ge_p1p1 r,
const ge_p3 p,
const ge_cached q 
)

◆ x25519_ge_frombytes_vartime()

int x25519_ge_frombytes_vartime ( ge_p3 h,
const uint8_t s 
)

◆ x25519_ge_p1p1_to_p2()

void x25519_ge_p1p1_to_p2 ( ge_p2 r,
const ge_p1p1 p 
)

◆ x25519_ge_p1p1_to_p3()

void x25519_ge_p1p1_to_p3 ( ge_p3 r,
const ge_p1p1 p 
)

◆ x25519_ge_p3_to_cached()

void x25519_ge_p3_to_cached ( ge_cached r,
const ge_p3 p 
)

◆ x25519_ge_scalarmult()

void x25519_ge_scalarmult ( ge_p2 r,
const uint8_t scalar,
const ge_p3 A 
)

◆ x25519_ge_scalarmult_base()

void x25519_ge_scalarmult_base ( ge_p3 h,
const uint8_t a 
)

◆ x25519_ge_scalarmult_small_precomp()

void x25519_ge_scalarmult_small_precomp ( ge_p3 h,
const uint8_t  a[32],
const uint8_t  precomp_table[15 *2 *32] 
)

◆ x25519_ge_sub()

void x25519_ge_sub ( ge_p1p1 r,
const ge_p3 p,
const ge_cached q 
)

◆ x25519_ge_tobytes()

void x25519_ge_tobytes ( uint8_t s,
const ge_p2 h 
)

◆ X25519_keypair()

void X25519_keypair ( uint8_t  out_public_value[32],
uint8_t  out_private_key[32] 
)

◆ X25519_public_from_private()

void X25519_public_from_private ( uint8_t  out_public_value[32],
const uint8_t  private_key[32] 
)

◆ x25519_sc_reduce()

void x25519_sc_reduce ( uint8_t s)