From ca788fa4dc832e930479f76fa878831f747c795d Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Wed, 23 Aug 2023 10:53:32 -0400 Subject: Add verbiage about the formats of SM and CM in ntor-v3 --- tor-spec.txt | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'tor-spec.txt') diff --git a/tor-spec.txt b/tor-spec.txt index 3e13fcd..98f033d 100644 --- a/tor-spec.txt +++ b/tor-spec.txt @@ -33,6 +33,7 @@ Table of Contents 5.1.4. The "ntor" handshake 5.1.4.1. The "ntor-v3" handshake. 5.1.5. CREATE_FAST/CREATED_FAST cells + 5.1.6. Additional data in CREATE/CREATED cells 5.2. Setting circuit keys 5.2.1. KDF-TOR 5.2.2. KDF-RFC5869 @@ -1488,6 +1489,43 @@ see tor-design.pdf. [Tor 0.3.1.1-alpha and later disable CREATE_FAST by default.] +5.1.6. Additional data in CREATE/CREATED cells + + Some handshakes (currently ntor-v3 defined above) allow the client or the + relay to send additional data as part of the handshake. When used in a + CREATE/CREATED handshake, this additional data must have the following + format: + + [Any number of times]: + EXTENSION + EXT_FIELD_TYPE [one byte] + EXT_FIELD_LEN [one byte] + EXT_FIELD [EXT_FIELD_LEN bytes] + + (`EXT_FIELD_LEN` may be zero, in which case EXT_FIELD is absent.) + + All parties MUST reject messages that are not well-formed per the + rules above. + + We do not specify specific TYPE semantics here; we leave those for + other proposals and specifications. + + Parties MUST ignore extensions with `EXT_FIELD_TYPE` bodies they do not + recognize. + + Unless otherwise specified in the documentation for an extension type: + * Each extension type SHOULD be sent only once in a message. + * Parties MUST ignore any occurrences all occurrences of an extension + with a given type after the first such occurrence. + * Extensions SHOULD be sent in numerically ascending order by type. + + (The above extension sorting and multiplicity rules are only defaults; + they may be overridden in the description of individual extensions.) + + Currently supported extensions are: + + ..... + 5.2. Setting circuit keys 5.2.1. KDF-TOR -- cgit v1.2.3-54-g00ecf