aboutsummaryrefslogtreecommitdiff
path: root/spec/tor-spec
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2023-11-09 10:31:25 -0500
committerNick Mathewson <nickm@torproject.org>2023-11-09 10:33:39 -0500
commita24c5f71df9c5e3258789c2b1ade492b214509a4 (patch)
tree3f336e279aaf1f6907c8d1f111c6acd1b12e40d3 /spec/tor-spec
parent38fa996c1cd8691cbd57b8fab543e74b33501fe3 (diff)
downloadtorspec-a24c5f71df9c5e3258789c2b1ade492b214509a4.tar.gz
torspec-a24c5f71df9c5e3258789c2b1ade492b214509a4.zip
Start a "conventions" section to span all the specs
It's short for now, but we will extract more and more things from the rest of the specifications as we continue editing.
Diffstat (limited to 'spec/tor-spec')
-rw-r--r--spec/tor-spec/opening-streams.md5
-rw-r--r--spec/tor-spec/preliminaries.md23
2 files changed, 3 insertions, 25 deletions
diff --git a/spec/tor-spec/opening-streams.md b/spec/tor-spec/opening-streams.md
index d59e26b..757f776 100644
--- a/spec/tor-spec/opening-streams.md
+++ b/spec/tor-spec/opening-streams.md
@@ -26,8 +26,9 @@ fingerprinting. Implementations MUST accept strings in any case.
The FLAGS value has one or more of the following bits set, where
"bit 1" is the LSB of the 32-bit value, and "bit 32" is the MSB.
-(Remember that all values in Tor are big-endian (see
-["Preliminaries ยป Encoding integers"](./preliminaries.md#encoding)), so
+(Remember that
+[all integers in Tor are big-endian](../intro/conventions.md),
+so
the MSB of a 4-byte value is the MSB of the first byte, and the LSB
of a 4-byte value is the LSB of its last byte.)
diff --git a/spec/tor-spec/preliminaries.md b/spec/tor-spec/preliminaries.md
index 8cc92b7..60359af 100644
--- a/spec/tor-spec/preliminaries.md
+++ b/spec/tor-spec/preliminaries.md
@@ -2,13 +2,6 @@
# Preliminaries
-```text
- The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
- NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and
- "OPTIONAL" in this document are to be interpreted as described in
- RFC 2119.
-```
-
<a id="tor-spec.txt-0.1"></a>
## Notation and encoding{#notation-and-encoding}
@@ -23,26 +16,10 @@
a|b -- concatenation of 'a' and 'b'.
```
-\[A0 B1 C2\] -- a three-byte sequence, containing the bytes with
-hexadecimal values A0, B1, and C2, in that order.
-
H(m) -- a cryptographic hash of m.
-We use "byte" and "octet" interchangeably. Possibly we shouldn't.
-
Some specs mention "base32". This means RFC4648, without "=" padding.
-<a id="tor-spec.txt-0.1.1"></a>
-
-### Encoding integers{#encoding}
-
-Unless we explicitly say otherwise below, all numeric values in the
-Tor protocol are encoded in network (big-endian) order. So a "32-bit
-integer" means a big-endian 32-bit integer; a "2-byte" integer means
-a big-endian 16-bit integer, and so forth.
-
-<a id="tor-spec.txt-0.2"></a>
-
## Security parameters
Tor uses a stream cipher, a public-key cipher, the Diffie-Hellman