Commit Graph

3498 Commits

Author SHA1 Message Date
David Goulet
8961bb4d83 prop340: Change the ntorv3 data format
Reason behind this is to simplify the negotiation of this feature. A
ntorv3 handshake is in the fast path of circuit creation and minimizing
any parsing and on the wire binary size is a win.

Furthermore, this prevents us to go into a complex code path of version
negotiation where either side can be tricked into using another older
version.

We also do NOT expect to ever end up in a situation where one side sends
packed cells but not the other.

And so, this change simplifies everything and reflects the approach we
took with congestion control as well. Future change of packed/fragmented
relay cells will be possible through a new ntorv3 extension and a Relay
protover.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-06-13 13:21:30 -04:00
David Goulet
21d7e9a41f prop340: Tweak how we handle optional stream IDs
Introduce an optional header called the "message routing header" which
contains a `stream_id` and is only present for commands that do require
it.

We also specify that if an unrecognized command is encountered, the
circuit MUST be destroyed immediately.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-06-13 13:21:30 -04:00
David Goulet
4a14d01cba Merge branch 'tor-gitlab/mr/139' 2023-06-13 12:20:56 -04:00
Nick Mathewson
b345ca0441 Describe the behavior of our HSv3 crypto layers.
These layers use SHA3 instead of SHA1 and AES256 instead of AES128.
Their SENDME tags are made with SHA3 too, but they are truncated to
20 bytes.

Closes #204.
2023-06-13 12:13:25 -04:00
Alexander Færøy
a31defc82d Merge remote-tracking branch 'mikeperry/pow-edits' 2023-06-07 14:21:05 +00:00
Q
67f8481596
update 343-rend-caa to include guidance on the non mandatory state of CAA 2023-06-06 23:27:36 +02:00
Nick Mathewson
cf44439a2c Merge branch 'relay_early' into 'main'
tor-spec: inform about RELAY_EARLY in EXTEND(2)

See merge request tpo/core/torspec!135
2023-05-31 18:15:06 +00:00
Mike Perry
ded57d896a Prop 327: Clarify that the starting difficulty is on the client side.
Also clarify that the main reason we may need to tune it is because of
on-and-off attack patterns of large size.
2023-05-30 18:46:25 +00:00
Mike Perry
cbf62c799f Prop327: Remove notions of default difficulty and tuning
Also link to the updated sim, and remove old sections of Tor Browser UX
from before we had auto-difficulty.
2023-05-25 19:39:28 +00:00
Mike Perry
38469b0626 Prop327: Onion service rate limiting is not congestion control.
It is just rate limiting. We could apply real Prop324 congestion control to
the intro circuit, but so far we have not done so.
2023-05-25 13:12:00 +00:00
David Goulet
646fbf74fb Merge branch 'tor-gitlab/mr/125' 2023-05-24 14:55:21 -04:00
David Goulet
51e2149dd3 Merge branch 'tor-gitlab/mr/132' 2023-05-24 14:48:07 -04:00
David Goulet
a1cd058386 Merge branch 'tor-gitlab/mr/133' 2023-05-24 14:40:30 -04:00
David Goulet
9c55db437e Merge branch 'tor-gitlab/mr/134' 2023-05-24 14:38:04 -04:00
Nick Mathewson
97c0c12f47 Describe identity-binding defense for intro-point POW 2023-05-24 14:38:00 -04:00
Micah Elizabeth Scott
a3c88e156f proposal 327: Editing pass to align the spec with our implementation
This makes numerous small changes, but also adds some larger blocks of
explanation that are written based on the finalized design.

Signed-off-by: Micah Elizabeth Scott <beth@torproject.org>
2023-05-24 14:38:00 -04:00
zocker1999net
0d91005ea6 Add info that onion v3 URLs use SHA3-256 2023-05-23 21:31:51 +00:00
Emil Engler
b67dc469b0
tor-spec: inform about RELAY_EARLY in EXTEND(2)
EXTEND/EXTEND2 cells MUST only be send through RELAY_EARLY cells, as
demanded by section 5.6.

This commit informs about this in the section of the EXTEND/EXTEND2
cells, as the current formulation contradicts the one in 5.6 to some
degree.
2023-05-23 19:30:15 +02:00
Alexander Færøy
2498f2081a Merge remote-tracking branch 'gitlab/mr/129' 2023-05-23 14:36:18 +00:00
Alexander Færøy
74788eb5fe Merge remote-tracking branch 'gitlab/mr/128' 2023-05-23 14:33:57 +00:00
Alexander Færøy
14a811eec9 Merge remote-tracking branch 'gitlab/mr/127' 2023-05-23 14:33:47 +00:00
Mike Perry
7ea74b99bd Prop329: Document Snowflake exemption to Guard restriction. 2023-05-18 20:00:30 +00:00
Nick Mathewson
eeb208d577 rend-spec: Add a set of test vectors for hs-ntor.
These were generated using a patched Tor with extra logging info.
I've used them to validate (and find bugs in) the arti hs-ntor
implementation. (See arti!1189.)
2023-05-18 08:57:34 -04:00
Mike Perry
1473e9592a Prop#329: Clarity improvements 2023-05-17 21:17:59 +00:00
Mike Perry
ee9f341b32 Note that we need to explicitly allow 2 INTROs 2023-05-17 21:17:59 +00:00
Mike Perry
0d332d868c Prop329 updates for bug40781 2023-05-17 21:17:45 +00:00
David Goulet
402647ea1b Proposal 319 and 325 superseded by 340
Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-05-10 12:50:12 -04:00
David Goulet
a14e2981ef prop343: Initial import
CAA Extensions for the Tor Rendezvous Specification.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2023-05-08 15:14:58 -04:00
Georg Koppen
3169512d71
Fix typo
Closes: #199.
2023-05-08 13:29:00 +00:00
Emil Engler
4384e30ca2
tor-spec: define the EXP(a, b) function
This commit adds an explanation of the meaning behind the EXP(a, b)
function, primarily targeted for readers without a deep understanding of
the cryptography.

