2 * This contains the definition of the ESTABLISH_INTRO and INTRO_ESTABLISHED
3 * cell for onion service version 3 and onward. The following format is
4 * specified in proposal 224 section 3.1.
7 extern struct trn_cell_extension;
9 const TRUNNEL_SHA3_256_LEN = 32;
11 /* ESTABLISH_INTRO payload. See details in section 3.1.1 */
12 struct trn_cell_establish_intro {
13 /* Indicate the start of the handshake authentication data. */
16 /* Authentication key material. */
17 u8 auth_key_type IN [0x00, 0x01, 0x02];
19 u8 auth_key[auth_key_len];
21 /* Extension(s). Reserved fields. */
22 struct trn_cell_extension extensions;
26 u8 handshake_mac[TRUNNEL_SHA3_256_LEN];
29 /* Indicate the end of the handshake authentication data. */
35 /* INTRO_ESTABLISHED payload which is an acknowledge of the ESTABLISH_INTRO
36 * cell. For legacy node, this payload is empty so the following only applies
38 struct trn_cell_intro_established {
39 /* Extension(s). Reserved fields. */
40 struct trn_cell_extension extensions;