what is a public key encryption?? In public key encryption we have two keys: - one is public and another is private.We use these keys for secure communicating with each outher.Public key is used by sender to encrypt his message and private key is used by receiver to decript this message. Example :- Suppose I want to get message from many resources so I will distribute public key to all the user who want to send me message and I keep private key to decrypt the message which user send to me.