50 uint8_t *handshake_out)
68 uint8_t *handshake_reply_out,
82 out = tor_malloc(out_len);
110 const uint8_t *handshake_reply_out,
113 const char **msg_out)
120 memcpy(tmp, handshake_state->state,
DIGEST_LEN);
123 out = tor_malloc(out_len);
127 *msg_out =
"Failed to expand key material";
134 *msg_out =
"Digest DOES NOT MATCH on fast handshake. Bug or attack.";
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 crypto_rand(char *to, size_t n)
Common functions for using (pseudo-)random number generators.
void memwipe(void *mem, uint8_t byte, size_t sz)
Common functions for cryptographic routines.
#define tor_memneq(a, b, sz)
void fast_handshake_state_free_(fast_handshake_state_t *victim)
int fast_client_handshake(const fast_handshake_state_t *handshake_state, const uint8_t *handshake_reply_out, uint8_t *key_out, size_t key_out_len, const char **msg_out)
int fast_server_handshake(const uint8_t *key_in, uint8_t *handshake_reply_out, uint8_t *key_out, size_t key_out_len)
int fast_onionskin_create(fast_handshake_state_t **handshake_state_out, uint8_t *handshake_out)
Header file for onion_fast.c.
Master header file for Tor-specific functionality.