Tor  0.4.7.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-2021, 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) */
#define DIGEST_LEN
Definition: digest_sizes.h:20
struct crypto_digest_t * b_digest
struct crypto_digest_t * f_digest
uint8_t sendme_digest[DIGEST_LEN]
struct crypto_cipher_t * f_crypto
struct crypto_cipher_t * b_crypto