title: How does SSL protect the data against sniffing?
body: <p>I've got a small website and it's security is important to me. I don't have the money to buy an SSL certificate so I thought of making one myself (theoretically with java, although I still don't know how would I then decrypt it on the sever side). The users won't trust it like they trust SSL but it would provide the security I'm looking for.</p>
  
  <p>I read a few articles about SSL and I think I got the math behind it but I didn't understand How does it protect from sniffing. If SSL encrypts the password/info/whatever on the client's computer and than sends it to the server for decryption, what problem would there be for a sniffer to sniff the encoded password and send it to the server? </p>