Skip to content

Instantly share code, notes, and snippets.

@chakrit
Last active December 21, 2015 01:48
Show Gist options
  • Save chakrit/6230184 to your computer and use it in GitHub Desktop.
Save chakrit/6230184 to your computer and use it in GitHub Desktop.
SSL in English.

SSL in English.

Server-side

Key-(re-)generation

  1. Generates an RSA public/private key pair.
  2. Uploads the public key to the CA.
  3. The CA issues a validity certificate.
  4. Appends any intermediate certificate to it as necessary.
  5. Installs the CA and public key on the server.

Intermediate Certification Problem

Sometimes a well-known client or vendor lists of CA may not suffice to verify your certificate. In this case it is likely that the CA that has issued your certificate is using its own intermediate certificate. This can be solved easily by simply appending all the intermediate certificates used to sign it along with the certificate itself.

Client-side

Connecting to a secure server

  1. Connects to a secure server.
  2. A key exchange process takes place whereby the client is given the server's public key and certificate.
  3. Client verifies this certificates against a known CA already provided in advance (via the OS/well-known vendor lists). (*)
  4. Client generates a new symmetric key for communication with the server. This key should be valid only for the lifetime of the connection.
  5. Client encrypts this symmetric key using the server's public key and sends it to the server. Thus only the server can decrypt the message
  6. Change the connection encryption mode to use this new symmetric key.
  7. Proceed normally with the intended protocol (i.e. HTTP).

* The certificate may include any intermediate certificates used for verification, these should be verified before/or in addition to the certificate itself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment