What Cryptography Actually Gives You

Most engineers reach for cryptography wanting "make this secure," but crypto doesn't provide "secure" — it provides four specific, separable guarantees, and using the wrong one (encrypting when you needed to authenticate, hashing when you needed to encrypt) is how most real-world crypto failures happen. This series is about using cryptography correctly as an engineer who builds on top of it, not about inventing it.

Cryptography is one of the few areas where a small mistake — a reused nonce, a missing authentication tag, a comparison that leaks timing — silently destroys the entire guarantee while the code still appears to work. This series is a practical, engineer’s tour of applied cryptography: what the primitives are, what each actually guarantees, how they combine into systems like TLS, and the pitfalls that turn correct-looking code into broken security. This first post frames the whole thing: what cryptography gives you, and the mindset that keeps you from misusing it.

The four guarantees

“Secure” is not a cryptographic concept. Cryptography provides four distinct guarantees, and being precise about which one you need is the first skill:

The single most common applied-crypto mistake is conflating these. “I encrypted it, so it’s safe” ignores integrity and authenticity — encryption alone doesn’t stop tampering. “I hashed the password, so it’s secure” confuses hashing (integrity/verification) with the actual requirement (slow, salted password storage). Naming the guarantee you need — confidentiality? integrity? authenticity? all three? — is the first and most clarifying step, and the rest of this series maps primitives onto these guarantees.

The tools that provide them

Each guarantee maps to specific primitives (the rest of the series covers each in depth):

So the primitives aren’t a random toolbox — they map onto the four guarantees. Knowing “I need confidentiality and integrity for this message” tells you “use an AEAD cipher,” and “I need to prove this came from me and I can’t deny it” tells you “use a digital signature.” Matching the guarantee to the primitive is the core applied-crypto skill.

The cardinal rule: don’t roll your own

The most important rule in applied cryptography: don’t invent your own cryptographic algorithms or protocols, and don’t implement the primitives yourself. Use well-vetted, standard algorithms (AES, SHA-256, etc.) via well-vetted, standard libraries. This isn’t gatekeeping — it’s hard-won experience:

The engineer’s job is not to create cryptography but to use it correctly: choose the right standard primitive for the guarantee you need, use a reputable library, and avoid the misuse patterns this series covers. That’s both humbler and harder than it sounds — most crypto vulnerabilities are misuse of good primitives, not broken primitives.

Kerckhoffs’s principle: secrecy lives in the key

A foundational idea, from the 19th century and truer than ever: a cryptographic system should be secure even if everything about it except the key is public. The algorithm, the protocol, the source code — all can be known to the attacker; only the key is secret. Its consequences shape everything:

Kerckhoffs’s principle reframes the engineer’s focus: not “keep my method secret” but “use a strong public algorithm and protect the key.” It’s the reason this series trusts public standards and devotes a whole post to key management.

The mindset for the rest of the series

Applied cryptography rewards a specific mindset, which this series builds:

With this framing — four guarantees, matched to primitives, using public standards via good libraries, with keys as the real secret — the rest of the series can go deep on each primitive and how they combine. Next: symmetric encryption, the workhorse of confidentiality, and why authenticated encryption is the default you should reach for.

Key takeaways

Further reading

Sources & References

Applied crypto guidance
Secrecy lives in the key