← LibraryPrimality Certificates and Independent VerificationEngineering · MathematicsLesson 367/385← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin Jogincertificateverificationprimality proofindependent check

Modern Primality Tests

Primality Certificates and Independent Verification

What a primality certificate is, why verification is cheaper than production, and what a certificate does and does not guarantee.

Engineering / MathematicsModern Primality Tests2 min readKV-MATH-0664

A certificate is data allowing a primality claim to be verified much more cheaply than it was produced, and by independent software. This converts trust in an implementation into a checkable mathematical claim.

The asymmetry

Production versus verification cost
MethodProduction costVerification cost
Pocklington-LehmerRequires factoring one less than the candidateA few modular exponentiations
ECPPSubstantial searchPoint arithmetic at each level; logarithmically many levels
Jacobi sumModerateThe same as production — no certificate

Structure of an ECPP certificate

Per recursion level

The candidateThe number being proven prime at this level
The curveIts coefficients modulo the candidate
A pointOf the required order on that curve
The orderWith its factorisation into a small part and a large prime
The next candidateThat large prime, proven at the next level

The chain terminates at a number small enough to verify by direct means, and each level is checked by elliptic curve arithmetic alone.

What a certificate guarantees

Correctness of the claim
If the certificate verifies, the number is prime. This is unconditional.
Independence from the producer
Verification uses different code and different logic.
Nothing about the search
The certificate says nothing about how it was found, and does not need to.

Verification discipline

Verifying a certificate

  1. Use independent softwareVerification by the producing program establishes much less.
  2. Check every levelIncluding the recursion structure and that each level's next candidate matches.
  3. Check the terminal caseThe smallest number must be verified by an independent method.
  4. Check the arithmeticPoint orders and curve membership at each level.

When certificates matter

For published mathematical results, for adversarially supplied input, and wherever the primality claim will be relied upon by others. For routine cryptographic key generation, Baillie-PSW is normally accepted without proof.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 9.2. Structural reference unverified: the source file was not available during authoring; chapter and section numbers are taken from the published edition and have not been checked against a physical copy.

Continue learning

Atkin-Morain Elliptic Curve Primality ProvingArticle · MathematicsNEXT LESSON →Smoothness and Sub-exponential ComplexityArticle · MathematicsThe Goldwasser-Kilian Primality TestArticle · MathematicsThe Continued Fraction Factorisation MethodArticle · Mathematics