Skip to content

PRP Proof File Spec

Mihai Preda edited this page Jul 4, 2020 · 4 revisions

The PRP Proof format described below represents the consensus reached by the GIMPS project. This allows proofs to be produced and consumed by various software such as mprime/Prime95 and GpuOwl and hopefully others.

The file starts with an ASCII section composed of a few lines separated by a single '\n' character. Example header:

PRP PROOF\n
VERSION=1\n
HASHSIZE=64\n
POWER=9\n
NUMBER=M216091\n

This ASCII header is immediately followed by a number of binary residues, in total POWER + 1 residues. Each of these residues is represented as a series of bytes, starting with the least-significant byte. The size in bits of a residue is derived from the NUMBER information in the header (for example, a residue modulo a mersenne number such as M216091 is has 216091 bits), and the number of bytes in the persistent form of a residue is the minimum number of bytes that covers the bit-size of the residue.

The residues

The header section is followed immediately by N+1 (where N is the proof power) binary residues without separators.

A residue is a value modulo the Mersenne candidate 2E-1. As such, a residue has exactly E bits. A residue is stored as a sequence of bytes starting with the least-significant byte. The number of bytes of a residue is (E-1)/8+1.

The first residue is called B and is the PRP residue at iteration topK. The next N residues are called middles, denoted M[0]...M[N-1]. More details about the meaning of these residues is found in Proof Verification.

The proof covers the iteration range up to iteration topK -- it allows to verify the correctness of the residue at topK (B). The implicit value topK is the lowest multiple of 2^POWER that is larger than E.

An example proof file is provided.

Clone this wiki locally