The public key can be known to everyone , it is used to encrypt messages .
The public key can be known to everyone and is used for encrypting messages .