Explained plainly

What is AES-GCM?

AES-GCM scrambles your message so nobody can read it, and seals it so nobody can change it without getting caught.

The secret note

A note passed across the classroom, through a nosy pair of hands.

You want to pass a secret note to a friend, but a nosy kid sits between you and handles every note on the way. That gives you two problems.

  1. They might read it.
  2. They might change it. “Meet at 3pm” becomes “Meet at 5pm,” and your friend would never know.

AES-GCM fixes both at once. It has two parts.

Part 1 · Nobody can read it

AES is the scrambler

AES is a very strong way to scramble a message. You and your friend share one secret key, like a password only the two of you know.

With the key, your friend unscrambles the note. Without it, the note is random junk: x7#Qp!9zL…. Guessing every possible key would take all the computers on Earth longer than the universe has existed.

Part 2 · Nobody can change it

GCM is the tamper-proof seal

Scrambling alone has a weakness. The nosy kid cannot read the junk, but they could flip a few characters. Your friend would unscramble a slightly wrong message and never notice.

So GCM adds a tag: a wax seal only you and your friend know how to make, worked out from the key and every letter of the scrambled note. Change even one letter and the seal no longer matches. Your friend sees that and throws the note away.

One extra rule

The nonce: a number used once.

Every note also gets a fresh random ticket number. It stops two notes that say the same thing from scrambling into the same junk, so nobody can spot patterns like “every Friday’s note looks identical, so it must say pizza day.”

The golden rule: never use the same nonce twice with the same key. Break it and GCM breaks badly. An attacker can start working out messages and even forge fake seals.

Putting it together

Key

The shared secret password

Only you and your friend have it.

AES

The scrambler

Nobody else can read the note.

GCM tag

The wax seal

Nobody can change the note without getting caught.

Nonce

A fresh ticket number on each note

Two identical notes never look identical.

Where you already meet it

Behind the padlock in your browser, your Wi-Fi, and your messaging apps.

AES-GCM is popular because it is fast (most computer chips have hardware built for it) and it does both jobs in one step. In Verndr, your files are encrypted on your device with AES-GCM before anything is sent. If a file were tampered with, it would not open.