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.
Each mechanism answers one question
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.
Mathematical key system
Secret agreement
Raw ECDH output — not an AES key
Fingerprint / KDF / integrity
Domain separation for derived keys
Encryption with a 16-byte key
Encryption + tamper detection
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
Private stays home. Public can travel.
Private key
never leaves the holder
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).
P-256 does ECDH and signatures
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
Agree on a secret without sending the secret
Party A
Party B
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.
ECDH is not an AES key yet
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
Any input → always 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
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.
Block cipher. Turns plaintext + key into ciphertext.
AES with a 16-byte key (first 16 of SHA-256).
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)
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.
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
Metadata stays readable. Payload does not.
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.
Secure network pipe. Server authenticates with a certificate.
TLS where both parties prove their identities.
TLS terminates inside the enclave, not on the host OS.
One-way identity vs both sides prove who they are
server cert →
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.
Remote proof of what is running inside the enclave.
Intel's quote verification stack for SGX.
Source of certs/CRLs/TCB needed to verify a quote.
Measurement of enclave code and initial state.
Prove what code is running inside the enclave
Measurement + REPORTDATA
Certs, CRLs, TCB, QE identity
Verify the quote
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.
Authorization protocol. Issues access, not identity of silicon.
Signed token carrying claims: who, what, until when.
ECDSA + P-256 + SHA-256. How the JWT is signed.
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.
Human label. Easy to swap the bytes underneath.
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
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.