KEVOS
ArticlesServicesCase studiesAboutContact
ArticlesServicesCase studiesAboutContact
← ArticlesPrimality Versus Factoring: Framing the ProblemsEngineering · Engineering MathematicsLesson 848/884← PrevNext →
ArticlePublished 7 Aug 20262 min readBy Kevin Joginprimalityfactoringcompositenesscertificate
On this page

Ask about this page

KEVOS AIPrimality Versus Factoring: Framing the Problems

KEVOS knowledge first · trusted web sources when needed

Classical Primality and Factoring

Primality Versus Factoring: Framing the Problems

Why proving compositeness is easy, proving primality is harder, and factoring is harder still — and what this asymmetry means in practice.

Engineering / MathematicsClassical Primality and Factoring2 min readKV-MATH-0646

Primality and factoring are frequently conflated and are entirely different problems. Deciding primality is easy; producing a factor is not, and the gap between them is what public-key cryptography rests on.

Three distinct questions

The three questions and their difficulty
QuestionDifficultyTypical method
Is this number composite?EasyA single strong pseudoprime test
Is this number prime, provably?ModerateECPP or Jacobi sum
What are its factors?HardECM, MPQS or the number field sieve

Key point

A compositeness proof is a single witness — one number demonstrating the failure of a property primes must satisfy. It reveals nothing about the factors, which is precisely why compositeness is cheap and factoring is not.

The asymmetry

A strong pseudoprime test on a composite number succeeds in exposing it with probability at least three quarters per random base, so a handful of bases settles compositeness beyond practical doubt. Nothing in that process yields a factor.

Note

This is a genuinely surprising fact when first encountered: it is possible to be certain a number is composite while having no information whatsoever about its factors.

Probable primes versus proven primes

Probable prime
Passes several strong pseudoprime tests. Overwhelmingly likely prime, but not proven.
Proven prime
Certified by an algorithm producing a verifiable certificate.
Industrial-grade prime
A probable prime accepted for practical use without proof. Standard in cryptography.

Key point

For most applications a probable prime is sufficient and the proof is an unnecessary expense. Proof matters when the result is a mathematical claim, or when an adversary might have chosen the number specifically to defeat the test — see certificates.

Practical strategy

Practical primality determination

  1. Trial divideBy small primes; disposes of most composites instantly.
  2. Strong pseudoprime testBase two first, then a few random bases.
  3. Lucas testFor a Baillie-PSW combination.
  4. Stop or proveAccept as a probable prime, or invoke a proving algorithm if certainty is required.

When factoring is needed

Factoring appears throughout this collection as a subroutine, not merely as an end in itself: discriminant factorisation for maximal orders, norm factorisation for ideal factorisation, and smoothness testing in relation collection.

Source. Henri Cohen, A Course in Computational Algebraic Number Theory, Springer GTM 138 — 8.1. 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.

Related pages

  • Computational Algebraic Number Theory: Field Overview
  • The Modern Primality Testing Landscape
  • Fermat and Strong Pseudoprime Tests

Continue learning

Schoof's Point Counting AlgorithmArticle · Engineering MathematicsNEXT LESSON →Fermat and Strong Pseudoprime TestsArticle · Engineering MathematicsCurve Reduction and Tate's AlgorithmArticle · Engineering MathematicsLucas Sequences and Lucas PseudoprimesArticle · Engineering Mathematics
KEVOS · Engineering, manufacturing and project improvement
ArticlesServicesCase studiesAboutContact
© 2026 KEVOS®