Where cryptographic systems fail

7 min 5 sections 3 practice questions 15 sources citedISC2 objective 3.5

Encryption methods in wide use today are very hard to break by mathematics alone. Systems built on them still fail, because of short keys, guessable random numbers, keys left lying about, or software that skips a check. A new kind of computer also threatens some methods in years to come. No technical background is assumed. A security professional judges the whole system around the mathematics, and plans for the change ahead.

By the end of this unit you will be able to:

  • Name six ways a cryptographic system fails, with an example and a fix for each
  • Put the four FIPS 140 security levels in order and say what each adds
  • Explain which methods a large quantum computer would break and which it would only weaken
  • Explain harvest now, decrypt later, and why it makes preparation urgent
  • Describe a cryptographic inventory and cryptographic agility

Strong encryption, and a key in the wrong folder

An illustrative example

An online pharmacy encrypts every customer's prescription history with a method its supplier describes as unbreakable. A developer, testing a fix late one evening, copies the encryption key into a settings file so the program can find it. The settings file is saved with the program's code in a shared online repository.

Two months later an outsider searching such repositories finds the key and downloads the encrypted database from a misconfigured backup. Nothing about the encryption method was broken.

If the mathematics held, which part of the pharmacy's cryptographic system failed, and which control would have prevented it?

Strong mathematics, weak surroundings

A bank vault can have a door no drill will pierce. If the combination is written on a note taped beside it, the door adds nothing. is the same. Its algorithm, the published method of scrambling and unscrambling, is rarely where a real system breaks.

A cryptographic system is everything needed to protect data with . It includes the and the keys. It includes the protocol, the agreed sequence of messages between two parties. It also includes the software and hardware that do the work, and the people and that manage the keys. Each part can fail while the mathematics stays sound.

The rule that follows is old and still holds: the design may be public, and only the key must stay secret. A system that relies on its method staying hidden is weak by design. One that relies on its keys staying secret is only as strong as the way those keys are made, stored, used and retired.

Six ways a cryptographic system fails

Six common failures, each with an example and its fix
FailureWhat goes wrongExampleFix
Weak algorithmA method with a known flaw stays in use after it has been retiredSHA-1, a method, was disallowed by NIST for at the end of 2013Replace retired methods; follow the approved list
Short keyToo few possible keys, so trying them all becomes practicalNIST disallows RSA signature keys shorter than 2048 bitsUse the current guidance approves
Poor randomnessKeys come from a predictable random number generator, so they can be guessedA 2008 Debian flaw made OpenSSL keys predictableUse a tested random number generator
Poor key storageThe key sits in ordinary memory, a file or source codeHeartbleed, in 2014, let attackers read private keys out of server memoryHold keys in a or HSM; never in code
Protocol downgradeAn attacker in the middle forces both sides to agree on an older, weaker versionOlder TLS versions accepted by servers kept for compatibilitySwitch off old versions; use protocols with downgrade protection
Certificate not checkedSoftware accepts a or signature without verifying it fullyA 2014 Apple flaw skipped a signature check, so a fake server was acceptedTest that every check runs, including the failure cases

TLS, Security, is the protocol that protects web traffic. Its current version, 1.3, places a marker in the server's reply when an older version is negotiated. A client that sees the marker unexpectedly abandons the connection, which defeats a forced downgrade.

Most of the six are failures of implementation or management. That is why the fixes are processes and products, not new mathematics.

Validated modules: FIPS 140 and its four levels

A cryptographic module is the hardware, software or firmware that carries out cryptography and holds its keys. A hardware security module is one. FIPS 140 is the United States standard for testing such modules. FIPS 140-3, published in 2019 and based on ISO/IEC 19790, superseded FIPS 140-2. Both define four increasing levels.

FIPS 140 security levels: each adds to the one before
LevelPhysical protectionOperator authentication
1Production-grade parts and at least one approved algorithm; no specific physical protectionNot required
2Tamper evidence: seals, coatings or pick-resistant locks show any opening: the operator proves which role they hold
3Tamper detection and response: opening the case erases the keysIdentity-based: the operator proves who they are
4A complete protective envelope: any penetration, or extreme voltage or temperature, erases the keysIdentity-based with more than one factor under FIPS 140-3

A module is validated only at the level, version and configuration that were tested. A product described as using FIPS-approved algorithms has not necessarily been validated.

Quantum computing: which locks it opens

A quantum computer uses the physics of very small particles to calculate in a way ordinary computers cannot. For a few kinds of problem it is enormously faster. None yet exists that is large enough to threaten cryptography.

Two kinds of cryptography are affected differently. Symmetric methods use one shared key at both ends. Public-key methods use a key pair: one key is published and its partner is kept secret. Public-key methods set up shared keys and make digital signatures across the internet.

Shor's algorithm
A method published by Peter Shor in 1994. On a large quantum computer it would solve the problems that RSA, Diffie-Hellman and elliptic curve methods rely on. Those public-key methods would be broken.
Grover's algorithm
A faster way to search. It roughly halves the effective strength of a . Doubling the key length restores the protection, so symmetric methods survive.

Harvest now, decrypt later is the reason for haste. An adversary records encrypted traffic today and stores it until a quantum computer can open it. Medical records or state secrets that must stay confidential for decades are already at .

Preparing: inventory, agility and new algorithms

