2026-08-12|18 min read|[Cryptography, AES-GCM, TLS, SGX, Attestation, JWT, P-256, ECDH]

Crypto Terms: A Practical Glossary

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

Cryptography is easier when you treat each mechanism as an answer to one question — not as one pile of acronyms. Same curve, two jobs. AES-GCM and TLS protect different layers. Attestation is not authorization.

Mental model

Each mechanism answers one question

Who am I talking to?
TLS / mTLS
Am I allowed to do this?
OAuth / JWT
Is this the trusted hardware?
DCAP · PCCS · MRENCLAVE
How do we create a secret?
P-256 + ECDH
How do we make an AES key?
SHA-256 KDF
How do we encrypt the payload?
AES-128-GCM
How do we protect metadata?
AAD
How is each encryption unique?
12-byte IV

Tiny definitions

Keep these in your pocket. Hover a card. Each term is one sentence, the way FFmpeg posts isolate PTS vs DTS vs time_base.

P-256

Mathematical key system

ECDH

Secret agreement

Shared secret

Raw ECDH output — not an AES key

SHA-256

Fingerprint / KDF / integrity

Context label

Domain separation for derived keys

AES-128

Encryption with a 16-byte key

GCM

Encryption + tamper detection

Rijndael

AES's original algorithm family name

NIST P-256

P-256 (secp256r1 / prime256v1) is an elliptic-curve group standardized by NIST. It is the machinery that produces a public/private key pair via scalar multiplication.

P-256 = the mathematical machinery used to create public/private keys

P-256

Private stays home. Public can travel.

sk

Private key

never leaves the holder

pk

Public key

safe to publish

public = private × generator point

The same curve is reused later for two operations: ECDH (agree on a secret) and ECDSA / ES256 (sign a token).

Same curve, two jobs

P-256 does ECDH and signatures

P-256

ECDH

shared secret

ES256

JWT signature

ECDH

Elliptic Curve Diffie–Hellman lets two parties compute the same secret without sending it. Mix your private key with their public key. A network observer sees both public keys and still cannot derive the secret.

ECDH = independently calculate the same secret without sending the secret itself

ECDH animation

Agree on a secret without sending the secret

Party A

skA locked
pkA shareable
pkA →
← pkB

Party B

skB locked
pkB shareable
STEP 1 / 4

Each side holds a private / public pair

Shared secret vs AES key

ECDH produces a raw shared secret — the wrong shape and the wrong purpose for encryption. A KDF (usually SHA-256) turns it into a clean AES key.

Key derivation

ECDH is not an AES key yet

P-256
ECDH
Shared secret
SHA-256
AES-128 key

SHA-256

A cryptographic hash. Always 32 bytes. Three jobs in this stack: fingerprint, key derivation, and the hash inside ES256 signatures.

SHA-256 = a cryptographic fingerprint function that produces 32 bytes

SHA-256

Any input → always 32 bytes

any input bytes…
SHA-256 →
32 bytes

Used as fingerprint, KDF, and inside ES256 signatures

Concatenation and domain separation

Hash shared || context. The || is concatenate. The context label says what the derived key is for, so two purposes cannot accidentally share a key.

Context = a label that says what this derived key is intended for

Domain separation

Same secret + different labels = different keys

SHA256(shared || "payload-v1")

key A

SHA256(shared || "channel-v1")

key B

AES-128 and Rijndael

AES is a block cipher. AES-128 uses a 16-byte key, so you take the first 16 bytes of the SHA-256 output. Rijndael is the family AES was standardized from — APIs that say rijndael128 mean AES-128.

AES

Block cipher. Turns plaintext + key into ciphertext.

AES-128

AES with a 16-byte key (first 16 of SHA-256).

Rijndael

The original algorithm family. rijndael128 = AES-128.

GCM

Galois/Counter Mode makes AES into authenticated encryption: confidentiality plus a tag that fails if anyone tampers.

GCM = encryption + tamper detection (ciphertext + 16-byte tag)

AES-GCM

Hide the bytes. Detect the flip.

Confidentiality

Plaintext becomes ciphertext. Without the key, it is noise.

Integrity / authenticity

16-byte tag binds ciphertext + AAD

IV / nonce

GCM needs a 12-byte IV. Never reuse the same (AES key, IV) pair. A counter in the first 4 bytes, zeros in the rest, keeps every encryption unique and blocks replay if the receiver requires a strictly increasing counter.

