Tor  0.4.4.0-alpha-dev
relay_crypto.h
Go to the documentation of this file.
1 /* Copyright (c) 2001 Matej Pfajfar.
2  * Copyright (c) 2001-2004, Roger Dingledine.
3  * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
4  * Copyright (c) 2007-2020, The Tor Project, Inc. */
5 /* See LICENSE for licensing information */
6 
7 /**
8  * \file relay.h
9  * \brief Header file for relay.c.
10  **/
11 
12 #ifndef TOR_RELAY_CRYPTO_H
13 #define TOR_RELAY_CRYPTO_H
14 
16  const char *key_data, size_t key_data_len,
17  int reverse, int is_hs_v3);
18 
19 int relay_decrypt_cell(circuit_t *circ, cell_t *cell,
20  cell_direction_t cell_direction,
21  crypt_path_t **layer_hint, char *recognized);
23  crypt_path_t *layer_hint);
24 void relay_encrypt_cell_inbound(cell_t *cell, or_circuit_t *or_circ);
25 
27 
28 void relay_crypto_assert_ok(const relay_crypto_t *crypto);
29 
31 
33  bool is_foward_digest);
34 
35 void
36 relay_crypt_one_payload(crypto_cipher_t *cipher, uint8_t *in);
37 
38 void
40 
41 #endif /* !defined(TOR_RELAY_CRYPTO_H) */
42 
void relay_encrypt_cell_outbound(cell_t *cell, origin_circuit_t *or_circ, crypt_path_t *layer_hint)
Definition: relay_crypto.c:219
uint8_t * relay_crypto_get_sendme_digest(relay_crypto_t *crypto)
Definition: relay_crypto.c:102
void relay_crypt_one_payload(crypto_cipher_t *cipher, uint8_t *in)
Definition: relay_crypto.c:95
Definition: cell_st.h:17
int relay_decrypt_cell(circuit_t *circ, cell_t *cell, cell_direction_t cell_direction, crypt_path_t **layer_hint, char *recognized)
Definition: relay_crypto.c:145
void relay_set_digest(crypto_digest_t *digest, cell_t *cell)
Definition: relay_crypto.c:31
cell_direction_t
Definition: or.h:482
void relay_crypto_assert_ok(const relay_crypto_t *crypto)
Definition: relay_crypto.c:367
int relay_crypto_init(relay_crypto_t *crypto, const char *key_data, size_t key_data_len, int reverse, int is_hs_v3)
Definition: relay_crypto.c:293
void relay_crypto_record_sendme_digest(relay_crypto_t *crypto, bool is_foward_digest)
Definition: relay_crypto.c:111
void relay_encrypt_cell_inbound(cell_t *cell, or_circuit_t *or_circ)
Definition: relay_crypto.c:248
void relay_crypto_clear(relay_crypto_t *crypto)
Definition: relay_crypto.c:265