Why PGP?
- Actually the question should be “why not public key encryption”
- Suppose a text “abc” is encrypted with the receivers public key and during transit of this encrypted file, the file is read by a hacker. Now since the public key of the receiver is a public knowledge and hacker just have to predict the input from the sender and encrypt the predicted text with the public key of the receiver and compare. And if the text matches “vola” you have read the data sent by the sender.
- Hence to avoid this type of attack PGP came into picture where the actual text sent by the sender is encrypted with a random key and the random key is encrypted by the public key of the receiver. This makes the data pretty hard to read even if it is read in transit.
You can perform PGP encryption on ubuntu using tool called Seahorse (Inbuild with ubuntu)
Reference :
https://en.wikipedia.org/wiki/Pretty_Good_Privacy