diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-05 12:12:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-05 12:12:18 -0400 |
commit | c6d7e0becf33409f87c41c369cd3b561f477df2b (patch) | |
tree | 3f84139a214cc091ccc1eae8ad6ad81d798f896a /src/or/or.h | |
parent | 2933f73b31a51ed4ffdb5c0f69c7b58d11c237b6 (diff) | |
parent | a9fa483004b0951c3fc7f8a9f5a097b917da6fa8 (diff) | |
download | tor-c6d7e0becf33409f87c41c369cd3b561f477df2b.tar.gz tor-c6d7e0becf33409f87c41c369cd3b561f477df2b.zip |
Merge remote-tracking branch 'public/split_relay_crypto'
Diffstat (limited to 'src/or/or.h')
-rw-r--r-- | src/or/or.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/src/or/or.h b/src/or/or.h index 25fc6cdf37..25ad351751 100644 --- a/src/or/or.h +++ b/src/or/or.h @@ -2899,11 +2899,7 @@ typedef struct { } u; } onion_handshake_state_t; -/** Holds accounting information for a single step in the layered encryption - * performed by a circuit. Used only at the client edge of a circuit. */ -typedef struct crypt_path_t { - uint32_t magic; - +typedef struct relay_crypto_t { /* crypto environments */ /** Encryption key and counter for cells heading towards the OR at this * step. */ @@ -2917,6 +2913,17 @@ typedef struct crypt_path_t { /** Digest state for cells heading away from the OR at this step. */ crypto_digest_t *b_digest; +} relay_crypto_t; + +/** Holds accounting information for a single step in the layered encryption + * performed by a circuit. Used only at the client edge of a circuit. */ +typedef struct crypt_path_t { + uint32_t magic; + + /** Cryptographic state used for encrypting and authenticating relay + * cells to and from this hop. */ + relay_crypto_t crypto; + /** Current state of the handshake as performed with the OR at this * step. */ onion_handshake_state_t handshake_state; @@ -3465,21 +3472,10 @@ typedef struct or_circuit_t { /** Linked list of Exit streams associated with this circuit that are * still being resolved. */ edge_connection_t *resolving_streams; - /** The cipher used by intermediate hops for cells heading toward the - * OP. */ - crypto_cipher_t *p_crypto; - /** The cipher used by intermediate hops for cells heading away from - * the OP. */ - crypto_cipher_t *n_crypto; - - /** The integrity-checking digest used by intermediate hops, for - * cells packaged here and heading towards the OP. - */ - crypto_digest_t *p_digest; - /** The integrity-checking digest used by intermediate hops, for - * cells packaged at the OP and arriving here. - */ - crypto_digest_t *n_digest; + + /** Cryptographic state used for encrypting and authenticating relay + * cells to and from this hop. */ + relay_crypto_t crypto; /** Points to spliced circuit if purpose is REND_ESTABLISHED, and circuit * is not marked for close. */ |