SWILIB API (ELKA)    
Loading...
Searching...
No Matches
dh.h File Reference
#include "bn.h"
#include "crypto.h"

Go to the source code of this file.

Data Structures

struct  dh_method
 
struct  dh_st
 

Macros

#define DH_FLAG_CACHE_MONT_P   0x01
 
#define DH_GENERATOR_2   2
 
#define DH_GENERATOR_5   5
 
#define DH_CHECK_P_NOT_PRIME   0x01
 
#define DH_CHECK_P_NOT_SAFE_PRIME   0x02
 
#define DH_UNABLE_TO_CHECK_GENERATOR   0x04
 
#define DH_NOT_SUITABLE_GENERATOR   0x08
 
#define DH_CHECK_P_NOT_STRONG_PRIME   DH_CHECK_P_NOT_SAFE_PRIME
 
#define DHparams_dup(x)
 
#define d2i_DHparams_fp(fp, x)
 
#define i2d_DHparams_fp(fp, x)
 
#define d2i_DHparams_bio(bp, x)
 
#define i2d_DHparams_bio(bp, x)
 
#define DH_F_DHPARAMS_PRINT   100
 
#define DH_F_DHPARAMS_PRINT_FP   101
 
#define DH_F_DH_COMPUTE_KEY   102
 
#define DH_F_DH_GENERATE_KEY   103
 
#define DH_F_DH_GENERATE_PARAMETERS   104
 
#define DH_F_DH_NEW   105
 
#define DH_R_NO_PRIVATE_VALUE   100
 

Typedefs

typedef struct dh_st DH
 
typedef struct dh_method DH_METHOD
 

Functions

DH_METHOD * DH_OpenSSL (void)
 
void DH_set_default_method (DH_METHOD *meth)
 
DH_METHOD * DH_get_default_method (void)
 
DH_METHOD * DH_set_method (DH *dh, DH_METHOD *meth)
 
DH * DH_new_method (DH_METHOD *meth)
 
DH * DH_new (void)
 
void DH_free (DH *dh)
 
int DH_size (DH *dh)
 
int DH_get_ex_new_index (long argl, void *argp, CRYPTO_EX_new *new_func, CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func)
 
int DH_set_ex_data (DH *d, int idx, void *arg)
 
void * DH_get_ex_data (DH *d, int idx)
 
DH * DH_generate_parameters (int prime_len, int generator, void(*callback)(int, int, void *), void *cb_arg)
 
int DH_check (DH *dh, int *codes)
 
int DH_generate_key (DH *dh)
 
int DH_compute_key (unsigned char *key, BIGNUM *pub_key, DH *dh)
 
DH * d2i_DHparams (DH **a, unsigned char **pp, long length)
 
int i2d_DHparams (DH *a, unsigned char **pp)
 
int DHparams_print (char *bp, DH *x)
 
void ERR_load_DH_strings (void)
 

Data Structure Documentation

◆ dh_method

struct dh_method

◆ dh_st

struct dh_st

Macro Definition Documentation

◆ DH_FLAG_CACHE_MONT_P

#define DH_FLAG_CACHE_MONT_P   0x01

Definition at line 73 of file dh.h.

◆ DH_GENERATOR_2

#define DH_GENERATOR_2   2

Definition at line 118 of file dh.h.

◆ DH_GENERATOR_5

#define DH_GENERATOR_5   5

Definition at line 120 of file dh.h.

◆ DH_CHECK_P_NOT_PRIME

#define DH_CHECK_P_NOT_PRIME   0x01

Definition at line 123 of file dh.h.

◆ DH_CHECK_P_NOT_SAFE_PRIME

#define DH_CHECK_P_NOT_SAFE_PRIME   0x02

Definition at line 124 of file dh.h.

◆ DH_UNABLE_TO_CHECK_GENERATOR

#define DH_UNABLE_TO_CHECK_GENERATOR   0x04

Definition at line 125 of file dh.h.

◆ DH_NOT_SUITABLE_GENERATOR

#define DH_NOT_SUITABLE_GENERATOR   0x08

Definition at line 126 of file dh.h.

◆ DH_CHECK_P_NOT_STRONG_PRIME

#define DH_CHECK_P_NOT_STRONG_PRIME   DH_CHECK_P_NOT_SAFE_PRIME

Definition at line 130 of file dh.h.

◆ DHparams_dup

