Data Structures | Functions | Variables
crypto_dh_nss.c File Reference

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


void crypto_dh_init_nss (void)
void crypto_dh_free_all_nss (void)
crypto_dh_tcrypto_dh_new (int dh_type)
crypto_dh_tcrypto_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)


static int dh_initialized = 0
static SECKEYDHParams tls_dh_param
static SECKEYDHParams circuit_dh_param
static unsigned char tls_dh_prime_data [DH1024_KEY_LEN]
static unsigned char circuit_dh_prime_data [DH1024_KEY_LEN]
static unsigned char dh_generator_data [1]

Detailed Description

NSS implementation of Diffie-Hellman over Z_p.

Definition in file crypto_dh_nss.c.