Live fingerprint
Make a message. Get a hash.
Change one character. The fingerprint changes completely.
Beginner field guide Secrets · fingerprints · signatures · trust
Start with the jobs cryptography performs, touch the ideas in local labs, then follow how modern protocols combine the pieces.
Live fingerprint
Change one character. The fingerprint changes completely.
01 First principles
Most confusion disappears once you stop treating “crypto” as one magical action. Start by asking what job needs doing.
Keep it secret
Turns readable plaintext into scrambled ciphertext. The right key reverses it.
Think: a locked box
Notice a change
Makes a fixed-size digest from any input. It is designed to be one-way, not unlocked later.
Think: a fingerprint
Prove shared-secret origin
A message authentication code detects changes and shows that someone with the shared secret made it.
Think: a secret wax seal
Prove key-holder origin
A private key signs. The corresponding public key lets others check the signer and the message.
Think: a verifiable autograph
The fast translation
Choose the goal first. Then choose a well-reviewed tool or protocol that provides it.
| Goal | Typical tool | Can it be reversed? | Needs a secret? |
|---|---|---|---|
| Hide data | Encryption | Yes, with a key | Yes |
| Fingerprint data | Hash | No | No |
| Authenticate between secret-sharers | MAC / HMAC | No | Shared secret |
| Publicly verifiable origin | Digital signature | No | Private signing key |
02 Shared-key encryption
Symmetric encryption uses the same secret key to protect and recover data. It is the efficient workhorse behind encrypted files, disks, databases, and network sessions.
The readable message or file.
Unpredictable key material shared by authorized parties.
A per-message value that must meet the mode’s uniqueness rules.
Hidden content plus evidence that detects tampering.
The standard primitive
AES transforms fixed-size blocks under a secret key. Applications use it through a carefully specified mode and a maintained library rather than applying raw AES directly.
The safer goal
Authenticated encryption with associated data can hide the message, detect changes, and authenticate unencrypted context such as a record type or protocol header.
The reuse trap
Nonce requirements depend on the algorithm. With widely used modes such as GCM, repeating a nonce with the same key can expose relationships between messages and undermine authentication.
Base64 and hexadecimal make bytes easier to store or transmit. They provide no secrecy; anyone can decode them.
A hash is designed to be one-way and uses no decryption key. It does not hide low-entropy guesses such as passwords.
Encryption is reversible for someone with the required key. Secure use also needs integrity protection.
Randomness and entropy
Keys, salts, and many nonces begin with secure randomness. Use the operating system, a maintained cryptographic library, or approved hardware. Human choices, timestamps, and ordinary random functions are not substitutes.
MAC and HMAC
A MAC detects message changes and shows that someone with the shared secret produced it. HMAC is a standard construction built from a cryptographic hash; it authenticates but does not hide the message.
Hybrid cryptography
TLS uses public-key techniques to authenticate and establish fresh secrets, key derivation to create session keys, and fast authenticated encryption to protect application data.
03 Hash functions
A cryptographic hash function accepts a message of any practical length and produces a fixed-length digest. It is easy to compute forward—and deliberately hard to undo.
Identical input, identical digest—every time.
A tiny input change should scramble the output.
A digest should not reveal the original message.
LAB / 01
Compare two messages. Changed digest bytes light up; the meter counts the exact output bits that differ.
Edit either message to compare its fingerprint.
Important distinction
Encryption is meant to be reversed by someone with a key. A cryptographic hash has no decryption key. You verify a guess by hashing it and comparing digests.
Password trap
SHA-256 is intentionally fast. Attackers can therefore test guesses quickly. Password storage needs a unique salt and a deliberately costly password-hashing function such as Argon2id.
OWASP password guidanceGiven a digest, finding any input that produces it should be computationally infeasible.
Given one message, finding a different message with the same digest should be infeasible.
Finding any two different messages with the same digest should be infeasible. Collisions must exist mathematically, but finding one should be out of reach.
MD5 and SHA-1 have practical collision weaknesses and should not be chosen for collision-resistant security. Use current, reviewed guidance for real systems.
04 Public-key cryptography
A keypair contains mathematically related keys with different roles. The public key can be distributed; the private key stays under its owner’s control.
PUBLIC KEY
Others can use it to encrypt to you or verify your signatures, depending on the system.
PRIVATE KEY
Its holder can decrypt to themselves or create signatures, depending on the system.
LAB / 02
Switch the goal. Watch the key roles change.
Uses Bob’s public key
Eve sees scrambled data
Uses his private key
Goal: Alice wants only Bob to read her message.
Alice obtains an authentic copy of Bob’s public key.
She uses it to protect a secret for Bob.
Only Bob’s private key can complete the decryption.
You still need confidence that a public key belongs to the person or service named. Certificates, trust stores, fingerprints, and verified directories help bind identities to keys.
It makes tampering detectable and connects the signature to a private-key holder. Confidentiality is a separate job.
Public-key techniques solve authentication and key-agreement problems; symmetric cryptography efficiently protects the ongoing data.
They are carefully generated bit strings, not physical objects. Copying one may leave no visible trace.
“Encrypt with the private key” is an oversimplification for signatures. Real signature schemes have distinct signing and verification operations.
The mathematics can show that two operations use a matching pair. It cannot, by itself, tell you whose pair it is.
05 Cryptography in practice
Protocols fail when keys are predictable, copied casually, overused, or left trusted after compromise. Treat each key as controlled data with an owner, purpose, and planned end.
Use a cryptographically secure source and the correct algorithm, size, and parameters.
Keep secret keys out of code, logs, chat, tickets, and ordinary files. Limit who or what may use them.
Know every dependency before rotation. Revoke and replace promptly when compromise is known or reasonably suspected.
End trust deliberately, preserve only what policy and recovery needs require, and remove obsolete copies.
Where the pieces meet
01 / WEB
A web server guards its private key. Its certificate publishes identity information and a public key, signed into a chain your browser can check.
Watch for: certificate validation, expiry, and exposed private keys.
02 / ACCESS
Your private key stays with you; servers receive your public key. Agents and hardware authenticators can reduce direct private-key exposure.
Watch for: stale access and unprotected private-key copies.
03 / SIGN-IN
A site stores a public key. Your authenticator retains the private key and signs a challenge tied to the real site, helping resist phishing.
Watch for: device sync, recovery, and authentic site binding.
04 / ASSETS
A recovery phrase can recreate wallet key material. Anyone who obtains it may be able to control the assets; loss can make recovery impossible.
High-stakes rule: never enter one into an untrusted site or share it for “support.”
Continue the operational trail
The companion guide covers inventories, ownership, storage, envelope encryption, rotation, revocation, recovery, audit trails, and compromise response in practical depth.
06 Video signal deck
Five carefully chosen explainers, arranged as a short viewing path. Select a card, then choose whether to load YouTube.
*The TLS video is a conceptual walkthrough and discusses protocol history. For precise current behavior, consult the linked TLS 1.3 standard.
07 Knowledge check
Choose an answer, then read the reasoning. Security lives in the reasoning.
01 / 03
02 / 03
03 / 03
08 Resource library
Selected for authority, clarity, and usefulness—not for having the loudest search result. Labels tell you what kind of reading to expect.
A concise bridge from keypairs to HTTPS.
Free book · Beginner+ Crypto 101A programmer-friendly tour from ciphers and hashes to TLS.
Reference · Beginner Security terminologyPlain distinctions between encryption, hashing, signatures, and more.
A rigorous undergraduate path with open online chapters.
Free textbook · Advanced A Graduate Course in Applied CryptographyA broad, mathematically serious reference.
Book · Intermediate Cryptography EngineeringDesign principles and the surrounding systems where crypto succeeds or fails.
NIST’s current final Part 1 guidance at the time this page was reviewed.
Checklist · Professional Key Management Cheat SheetApplication-focused practices for generation, storage, compromise, and recovery.
Standard · Advanced TLS 1.3The protocol specification behind modern secure browser connections.
Sources last reviewed July 2026. SP 800-57 Part 1 Rev. 5 remains NIST’s current final guidance; Rev. 6 is a public draft. Standards and security recommendations change, so check publication status before production decisions.
09 Pocket glossary
Authenticated encryption with associated data: encryption that also detects tampering and can authenticate selected unencrypted context.
The Advanced Encryption Standard, a widely used symmetric block cipher that applications use through an appropriate mode.
A defined set of steps. A cryptographic algorithm specifies how data and keys are transformed.
A signed document that binds identity information to a public key for a stated period and purpose.
The scrambled output of encryption, intended to be unreadable without the required key.
The fixed-size output of a hash function.
Unpredictability used when generating secure keys, nonces, and other cryptographic values.
A property that keeps old sessions protected even if a long-term key is compromised later.
A function that maps input data to a fixed-size digest. Cryptographic hashes add specific resistance properties.
A standard construction that combines a hash function and secret key to authenticate messages.
A mode-specific input used with an encryption key. Its uniqueness or unpredictability requirements depend on the selected algorithm and mode.
A function that derives one or more strong keys from source key material or, in specialized forms, a password.
Two mathematically related keys used by an asymmetric cryptographic system.
A value intended for one use in a particular cryptographic context; requirements vary by algorithm.
The non-public half of a keypair, used for operations such as decryption or signing.
The shareable half of a keypair, used for operations such as encryption or signature verification.
Public key infrastructure: the roles, policies, systems, and certificates used to establish trust in public keys.
Marking a key, certificate, or credential as no longer trustworthy before its scheduled expiration.
Replacing a key and transitioning systems to the replacement under a planned process.
A unique, non-secret value added before password hashing to defeat precomputed tables and separate identical passwords.
A key that must remain confidential; in symmetric cryptography, authorized parties share it.
Data created with a private key that a corresponding public key can verify.
A public key or certificate accepted as a starting point for validating a chain of trust.
No glossary terms match that search.