Basic encryption concept

gpg is mainly used for encryption. This article will conver that part.

The flow is that gpg will encrypt the data for someone (which identified by keys) and only him/her key can decrypt the data.

To encrypt, gpg needs public key. How that that someone have the key? Good question. Just create it and he will have a pair of keys.

Let’s go with example. A wants to encrypt the data and send to B. A needs B’s public key. So, B needs to genearte keys and send public key to A. A will encrypt the data and send to B the encrypted data. B will use his private key to decrypt. Phew!