I'm a mathematics student trying to understand Tor. I have little knowledge of networks and how exactly they function.
Up to now I (think I) understand the basic functionality of Tor. A route is generated first from the consensus list, and the packet (the message) is sent through that route. The packet is encrypted multiple times using the public keys obtained from the consensus list, and each relay strips away a layer of encryption before sending it on to the next relay (side question: how does this work with bridge relays? Is the message sent to a bridge relay first and then into the public Tor network, or does it move exclusively through bridge relays?). This means that the destination IP and IP of the sender are never in the same header of the packet and this is what gives Tor its relative anonymity.
Very often however I notice that SSL is brought up when discussions regarding Tor are made. I understand that SSL encrypts the data sent between the client and the server. But if this is the case I don't see how SSL is related to Tor, since they seemingly function on a different layer.
Edit: More specifically, I'm reading about how Iranian and Chinese authorities did "Deep Package Inspection" (i'm assuming this means that they looked at the contents of each packet) to look for SSL. Is this because SSL is used by default with encrypting the different layers in an onioned packet? If so, is there a reason that looking for SSL was enough to indentify a Tor connection?