Post Quantum Encryption Project Learning View on GitHub

Lesson 1: Passwords, keys, encryption and signatures

Part 1 · Foundation · Module 1, lesson 1

Imagine someone copies your password vault from your computer. What stops them from reading everything inside it?

This lesson introduces four ideas we will use throughout the project. No coding, installation, or real passwords are needed.

Choose your pace: for five minutes, read the example and answer the first question. For a 30-minute session, work through the whole lesson and exercise. You can stop and bookmark at any point.

Your goal

By the end, explain the difference between a password, an encryption key, encryption, and a digital signature in your own words.

1. Start with a fictional vault

Alice wants to keep this imaginary record private:

Service: Practice Garden Club
Username: alice-demo
Password: fictional-example-only

Saving that record as an ordinary text file leaves it readable to anyone who can open the file.

Alice wants a file she can save and back up without leaving the record readable.

2. Encryption scrambles the contents

Encryption turns readable information, called plaintext, into encrypted information, called ciphertext.

Decryption turns it back into readable information using the appropriate key.

Think of encryption as locking the record inside a box. The analogy helps us picture the purpose, but the real process is mathematical.

Readable record + encryption key → encrypted record
Encrypted record + correct decryption key → readable record

In symmetric encryption, the same secret key is used to encrypt and decrypt. AES is an example. KeePass supports AES-256 for its vault database. KeePass security documentation

The encrypted file is still a file someone can copy. Encryption aims to protect its contents when they do.

3. A password and a key have different jobs

A password is something Alice enters and remembers.

An encryption key is secret data the encryption algorithm uses. A program can generate a key randomly, without asking a person to memorize it.

In our planned vault, Alice's master password will help unlock a randomly generated data key. That data key will unlock the records.

Master password → password-based key derivation → unlock the data key
Data key → decrypt the vault records

The middle step makes each password guess more costly. It does not turn a predictable password into an unguessable one. KeePass documents this distinction between key derivation and database encryption. Key derivation and guessing attacks

Someone who steals the file may try password guesses on their own computer. A login screen's attempt limit would not, by itself, stop that attack.

4. A digital signature checks a different thing

Now suppose Alice publishes a software release and Bob wants to check its origin.

Alice creates a digital signature using a private signing key. Bob checks it using her public verification key.

Release file + Alice's private signing key → signature
Release file + signature + Alice's trusted public key → verification result

A valid signature supports checking that the signed bytes have not changed and that the matching private key was used. Bob must first establish that the public key really belongs to Alice. A signature does not hide the file or prove the software has no bugs. NIST digital signature standard

Private signing keys and public verification keys are different from the single shared secret key in symmetric encryption.

The four ideas together

Idea Plain-language job
Master password Something the person remembers to help unlock the vault
Encryption key Secret data the algorithm uses to lock or unlock information
Encryption Keeps the contents confidential
Digital signature Helps verify the signed bytes and their origin, given a trusted public key

Detecting changes to an encrypted vault also matters. Later lessons use authenticated encryption for that. Encryption alone should not be assumed to detect tampering.

Where post-quantum cryptography enters

We will later add an export that Alice encrypts for Bob. ML-KEM, a standardized lattice-based mechanism, establishes a shared secret. Symmetric encryption then protects the exported records. NIST ML-KEM standard

For now, remember the two jobs: establish a secret, then use it to protect data. We will examine the math and the full process in later modules.

Try it yourself

Write short answers before reading the discussion below. Use this fictional vault, not your own password database.

  1. A thief copies Alice's encrypted vault but does not have the key. What protection should the encryption provide?
  2. Alice chooses a predictable master password. Can adding a post-quantum label stop the thief from guessing it?
  3. Bob receives a signed file and a public key from a stranger. Has he established that Alice sent it? Why?
  4. Malware reads the records while Alice's vault is unlocked. Has encryption of the saved file prevented that?

Check your reasoning

  1. The thief should not be able to read the contents without recovering the necessary secret. This depends on correct implementation and adequate key protection.
  2. No. Password guessing remains a separate attack on how the vault is unlocked.
  3. No. The stranger could provide their own key and signature. Bob needs a trusted way to identify Alice's public key.
  4. No. Protecting a saved file does not automatically protect plaintext while an application is using it.

Completion check

Close the explanation and tell someone what each of the four ideas does. Then explain one thing the encrypted vault protects against and one thing it does not.

If you cannot explain a part yet, revisit its example. Reading this page alone does not mark the lesson complete.

Save your place

Record the last section you understood and the next unanswered question in your own notes. If you use this project's local progress.md, keep it private.

The planned next lesson covers which cryptographic protections quantum computers threaten. It is not published yet.

Return to the introduction · See the course outline · Read the references