I am trying to understand the protocol used when a hidden service establishes itself on the Tor network. I read multiple documentations about it, but its not all clear to me.
If I understand correctly, it calculates the private and public key. Then it connects and sends extend2 cells to multiple Tor relays to establish a circuit. I am not sure about what happens next. I think it uses the circuit to connect to a new Tor relay and exchange messages according to the introduction protocol. Then the hidden service descriptor is created containing the ip of the introduction point and the public key, which will be send to a distributed hash table.
When a client connects to the introduction point it tells the introduction point the ip of a random Tor node (rendezvous point). I also don't know how the introduction point communicates the ip of the rendezvous point to the hidden service. After that the hidden service will create a circuit to the rendezvous point. From there it can send messages back and forth.
There is probably something wrong with my explanation, so it would be great if someone could point out the mistakes and explain the parts I didn't get or give a clear explanation of the protocol.