liveBook · Manning

Precomputation attack

As explained in Real-World Cryptography

A precomputation attack computes a large collection of candidate cryptographic values in advance so that a later compromise or query can be searched efficiently.

A precomputation attack prepares a huge collection of candidate cryptographic values before a target compromise. When a database is later exposed, the attacker searches the collection instead of recomputing every guess. section 11.2.2

A typical password-authentication attack proceeds like this:

  • Obtain a user-specific salt or other information needed to derive candidate keys. section 11.2.2
  • Compute many candidate asymmetric private keys and their corresponding public keys offline. section 11.2.2
  • After a database breach, compare stored public keys with the precomputed collection and recover matching passwords. section 11.2.2
  • Use an OPRF-based design such as OPAQUE to force guesses through online, rate-limitable queries rather than offline computation. section 11.2.2

Alice logs in from another device

An attacker receives Alice’s salt, precomputes a large password-to-key list, and waits for a database compromise. OPRF-based derivation prevents this preparation by requiring server interaction for each guess; the server can then limit attempts, such as ten sign-ins per hour. section 11.2.2

Figure 11.4 An oblivious PRF (OPRF) is a construction that allows one party to compute a PRF over the input of another party without learning that input. To do this, Alice first generates a random blinding factor, then blinds her input with that before sending it to Bob. Bob uses his secret key to compute the PRF over the blinded value, then sends the blinded output to Alice who can unblind it. The result does not depend on the value of the blinding factor.

The OPRF flow shows how blinding lets the server evaluate a password-derived function without learning the password, supporting the online-query defense. section 11.2.2

How Real-World Cryptography covers it

How deep it goes
Explains the attack sequence and contrasts salts with OPRF-enforced online queries, without detailing cryptographic implementation.
Examples
Uses Alice’s login, a compromised database, precomputed public keys, salts, and a ten-attempts-per-hour limit.
What it assumes
Assumes familiarity with passwords, public and private keys, salts, password-based key derivation, and database compromise.
What you can do after
Apply OPAQUE-style OPRF authentication to replace offline password-key precomputation with rate-limitable online attempts.
How it connects
Connects passwords, salts, key derivation functions, OPRF, OPAQUE, offline brute force, and rate limiting.

This explainer was generated by Manning's knowledge graph from the text of Real-World Cryptography. The section links point to the parts of the book it draws on.