ArticleslgStudy

computer science

Key finding attacks

Key finding attacks 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 Key finding attacks rather than just read about it. In short: Key finding attacks are attacks on computer systems that make use of cryptography in which computer memory or non-volatile storage is searched for private cryptographic keys that can be used to decrypt or sign data. The term is generally used in the context of attacks which search memory much more efficiently than simply testing each sequence of bytes to determine if it provides the correct answer.

Key finding attacks — main illustration
Key finding attacks — illustration

Key takeaways

  • Key finding attacks 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 Key finding attacks to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Key finding attacks from memory before moving on to harder problems.

Reference excerpt

Key finding attacks are attacks on computer systems that make use of cryptography in which computer memory or non-volatile storage is searched for private cryptographic keys that can be used to decrypt or sign data. The term is generally used in the context of attacks which search memory much more efficiently than simply testing each sequence of bytes to determine if it provides the correct answer. They are often used in combination with cold boot attacks to extract key material from computers.

Approaches In their seminal paper on Key Finding attacks, Shamir and van Someren proposed two different approaches to key finding: statistical or entropic key finding and analytical key finding. The former relies on detecting differences in the statistical properties of the data that make up cryptographic keys while the latter relies on determining specific byte patterns that must necessarily exist in the target key material and looking for these patterns.

Statistical key finding In general for most cryptographic systems the cryptographic keys should be as random as possible. For most symmetric ciphers the keys can and should be a truly random set of bits. For most asymmetric ciphers the private keys are either numbers chosen at random with certain constraints (such as primality or being generators in a group) or are the result of computations based on a set of random numbers with some constraints. In either case the key material exhibits high entropy. In contrast to this, most uncompressed data in a computer's memory has relatively low entropy. As a result, if a key is known to exist in memory in its raw form then it is likely to stand out against the background of non-key data by virtue of its high entropy and an attacker needs to only test for matching keys in areas of memory or storage that have high entropy.

The contrast between the low entropy of most data and the high entropy of key data is sufficient as to be apparent by visual inspection. The image to the right shows an example of this.

Analytical key finding While statistical key finding can be effective for reducing the amount of memory that needs to be searched, it still requires high-entropy areas to be tested to check if they contain the correct key material. In certain cases, particularly in the context of public key encryption systems, it is possible to determine patterns that must occur in the key material and then limit the search to areas where these patterns are found. Shamir and van Someren demonstrated one example of this analytical approach for finding private RSA keys where the public key is known and has a small public exponent. In the RSA system the public key is a pair (n,e), where n=p.q with p and q being two large primes. The corresponding private key is (n,d) (or sometimes (p,q,d) or some variant thereof) where e.d≡1(modϕ(n)), which is to say that e multiplied by d is equivalent to 1, modulo ϕ(n) where φ represents Euler's totient function and is the size of the multiplicative group modulo n. In the case of an RSA key: ϕ(n)=(p−1)(q−1)=n−p−q+1 Finding the value of ϕ(n) from n allows for the factorization of n and the security of the RSA cryptosystem rests on the difficulty of doing so. As such an attacker cannot determine d exactly, given e and n. An attack can however know a fair amount about what d looks like, given the knowledge that p and q are typically chosen to be the same length in bits and are both 'close' to the square root of n. Thus an attacker can approximate a guess of: ϕ(n)≈ϕ′(n)=n−2n and typically this approximation will be correct in the more significant half of its bits of its binary representation. The relationship of e and d means that: d=(1+k.ϕ(n))/e where the exact value of k is unknown but 0<k<e. Using this fact and the approximation ϕ′(n), the attacker can enumerate a set of possible values for the top half of the binary representation of d for each possible value of k. These binary patterns can be tested for many orders of magnitude faster than performing a trial decryption. Furthermore, in the common case of e=3 it can be shown that k=2, which allows the top half of the bits of d to be determined exactly and searched for directly.

Application Key finding attacks have been used in conjunction with cold boot attacks to extract keys from machines after they have been switched off. Heninger and Shacham showed that keys can be extracted even when the data in memory has been corrupted by having the power removed. Statistical key finding was used by Nicko van Someren to locate the signature verification keys used by Microsoft to validate the signatures on MS-CAPI plug-ins. One of these key was later discovered to be referred to as the NSAKEY by Microsoft, sparking some controversy.

Mitigations Key finding attacks can be mitigated in several ways. For analytic attacks, randomized key blinding will prevent the expected patterns from being found in memory as well as protecting against some other sorts of side-channel attack. Statistical attacks can be made less effective by storing other sorts of high-entropy or compressed data in memory and key material can be spread over a larger block of memory when not in use to reduce the concentration of entropy in one place.

References

Worked examples

Example 1 — a first encounter with Key finding attacks

Start with the simplest possible case. Write down what Key finding attacks 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 Key finding attacks 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 Key finding attacks 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 Key finding attacks

In research
Key finding attacks 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 Key finding attacks 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
Key finding attacks is common in secondary-school and first-year university syllabi. It links to neighbouring topics Hacking (computer security), so understanding it makes those chapters shorter.
In everyday life
Look for Key finding attacks 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.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Key finding attacks” →

How to study Key finding attacks in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Key finding attacks 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 Key finding attacks out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Key finding attacks in simple terms?

Key finding attacks are attacks on computer systems that make use of cryptography in which computer memory or non-volatile storage is searched for private cryptographic keys that can be used to decrypt or sign data. The term is generally used in the context of attacks which search memory much more…

Why does Key finding attacks 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 Key finding attacks?

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 Key finding attacks.

Tags

  • Hacking (computer security)

Keep exploring