Читать книгу Cryptography, Information Theory, and Error-Correction - Aiden A. Bruen - Страница 82
Encrypting/decrypting
ОглавлениеTo send an encrypted message, the user decides on a symmetric algorithm and then the computer will generate a random key for use with this message. The message is encrypted using this key, and the key is encrypted using the intended recipient's public key. Both the message and the encrypted key are sent by e‐mail to the intended recipient. If the e‐mail is intercepted in this form, the eavesdropper shouldn't be able to read the contents, because they don't possess the proper private key to decode the session key, nor do they possess the session key to decode the message.
Upon receipt of an encrypted e‐mail, the user's computer will use his/her private key to decrypt the enclosed session key, and then will use the session key to decode the message. In many modern e‐mail programs that support PGP or GPG, this is done without the user knowing. That way, the user isn't inconvenienced by the added security, but will still enjoy the benefits of encrypted e‐mail.
Note that symmetric encryption is used for the actual message and asymmetric encryption is used for the key exchange. This is because symmetric cryptography is about 4000 times faster than asymmetric. That means that sending a large e‐mail with large attachments would take quite some time to encrypt if you only used RSA.