14 #include "lib/crypt_ops/compat_openssl.h"
29 "D67DE440CBBBDC1936D693D34AFD0AD50C84D239A45F520BB88174CB98"
30 "BCE951849F912E639C72FB13B4B4D7177E16D55AC179BA420B2A29FE324A"
31 "467A635E81FF5901377BEDDCFD33168A461AAD3B72DAE8860078045B07A7"
32 "DBCA7874087D1510EA9FCC9DDD330507DD62DB88AEAA747DE0F4D6E2BD68"
40 "FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E08"
41 "8A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B"
42 "302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9"
43 "A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE6"
44 "49286651ECE65381FFFFFFFFFFFFFFFF";
58 crypto_dh_free_all(
void)
61 crypto_dh_free_all_openssl();
64 crypto_dh_free_all_nss();
80 const char *pubkey,
size_t pubkey_len,
81 char *secret_out,
size_t secret_bytes_out)
85 unsigned char *secret_tmp = NULL;
86 size_t secret_len=0, secret_tmp_len=0;
88 secret_tmp = tor_malloc(secret_tmp_len);
91 secret_tmp, secret_tmp_len);
97 (uint8_t*)secret_out, secret_bytes_out)<0)
99 secret_len = secret_bytes_out;
106 memwipe(secret_tmp, 0, secret_tmp_len);
ssize_t crypto_dh_compute_secret(int severity, crypto_dh_t *dh, const char *pubkey, size_t pubkey_len, char *secret_out, size_t secret_bytes_out)
const char OAKLEY_PRIME_2[]
const char TLS_DH_PRIME[]
const unsigned DH_GENERATOR
int crypto_dh_get_bytes(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)
void crypto_dh_init_openssl(void)
Headers for crypto_digest.c.
int crypto_expand_key_material_TAP(const uint8_t *key_in, size_t key_in_len, uint8_t *key_out, size_t key_out_len)
Headers for crypto_hkdf.h.
void memwipe(void *mem, uint8_t byte, size_t sz)
Common functions for cryptographic routines.
Macros to manage assertions, fatal and non-fatal.