12 #ifndef TOR_ONION_CRYPTO_H
13 #define TOR_ONION_CRYPTO_H
28 uint8_t *onion_skin_out);
30 const uint8_t *onion_skin,
size_t onionskin_len,
33 uint8_t *keys_out,
size_t key_out_len,
34 uint8_t *rend_nonce_out);
37 const uint8_t *reply,
size_t reply_len,
38 uint8_t *keys_out,
size_t key_out_len,
39 uint8_t *rend_authenticator_out,
40 const char **msg_out);
44 #define server_onion_keys_free(keys) \
45 FREE_AND_NULL(server_onion_keys_t, server_onion_keys_free_, (keys))
server_onion_keys_t * server_onion_keys_new(void)
void server_onion_keys_free_(server_onion_keys_t *keys)
void onion_handshake_state_release(onion_handshake_state_t *state)
int onion_skin_create(int type, const extend_info_t *node, onion_handshake_state_t *state_out, uint8_t *onion_skin_out)
int onion_skin_server_handshake(int type, const uint8_t *onion_skin, size_t onionskin_len, const server_onion_keys_t *keys, uint8_t *reply_out, uint8_t *keys_out, size_t key_out_len, uint8_t *rend_nonce_out)
int onion_skin_client_handshake(int type, const onion_handshake_state_t *handshake_state, const uint8_t *reply, size_t reply_len, uint8_t *keys_out, size_t key_out_len, uint8_t *rend_authenticator_out, const char **msg_out)