cell_rendezvous.trunnel (933B)
1 /* 2 * This contains the definition of the RENDEZVOUS1/2 cell for onion service 3 * version 3 and onward. The following format is specified in proposal 224 4 * section 4.2. 5 */ 6 7 /* Rendezvous cookie length. */ 8 const TRUNNEL_REND_COOKIE_LEN = 20; 9 /* The HANDSHAKE_INFO field layout is as follow: 10 * SERVER_PK [PK_PUBKEY_LEN bytes] 11 * AUTH [MAC_LEN bytes] 12 * This means, the size is 32 bytes + 32 bytes. */ 13 const TRUNNEL_HANDSHAKE_INFO_LEN = 64; 14 15 /* RENDEZVOUS1 payload. See details in section 4.2. */ 16 struct trn_cell_rendezvous1 { 17 /* The RENDEZVOUS_COOKIE field. */ 18 u8 rendezvous_cookie[TRUNNEL_REND_COOKIE_LEN]; 19 20 /* The HANDSHAKE_INFO field which has a variable length depending on the 21 * handshake type used. */ 22 u8 handshake_info[]; 23 }; 24 25 /* RENDEZVOUS2 payload. See details in section 4.2. */ 26 struct trn_cell_rendezvous2 { 27 /* The HANDSHAKE_INFO field. */ 28 u8 handshake_info[TRUNNEL_HANDSHAKE_INFO_LEN]; 29 };