Fixes #195
2023-05-05 14:10:11 +02:00
Emil Engler
9c3a2d219a
tor-spec: remove the redundant MULT function
This commit removes the redundant MULT(a, b) function from the ntor
section, as the function is defined but never used.
2023-05-05 14:06:42 +02:00
Emil Engler
d612d2344a tor-spec: Revise the CircID selection section
This commit updates the "5.1.1. Choosing circuit IDs in create cells"
section, in order to clarify its importance, as well as to adjust it to
modern link protocol versions.

The first goal is achieved, by directly adding a "MUST" in the first
paragraph, alongside a reformulation in the paragraph explaining the
method in link protocol version 4 or higher.

The second goal is achieved by merging the second paragraph with the
third paragraph, as the second paragraph only applies to the link
protocol versions addressed in the third one.
2023-05-02 09:00:35 +02:00
Alexander Færøy
142dda7257 Merge remote-tracking branch 'mikeperry/conflux_mr' 2023-04-13 18:29:40 +00:00
Mike Perry
8115fc7d12 Update Prop#329 for conflux merge request. 2023-04-06 16:01:55 +00:00
Nick Mathewson
70ca4e9dcb rend-spec: clarify how dir info may be used to confirm linkspecs
Specifically, you can look at the directory to see if somebody is
lying about a relay (mismatched IDs, etc), but you can't modify
the list of linkspecs.
2023-03-22 14:31:55 -04:00
Nick Mathewson
0b19f2114b rend-spec: Clarify that IPv4, RSA-ID and Ed25519-ID are mandatory for now.
We can make these non-mandatory in the future if we want, using a
consensus flag.
2023-03-22 14:31:55 -04:00
Nick Mathewson
1aa3a8316a rend-spec: Clarify that linkspec lists should be used verbatim.
This resolved "problem 2" from torspec#193.
2023-03-22 14:31:55 -04:00
Nick Mathewson
33308845ce {rend,tor}-spec: clarify linkspec ID multiplicity issues
We were previously a bit unclear on how to handle multiple linkspecs
of type ed25519, and our spec didn't actually permit Tor's current
behavior.

Now we say that both Ed25519 ID and Legacy ID linkspecs MUST appear
at most once in a list of linkspecs, and that parties SHOULD
enforce this.

This is "problem 1" on torspec#193.
2023-03-22 14:24:33 -04:00
Nick Mathewson
71ed0ed831 Merge remote-tracking branch 'tor-gitlab/mr/119' 2023-03-07 13:55:00 -05:00
David Goulet
99a5803fa7 Merge branch 'tor-gitlab/mr/118' 2023-03-07 08:48:05 -05:00
Ian Jackson
9dee2f8efa State that "base32" always means RFC4648, unpadded.
I found src/lib/encoding/binascii.[ch] in the C Tor codebase.
It has
  #define BASE32_CHARS "abcdefghijklmnopqrstuvwxyz234567"

The function "base32_encode" says "Implements base32 encoding as in
RFC 4648.".  Now, that RFC says that it's supposed to be padded unless
explicitly stated otherwise.  However, the padding is pointless and
neither our "base32_encode" nor our "base32_decode" seem to implemnet
it.

I hope that we are using the same base32 encoding everywhere, but have
not checked.
2023-03-07 13:25:15 +00:00
Ian Jackson
85c2b704ac rend-spec-v3 ESTABLISH_INTRO: Actually name which key AUTH_KEY is
Really, AUTH_KEY in the display ought to be KP_IPT_SID, to get rid of
a layer of terminological indirection.
2023-03-01 15:11:57 +00:00
Nick Mathewson
ba581c95bf Clarify that ESTABLISH_INTRO signature doesn't cover SIG_LEN.
The previous wording implied that SIG_LEN was also signed, which
it isn't.
2023-03-01 07:42:22 -05:00
Roger Dingledine
29fbf57f79 a few more grammar / whitespace fixes 2023-02-08 13:20:01 -05:00
Nick Mathewson
e8aea86688 Merge remote-tracking branch 'tor-gitlab/mr/113' 2023-02-08 11:40:11 -05:00
Nick Mathewson
7838586895 Refer to N_hs_desc_enc in description of encrypted-cookie 2023-02-08 11:39:37 -05:00
Nick Mathewson
4234d93259 Merge remote-tracking branches 'tor-gitlab/mr/114' and 'tor-gitlab/mr/115' 2023-02-08 11:37:35 -05:00
gabi-250
b7aeadeec6 Grammar fix 2023-02-08 16:35:02 +00:00
Ian Jackson
71d7e7184d Rename hs_index and hsdir_index to hs_{service,relay}_index
These new names are the ones used in arti's hsdir_ring.rs and make a
lot more sense than calling one of them the "directory" index and
the other just the "index".

In C Tor these are calculated by functions called
  hs_build_hs_index
  hs_build_hsdir_index

That might be a reason *not* to accept this change.  Or it might be a
reason to change the C Tor code.

If we don't change the names in the spec the Arti function names
should change.
2023-02-08 14:49:30 +00:00
Nick Mathewson
0b1289fd26 Remove mention of "password" auth in rend-spec.
It was never implemented, is not specified, and neither dgoulet nor
I can quite remember how it was supposed to work.
2023-02-07 15:10:54 -05:00