Cryptography Myths vs. Facts: What the Headlines Missed About Keys and Randomness
Archi4 min read
Contents
- Myth 1: Longer keys always mean stronger security
- What the headlines missed
- Myth 2: Random numbers are random enough
- The fix is boring
- Myth 3: Quantum computers break everything tomorrow
- Myth 4: Encryption at rest solves the breach
- Tokenization and field-level encryption
- Myth 5: Hashing passwords is enough
- What to check this week
Myth 1: Longer keys always mean stronger security#
Headlines love a big number. A 4096-bit RSA key sounds twice as safe as a 2048-bit one. In practice, the jump from 2048 to 4096 bits adds roughly one bit of security margin per doubling, and it costs far more in computation. The real risk sits elsewhere: a 2048-bit key generated on a device with a predictable random number source is weaker than a well-generated 1024-bit key from a trusted module.
Key length is a ceiling, not a floor. It caps how much work an attacker must do, but it does nothing about key reuse, weak passphrases protecting the key store, or a signing service that hands out signatures to anyone who asks. When a breach report says "military-grade encryption," ask two questions: how were the keys generated, and who can request a signature. The bit count rarely appears in the answer.
What the headlines missed#
Most breach write-ups lead with the algorithm. "AES-256 was defeated" makes a better headline than "the key was stored in a config file." In nearly every public incident I have read, the cipher held. The process around it did not.
Myth 2: Random numbers are random enough#
Randomness is the part of cryptography that fails silently. A weak generator does not throw an error. It produces output that looks fine to every test except the one an attacker runs.
Two failure patterns show up again and again. The first is seeding from a clock. If a device seeds its generator with the current time in milliseconds, an attacker who knows roughly when the key was created can search a window of a few million values. The second is forking. A process that forks after seeding can produce two children with identical generator state, which means two keys that are mathematically related.
The fix is boring#
Use the operating system's cryptographic random source. On Linux that is getrandom(), on Windows it is BCryptGenRandom, and on most platforms the language runtime wraps one of these. Test that your library actually calls it. A wrapper that falls back to a userspace generator when the system call fails is a liability.
Myth 3: Quantum computers break everything tomorrow#
Quantum computing is a real threat to RSA and elliptic curve cryptography, and the timeline is measured in years, not weeks. The practical concern for most teams is not a machine in a lab. It is data captured today and decrypted later. If a database dump has a ten-year confidentiality requirement, the migration clock started before the quantum machine arrived.
Post-quantum algorithms are standardized and deployable. The hard part is inventory: finding every place a key exchange or signature happens, including firmware, VPN concentrators, and certificate pinning inside mobile apps. A migration plan that covers the web tier and ignores the update channel is incomplete.
Myth 4: Encryption at rest solves the breach#
Disk encryption protects a stolen laptop. It does not protect a running database. Once the service is up, the keys are in memory and the data is readable by anything with the right permissions.
This is the gap between compliance and security. A checklist that says "data encrypted at rest" can be satisfied while every query returns plaintext to an application that logs it. The useful question is where decryption happens and who can trigger it. If the answer is "the application server, for any authenticated request," then the encryption protects against physical theft and little else.
Tokenization and field-level encryption#
Field-level encryption, where a credit card number or national ID is encrypted before it reaches the database, narrows the blast radius. It also complicates search and indexing. Teams that adopt it usually start with the highest-risk fields and accept the query limitations.
Myth 5: Hashing passwords is enough#
A salted hash with a fast algorithm is better than plaintext, but it is not enough. GPUs compute billions of SHA-256 hashes per second. A leaked table of fast hashes falls quickly, especially if users chose common passwords.
Password hashing needs a deliberately slow function with a tunable cost. Argon2id, scrypt, and bcrypt are the usual choices. The parameter that matters is the work factor, and it must rise as hardware improves. A cost setting chosen in 2018 may be cheap to attack in 2026.
The other half of the problem is the reset flow. A strong hash behind a reset link that never expires, or that leaks through a referrer header, gives an attacker the account without touching the hash.
What to check this week#
Start with key generation. Confirm every service uses the operating system's random source. Then inventory where keys live: environment variables, config files, hardware modules. Environment variables are common and easy to leak through crash dumps and process listings.
Next, look at password hashing parameters and the reset flow. Finally, find the places where encryption is claimed but decryption is trivial. Those are the gaps the next headline will describe, and the details will be in paragraph nine, after the word "military-grade."
More articles