KEYS-1Lesson 1 of 49 min

Shared-key encryption

Modern ciphers work on bits, not letters, and they leave no patterns. The first family uses one shared key for both directions. It does most of the encrypting in the world today.

One key, both ways

Figure KEYS-1.1One shared key, and the problem of sharing it

shared-key encryption

Asha: plaintext 'Lab report attached' + key K → ciphertextOK
Network: 7f3a91c0 e2b4… (unreadable)
Bhavesh: ciphertext + the same key K → 'Lab report attached'OK
1/4

In shared-key encryption, one secret key both encrypts and decrypts. Asha encrypts her message with the key; Bhavesh decrypts it with the same key. Anyone watching the network sees only ciphertext.

Step 1 of 4

AES, and what it replaced

The standard shared-key cipher today is AES, the Advanced Encryption Standard. It was chosen by NIST in an open competition in 2000; the winning design came from two Belgian researchers. AES keys are 128, 192 or 256 bits long. It is fast enough that most phones and laptops have built-in circuits for it.

Some older ciphers are now retired, and one of this course’s books still lists them as current:

  • DES had a 56-bit key, short enough that a purpose-built machine found a key by brute force in 1998, in under three days.
  • 3DES ran DES three times. NIST stopped allowing it for encryption after 2023.
  • RC4 had patterns in its output and has been banned from secure web connections since 2015.

The key-sharing problem

Shared-key encryption has one big weakness: both sides need the key first, and it must reach them secretly. For two friends, they could meet. For a website with millions of visitors, that is impossible. The next lesson shows the idea that solved it.

KEYS-1 counts as completed once you step through the figure to its last step.