How does handshake with directory server work in the standard setup? How does it work when you configure Tor Browser to use a custom bridge?
1 Answer
It is an SSL/TLS standard handshake, no homebrew magic : all directory servers' keys and IP addresses are hardcoded into the tor source, you can try adding some extra, if there's a need for some special purposes - some hacks in a config files are posssible. If you're using a Bridge - it helps you to connect to the Tor network itself, and you can also instruct your tor client(whatever it is - in a TBB or a standalone official binary) to fetch an additional info from Bridge(s). If you will do so, some data signed by directory servers can be obtained from a Bridge(s), and actualized via direct request a bit later. See also official docs for FastFirstHopPK 0
mode - it alters and slows the handshake you're interested in abit, but adding some security. Feel free to ask questions if you need more info!