Implement relay variants of channel establishment handshake.
As described in the specification, relays implement a different variant of the channel establishment handshake. We will need to implement this for Arti relay support.
The handshake variants are:
-
Acting as connection initiator, responder authentication only.(Already implemented; used by clients and bridges.) - Acting as connection initiator, both sides authenticating.
- Acting as connection responder, responder authentication only. (Guards need this; middle relays don't.)
- Acting as connection responder, both sides authenticating.
Implementing the remaining variants will require us to generate and handle CERTS
, AUTH_CHALLENGE
, and AUTHENTICATE
cells.
It would be good for these handshake variants to share as much code as possible.