ArticleslgStudy

computer science

ROCA vulnerability

ROCA vulnerability is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand ROCA vulnerability rather than just read about it. In short: The ROCA vulnerability is a cryptographic weakness that allows the private key of a key pair to be recovered from the public key in keys generated by devices with the vulnerability. "ROCA" is an acronym for "Return of Coppersmith's attack". The vulnerability has been given the identifier CVE-2017-15361.

Key takeaways

  • ROCA vulnerability belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect ROCA vulnerability to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of ROCA vulnerability from memory before moving on to harder problems.

Reference excerpt

The ROCA vulnerability is a cryptographic weakness that allows the private key of a key pair to be recovered from the public key in keys generated by devices with the vulnerability. "ROCA" is an acronym for "Return of Coppersmith's attack". The vulnerability has been given the identifier CVE-2017-15361. The vulnerability arises from an approach to RSA key generation used in vulnerable versions of the software library RSALib provided by Infineon Technologies and incorporated into many smart cards, Trusted Platform Modules (TPM), and Hardware Security Modules (HSM), including YubiKey 4 tokens when used to generate RSA keys on-chip for OpenPGP or PIV. RSA keys of lengths 512, 1024, and 2048 bits generated using these versions of the Infineon library are vulnerable to a practical ROCA attack. The research team that discovered the attack (all with Masaryk University and led by Matúš Nemec and Marek Sýs) estimate that it affected around one-quarter of all current TPM devices globally. Millions of smart cards are believed to be affected. The team informed Infineon of the RSALib problem in February 2017, but withheld public notice until mid-October, citing responsible disclosure. At that time they announced the attack and provided a tool to test public keys for vulnerability. They published the details of the attack in November.

Technical details Generating an RSA key involves selecting two large randomly-generated prime numbers, a process that can be time-consuming, particularly on small devices, such as smart cards. In addition to being primes, the numbers should have certain other properties for best security. The vulnerable RSALib selection process quickly creates primes of the desired type by only considering numbers of the form

k × M + ( 65537 a mod M ) , {\displaystyle k\times M+(65537^{a}{\bmod {M}}),}

where M {\displaystyle M} is the product of the first n successive primes (2, 3, 5, 7, 11, 13, ...), and n is a constant that only depends on the desired key size. The security is based on the secret constants k {\displaystyle k} and a {\displaystyle a} . The ROCA attack exploits this particular format for primes using a variation of the Coppersmith method. In addition, public keys generated this way have a distinctive fingerprint that can be quickly recognized by attempting to compute the discrete logarithm of the public key mod M {\displaystyle M} to base 65537. Computing discrete logarithms in a large group is usually extremely difficult, but in this case it can be done efficiently using the Pohlig–Hellman algorithm because M {\displaystyle M} is a smooth number. A test site is available on the Internet. In short, keys that fit this format have significantly lower entropy and can be attacked relatively efficiently (weeks to months), and the format can be confirmed ("fingerprinted") by the attacker very quickly (microseconds). Multiple implementations of the attack are publicly available.

Mitigation The ROCA authors consider public keys of length 512, 1024 and 2048-bits generated by RSALib to be vulnerable. Because the details of key generation differ for different key lengths, shorter keys are not necessarily more vulnerable than longer keys. For example, a 1952-bit RSAlib key is stronger than a 2048-bit key and a 4096-bit key is weaker than a 3072-bit key. The best mitigation, according to the authors, is to generate RSA keys using a stronger method, such as by OpenSSL. If that is not possible, the ROCA authors suggest using key lengths that are less susceptible to ROCA such as 3936-bit, 3072-bit or, if there is a 2048-bit key size maximum, 1952-bits. Infineon has released firmware updates for its Trusted Platform Modules to manufacturers who have used its TPMs.

Implications The vulnerability highlighted several shortcomings of the Common Criteria certification scheme as the vulnerability was present in a list of Common Criteria certified smart card products. Namely, the approval of homegrown cryptographic algorithms; the lack of transparency in certification reports, inability to revoke Common Criteria certificates for known vulnerable products and distribute this information to the users of the certified products. In Estonia, the discovery of the vulnerability resulted in a state-level cyber crisis as the vulnerable smart card chip was deployed on more than 750,000 Estonian identity cards that are used daily by Estonian residents and e-residents to securely authenticate online and create digital signatures.

See also BitLocker § Security concerns Infineon Technologies § Security flaw Trusted Platform Module

References

External links ROCA detection tool (Detection source code) ROCA Vulnerability Test Suite (Online tool for testing keys, files, GitHub accounts, GnuPG keys, and includes an S/MIME and PGP email responder) TrustMonitor ROCA Vulnerability Test (Online tool for testing multiple certificates) Detect Trusted Platform Modules Vulnerable to CVE-2017-15361 (Scripts)

Worked examples

Example 1 — a first encounter with ROCA vulnerability

Start with the simplest possible case. Write down what ROCA vulnerability claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to ROCA vulnerability before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about ROCA vulnerability ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of ROCA vulnerability

In research
ROCA vulnerability appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses ROCA vulnerability in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
ROCA vulnerability is common in secondary-school and first-year university syllabi. It links to neighbouring topics Attacks on public-key cryptosystems, Cryptographic attacks, so understanding it makes those chapters shorter.
In everyday life
Look for ROCA vulnerability outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study ROCA vulnerability in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what ROCA vulnerability means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain ROCA vulnerability out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is ROCA vulnerability in simple terms?

The ROCA vulnerability is a cryptographic weakness that allows the private key of a key pair to be recovered from the public key in keys generated by devices with the vulnerability. "ROCA" is an acronym for "Return of Coppersmith's attack". The vulnerability has been given the identifier CVE-2017-1…

Why does ROCA vulnerability matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study ROCA vulnerability?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on ROCA vulnerability.

Tags

  • Attacks on public-key cryptosystems
  • Cryptographic attacks

Keep exploring