aboutsummaryrefslogtreecommitdiffstats
path: root/src/content/docs/guides/fundamental-concepts.md
blob: aab63fc7ba24bcf1c1b9cd0c9e3abcde32e19fa6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
---
title: Fundamental Concepts for Beginners
sidebar:
  label: Fundamental Concepts
  order: 1
---

If you're new to **GPG (GNU Privacy Guard)** or **PGP (Pretty Good Privacy)**,
this guide clearly explains the fundamental concepts step-by-step.

## What Is GPG, and Why Use It?

GPG (GNU Privacy Guard) is a free, open-source software primarily used to:

- **Encrypt information**, ensuring messages and files stay private.
- **Digitally sign information**, verifying authenticity and integrity.

GPG is based on the OpenPGP standard, a widely adopted protocol for secure
digital communication.

In simple terms:

- **PGP** was the original commercial software and is now seldom used.
- **GPG** is the modern, free, and most commonly used implementation of OpenPGP.

Most users today rely on **GPG**.

## Understanding Key Pairs

GPG is built around pairs of cryptographic keys:

- **Public Key**: Shared openly, allowing others to encrypt messages to you or
  verify your signatures.
- **Private Key**: Kept secret by you, used to decrypt incoming messages and to
  sign your messages or files.

A practical analogy: Your public key is like a locked mailbox. Anyone can put
mail inside, but only you hold the private key to open and read it.

A complete GPG key pair includes:

- A primary key representing your identity.
- Subkeys assigned for specific purposes like encryption or digital signing.
- Your user ID, typically your name and email address.
- Metadata such as creation date, expiration date, and usage permissions.

This structure clearly separates identity from usage, improving flexibility and
security.

## Generating Your First Key Pair

When generating a key pair, you’ll choose:

- A **cryptographic algorithm** (commonly RSA or ECC).
- A **key size** (larger sizes offer greater security but slower performance).
- A strong, unique **passphrase** to protect your private key.

A strong passphrase ensures that even if someone accesses your private key file,
they cannot use it without knowing the passphrase.

## Primary Keys and Subkeys Explained

Your **primary key** serves as your GPG identity:

- Linked directly to your user ID (name and email).
- Used to sign subkeys and certify the keys of other users.

**Subkeys** handle routine tasks:

- **Encryption subkey**: Encrypts and decrypts messages.
- **Signing subkey**: Digitally signs files or messages.

Using subkeys for everyday tasks reduces the risk of exposing your primary key.
Many users keep their primary keys stored offline or in highly secure
environments.

## Encryption and Digital Signatures

### Encryption: Ensuring Privacy

To securely send a message:

1. Use the recipient's **public key** to encrypt the message.
2. The recipient decrypts it using their **private key**.

This guarantees that **only the intended recipient** can read the content.

### Digital Signatures: Proving Identity

Digital signatures ensure:

- **Authenticity**: The recipient knows the message is genuinely from you.
- **Integrity**: The recipient knows the message hasn't been altered.

Signing a message involves:

1. Using your **private key** to create a signature.
2. Others verify your signature using your **public key**.

This confirms both your identity and the integrity of your message.

## Practical Examples of GPG Usage

Common real-world applications of GPG include:

- **Secure Email**: Encrypting sensitive emails for personal or professional
  use.
- **Cloud Storage**: Encrypting files before uploading to cloud services like
  Dropbox or Google Drive.
- **Password Sharing**: Securely sharing passwords or confidential data within
  teams.
- **Software Verification**: Ensuring downloaded software hasn’t been tampered
  with by verifying digital signatures.
- **Protecting Personal Data**: Encrypting personal documents stored on your
  devices.

## Public Key Certificates and Trust

When sharing your public key, you're actually distributing a **certificate**
that includes:

- Your public key itself.
- Your user ID (name and email).
- Digital signatures from your primary key or trusted contacts confirming your
  identity.

Certificates build trust, allowing others to confirm the authenticity of your
public key.

## GPG Security Best Practices

For secure and effective GPG usage:

- **Securely Back Up Keys**: Always keep secure, offline backups of your private
  key and revocation certificate.
- **Use Strong Passphrases**: Protect your private keys rigorously.
- **Store Primary Keys Offline**: Rely on subkeys for regular usage.
- **Review and Rotate Keys Regularly**: Update your keys periodically for
  enhanced security.
- **Immediately Revoke Compromised Keys**: Alert contacts immediately if your
  key is compromised.
- **Leverage the Web of Trust**: Build a network of trust by exchanging digital
  signatures with contacts.

## GpgFrontend: Simplifying GPG

GPG's command-line interface can be challenging for new users. **GpgFrontend**
provides a user-friendly graphical interface that simplifies common GPG
operations:

- Visually create and manage key pairs.
- Easily encrypt and decrypt messages and files.
- Sign and verify digital signatures intuitively.
- Seamlessly interact with public key servers.

GpgFrontend makes secure communication accessible, even if you're new to
encryption.

By managing the complexity behind the scenes, GpgFrontend allows you to focus
solely on keeping your information secure and private.