Enable and use ntorv3 (prop332)

ntorv3

Some of the core crypto appears to be implemented, but it isn't "wired up" for use.

Needed for #1067

  • Implement ClientHandshake trait for client side of ntor-v3
  • Implement ServerHandshake trait for server side of ntor-v3
  • Add tor_proto::circuit::Reactor::create_firsthop_ntor_v3
  • Add tor_proto::circuit::PendingClientCirc::create_firsthop_ntor_v3
  • When creating or extending a circuit to a relay that supports Relay=4 (as advertised in its descriptor), do an ntorv3 handshake (CREATE2 or EXTEND2 cell with HTYPE=3) as spec'd in https://spec.torproject.org/tor-spec/create-created-cells.html#ntor-v3 and https://tpo.pages.torproject.net/core/torspec/tor-spec/subprotocol-versioning.html?highlight=ntorv3#relay
    • TODO: File a ticket for working out how to use ntorv3 with a relay that isn't in the client's consensus; probably as part of prop346
  • Add shadow(?) integration test validating successful ntorv3 handshakes with tor
  • Change ClientHandshake trait API to include ntor_v3 features (with ntor implementation expecting and returning empty sets)
Edited Nov 27, 2023 by Jim Newsome
Assignee Loading
Time tracking Loading