Understanding Public Key Cryptography and Keytool

Excellent article on the subject from Sun

public private keys

Search for: public private keys

wikipedia is a good place to start


TLS - Transport Layer Security (replacing SSL)
PGP
GPG

private key - the one used to encrypt
public key - key that everyone knows how to decrypt

There is only one public key that can decrypt the message encrypted by the private key. Everyone knows the public key. For example if you were to receive an encrypted message and if you have many public keys with you, you will be able to decrypt (if you could) it with ONE and ONLY ONE public key. If you know who gave you that public key then you know who sent it unequivocally. This is the secret of public and private keys

They come in pairs. They allow a receiver to know exactly who sent the message. when ever you are in need of such a functionality think of public/private keys.

You can use the java tool called "keytool" to generate these public/private keys.

They are computationally intensive. If you have a lot of data to encrypt and decrypt you may want to encrypt a symmetric key first with public/prviatekey combination and then encrypt the rest with the symmetric key.