Skip to content
Snippets Groups Projects

tor-spec: clean-ups and a new proposal (357) related to use of KH.

Merged Nick Mathewson requested to merge nickm/torspec:kh_clarification into main
1 unresolved thread

In this branch:

  • We clean up some of our usage of CREATE, to make sure that "CREATE" never means "CREATE or CREATE2".
  • We clarify some points about the generation and use of the KH field.
  • We add a new proposal for a better way to use KH in the future.

Closes #191 (closed).

Merge request reports

Merge request pipeline #262528 passed

Merge request pipeline passed for 1704f527

Approved by

Merged by Nick MathewsonNick Mathewson 3 weeks ago (Mar 27, 2025 7:10pm UTC)

Merge details

Pipeline #262652 passed

Pipeline passed for 08f09290 on main

Deployed to produ‎ction‎ 3 weeks ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
46 - S (customization string) as a customization string starting with "Tor:"
47 - L (the output length) as desired.
48
49 We denote this exported secret as:
50
51 ```
52 CircExporter(Circuit[Hop], Custom, Len)
53 = cSHAKE128(X=Circuit[Hop].KH, L=Len, N="", C=Custom)
54 ```
55
56 > For example, in the future when we're computing our MAC
57 > for an ESTABLISH\_INTRO message,
58 > instead of using KH directly as our MAC key,
59 > we might use
60 > `CircExporter(Circuit[Hop], "Tor:ESTABLISH_INTRO MAC", 32)`
61 > as our MAC key.
  • So does this mean we'll have to reserve in our spec the namespace for every places that requires a KH?

    In other words, reserve the ESTABLISH_INTRO_MAC string.

  • So, there's only one place that uses KH right now, since TAP is dead. But yes, in the future we'll need to make sure we use different customization strings for every place that uses KH.

  • Please register or sign in to reply
  • David Goulet approved this merge request

    approved this merge request

  • Nick Mathewson mentioned in commit 08f09290

    mentioned in commit 08f09290

  • Please register or sign in to reply
    Loading