Equivalence of Rabin inversion and integer factoring for Blum moduli #
The Rabin squaring function x ↦ x ^ 2 % N over Blum moduli N = p * q (p ≠ q primes with
p ≡ q ≡ 3 [MOD 4]), the integer factoring assumption FactoringHard, the Rabin one-wayness
assumption RabinOneWay, the polynomial-time equivalence RabinOneWay gen ↔ FactoringHard gen,
and the Blum-modulus transfer FactoringHard.of_modulusFactoringHard and
QuadraticResiduosityHard.factoringHard.
Main definitions #
Cslib.Crypto.BlumDesc,Cslib.Crypto.BlumGen: Blum modulus parameters and generators.Cslib.Crypto.rabinEval: Rabin squaringx ^ 2 % N.Cslib.Crypto.factoringGame,Cslib.Crypto.FactoringHard: the Blum-generator integer factoring experiment and assumption.Cslib.Crypto.rabinInversionGame,Cslib.Crypto.RabinOneWay: the Rabin modular square-root experiment and assumption.Cslib.Crypto.rabinToFactor,Cslib.Crypto.factorToRabin: explicit PPT reductions between Rabin inversion and factoring.
Main results #
Cslib.Crypto.factoringHard_iff_modulusFactoringHard,Cslib.Crypto.FactoringHard.of_modulusFactoringHard:FactoringHard genisModulusFactoringHardon the pushed-forward Blum modulus distribution.Cslib.Crypto.rabinOneWay_of_factoringHard: if factoring is hard forgen, then Rabin squaring is one-way forgen.Cslib.Crypto.factoringHard_of_rabinOneWay: if Rabin squaring is one-way forgen, then factoring is hard forgen.Cslib.Crypto.rabinOneWay_iff_factoringHard:RabinOneWay gen ↔ FactoringHard gen.Cslib.Crypto.QuadraticResiduosityHard.factoringHard: quadratic residuosity hardness impliesFactoringHardfor any Blum generator with the same modulus distribution.
Implementation notes #
To execute natively inside ProbComp without an exact uniform sampler over (ZMod N)ˣ or
modular rejection-sampling error, rabinInversionGame and rabinToFactor use an original
dyadic all-residue sampling variant: they draw a uniform 2 * N.bits.length-bit word r
(x = ofBits r < 2^(2 * bits(N)) with N^2 ≤ 2^(2 * bits(N))) and evaluate
rabinEval N x = x^2 % N. In rabinToFactor, if 1 < gcd(x, N) < N the reduction factors
N immediately; otherwise it queries the Rabin inverter A on (N, x^2 % N) and returns
(gcd(x + x', N), N / gcd(x + x', N)). Partitioning Fin (2^L) into nontrivial-gcd draws,
multiples of N, and 4-to-1 unit fibers (where at least 2k of the at most 4(k + 1)
preimages in Fin (2^L) fall in the two mixed-sign CRT classes, equal to x' modulo one prime
and -x' modulo the other, for k = 2^L / N ≥ N ≥ 21) yields the concrete factor-3 reduction
bound succProbability_rabinInversionGame_le:
Game.succProbability (rabinInversionGame gen A n) ≤
3 * Game.succProbability (factoringGame gen (rabinToFactor A) n).
Both FactoringHard and RabinOneWay are parameterized by an arbitrary generator family
gen : BlumGen := ℕ → PMF BlumDesc (without bundling efficient Blum-modulus sampling or
bit-length bounds in n) and quantify over uniform native strict-PPT algorithms (IsPPTOn)
charging the full binary-encoded inputs and sampled/callback outputs uniformly before n.
References #
- J. Katz, Y. Lindell, Introduction to Modern Cryptography, Section 9.2.3, Definition 9.45 (The Factoring Assumption), Section 15.4 (Quadratic Residuosity), and Sections 15.5.1–15.5.2, Lemma 15.35, Theorem 15.36, Proposition 15.37, and Theorem 15.38 (Computing Modular Square Roots; A Trapdoor Permutation Based on Factoring). This is the source of the definitions.
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, context
only: Exercise 16.9(a), p. 709 (a square-root oracle factors
n), and Appendix A.2.3, p. 1097 (Quadratic residues).
The Blum modulus is positive.
Every Blum prime is at least 3.
Every Blum prime is at least 3.
Every Blum modulus is at least 21.
View a Blum modulus descriptor as a ModulusDesc.
A Blum modulus generator indexed by the security parameter n.
Rabin squaring (N, x) ↦ x ^ 2 % N is computable in polynomial time whenever N and x are
computable in polynomial time and 0 < N a.
The integer factoring assumption for gen ([KL20], Section 9.2.3, Definition 9.45):
every uniform PPT factoring algorithm succeeds with negligible probability.
factoringGame gen A n is modulusFactoringGame on the pushed-forward Blum modulus
distribution (gen n).map BlumDesc.modulus.
FactoringHard gen is equivalent to ModulusFactoringHard on the pushed-forward Blum modulus
distribution.
Transfer ModulusFactoringHard on a modulus distribution to FactoringHard on a Blum
generator with the same modulus distribution.
The Rabin one-wayness assumption for gen ([KL20], Section 15.5.2; locator not
independently inspected in the 3rd-edition PDF): every uniform strict PPT inverter has negligible
probability of finding a modular square root of x ^ 2 % N on Blum moduli drawn from gen, with
the preimage x drawn from a uniform bit string of length 2 * N.bits.length reduced modulo N
rather than a uniform unit in ℤ_N^*.
Recombine square roots modulo Blum primes a and b via Fermat's little theorem CRT.
Explicit PPT reduction from Rabin inversion to factoring: given (n, (N, y)), run the
factoring algorithm F n N; if it returns (a, b) with 1 < a, 1 < b, a * b = N, extract
square roots modulo a and b via y ^ ((p + 1) / 4) % p and combine them via Fermat's little
theorem CRT.
factorToRabin F is uniform PPT whenever F is uniform PPT.
rabinToFactor A is uniform PPT whenever A is uniform PPT.
Success probability of factoringGame gen F n is at most that of
rabinInversionGame gen (factorToRabin F) n.
If Rabin squaring is one-way for gen, then factoring is hard for gen.
Counting Rabin preimages #
Success probability of rabinInversionGame gen A n is at most 3 times that of
factoringGame gen (rabinToFactor A) n.
If factoring is hard for gen, then Rabin squaring is one-way for gen.
Equivalence of Rabin one-wayness and integer factoring hardness for Blum modulus generators.
Quadratic residuosity hardness implies FactoringHard for any Blum modulus generator gen
whose modulus distribution matches setup.