The strong RSA assumption #
[BS23], §10.9, p. 420, calls a pair (G, g) of a finite abelian group G and an
element g ∈ G a group of unknown order when the size of G is hard to deduce from (G, g); a
probabilistic algorithm GGen draws it. In the strong RSA game the adversary receives (G, g)
and wins when it outputs (x, e) ∈ G × ℤ with x ^ e = g and e ≠ ±1. GGen satisfies the
strong RSA assumption when no efficient adversary wins with non-negligible probability. The book
remarks that this is a stronger assumption than standard RSA; no implication between StrongRSA
and RSAOneWay or RSAUnitOneWay is formalized here. On p. 421 the book observes that the
assumption is false when the order u of g, or a multiple of it, is known: for v > 1 coprime
to u, the element x = g ^ (v⁻¹ mod u) satisfies x ^ v = g. Its example of GGen draws an
RSA modulus n from RSAGen(ℓ, e) and a uniform g ∈ ℤₙ*.
Main definitions #
Cslib.Crypto.GUOParams,Cslib.Crypto.encGUOParams: the public parameters(N, g)of the group(ZMod N)ˣand their encoding.Cslib.Crypto.StrongRSAAdversary,Cslib.Crypto.StrongRSAAdversary.IsPPT: adversaries of the strong RSA game and their efficiency on encodings.Cslib.Crypto.isStrongRSASolution,Cslib.Crypto.strongRSAGame,Cslib.Crypto.StrongRSA: the winning condition, the game and the strong RSA assumption for a setup law.Cslib.Crypto.rsaGUOSetup: the book'sGGenfor an RSA key generator.Cslib.Crypto.knownOrderRoot,Cslib.Crypto.knownOrderAdversary: the rootg ^ (v⁻¹ mod u)of p. 421 and the adversary that outputs it with the exponentv.Cslib.Crypto.orderMultipleAdversary: the adversary of p. 421 for a multipleuof the order, withv = u + 1.
Main results #
Cslib.Crypto.not_strongRSA_of_orderMultiple: the observation of p. 421. If a polynomial-time functionuof the security parameter and(N, g)gives0 < uandg ^ u ≡ 1 [MOD N]for every supported(N, g), thenStrongRSA setupdoes not hold:orderMultipleAdversary uis PPT (isPPT_orderMultipleAdversary) and wins with probability1(strongRSAGame_orderMultipleAdversary).Cslib.Crypto.strongRSAGame_orderMultipleAdversary:orderMultipleAdversary uwins with probability1at every security parameter where0 < uandg ^ u ≡ 1 [MOD N]for every supported(N, g).Cslib.Crypto.exists_of_mem_support_rsaGUOSetup: every(N, g)drawn byrsaGUOSetuphas the modulus of a supported key and a basegcoprime toN.Cslib.Crypto.powMod_knownOrderRoot: for0 < u,g ^ u ≡ 1 [MOD N]andvcoprime tou,knownOrderRoot N u v gis av-th root ofgmoduloN.Cslib.Crypto.isPPT_knownOrderAdversary: the known-order adversary is PPT when its exponents are computable in polynomial time from the security parameter and(N, g).Cslib.Crypto.strongRSAGame_knownOrderAdversary: it wins with probability1at every security parameter whereg ^ u ≡ 1 [MOD N],vis coprime touandv ≠ 1for every supported(N, g).Cslib.Crypto.not_strongRSA_of_knownOrder: the general form of the observation, for any such exponentvcomputed in polynomial time.
Implementation notes #
The statements differ from the book's in three ways.
- The group is
(ZMod N)ˣ, the group of the book'sGGenfrom RSA keys (p. 421).GUOParamsholds the natural numbersNandg, and a setup is any lawℕ → PMF GUOParams, which need not be efficiently samplable or give a unitg.rsaGUOSetup genis the book'sGGen, with keys from any lawgenonRSADescin place ofRSAGen(ℓ, e). Class groups (p. 423) are not covered. - The adversary outputs natural numbers
xande, and wins whenx ^ e ≡ gmoduloNande ≠ 1(isStrongRSASolution_eq_true_ifffor0 < N). The book's integer exponentse ≤ -2are left out:x ^ e = gwithe < 0is(x⁻¹) ^ (-e) = g. For a unitg, every output that wins here gives one that wins the book's game (xmoduloN, or1whene = 0), so for a setup that gives a unitgthis assumption is implied by the book's; that implication is not formalized. As in the book,e = 0wins exactly wheng ≡ 1. - "The order of
gis known" (p. 421) is read as: a multipleuof the order, with0 < uandg ^ u ≡ 1 [MOD N], is a polynomial-time function of the security parameter, in unary, and(N, g). The adversary then takesv = u + 1, which is greater than1and coprime tou(orderMultipleAdversary). The general lemmas take any polynomial-timev ≠ 1coprime touin place of the book'sv > 1; this admitsv = 0only whenu = 1, so0 < ufollows.
References #
- D. Boneh, V. Shoup, A Graduate Course in Applied Cryptography, Version 0.6,
§10.9, the strong RSA game and assumption, p. 420; the known-order observation and
GGenfromRSAGen, p. 421.
The public parameters (G, g) of a group of unknown order ([BS23], §10.9, p. 420)
for G = (ZMod N)ˣ: the modulus N and the base g.
- modulus : ℕ
The modulus
N; the group is(ZMod N)ˣ. - base : ℕ
The base
g, a unit moduloNunderrsaGUOSetup.
The encoding of the public parameters: N and g in binary, N framed
(encGUOParams_apply).
The tuple of the fields of encGUOParams.
An adversary of the strong RSA game: given the security parameter and the public parameters
(N, g), it outputs a pair (x, e). StrongRSAAdversary.IsPPT states its efficiency on
encodings.
A strong RSA adversary is PPT when one uniform strict PPT machine reads the unary security
parameter followed by encGUOParams, and writes (x, e) as a pair of binary numbers.
The winning condition of the strong RSA game ([BS23], §10.9, p. 420) in
(ZMod N)ˣ: x ^ e and g agree modulo N, computed with powMod, and e ≠ 1. For 0 < N
this is x ^ e ≡ g [MOD N] ∧ e ≠ 1 (isStrongRSASolution_eq_true_iff). For N = 0,
powMod 0 x e = 1, so (x, e) wins exactly when g = 1 and e ≠ 1.
The strong RSA game ([BS23], §10.9, p. 420): draw p ← setup n, run the adversary on
(n, p), and accept its output (x, e) when isStrongRSASolution p (x, e).
The strong RSA assumption for the setup law setup ([BS23], §10.9, p. 420):
every PPT adversary wins strongRSAGame with negligible probability. Two differences from the
book. The group is (ZMod N)ˣ for public parameters (N, g) drawn from any law, which need not be
efficiently samplable or give a unit g, in place of a group of unknown order from an efficient
GGen; rsaGUOSetup gen is the book's GGen (p. 421). The adversary outputs natural numbers x
and e ≠ 1 in place of x ∈ G and an integer e ≠ ±1. For a unit g, every output that wins
here gives one that wins the book's game, so for a setup that gives a unit g the book's
assumption implies this one.
The group generator GGen of [BS23], §10.9, p. 421, for the RSA key generator
gen: draw desc ← gen n and a uniform unit g modulo N = desc.modulus, and return (N, g)
with g read in [0, N). The book draws n from RSAGen(ℓ, e); here gen is any law on
RSADesc. Every base it draws is a unit (exists_of_mem_support_rsaGUOSetup).
Every (N, g) drawn by rsaGUOSetup gen n has the modulus N of a key in the support of
gen n and a base g coprime to N.
The known-order observation #
The root g ^ (v⁻¹ mod u) modulo N of [BS23], §10.9, p. 421, with v⁻¹ mod u
computed as BinaryGcd.modInv v u. When g ^ u ≡ 1 [MOD N] for some 0 < u and v is coprime
to u, it is a v-th root of g (powMod_knownOrderRoot). The book does not name it;
knownOrderRoot is this library's name.
For 0 < u with g ^ u ≡ 1 [MOD N] and v coprime to u, knownOrderRoot N u v g is a
v-th root of g modulo N ([BS23], §10.9, p. 421). There is no condition on N.
The adversary of [BS23], §10.9, p. 421, for exponents u and v computed from the
security parameter and the public parameters: on (n, (N, g)) it outputs
(knownOrderRoot N u v g, v) for u = u n (N, g) and v = v n (N, g). The book does not name it;
knownOrderAdversary is this library's name.
The known-order adversary is PPT when its exponents u and v are computable in polynomial
time from the unary security parameter and encGUOParams.
The known-order adversary wins strongRSAGame with probability 1 at a security parameter
n where, for every (N, g) in the support of setup n, g ^ u ≡ 1 [MOD N], v is coprime to
u and v ≠ 1 ([BS23], §10.9, p. 421).
The known-order adversary wins with probability 1, so StrongRSA setup does not hold, when
polynomial-time functions u and v of the security parameter and (N, g) give, for every
(N, g) in the support of every setup n, g ^ u ≡ 1 [MOD N] and an exponent v ≠ 1 coprime to
u. This is the general form of the observation of [BS23], §10.9, p. 421, with the
exponent v chosen by the caller; not_strongRSA_of_orderMultiple is the book's form, with
hypotheses on u alone.
The adversary of [BS23], §10.9, p. 421, for a multiple u of the order of g
computed from the security parameter and the public parameters: it takes v = u + 1, which is
greater than 1 and coprime to u, and outputs (knownOrderRoot N u (u + 1) g, u + 1). The book
does not name it; orderMultipleAdversary is this library's name.
The order-multiple adversary is PPT when u is computable in polynomial time from the unary
security parameter and encGUOParams.
The order-multiple adversary wins strongRSAGame with probability 1 at a security parameter
n where, for every (N, g) in the support of setup n, 0 < u and g ^ u ≡ 1 [MOD N]
([BS23], §10.9, p. 421).
The strong RSA assumption does not hold when a multiple of the order is known
([BS23], §10.9, p. 421). If a polynomial-time function u of the security parameter and
(N, g) gives, for every (N, g) in the support of every setup n, a positive multiple of the
order of g modulo N (0 < u and g ^ u ≡ 1 [MOD N]), then orderMultipleAdversary u is PPT
(isPPT_orderMultipleAdversary) and wins with probability 1
(strongRSAGame_orderMultipleAdversary), so StrongRSA setup is false.