webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
Macros | Enumerations | Functions
curve25519.h File Reference
#include <openssl/base.h>

Go to the source code of this file.

Macros

#define ED25519_PRIVATE_KEY_LEN   64
 
#define ED25519_PUBLIC_KEY_LEN   32
 
#define ED25519_SIGNATURE_LEN   64
 
#define SPAKE2_MAX_MSG_SIZE   32
 
#define SPAKE2_MAX_KEY_SIZE   64
 

Enumerations

enum  spake2_role_t { spake2_role_alice, spake2_role_bob }
 

Functions

OPENSSL_EXPORT void X25519_keypair (uint8_t out_public_value[32], uint8_t out_private_key[32])
 
OPENSSL_EXPORT int X25519 (uint8_t out_shared_key[32], const uint8_t private_key[32], const uint8_t peers_public_value[32])
 
OPENSSL_EXPORT void X25519_public_from_private (uint8_t out_public_value[32], const uint8_t private_key[32])
 
OPENSSL_EXPORT void ED25519_keypair (uint8_t out_public_key[32], uint8_t out_private_key[64])
 
OPENSSL_EXPORT int ED25519_sign (uint8_t out_sig[64], const uint8_t *message, size_t message_len, const uint8_t private_key[64])
 
OPENSSL_EXPORT int ED25519_verify (const uint8_t *message, size_t message_len, const uint8_t signature[64], const uint8_t public_key[32])
 
OPENSSL_EXPORT SPAKE2_CTXSPAKE2_CTX_new (enum spake2_role_t my_role, const uint8_t *my_name, size_t my_name_len, const uint8_t *their_name, size_t their_name_len)
 
OPENSSL_EXPORT void SPAKE2_CTX_free (SPAKE2_CTX *ctx)
 
OPENSSL_EXPORT int SPAKE2_generate_msg (SPAKE2_CTX *ctx, uint8_t *out, size_t *out_len, size_t max_out_len, const uint8_t *password, size_t password_len)
 
OPENSSL_EXPORT int SPAKE2_process_msg (SPAKE2_CTX *ctx, uint8_t *out_key, size_t *out_key_len, size_t max_out_key_len, const uint8_t *their_msg, size_t their_msg_len)
 

Macro Definition Documentation

◆ ED25519_PRIVATE_KEY_LEN

#define ED25519_PRIVATE_KEY_LEN   64

◆ ED25519_PUBLIC_KEY_LEN

#define ED25519_PUBLIC_KEY_LEN   32

◆ ED25519_SIGNATURE_LEN

#define ED25519_SIGNATURE_LEN   64

◆ SPAKE2_MAX_KEY_SIZE

#define SPAKE2_MAX_KEY_SIZE   64

◆ SPAKE2_MAX_MSG_SIZE

#define SPAKE2_MAX_MSG_SIZE   32

Enumeration Type Documentation

◆ spake2_role_t

Enumerator
spake2_role_alice 
spake2_role_bob 

Function Documentation

◆ ED25519_keypair()

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

◆ ED25519_sign()

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

◆ ED25519_verify()

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

◆ SPAKE2_CTX_free()

OPENSSL_EXPORT void SPAKE2_CTX_free ( SPAKE2_CTX ctx)

◆ SPAKE2_CTX_new()

OPENSSL_EXPORT SPAKE2_CTX* SPAKE2_CTX_new ( enum spake2_role_t  my_role,
const uint8_t my_name,
size_t  my_name_len,
const uint8_t their_name,
size_t  their_name_len 
)

◆ SPAKE2_generate_msg()

OPENSSL_EXPORT int SPAKE2_generate_msg ( SPAKE2_CTX ctx,
uint8_t out,
size_t out_len,
size_t  max_out_len,
const uint8_t password,
size_t  password_len 
)

◆ SPAKE2_process_msg()

OPENSSL_EXPORT int SPAKE2_process_msg ( SPAKE2_CTX ctx,
uint8_t out_key,
size_t out_key_len,
size_t  max_out_key_len,
const uint8_t their_msg,
size_t  their_msg_len 
)

◆ X25519()

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

◆ X25519_keypair()

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

◆ X25519_public_from_private()

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