In August 2024 NIST published its first three post-quantum standards, methods designed to resist quantum computers. sets up shared keys. FIPS 204 and FIPS 205 make digital signatures. NIST plans to deprecate the vulnerable public-key methods after 2030 and disallow them after 2035.

Past changes of algorithm have taken 10 to 20 years to complete. Organisations therefore start with three steps.

  1. Build a cryptographic inventory: a list of every system, product and data flow that uses cryptography, which methods it uses, and how long its data must stay secret.
  2. Rank the list, putting data that must stay secret longest, and systems that are hardest to change, first.
  3. Build cryptographic agility: the ability to swap one algorithm for another by changing configuration, not by rewriting systems, and ask suppliers for their plans.

Shor breaks public-key methods. Grover only weakens symmetric ones. Data recorded today can be read tomorrow: inventory first.

A question, worked through

A national adoption agency must keep its records confidential for a century. Records move between regional offices over links protected by RSA key exchange. A board member reads that quantum computers may break RSA within fifteen years and asks the head of security how to begin.

What should the head of security do FIRST?

  1. Map which systems carry long-lived records under public-key methods
  2. Double the length of every symmetric key the agency uses
  3. Defer any change until a large quantum computer is shown
  4. Replace every link's certificates with longer RSA keys
Decide on your answer, then open the reasoning
  1. The question asks for the first step in preparing for quantum risk, for data that must stay secret for a century.
  2. Rule out c. Harvest now, decrypt later means traffic recorded today can be opened once such a computer exists. Waiting leaves a century of records exposed.
  3. Rule out d. Shor's algorithm breaks RSA whatever its key length, so longer RSA keys do not answer the threat.
  4. Between a and b: doubling symmetric keys answers Grover, a lesser threat, and misses the RSA exchange that is actually exposed. It also commits effort before the agency knows where its cryptography is.
  5. An inventory comes first. It shows where public-key methods protect long-lived records, so migration to post-quantum methods can start there.

Answer: A. Map which systems carry long-lived records under public-key methods

Choosing between good answers

A system using an approved algorithm has been breached
look for the failure around the mathematics: key storage, randomness, a skipped check or a downgrade.
A question asks which FIPS 140 level first erases keys when the case is opened
choose level 3. Level 2 only shows tampering; level 4 adds a full envelope and protection against environmental extremes.
Quantum risk is raised for data that must stay secret for many years
treat it as urgent now because of harvest now, decrypt later, and begin with a cryptographic inventory.
An answer offers longer keys as the defence against quantum computers
it works for symmetric keys against Grover. It does not save RSA or elliptic curve methods from Shor.

Try it

Walk a certificate chain and mark each check that, if skipped, would let a fake server be trusted.

Loading the preview.

Check your understanding

3 questions on this unit, easiest first. Confirm an answer to see the reasoning for it, then the right answer, the other options and the rule to reuse. Your answers are kept in this browser and feed readiness and review.

These questions are drafts that no named reviewer has approved yet.

Question 1 of 3

A buyer is comparing cryptographic modules. Put the physical protection of the four FIPS 140 security levels in order, from level 1 to level 4.

Put the steps in order with the buttons beside each one. The whole order has to be right.

  1. 1Seals or coatings that show when the module has been opened
  2. 2Production-grade parts, with no specific physical protection
  3. 3A full protective envelope that erases the keys on any penetration or extreme temperature
  4. 4Detection that erases the keys when the case is opened

What to remember

  • Cryptographic systems usually fail around the mathematics: weak or retired algorithms, short keys, poor randomness, poorly stored keys, protocol downgrade and unchecked certificates.
  • FIPS 140 has four levels: basic; tamper evidence and role-based authentication; tamper response and identity-based authentication; a full envelope with environmental protection.
  • A large quantum computer running Shor's algorithm would break RSA, Diffie-Hellman and elliptic curve methods. Grover's algorithm only halves symmetric strength, answered by longer keys.
  • Harvest now, decrypt later makes long-lived secrets vulnerable today.
  • Preparation starts with a cryptographic inventory, then priorities, then agility and migration to FIPS 203, 204 and 205.

Say it from memory

  1. Name six ways a cryptographic system fails while its mathematics stays sound, with a fix for each.

    Weak or retired algorithm: replace it. Short key: use approved lengths. Poor randomness: use a tested generator. Poor key storage: keep keys in a TPM or HSM, never in code. Protocol downgrade: switch off old versions. Certificates or signatures not fully checked: test every check. Use FIPS 140 validated modules.

    Read this part again

  2. What does a cryptographic system include, and which part must stay secret?

    The algorithms and keys, the protocol, the software and hardware that do the work, and the people and procedures that manage the keys. The design may be public, and only the key must stay secret. A system relying on its method staying hidden is weak by design.

    Read this part again

  3. What do the four FIPS 140 security levels add for physical protection?

    Level 1: production-grade parts and at least one approved algorithm, with no specific physical protection. Level 2: tamper evidence, with role-based authentication. Level 3: tamper detection and response, so opening the case erases the keys, with identity-based authentication. Level 4: a complete protective envelope that erases the keys on any penetration or extreme voltage or temperature.

    Read this part again

  4. What do FIPS 203, FIPS 204 and FIPS 205 do, and what is cryptographic agility?

    They are NIST's first three post-quantum standards, published in August 2024. FIPS 203 sets up shared keys; FIPS 204 and FIPS 205 make digital signatures. Cryptographic agility is the ability to swap one algorithm for another by changing configuration, not by rewriting systems.

    Read this part again

Sources