Tor 0.4.9.2-alpha-dev
|
NSS implementation of Diffie-Hellman over Z_p. More...
#include "lib/crypt_ops/crypto_dh.h"
#include "lib/crypt_ops/crypto_nss_mgt.h"
#include "lib/encoding/binascii.h"
#include "lib/log/util_bug.h"
#include "lib/malloc/malloc.h"
#include <cryptohi.h>
#include <keyhi.h>
#include <pk11pub.h>
Go to the source code of this file.
Data Structures | |
struct | crypto_dh_t |
Functions | |
void | crypto_dh_init_nss (void) |
void | crypto_dh_free_all_nss (void) |
crypto_dh_t * | crypto_dh_new (int dh_type) |
crypto_dh_t * | crypto_dh_dup (const crypto_dh_t *dh) |
int | crypto_dh_get_bytes (crypto_dh_t *dh) |
int | crypto_dh_generate_public (crypto_dh_t *dh) |
int | crypto_dh_get_public (crypto_dh_t *dh, char *pubkey_out, size_t pubkey_out_len) |
void | crypto_dh_free_ (crypto_dh_t *dh) |
ssize_t | crypto_dh_handshake (int severity, crypto_dh_t *dh, const char *pubkey, size_t pubkey_len, unsigned char *secret_out, size_t secret_bytes_out) |
Variables | |
static int | dh_initialized = 0 |
static SECKEYDHParams | tls_dh_param |
static SECKEYDHParams | circuit_dh_param |
static unsigned char | tls_dh_prime_data [DH2048_KEY_LEN] |
static unsigned char | circuit_dh_prime_data [DH1024_KEY_LEN] |
static unsigned char | dh_generator_data [1] |
NSS implementation of Diffie-Hellman over Z_p.
Definition in file crypto_dh_nss.c.
crypto_dh_t * crypto_dh_dup | ( | const crypto_dh_t * | dh | ) |
Definition at line 83 of file crypto_dh_nss.c.
void crypto_dh_free_ | ( | crypto_dh_t * | dh | ) |
Definition at line 143 of file crypto_dh_nss.c.
void crypto_dh_free_all_nss | ( | void | ) |
Definition at line 63 of file crypto_dh_nss.c.
int crypto_dh_generate_public | ( | crypto_dh_t * | dh | ) |
Definition at line 102 of file crypto_dh_nss.c.
int crypto_dh_get_bytes | ( | crypto_dh_t * | dh | ) |
Definition at line 95 of file crypto_dh_nss.c.
int crypto_dh_get_public | ( | crypto_dh_t * | dh, |
char * | pubkey_out, | ||
size_t | pubkey_out_len | ||
) |
Definition at line 118 of file crypto_dh_nss.c.
ssize_t crypto_dh_handshake | ( | int | severity, |
crypto_dh_t * | dh, | ||
const char * | pubkey, | ||
size_t | pubkey_len, | ||
unsigned char * | secret_out, | ||
size_t | secret_bytes_out | ||
) |
Definition at line 155 of file crypto_dh_nss.c.
void crypto_dh_init_nss | ( | void | ) |
Definition at line 33 of file crypto_dh_nss.c.
crypto_dh_t * crypto_dh_new | ( | int | dh_type | ) |
Definition at line 75 of file crypto_dh_nss.c.
|
static |
Definition at line 27 of file crypto_dh_nss.c.
|
static |
Definition at line 29 of file crypto_dh_nss.c.
|
static |
Definition at line 30 of file crypto_dh_nss.c.
|
static |
Definition at line 26 of file crypto_dh_nss.c.
|
static |
Definition at line 27 of file crypto_dh_nss.c.
|
static |
Definition at line 28 of file crypto_dh_nss.c.