aboutsummaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorJim Newsome <jnewsome@torproject.org>2023-11-08 13:28:41 -0600
committerJim Newsome <jnewsome@torproject.org>2023-11-08 13:28:41 -0600
commit3ca19b7529f6c587c5c715945a926830eaa556e9 (patch)
tree32784d9687f5e9eb91e9334134e981f70d6fb6af /spec
parent4436b5235596e90c9bf4ec6d2b6979f16e3ac11e (diff)
downloadtorspec-3ca19b7529f6c587c5c715945a926830eaa556e9.tar.gz
torspec-3ca19b7529f6c587c5c715945a926830eaa556e9.zip
create-created-cells.md: replace section number refs
Diffstat (limited to 'spec')
-rw-r--r--spec/tor-spec/create-created-cells.md18
-rw-r--r--spec/tor-spec/setting-circuit-keys.md2
2 files changed, 11 insertions, 9 deletions
diff --git a/spec/tor-spec/create-created-cells.md b/spec/tor-spec/create-created-cells.md
index c09c96d..7fc5b51 100644
--- a/spec/tor-spec/create-created-cells.md
+++ b/spec/tor-spec/create-created-cells.md
@@ -249,7 +249,8 @@ EXTENDED cell, contains:
| Field | Size
| ----- | ----
| DH data (`g^y`) | `DH_LEN` bytes
-| Derivative key data (`KH`) | `HASH_LEN` bytes (see 5.2 below)
+| Derivative key data (`KH`) | `HASH_LEN` bytes (see ["Setting Circuit Keys"](./setting-circuit-keys.md))
+
Once the handshake between the OP and an OR is completed, both can
now calculate `g^xy` with ordinary DH. Before computing `g^xy`, both parties
@@ -352,7 +353,8 @@ checking `Y` for group membership, if the group is curve25519.\]
Both parties now have a shared value for `KEY_SEED`. They expand this
into the keys needed for the Tor relay protocol, using the KDF
-described in 5.2.2 and the tag `m_expand`.
+described in ["KDF-RFC5869"](./setting-circuit-keys.md#kdf-rfc5869)
+and the tag `m_expand`.
<a id="tor-spec.txt-5.1.4.1"></a>
@@ -404,7 +406,7 @@ For any tag "t_foo":
KDF_foo(s) = KDF(s, t_foo)
```
-Other notation is as in the ntor description in 5.1.4 above.
+Other notation is as in the [ntor description above](#ntor).
The client begins by knowing:
@@ -544,15 +546,15 @@ A CREATE_FAST cell contains:
A CREATED_FAST cell contains:
-| Field | Size
-| ----- | ----
-| Key material (`Y`) | `HASH_LEN` bytes
-| Derivative key data| `HASH_LEN` bytes (See 5.2.1 below)
+| Field | Size
+| ----- | ----
+| Key material (`Y`) | `HASH_LEN` bytes
+| Derivative key data | `HASH_LEN` bytes (See [KDF-TOR](./setting-circuit-keys.md#kdf-tor))
The values of `X` and `Y` must be generated randomly.
Once both parties have `X` and `Y`, they derive their shared circuit keys
-and 'derivative key data' value via the KDF-TOR function in 5.2.1.
+and 'derivative key data' value via the [KDF-TOR function](./setting-circuit-keys.md#kdf-tor).
The CREATE_FAST handshake is currently deprecated whenever it is not
necessary; the migration is controlled by the "usecreatefast"
diff --git a/spec/tor-spec/setting-circuit-keys.md b/spec/tor-spec/setting-circuit-keys.md
index 36737c9..200862f 100644
--- a/spec/tor-spec/setting-circuit-keys.md
+++ b/spec/tor-spec/setting-circuit-keys.md
@@ -36,7 +36,7 @@ Kb is used to encrypt the stream of data going from the OR to the OP.
<a id="tor-spec.txt-5.2.2"></a>
-## KDF-RFC5869
+## KDF-RFC5869{#kdf-rfc5869}
For newer KDF needs, Tor uses the key derivation function HKDF from
RFC5869, instantiated with SHA256. (This is due to a construction