Safe Defaults
Conservative recommendations for the most common cryptographic decisions. Send this page to any engineer.
Each recommendation links to its full entry in the algorithm browser. Click any algorithm badge for details, sources, and comparisons.
Password storage
Symmetric encryption
Authenticated messaging
Web / API transport
Digital signatures
Key exchange
General-purpose hash
MAC / message integrity
Choosing the right algorithm is 20% of security.
The distinction between a primitive and a protocol is where most teams stumble. AES-256-GCM is a primitive — it encrypts a block of data with a key and a nonce. TLS 1.3 is a protocol — it negotiates keys, authenticates peers, handles session resumption, and defends against replay and downgrade. Choosing AES-256-GCM does not mean you have a secure transport layer any more than choosing good lumber means you have a house.
Key generation, storage, and rotation are at least as critical as algorithm selection. A perfectly chosen cipher is worthless if the key is generated from a weak PRNG, stored in plaintext in a config file, or shared across environments. Keys should be generated from a CSPRNG, separated by purpose (never reuse an encryption key for authentication), and rotated on an explicit schedule rather than when someone remembers.
Implementation risk is the silent killer. Misuse-resistant APIs (like libsodium's secretbox) exist because even expert developers make mistakes with low-level primitives. A nonce reused in AES-GCM does not produce a helpful error message — it silently destroys your authentication guarantees and can leak the GHASH key. Choose libraries that make the safe path the default path, not libraries that give you maximum rope.
Deployment and key management infrastructure determine whether your cryptographic choices survive contact with reality. HSMs, secret managers, certificate authorities, rotation automation, and incident-response plans for key compromise are all part of the system. The algorithm is one parameter in a much larger security function.
Correct crypto ≠ secure system. A system can use every recommended algorithm on this page and still be vulnerable to timing leaks, memory-safety bugs, insecure deserialization, broken access control, or a misconfigured reverse proxy that terminates TLS at the wrong boundary. Cryptography solves specific, well-defined problems. It does not solve the general problem of building secure software.