From b842f50c4f952d9baec83395dd782241c20de610 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 30 Jan 2023 16:46:58 -0500 Subject: Document missing NL in the middle layer of an HsDesc. It looks like C tor doesn't include a final newline in the middle layer of its onion service descriptors. That made arti reject them the first time I tried to parse one! Here I document this behavior, and tell other implementations what to do. --- rend-spec-v3.txt | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'rend-spec-v3.txt') diff --git a/rend-spec-v3.txt b/rend-spec-v3.txt index 278c1fa..a4a827a 100644 --- a/rend-spec-v3.txt +++ b/rend-spec-v3.txt @@ -1270,6 +1270,13 @@ Table of contents: discussed in [HS-DESC-SECOND-LAYER] below. The blob is base64 encoded and enclosed in -----BEGIN MESSAGE---- and ----END MESSAGE---- wrappers. + + Compatibility note: The C Tor implementation does not include a final + newline when generating this first-layer-plaintext section; other + implementations MUST accept this section even if it is missing its final + newline. Other implementations MAY generate this section without a final + newline themselves, to avoid being distinguishable from C tor. + 2.5.1.3. Client behavior [FIRST-LAYER-CLIENT-BEHAVIOR] The goal of clients at this stage is to decrypt the "encrypted" field as -- cgit v1.2.3-54-g00ecf