Choosing cryptography and retiring it in time

7 min 5 sections 3 practice questions 14 sources citedISC2 objective 3.6

Choosing cryptography starts with the job: keeping a file secret, spotting a changed download, proving who signed a contract, or protecting a connection. Each job has a standard tool, and each tool has a strength that can be compared on one scale and a working life that ends when attacks improve. No background beyond the earlier cryptography is assumed. A security manager chooses methods, compares their strength, and replaces them before they fail.

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

  • Choose a cryptographic method for a stated job: secrecy, integrity, proof of origin or a protected connection
  • Explain what bits of security measure, and compare symmetric, RSA, elliptic curve and hash strengths on that scale
  • Put in order the stages of the cryptographic life cycle and explain cryptographic agility
  • Tell apart link encryption and end-to-end encryption
  • Choose the right product family for email, web, network and disk protection

Four jobs at a veterinary practice

An illustrative example

The practice manager at a veterinary surgery has four tasks on her list. The reception laptop holds client records and goes home with a locum. The booking website takes card details. Laboratory results arrive by email and must be shown to come from the laboratory. Staff download a software update from the supplier's site.

The supplier of the booking system advises her to "use the strongest encryption for everything".

Is one strong encryption method the answer to all four tasks, or does each need a different tool?

Start from the job

Each method answers one question well. hides content. A detects accidental change. A detects deliberate change between parties who share a key. A signature proves who signed, to anyone.

From the job to the method
JobMethodWhy
Keep a laptop's files secret if it is lostFull disk encryption with AESFast of everything at rest
Protect a web connectionTLS: key agreement, , then AES in an authenticated modeHybrid: public key to set up, symmetric for the data
Check a download was not damagedA SHA-256 digest published on the supplier's siteDetects accidental change
Prove a file came from the supplierThe supplier's , checked with its certificate and origin, provable to anyone
Detect tampering between two of one firm's systemsHMAC with a shared keyFaster than a signature when no third party needs proof
Store passwordsA salted, slow hash such as Argon2id or PBKDF2Recovery is not needed, and guessing is made expensive
Send a secret file to a strangerEncrypt under the recipient's public key, in a digital envelopeNo secret has to be shared first

Only published, standard from well-tested libraries are chosen. A home-made algorithm relies on staying secret, which breaks Kerckhoffs's principle.

Common misconception

“The strongest encryption available is the right answer to every security need.”

Encryption gives confidentiality. It does not prove origin to a third party. Stored passwords need a slow one-way hash, because a key that could decrypt them is one more thing to steal.

Comparing strength in bits

of different kinds cannot be compared directly: a 3,072-bit RSA key is not 24 times stronger than a 128-bit AES key. Bits of security, also called security strength, give a common scale. A strength of n bits means the best known attack needs about 2 to the power n operations.

Comparable strengths: methods in the same row need about the same work to break
Bits of securitySymmetricRSA or Diffie-HellmanElliptic curveHash, collision
80 or lessTwo-key Triple DES1,024160 to 223SHA-1 (below 80)
112Three-key Triple DES2,048224 to 255SHA-224
128AES-1283,072256 to 383SHA-256
192AES-1927,680384 to 511SHA-384
256AES-25615,360512 or moreSHA-512

Eighty bits is no longer considered enough. Elliptic curve keys stay short as strength rises, which is why they suit phones and smart cards.

Common misconception

“128 bits of security is half as strong as 256 bits.”

Each extra bit doubles the work. 256 bits needs 2 to the power 128 times the work of 128 bits: a number with 39 digits.

Algorithms age: the cryptographic life cycle

Attacks and computers improve, so every algorithm and key length has a working life. The cryptographic life cycle manages methods from choice to removal. The National Institute of Standards and Technology (NIST), the United States standards body, gives each method a status. Acceptable means safe to use. Deprecated means usable with some . Disallowed means no longer used to protect anything. Legacy use means only or verifying what was protected before.

  1. Select an acceptable algorithm and key length for the data's required protection life.
  2. Deploy it, and record where it is used in an .
  3. Monitor its status and new attacks.
  4. When it is deprecated, plan and fund its replacement.
  5. When it is disallowed, stop protecting new data with it; keep it only for legacy use.
  6. Retire it: re-protect old data with a current method and destroy the old keys.
Algorithms that have reached the end of their life
AlgorithmWhat happened
DESStandard withdrawn in 2005; open to brute force
MD5Declared unacceptable for signatures in 2011
SHA-1Disallowed for signatures from the end of 2013; to be phased out by 2030
RC4Banned from TLS in 2015
Triple DESDisallowed for encryption after 2023; decryption for legacy use only

Cryptographic agility is the ability to replace an algorithm in protocols, applications and devices without rebuilding them or stopping the business. Each key used with a method also has its own life, from generation to destruction.

Cryptography in everyday products

TLS
Security protects web and other connections between programs.
IPsec
Security protects all traffic between two networks or devices, often as a virtual private network.
S/MIME
Secure/Multipurpose Internet Mail Extensions sign and encrypt email using certificates from a .
PGP
Pretty Good signs and encrypts email and files, with users vouching for each other's keys.
Disk and file encryption
Protects data at rest on laptops, phones and , usually with AES.

Two newer techniques solve narrower problems. Homomorphic encryption allows calculations on encrypted data, so a service can process figures it can never read. A zero-knowledge proof convinces a verifier that a statement is true while revealing nothing else, such as proving a person is over 18 without giving the date of birth.

