aboutsummaryrefslogtreecommitdiff
path: root/spec/tor-spec/relay-cells.md
diff options
context:
space:
mode:
Diffstat (limited to 'spec/tor-spec/relay-cells.md')
-rw-r--r--spec/tor-spec/relay-cells.md14
1 files changed, 8 insertions, 6 deletions
diff --git a/spec/tor-spec/relay-cells.md b/spec/tor-spec/relay-cells.md
index 3089d32..f1f7997 100644
--- a/spec/tor-spec/relay-cells.md
+++ b/spec/tor-spec/relay-cells.md
@@ -13,7 +13,7 @@ End nodes that accept streams may be:
- directory servers (RELAY_BEGIN_DIR, anonymous or non-anonymous),
- onion services (RELAY_BEGIN, anonymous via a rendezvous point).
-The payload of each unencrypted relay cell consists of an
+The body of each unencrypted relay cell consists of an
enveloped relay message, encoded as follows:
| Field | Size
@@ -24,7 +24,7 @@ enveloped relay message, encoded as follows:
| Digest | 4 bytes
| Length | 2 bytes
| Data | Length bytes
-| Padding | PAYLOAD_LEN - 11 - Length bytes
+| Padding | CELL_BODY_LEN - 11 - Length bytes
> TODO: When we implement [prop340](../proposals/340-packed-and-fragmented.md),
> we should clarify which parts of the above are about
@@ -120,12 +120,12 @@ that we should relay, the 'recognized' field will usually be nonzero,
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
+decrypted relay cell 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
[Setting circuit keys](./setting-circuit-keys.md#setting-circuit-keys)),
-and including this relay cell's entire payload
+and including this relay cell's entire body
(taken with the digest field set to zero). Note that these digests
_do_ include the padding bytes at the end of the cell, not only those up
to "Len". If the digest is correct, the cell is considered "recognized"
@@ -148,8 +148,10 @@ can include a StreamID or not depending on their purpose -- see
[Flow control](./flow-control.md#flow-control).)
The 'Length' field of a relay cell contains the number of bytes in
-the relay payload which contain real payload data. The remainder of
-the unencrypted payload is padded with padding bytes. Implementations
+the relay cell's body which contain the body of the message.
+The remainder of
+the unencrypted relay cell's body is padded with padding bytes.
+Implementations
handle padding bytes of unencrypted relay cells as they do padding
bytes for other cell types; see [Cell Packet format](./cell-packet-format.md#cell-packet-format).