[tor-commits] [torspec/master] Small tweaks to clarify recognized even more

nickm at torproject.org nickm at torproject.org
Tue Feb 13 14:07:09 UTC 2018


commit ef91cd6a595128847c991eb875d105b850d60fcf
Author: Nick Mathewson <nickm at torproject.org>
Date:   Tue Feb 13 09:03:58 2018 -0500

    Small tweaks to clarify recognized even more
---
 tor-spec.txt | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/tor-spec.txt b/tor-spec.txt
index 7aba3da..13691b7 100644
--- a/tor-spec.txt
+++ b/tor-spec.txt
@@ -1443,22 +1443,22 @@ 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. When receiving and decrypting
-   cells the 'recognized' MAY be zero if we're the endpoint the cell
-   is destined for (there's a 1/2^32 chance of encrypted bytes
-   coincidently being zero), 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
+   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 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.
+
+   When handling a relay cell, if the 'recognized' in field in a
+   decrypted 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).  If the digest
    is correct, the cell is considered "recognized" for the purposes of
    decryption (see section 5.5 above).
 



More information about the tor-commits mailing list