How_SSL_Works.mdwn 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. Without a security layer, the communication between the client and the server of
  2. a web service is not encrypted. Third parties such as your [[!wikipedia ISP]]
  3. can read what you send and receive. It is also not authenticated: Someone can
  4. pretend to be the server you're looking for, and you may end up giving your
  5. private details, such as passwords and bank account numbers, to someone with
  6. bad intentions!
  7. Therefore, a secure connection, e.g. between a web browser and a web server,
  8. should have these two properties:
  9. 1. Encrypted: Nobody can read the data while it's sent through the network
  10. 2. Authenticated: Nobody can use a fake identity to trick you into believing
  11. you see the website you want, while you actually see a copy of it made by
  12. someone else.
  13. SSL can provide this security. Although it's not perfect when used as is (see
  14. next section), combining it with your own CA and Monkeysphere support helps
  15. fix the weaknesses and launch secure web services.
  16. You can read more about it in [[!wikipedia SSL desc="Wikipedia"]].
  17. The idea is as follows.
  18. The web service holds a private key, which is kept in a secure location and must
  19. not be stolen. The key is a way for the web service to prove it's really it,
  20. i.e. allow others to verify its identity. If someone else got the key, the
  21. service's security could thus be compromised.
  22. The client holds a public certificate. When connecting to the web service, it
  23. uses the certificate to identify the service (the service uses its private key
  24. for this process, but *doesn't* send it as-is to the client) and make sure the
  25. service is "trusted", i.e. its certificate is installed on the client machine.
  26. Web browsers usually come with a preinstalled collection of such certificates.
  27. To be more precise, they hold the root certificates of the CAs, and not the
  28. certificates of the web services themselves.
  29. After authentication, the communication moves to a secure, i.e. encrypted
  30. channel.
  31. Actually, it's possible to have the encryption even without authentication: If
  32. the web browser can't authenticate the server, it can use the encryption anyway,
  33. and warn you that the website's SSL certificate is not trusted. Some browsers
  34. just display a small icon indicating this, while others show you a warning
  35. message.