Worked example: The veterinary practice's four tasks

The practice manager decides on one method for each task on her list.

  1. Reception laptop: full disk encryption with AES-256, unlocked at start-up. A lost laptop reveals nothing.
  2. Booking website: TLS 1.3 with a certificate from a public certificate authority. The connection is protected and customers can see whose site it is.
  3. Laboratory results: the laboratory signs each result with S/MIME. The practice's mail program checks the signature against the laboratory's certificate.
  4. Software update: the supplier signs the installer, and the computer checks the code signature before running it. A published SHA-256 digest alone would catch a damaged download but not a substituted one.
  5. She records all four in the practice's cryptographic inventory, with the algorithm and the date each certificate expires.

Four jobs need four tools. "The strongest encryption for everything" would have hidden the laboratory results without proving where they came from.

A question, worked through

A security manager at a land registry learns that its archive of title deeds is signed with RSA keys of 1,024 bits and SHA-1. The deeds must remain provably genuine for decades. The archive software can change algorithms only through a costly supplier upgrade.

What should the security manager recommend FIRST?

  1. Plan migration to signatures of at least 128-bit strength and require algorithm agility in the upgrade
  2. Keep the present signatures, since a 1,024-bit RSA key is eight times longer than an AES-128 key
  3. Encrypt the archive with AES-256 so that nobody outside the registry can alter the title deeds
  4. Publish a SHA-1 digest of each deed on the registry's website so that anyone can check them
Decide on your answer, then open the reasoning
  1. The deeds need long-lived proof of origin and integrity. The current method is rated at 80 bits or less and SHA-1 is disallowed for signatures.
  2. Rule out d. It adds more SHA-1, whose collision strength is below 80 bits, and a bare digest proves nothing about origin.
  3. Rule out c. Encryption hides content. It does not prove who issued a deed, and the deeds must be checkable by others.
  4. Between a and b: b compares key lengths across different kinds of algorithm. On the bits of security scale, RSA-1,024 is far weaker than AES-128.
  5. Option a replaces the method with one rated for decades and builds in agility so the next change is cheaper. It is the decision to make first.

Answer: A. Plan migration to signatures of at least 128-bit strength and require algorithm agility in the upgrade

Choosing between good answers

A question compares key lengths of different algorithm types
convert to bits of security first. RSA-3,072, a 256-bit elliptic curve key and AES-128 are all 128 bits.
A scenario asks for proof of origin to an outside party
choose a signature, not encryption or a bare hash.
An algorithm in use is deprecated or disallowed
choose planning its replacement, and stop applying new protection with a disallowed method.
Intermediate network points must not be able to read the content
choose end-to-end encryption. Link encryption is decrypted at each point.
An option offers a proprietary or secret algorithm
reject it. Choose a published standard from a tested library.

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 payment card scheme requires at least the security strength of RSA with 3,072-bit keys. The card chip is too small for RSA keys of that length, so the engineer will use elliptic curve keys.

Which elliptic curve key length meets the requirement with the shortest key?

What to remember

  • Start from the job: encryption for secrecy, a hash for accidental change, an HMAC for tampering between key holders, a signature for provable origin.
  • Bits of security put all methods on one scale: AES-128, RSA-3,072, a 256-bit elliptic curve key and SHA-256 collision resistance are each 128 bits.
  • The cryptographic life cycle runs from selection through deployment, monitoring, deprecation and disallowance to retirement.
  • Cryptographic agility is the ability to swap algorithms without rebuilding systems.
  • Link encryption is decrypted at every point and hides addresses; end-to-end encryption is not, and leaves addresses visible.

Say it from memory

  1. What is the cryptographic life cycle, and how are algorithms selected and retired?

    It manages algorithms and keys from choice to removal. Select an acceptable algorithm and key length for the data's protection life, then deploy, inventory and monitor it. Plan replacement when it is deprecated. Stop new protection when it is disallowed, keeping legacy use only. Finally retire it and destroy its keys. Examples: DES, MD5, SHA-1, RC4, Triple DES. Cryptographic agility makes the replacement cheap.

    Read this part again

  2. Which method fits each job: detect accidental change, detect tampering between two of your own systems, prove origin to anyone, store passwords?

    Accidental change: a SHA-256 digest. Tampering between two of one firm's systems: HMAC with a shared key. Proof of origin to anyone: a digital signature checked with a certificate. Stored passwords: a salted, slow hash such as Argon2id or PBKDF2.

    Read this part again

  3. Which RSA key length and elliptic curve key size give 128 bits of security, like AES-128?

    An RSA or Diffie-Hellman key of 3,072 bits, and an elliptic curve key of 256 to 383 bits. SHA-256 gives the same strength against collisions. Eighty bits is no longer considered enough.

    Read this part again

  4. How does link encryption differ from end-to-end encryption in what it hides and where data is readable?

    Link encryption protects one connection between two points and hides content and addresses on the link, but data is decrypted and readable at each point in between; the network operator runs it. End-to-end encryption hides content only, from sender to final recipient, so who is talking to whom stays visible.

    Read this part again

  5. How do S/MIME and PGP differ, and what do homomorphic encryption and a zero-knowledge proof allow?

    S/MIME signs and encrypts email using certificates from a certificate authority. PGP signs and encrypts email and files, with users vouching for each other's keys. Homomorphic encryption allows calculations on encrypted data. A zero-knowledge proof convinces a verifier a statement is true while revealing nothing else.

    Read this part again

Sources