12-byte IV

Never reuse (key, IV) for two plaintexts

4-byte counter

1

8-byte zeros

00…

IV = 01 00 00 00 00 00 00 00 00 00 00 00

AAD

Additional Authenticated Data is bound into the GCM tag but not encrypted. Routing metadata can stay visible and still cannot be swapped, reordered, or attached to another job without failing the tag.

AAD = visible but tamper-protected metadata

AES-GCM envelope

Metadata stays readable. Payload does not.

AAD — visible, authenticated
IV — 12 bytes
Tag — 16 bytes
Ciphertext — encrypted payload

TLS, mTLS, eTLS

Application AES-GCM hides the payload from an untrusted relay. TLS hides the hop from a network observer. They stack; they are not substitutes.

TLS

Secure network pipe. Server authenticates with a certificate.

mTLS

TLS where both parties prove their identities.

eTLS

TLS terminates inside the enclave, not on the host OS.

TLS vs mTLS

One-way identity vs both sides prove who they are

Client

server cert →

Server

Client checks the server. Server may not know the client.

Attestation, DCAP, PCCS, MRENCLAVE

Remote attestation is proof of what software is running inside an SGX enclave. The enclave emits a quote. DCAP verifies it. PCCS supplies collateral. MRENCLAVE is the code fingerprint you pin.

Attestation

Remote proof of what is running inside the enclave.

DCAP

Intel's quote verification stack for SGX.

PCCS

Source of certs/CRLs/TCB needed to verify a quote.

MRENCLAVE

Measurement of enclave code and initial state.

Attestation

Prove what code is running inside the enclave

01Enclave quote

Measurement + REPORTDATA

02PCCS collateral

Certs, CRLs, TCB, QE identity

03DCAP / QVL

Verify the quote

04MRENCLAVE pin

Accept only the expected fingerprint

REPORTDATA

A 32-byte field inside the quote. Bind a public key and a fresh challenge into it so a valid quote cannot be paired with an attacker's key.

REPORTDATA = attestation binding field — usually SHA-256(version || pubkey || challenge)

OAuth, JWT, ES256

Attestation answers "is this the correct enclave?" Authorization answers "is this caller allowed?" OAuth issues a JWT. ES256 signs that JWT with P-256 ECDSA.

OAuth

Authorization protocol. Issues access, not identity of silicon.

JWT

Signed token carrying claims: who, what, until when.

ES256

ECDSA + P-256 + SHA-256. How the JWT is signed.

JWT

Three dots. One signature.

header

alg: ES256

payload

claims, expiry

signature

ECDSA P-256

Content hash as identity

A filename is a human label. SHA-256 of the bytes is cryptographic identity — authorization can pin exactly which content is allowed.

Filename

Human label. Easy to swap the bytes underneath.

Content hash

Cryptographic identity of the exact bytes.

Local attestation + DH

Two enclaves on the same platform prove identity locally, then run Diffie–Hellman so the host OS cannot read enclave-to-enclave traffic.

Local attest + DH = enclave-to-enclave secure channel on one machine

Cheat sheet

P-256Mathematical key system
ECDHSecret agreement
Shared secretRaw ECDH output — not an AES key
SHA-256Fingerprint / KDF / integrity
Context labelDomain separation for derived keys
AES-128Encryption with a 16-byte key
GCMEncryption + tamper detection
RijndaelAES's original algorithm family name
12-byte IVUnique encryption identifier
AADVisible but tamper-protected metadata
TLSSecure network pipe
mTLSSecure pipe + both identities
eTLSTLS terminating inside an enclave
DCAPSGX attestation verification
PCCSQuote-verification collateral source
MRENCLAVEEnclave measurement / fingerprint
REPORTDATAAttestation binding field
OAuthAuthorization protocol
JWTSigned authorization token
ES256P-256 ECDSA signature
Local attest + DHEnclave-to-enclave secure channel

One sentence = mTLS authenticates the network, OAuth/JWT authorizes the job, DCAP/PCCS proves the enclave, P-256/ECDH creates a shared secret, SHA-256 derives the AES key, AES-128-GCM protects the payload, AAD protects metadata, local attestation protects enclave-to-enclave.

Signup for Updates:

I promise to only email you cool shit. Draft chapters, progress updates, sneak peaks at illustrations I'm working on. Stuff like that.

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░