dh - Diffie-Hellman key agreement
#include <openssl/dh.h>
DH * DH_new(void); void DH_free(DH *dh);
int DH_size(DH *dh);
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);
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_METHOD *DH_OpenSSL(void);
int DH_get_ex_new_index(long argl, char *argp, int (*new_func)(), int (*dup_func)(), void (*free_func)()); int DH_set_ex_data(DH *d, int idx, char *arg); char *DH_get_ex_data(DH *d, int idx);
DH * d2i_DHparams(DH **a, unsigned char **pp, long length); int i2d_DHparams(DH *a, unsigned char **pp);
int DHparams_print_fp(FILE *fp, DH *x); int DHparams_print(BIO *bp, DH *x);
The DH structure consists of several BIGNUM components.
struct { BIGNUM *p; // prime number (shared) BIGNUM *g; // generator of Z_p (shared) BIGNUM *priv_key; // private DH value x BIGNUM *pub_key; // public DH value g^x // ... }; DH
Закладки на сайте Проследить за страницей |
Created 1996-2024 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |