Hi! I’m trying to implement the client side of the tor protocol in order to learn more about its internals

In section 2.4.1 of the specs it says:

To perform the handshake, the client needs to know an identity key digest for the server, and an ntor onion key (a curve25519 public key) for that server. Call the ntor onion key B .

I have taken this as meaning NODEID is the key digest found next to the relay nickname in the consensus and B is the key in the ed certificate with type IDENTITY_V_SIGNING, but my auths don’t match.

I have tested my implementation of the ntor handshake with src/test/ntor_ref.py and it works with arbitrary nodeids and public keys, I think my problem is in the data I’m feeding into it.

Does anyone know what I’m missing?

Edit: NEVERMIND! After some debugging of little-t-tor and fuzzy searching around I realized the ntor key is provided in a separate descriptor.
For anyone unfortunate enough to find themselves in my position: I used the key found in <dir>/tor/server/fp/<id> in the ntor-onion-key field (lol), everything matches now.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.