The Rabin signature scheme is parametrized by a randomized hash function H ( m , u ) {\displaystyle H(m,u)} of a message m {\displaystyle m} and k {\displaystyle k} -bit randomization string u {\displaystyle u} .
Security against any adversary defined generically in terms of a hash function H {\displaystyle H} (i.e., security in the random oracle model) follows from the difficulty of factoring n {\displaystyle n} : Any such adversary with high probability of success at forgery can, with nearly as high probability, find two distinct square roots x 1 {\displaystyle x_{1}} and x 2 {\displaystyle x_{2}} of a random integer c {\displaystyle c} modulo n {\displaystyle n} . If x 1 ± x 2 ≢ 0 ( mod n ) {\displaystyle x_{1}\pm x_{2}\not \equiv 0{\pmod {n}}} then gcd ( x 1 ± x 2 , n ) {\displaystyle \gcd(x_{1}\pm x_{2},n)} is a nontrivial factor of n {\displaystyle n} , since x 1 2 ≡ x 2 2 ≡ c ( mod n ) {\displaystyle {x_{1}}^{2}\equiv {x_{2}}^{2}\equiv c{\pmod {n}}} so n ∣ x 1 2 − x 2 2 = ( x 1 + x 2 ) ( x 1 − x 2 ) {\displaystyle n\mid {x_{1}}^{2}-{x_{2}}^{2}=(x_{1}+x_{2})(x_{1}-x_{2})} but n ∤ x 1 ± x 2 {\displaystyle n\nmid x_{1}\pm x_{2}} .11 Formalizing the security in modern terms requires filling in some additional details, such as the codomain of H {\displaystyle H} ; if we set a standard size K {\displaystyle K} for the prime factors, 2 K − 1 < p < q < 2 K {\displaystyle 2^{K-1}<p<q<2^{K}} , then we might specify H : { 0 , 1 } ∗ × { 0 , 1 } k → { 0 , 1 } K {\displaystyle H\colon \{0,1\}^{*}\times \{0,1\}^{k}\to \{0,1\}^{K}} .12
Randomization of the hash function was introduced to allow the signer to find a quadratic residue, but randomized hashing for signatures later became relevant in its own right for tighter security theorems13 and resilience to collision attacks on fixed hash functions.141516
The quantity b {\displaystyle b} in the public key adds no security, since any algorithm to solve congruences x ( x + b ) ≡ c ( mod n ) {\displaystyle x(x+b)\equiv c{\pmod {n}}} for x {\displaystyle x} given b {\displaystyle b} and c {\displaystyle c} can be trivially used as a subroutine in an algorithm to compute square roots modulo n {\displaystyle n} and vice versa, so implementations can safely set b = 0 {\displaystyle b=0} for simplicity; b {\displaystyle b} was discarded altogether in treatments after the initial proposal.17181920 After removing b {\displaystyle b} , the equations for x p {\displaystyle x_{p}} and x q {\displaystyle x_{q}} in the signing algorithm become: x p := ± c mod p , x q := ± c mod q . {\displaystyle {\begin{aligned}x_{p}&:=\pm {\sqrt {c}}{\bmod {p}},\\x_{q}&:=\pm {\sqrt {c}}{\bmod {q}}.\end{aligned}}}
The Rabin signature scheme was later tweaked by Williams in 198021 to choose p ≡ 3 ( mod 8 ) {\displaystyle p\equiv 3{\pmod {8}}} and q ≡ 7 ( mod 8 ) {\displaystyle q\equiv 7{\pmod {8}}} , and replace a square root x {\displaystyle x} by a tweaked square root ( e , f , x ) {\displaystyle (e,f,x)} , with e = ± 1 {\displaystyle e=\pm 1} and f ∈ { 1 , 2 } {\displaystyle f\in \{1,2\}} , so that a signature instead satisfies e f x 2 ≡ H ( m , u ) ( mod n ) , {\displaystyle efx^{2}\equiv H(m,u){\pmod {n}},} which allows the signer to create a signature in a single trial without sacrificing security. This variant is known as Rabin–Williams.2223
Further variants allow tradeoffs between signature size and verification speed, partial message recovery, signature compression (down to one-half size), and public key compression (down to one-third size), still without sacrificing security.24
Variants without the hash function have been published in textbooks,2526 crediting Rabin for exponent 2 but not for the use of a hash function. These variants are trivially broken—for example, the signature x = 2 {\displaystyle x=2} can be forged by anyone as a valid signature on the message m = 4 {\displaystyle m=4} if the signature verification equation is x 2 ≡ m ( mod n ) {\displaystyle x^{2}\equiv m{\pmod {n}}} instead of x 2 ≡ H ( m , u ) ( mod n ) {\displaystyle x^{2}\equiv H(m,u){\pmod {n}}} .
In the original paper,27 the hash function H ( m , u ) {\displaystyle H(m,u)} was written with the notation C ( M U ) {\displaystyle C(MU)} , with C for compression, and using juxtaposition to denote concatenation of M {\displaystyle M} and U {\displaystyle U} as bit strings:
By convention, when wishing to sign a given message, M {\displaystyle M} , [the signer] P {\displaystyle P} adds as suffix a word U {\displaystyle U} of an agreed upon length k {\displaystyle k} . The choice of U {\displaystyle U} is randomized each time a message is to be signed. The signer now compresses M 1 = M U {\displaystyle M_{1}=MU} by a hashing function to a word C ( M 1 ) = c {\displaystyle C(M_{1})=c} , so that as a binary number c ≤ n {\displaystyle c\leq n} …
This notation has led to some confusion among some authors later who ignored the C {\displaystyle C} part and misunderstood M U {\displaystyle MU} to mean multiplication, giving the misapprehension of a trivially broken signature scheme.28
Rabin, Michael O. (1978). "Digitalized Signatures". In DeMillo, Richard A.; Dobkin, David P.; Jones, Anita K.; Lipton, Richard J. (eds.). Foundations of Secure Computation. New York: Academic Press. pp. 155–168. ISBN 0-12-210350-5. 0-12-210350-5 ↩
Rabin, Michael O. (January 1979). Digitalized Signatures and Public Key Functions as Intractable as Factorization (PDF) (Technical report). Cambridge, MA, United States: MIT Laboratory for Computer Science. TR-212. /wiki/Michael_O._Rabin ↩
Bellare, Mihir; Rogaway, Phillip (May 1996). Maurer, Ueli (ed.). The Exact Security of Digital Signatures—How to Sign with RSA and Rabin. Advances in Cryptology – EUROCRYPT ’96. Lecture Notes in Computer Science. Vol. 1070. Saragossa, Spain: Springer. pp. 399–416. doi:10.1007/3-540-68339-9_34. ISBN 978-3-540-61186-8. 978-3-540-61186-8 ↩
Bernstein, Daniel J. (January 31, 2008). RSA signatures and Rabin–Williams signatures: the state of the art (Report). (additional information at https://cr.yp.to/sigs.html) /wiki/Daniel_J._Bernstein ↩
Bernstein, Daniel J. (April 2008). Smart, Nigel (ed.). Proving tight security for Rabin–Williams signatures. Advances in Cryptology – EUROCRYPT 2008. Lecture Notes in Computer Science. Vol. 4965. Istanbul, Turkey: Springer. pp. 70–87. doi:10.1007/978-3-540-78967-3_5. ISBN 978-3-540-78966-6. 978-3-540-78966-6 ↩
IEEE Standard Specifications for Public-Key Cryptography. IEEE Std 1363-2000. Institute of Electrical and Electronics Engineers. August 25, 2000. doi:10.1109/IEEESTD.2000.92292. ISBN 0-7381-1956-3. 0-7381-1956-3 ↩
Bellare, Mihir; Rogaway, Phillip (August 1998). Submission to IEEE P1393—PSS: Provably Secure Encoding Method for Digital Signatures (PDF) (Report). Archived from the original (PDF) on 2004-07-13. /wiki/Mihir_Bellare ↩
Halevi, Shai; Krawczyk, Hugo (August 2006). Dwork, Cynthia (ed.). Strengthening Digital Signatures via Randomized Hashing (PDF). Advances in Cryptology – CRYPTO 2006. Lecture Notes in Computer Science. Vol. 4117. Santa Barbara, CA, United States: Springer. pp. 41–59. doi:10.1007/11818175_3. /wiki/Shai_Halevi ↩
Dang, Quynh (February 2009). Randomized Hashing for Digital Signatures (Report). NIST Special Publication. Vol. 800–106. United States Department of Commerce, National Institute for Standards and Technology. doi:10.6028/NIST.SP.800-106. https://csrc.nist.gov/publications/detail/sp/800-106/final ↩
Williams, Hugh C. "A modification of the RSA public-key encryption procedure". IEEE Transactions on Information Theory. 26 (6): 726–729. doi:10.1109/TIT.1980.1056264. ISSN 0018-9448. /wiki/Hugh_C._Williams ↩
Menezes, Alfred J.; van Oorschot, Paul C.; Vanstone, Scott A. (October 1996). "§11.3.4: The Rabin public-key signature scheme". Handbook of Applied Cryptography (PDF). CRC Press. pp. 438–442. ISBN 0-8493-8523-7. 0-8493-8523-7 ↩
Galbraith, Steven D. (2012). "§24.2: The textbook Rabin cryptosystem". Mathematics of Public Key Cryptography. Cambridge University Press. pp. 491–494. ISBN 978-1-10701392-6. 978-1-10701392-6 ↩
Elia, Michele; Schipani, David (2011). On the Rabin signature (PDF). Workshop on Computational Security. Centre de Recerca Matemàtica, Barcelona, Spain. https://www.math.uzh.ch/fileadmin/user/davide/publikation/SignatureRabin11.pdf ↩