Tor  0.4.6.0-alpha-dev
relay_crypto_st.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_crypto_st.h
9  * @brief Relay-cell encryption state structure.
10  **/
11 
12 #ifndef RELAY_CRYPTO_ST_H
13 #define RELAY_CRYPTO_ST_H
14 
15 #define crypto_cipher_t aes_cnt_cipher_t
16 struct crypto_cipher_t;
17 struct crypto_digest_t;
18 
20  /* crypto environments */
21  /** Encryption key and counter for cells heading towards the OR at this
22  * step. */
23  struct crypto_cipher_t *f_crypto;
24  /** Encryption key and counter for cells heading back from the OR at this
25  * step. */
26  struct crypto_cipher_t *b_crypto;
27 
28  /** Digest state for cells heading towards the OR at this step. */
29  struct crypto_digest_t *f_digest; /* for integrity checking */
30  /** Digest state for cells heading away from the OR at this step. */
32 
33  /** Digest used for the next SENDME cell if any. */
35 };
36 #undef crypto_cipher_t
37 
38 #endif /* !defined(RELAY_CRYPTO_ST_H) */
relay_crypto_t
Definition: relay_crypto_st.h:19
crypto_digest_t
Definition: crypto_digest_nss.c:166
relay_crypto_t::sendme_digest
uint8_t sendme_digest[DIGEST_LEN]
Definition: relay_crypto_st.h:34
DIGEST_LEN
#define DIGEST_LEN
Definition: digest_sizes.h:20
relay_crypto_t::f_crypto
struct crypto_cipher_t * f_crypto
Definition: relay_crypto_st.h:23
relay_crypto_t::b_crypto
struct crypto_cipher_t * b_crypto
Definition: relay_crypto_st.h:26
relay_crypto_t::b_digest
struct crypto_digest_t * b_digest
Definition: relay_crypto_st.h:31
relay_crypto_t::f_digest
struct crypto_digest_t * f_digest
Definition: relay_crypto_st.h:29