ArticleslgStudy

computer science

Dictionary attack

Dictionary attack 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 Dictionary attack rather than just read about it. In short: In cryptanalysis and computer security, a dictionary attack is an attack using a restricted subset of a keyspace to defeat a cipher or authentication mechanism by trying to determine its decryption key or passphrase, sometimes trying thousands or millions of likely possibilities often obtained from lists of past security breaches. Technique A dictionary attack is based on trying all the strings in a pre-arranged lis…

Key takeaways

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

Reference excerpt

In cryptanalysis and computer security, a dictionary attack is an attack using a restricted subset of a keyspace to defeat a cipher or authentication mechanism by trying to determine its decryption key or passphrase, sometimes trying thousands or millions of likely possibilities often obtained from lists of past security breaches.

Technique A dictionary attack is based on trying all the strings in a pre-arranged listing. Such attacks originally used words found in a dictionary (hence the phrase dictionary attack); however, now there are much larger lists available on the open Internet containing hundreds of millions of passwords recovered from past data breaches. There is also cracking software that can use such lists and produce common variations, such as substituting numbers for similar-looking letters. A dictionary attack tries only those possibilities which are deemed most likely to succeed. Dictionary attacks often succeed because many people have a tendency to choose short passwords that are ordinary words or common passwords; or variants obtained, for example, by appending a digit or punctuation character, which are easily covered by modern cracking software pattern generation. A safer approach is to randomly generate a long password (15 letters or more) or a multiword passphrase, using a password manager program or manually typing a password. Dictionary attacks can be deterred by the server administrator by using a more computationally expensive hashing algorithm. Bcrypt, scrypt, and Argon2 are examples of such resource intensive functions that require significant computational power to process, allowing for large improvements in security against dictionary attacks. While other hashing functions, such as SHA and MD5, are much faster and less expensive to compute, they can still be strengthened by being applied multiple times to an input string through a process called key stretching. An attacker would have to know approximately how many times the function was applied for a dictionary attack to be feasible.

Pre-computed dictionary attack/Rainbow table attack It is possible to achieve a time–space tradeoff by pre-computing a list of hashes of dictionary words and storing these in a database using the hash as the key. This requires a considerable amount of preparation time, but this allows the actual attack to be executed faster. The storage requirements for the pre-computed tables were once a major cost, but now they are less of an issue because of the low cost of disk storage. Pre-computed dictionary attacks are particularly effective when a large number of passwords are to be cracked. The pre-computed dictionary needs be generated only once, and when it is completed, password hashes can be looked up almost instantly at any time to find the corresponding password. A more refined approach involves the use of rainbow tables, which reduce storage requirements at the cost of slightly longer lookup-times. See LM hash for an example of an authentication system compromised by such an attack. Pre-computed dictionary attacks, or "rainbow table attacks", can be thwarted by the use of salt, a technique that forces the hash dictionary to be recomputed for each password sought, making precomputation infeasible, provided that the number of possible salt values is large enough.

Dictionary attack software Cain and Abel Crack Aircrack-ng John the Ripper Hashcat L0phtCrack Metasploit Project Ophcrack Cryptool

See also Brute-force attack E-mail address harvesting Intercontinental Dictionary Series, an online linguistic database Key derivation function Key stretching Password cracking Password strength

References

External links

RFC 2828 – Internet Security Glossary RFC 4949 – Internet Security Glossary, Version 2 US Secret Service use a distributed dictionary attack on suspect's password protecting encryption keys Testing for Brute Force (OWASP-AT-004) Archived 2020-01-14 at the Wayback Machine

Worked examples

Example 1 — a first encounter with Dictionary attack

Start with the simplest possible case. Write down what Dictionary attack 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 Dictionary attack 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 Dictionary attack 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 Dictionary attack

In research
Dictionary attack 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 Dictionary attack 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
Dictionary attack is common in secondary-school and first-year university syllabi. It links to neighbouring topics Cryptographic attacks, so understanding it makes those chapters shorter.
In everyday life
Look for Dictionary attack 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 “Dictionary attack” →

How to study Dictionary attack in 20 minutes

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

Frequently asked questions

What is Dictionary attack in simple terms?

In cryptanalysis and computer security, a dictionary attack is an attack using a restricted subset of a keyspace to defeat a cipher or authentication mechanism by trying to determine its decryption key or passphrase, sometimes trying thousands or millions of likely possibilities often obtained from…

Why does Dictionary attack 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 Dictionary attack?

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 Dictionary attack.

Tags

  • Cryptographic attacks

Keep exploring