aboutsummaryrefslogtreecommitdiff
path: root/tor-spec.txt
diff options
context:
space:
mode:
authorDamian Johnson <atagar@torproject.org>2018-02-07 09:48:19 -0800
committerDamian Johnson <atagar@torproject.org>2018-02-07 09:48:19 -0800
commitd326f4d1e39640ed9ef8ee17e4c28119c391e097 (patch)
treefb3f3d99b8c8cb46933a0b2733fe65936cf28d52 /tor-spec.txt
parent6bd0a699a0856240480a4bc339722db142beec0a (diff)
downloadtorspec-d326f4d1e39640ed9ef8ee17e4c28119c391e097.tar.gz
torspec-d326f4d1e39640ed9ef8ee17e4c28119c391e097.zip
Clarify what the RELAY cell's 'recognized' field is for
Our tor-spec left me pretty mystified what the 'recognized' field actually was. It discussed what to do when it was zero, but not what the field *was* or what non-zero meant. Thankfully Roger filled me in over tasty, tasty pizza.
Diffstat (limited to 'tor-spec.txt')
-rw-r--r--tor-spec.txt20
1 files changed, 13 insertions, 7 deletions
diff --git a/tor-spec.txt b/tor-spec.txt
index 061cc08..2272c28 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -1443,13 +1443,19 @@ see tor-design.pdf.
other nodes in the circuit back to the originator. Commands marked
as either can be sent either by the originator or other nodes.
- The 'recognized' field in any unencrypted relay payload is always set
- to zero; the 'digest' field is computed as the first four bytes of
- the running digest of all the bytes that have been destined for
- this hop of the circuit or originated from this hop of the circuit,
- seeded from Df or Db respectively (obtained in section 5.2 above),
- and including this RELAY cell's entire payload (taken with the digest
- field set to zero).
+ The 'recognized' field is used for a simple indication for if the
+ cell still encrypted or not. When sending cells the unencrypted
+ 'recognized' MUST be set to zero. When receiving and decrypting
+ cells the 'recognized' will be zero if we're the endpoint the cell
+ is destined for, and non-zero otherwise.
+
+ When 'recognized' in an unencrypted relay payload is zero the
+ 'digest' field is computed as the first four bytes of the running
+ digest of all the bytes that have been destined for this hop of
+ the circuit or originated from this hop of the circuit, seeded from
+ Df or Db respectively (obtained in section 5.2 above), and including
+ this RELAY cell's entire payload (taken with the digest field set to
+ zero).
When the 'recognized' field of a RELAY cell is zero, and the digest
is correct, the cell is considered "recognized" for the purposes of