How do digital certificates work when used for securing websites (using SSL)

certificateSecurityssl

Please help me understand how the process goes. I understand that web browsers contain root certificates for certificate authorities (CAs) like verisign, Entrust, Comodo .. etc, but what exactly happens when a user accesses a secure page? Does the web browser send a request to the server of the CA to verify the ceriticate or it just uses the CA's root certificate (in the browser) to verify the certificate?

I used some HTTP sniffer and logged on to gmail (the login page is secure) but didn't see requests going to any websites other than google, does that mean it only uses the CA's root certificate?

Best Answer

A Certificate Authority issues certificates signed with a private key. Your browser stores the corresponding public key for a bunch of trusted CAs. When you receive a request for a secure transaction, your browser checks the root of the certificate (provided by the host you're connecting to) with the public key to make sure it was really signed by the matching private key.

The host stores the certificate signed by a trusted third party (the CA) and your browser stores the public key of that same third party. When a transaction begins, the host only needs to present that certificate for your browser to verify. There's no need for transaction-time intervention by the trusted third party.

This is different than systems like PGP, where you have to contact the third party in order to get the public key of whoever you're communicating with. The systems can work differently because with PGP you're encrypting/decrypting data. With certificates all you're doing is authenticating identity.