aboutsummaryrefslogtreecommitdiff
path: root/tor-spec.txt
diff options
context:
space:
mode:
authorteor <teor@torproject.org>2018-07-19 13:23:46 +1000
committerteor <teor@torproject.org>2018-07-19 13:24:49 +1000
commitce1d4a8b7e1e5eb714068a8cf44fdc5ae24460d9 (patch)
treedeac0f7297b0a7e9ce8385fe877fac30a2b6b884 /tor-spec.txt
parent1fb4cb58e98af3d4ac153efe6d0ddc43665d9a74 (diff)
downloadtorspec-ce1d4a8b7e1e5eb714068a8cf44fdc5ae24460d9.tar.gz
torspec-ce1d4a8b7e1e5eb714068a8cf44fdc5ae24460d9.zip
tor-spec: Fix recognized error, and explain why the field exists
Closes 26872.
Diffstat (limited to 'tor-spec.txt')
-rw-r--r--tor-spec.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/tor-spec.txt b/tor-spec.txt
index ea195ad..a685515 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -1443,14 +1443,15 @@ 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 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.
+ The 'recognized' field is used as a simple indication that the cell
+ is still encrypted. It is an optimization to avoid calculating
+ expensive digests for every cell. When sending cells, the unencrypted
+ 'recognized' MUST be set to zero.
When receiving and decrypting cells the 'recognized' will always be
zero if we're the endpoint that the cell is destined for. For cells
that we should relay, the 'recognized' field will usually be nonzero,
- but will accidentally be zero with P=2^-32.
+ but will accidentally be zero with P=2^-16.
When handling a relay cell, if the 'recognized' in field in a
decrypted relay payload is zero, the 'digest' field is computed as