liveBook · Manning

Suffix cube root

As explained in Hacking Cryptography

A suffix cube root is a candidate RSA signature value whose cube exactly matches a required suffix of an encoded message.

A suffix cube root is a candidate RSA signature value whose cube matches the required rightmost bytes of an encoded message. It ignores the cube's left-side bytes, leaving room for unrelated data during a forgery. section 9.6.3

The bitwise construction proceeds from the least significant bit upward:

  • Use the resulting root as the complete right-hand component of a forged signature. section 9.6.4

Matching a digest suffix

A test generates a random odd 16-byte suffix, computes its suffix cube root, cubes that value modulo an RSA modulus with public exponent 3, and confirms that the final 16 bytes match exactly.

Forgery construction places the suffix root after a trimmed prefix root. The suffix encodes the separator, ASN.1 hash identifier, and digest; invalid middle bytes remain hidden where verification is permissive. section 9.6.4

How Hacking Cryptography covers it

How deep it goes
Explains the bit-flipping algorithm, worked hexadecimal output, and signature stitching, but defers a full mathematical proof.
Examples
Uses bit diagrams, hexadecimal cube-root examples, Go functions, randomized tests, and a forged SHA-256 signature.
What it assumes
Assumes RSA signatures, encoded hash formats, byte-oriented big integers, and public exponent 3; teaches the suffix algorithm procedurally.
What you can do after
Build it from scratch using big integers, bit comparison, suffix assembly, and a permissive verifier test.
How it connects
Connects RSA signatures, RSA public exponent 3, PKCS #1 v1.5 padding, modular arithmetic, and cube roots.

Related concepts

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.