diff options
author | David Goulet <dgoulet@torproject.org> | 2017-07-23 15:04:59 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-08-24 13:03:28 -0400 |
commit | 2f1b3d647ff1489f4cb0f25d96701eaf35e076da (patch) | |
tree | d2d176844324d2ad16c2109228abc565ca5ac4e2 /src/trunnel/hs/cell_rendezvous.trunnel | |
parent | fca2f64e2f563c07e2d5467adc49914bc4545e36 (diff) | |
download | tor-2f1b3d647ff1489f4cb0f25d96701eaf35e076da.tar.gz tor-2f1b3d647ff1489f4cb0f25d96701eaf35e076da.zip |
trunnel: Add RENDEZVOUS2 cell definition
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/trunnel/hs/cell_rendezvous.trunnel')
-rw-r--r-- | src/trunnel/hs/cell_rendezvous.trunnel | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/trunnel/hs/cell_rendezvous.trunnel b/src/trunnel/hs/cell_rendezvous.trunnel index 27f1728b4a..2128b4d126 100644 --- a/src/trunnel/hs/cell_rendezvous.trunnel +++ b/src/trunnel/hs/cell_rendezvous.trunnel @@ -1,11 +1,16 @@ /* - * This contains the definition of the RENDEZVOUS1 cell for onion service + * This contains the definition of the RENDEZVOUS1/2 cell for onion service * version 3 and onward. The following format is specified in proposal 224 * section 4.2. */ /* Rendezvous cookie length. */ const TRUNNEL_REND_COOKIE_LEN = 20; +/* The HANDSHAKE_INFO field layout is as follow: + * SERVER_PK [PK_PUBKEY_LEN bytes] + * AUTH [MAC_LEN bytes] + * This means, the size is 32 bytes + 32 bytes. */ +const TRUNNEL_HANDSHAKE_INFO_LEN = 64; /* RENDEZVOUS1 payload. See details in section 4.2. */ struct trn_cell_rendezvous1 { @@ -16,3 +21,9 @@ struct trn_cell_rendezvous1 { * handshake type used. */ u8 handshake_info[]; }; + +/* RENDEZVOUS2 payload. See details in section 4.2. */ +struct trn_cell_rendezvous2 { + /* The HANDSHAKE_INFO field. */ + u8 handshake_info[TRUNNEL_HANDSHAKE_INFO_LEN]; +}; |