diff options
author | David Goulet <dgoulet@torproject.org> | 2017-09-19 09:07:42 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2017-09-19 09:13:28 -0400 |
commit | a3f5a246693cca2f6a51e418e6edf8fae2fe75b5 (patch) | |
tree | 1ffc0876ea4983534f09de041de9a41ce4e6bc78 /src/or/hs_common.h | |
parent | 1f602e86433cc132981e8f9727266353ea2c3b0e (diff) | |
download | tor-a3f5a246693cca2f6a51e418e6edf8fae2fe75b5.tar.gz tor-a3f5a246693cca2f6a51e418e6edf8fae2fe75b5.zip |
hs: Pad RENDEZVOUS1 v3 cell to match length of v2
RENDEZVOUS1 cell is 84 bytes long in v3 and 168 bytes long in v2 so this
commit pads with random bytes the v3 cells up to 168 bytes so they all look
alike at the rendezvous point.
Closes #23420
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/or/hs_common.h')
-rw-r--r-- | src/or/hs_common.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/hs_common.h b/src/or/hs_common.h index e28ffe1adb..c95e59a6f8 100644 --- a/src/or/hs_common.h +++ b/src/or/hs_common.h @@ -118,6 +118,12 @@ /* Default value of hsdir spread fetch (hsdir_spread_fetch). */ #define HS_DEFAULT_HSDIR_SPREAD_FETCH 3 +/* The size of a legacy RENDEZVOUS1 cell which adds up to 168 bytes. It is + * bigger than the 84 bytes needed for version 3 so we need to pad up to that + * length so it is indistinguishable between versions. */ +#define HS_LEGACY_RENDEZVOUS_CELL_SIZE \ + (REND_COOKIE_LEN + DH_KEY_LEN + DIGEST_LEN) + /* Type of authentication key used by an introduction point. */ typedef enum { HS_AUTH_KEY_TYPE_LEGACY = 1, |