liveBook · Manning

Cube root

As explained in Hacking Cryptography

A cube root of a number is a value whose third power equals that number.

A cube root of m is a value s whose third power equals m. In RSA signatures with public exponent e=3, attackers seek s such that s³ produces a desired padded message. section 9.6.3

Cube-rooting supports two partial-match strategies:

  • Prefix cube rooting finds s whose cube begins with a target prefix, ignoring trailing bytes. section 9.6.3
  • Suffix cube rooting finds s whose cube ends with a target suffix, using bitwise correction. section 9.6.3

Prefix-root test

A Go test computes a cube root for a random number and verifies that cubing 0xc15681d517f8d4fa produces the required prefix 0x6E46048A.

How Hacking Cryptography covers it

How deep it goes
Explains prefix and suffix algorithms, bitwise correction, bisection search, and executable tests, but not general cube-root mathematics.
Examples
Demonstrates prefix and suffix roots with hexadecimal values, Go implementations, unit tests, and logged matching bytes.
What it assumes
Assumes familiarity with RSA signatures, modular arithmetic, padded messages, hexadecimal bytes, and Go big integers.
What you can do after
Builds prefix and suffix cube-root routines and tests their partial-byte matches against concrete RSA values.
How it connects
Connects cube roots to RSA, digital signatures, public exponents, PKCS #1 v1.5 padding, and Bleichenbacher attacks.

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