fallbackdir: Update list generated on August 30, 2023
[tor.git] / src / core / or / relay_crypto_st.h
blob32ff86235af25e80790bb8c6408a7dbc87410233
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 */
7 /**
8 * @file relay_crypto_st.h
9 * @brief Relay-cell encryption state structure.
10 **/
12 #ifndef RELAY_CRYPTO_ST_H
13 #define RELAY_CRYPTO_ST_H
15 #define crypto_cipher_t aes_cnt_cipher_t
16 struct crypto_cipher_t;
17 struct crypto_digest_t;
19 struct relay_crypto_t {
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;
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. */
31 struct crypto_digest_t *b_digest;
33 /** Digest used for the next SENDME cell if any. */
34 uint8_t sendme_digest[DIGEST_LEN];
36 #undef crypto_cipher_t
38 #endif /* !defined(RELAY_CRYPTO_ST_H) */