Tor 0.4.9.2-alpha-dev
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
17
18typedef enum relay_crypto_kind_t {
19 RCK_TOR1,
20 RCK_CGO,
21} relay_crypto_kind_t;
22
23typedef struct cgo_pair_t {
24 // NOTE: Using pointers here is a bit awkward; we may want to refactor
25 // eventually.
26 cgo_crypt_t *fwd;
27 cgo_crypt_t *back;
28 /* The last tag that we got when originating or recognizing a message */
29 uint8_t last_tag[SENDME_TAG_LEN_CGO];
31
33 relay_crypto_kind_t kind;
34 union {
35 struct tor1_crypt_t tor1;
36 cgo_pair_t cgo;
37 } c;
38};
39
40#endif /* !defined(RELAY_CRYPTO_ST_H) */
#define SENDME_TAG_LEN_CGO
Definition: or.h:457
Header file for relay_crypto_cgo.c.
struct cgo_crypt_t cgo_crypt_t
Structures for tor1 relay cell encryption.