#define DHparams_dup ( x)
Value:
(DH *)ASN1_dup((int (*)())i2d_DHparams, \
(char *(*)())d2i_DHparams,(char *)(x))
char * ASN1_dup(int(*i2d)(), char *(*d2i)(), char *x)
DH * d2i_DHparams(DH **a, unsigned char **pp, long length)
int i2d_DHparams(DH *a, unsigned char **pp)
Definition dh.h:93

Definition at line 132 of file dh.h.

◆ d2i_DHparams_fp

#define d2i_DHparams_fp ( fp,
x )
Value:
(DH *)ASN1_d2i_fp((char *(*)())DH_new, \
(char *(*)())d2i_DHparams,(fp),(unsigned char **)(x))
DH * DH_new(void)

Definition at line 134 of file dh.h.

◆ i2d_DHparams_fp

#define i2d_DHparams_fp ( fp,
x )
Value:
ASN1_i2d_fp(i2d_DHparams,(fp), \
(unsigned char *)(x))

Definition at line 136 of file dh.h.

◆ d2i_DHparams_bio

#define d2i_DHparams_bio ( bp,
x )
Value:
(DH *)ASN1_d2i_bio((char *(*)())DH_new, \
(char *(*)())d2i_DHparams,(bp),(unsigned char **)(x))

Definition at line 138 of file dh.h.

◆ i2d_DHparams_bio

#define i2d_DHparams_bio ( bp,
x )
Value:
ASN1_i2d_bio(i2d_DHparams,(bp), \
(unsigned char *)(x))

Definition at line 144 of file dh.h.

◆ DH_F_DHPARAMS_PRINT

#define DH_F_DHPARAMS_PRINT   100

Definition at line 187 of file dh.h.

◆ DH_F_DHPARAMS_PRINT_FP

#define DH_F_DHPARAMS_PRINT_FP   101

Definition at line 188 of file dh.h.

◆ DH_F_DH_COMPUTE_KEY

#define DH_F_DH_COMPUTE_KEY   102

Definition at line 189 of file dh.h.

◆ DH_F_DH_GENERATE_KEY

#define DH_F_DH_GENERATE_KEY   103

Definition at line 190 of file dh.h.

◆ DH_F_DH_GENERATE_PARAMETERS

#define DH_F_DH_GENERATE_PARAMETERS   104

Definition at line 191 of file dh.h.

◆ DH_F_DH_NEW

#define DH_F_DH_NEW   105

Definition at line 192 of file dh.h.

◆ DH_R_NO_PRIVATE_VALUE

#define DH_R_NO_PRIVATE_VALUE   100

Definition at line 195 of file dh.h.

Typedef Documentation

◆ DH

typedef struct dh_st DH

Definition at line 75 of file dh.h.

◆ DH_METHOD

typedef struct dh_method DH_METHOD

Function Documentation

◆ DH_OpenSSL()

DH_METHOD * DH_OpenSSL ( void )

◆ DH_set_default_method()

void DH_set_default_method ( DH_METHOD * meth)

◆ DH_get_default_method()

DH_METHOD * DH_get_default_method ( void )

◆ DH_set_method()

DH_METHOD * DH_set_method ( DH * dh,
DH_METHOD * meth )

◆ DH_new_method()

DH * DH_new_method ( DH_METHOD * meth)

◆ DH_new()

DH * DH_new ( void )

◆ DH_free()

void DH_free ( DH * dh)

◆ DH_size()

int DH_size ( DH * dh)

◆ DH_get_ex_new_index()

int DH_get_ex_new_index ( long argl,
void * argp,
CRYPTO_EX_new * new_func,
CRYPTO_EX_dup * dup_func,
CRYPTO_EX_free * free_func )

◆ DH_set_ex_data()

int DH_set_ex_data ( DH * d,
int idx,
void * arg )

◆ DH_get_ex_data()

void * DH_get_ex_data ( DH * d,
int idx )

◆ DH_generate_parameters()

DH * DH_generate_parameters ( int prime_len,
int generator,
void(* callback )(int, int, void *),
void * cb_arg )

◆ DH_check()

int DH_check ( DH * dh,
int * codes )

◆ DH_generate_key()

int DH_generate_key ( DH * dh)

◆ DH_compute_key()

int DH_compute_key ( unsigned char * key,
BIGNUM * pub_key,
DH * dh )

◆ d2i_DHparams()

DH * d2i_DHparams ( DH ** a,
unsigned char ** pp,
long length )

◆ i2d_DHparams()

int i2d_DHparams ( DH * a,
unsigned char ** pp )

◆ DHparams_print()

int DHparams_print ( char * bp,
DH * x )

◆ ERR_load_DH_strings()

void ERR_load_DH_strings ( void )