The Rabin cryptosystem is a family of
public-key encryption
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
schemes
based on a trapdoor function whose security, like that of
RSA
RSA may refer to:
Organizations Academia and education
* Rabbinical Seminary of America, a yeshiva in New York City
*Regional Science Association International (formerly the Regional Science Association), a US-based learned society
*Renaissance S ...
, is related to the difficulty of
integer factorization.
The Rabin trapdoor function has the advantage that inverting it has been mathematically proven to be as hard as factoring integers, while there is no such proof known for the RSA trapdoor function.
It has the disadvantage that each output of the Rabin function can be generated by any of four possible inputs; if each output is a ciphertext, extra complexity is required on decryption to identify which of the four possible inputs was the true plaintext.
Naive attempts to work around this often either enable a chosen-ciphertext attack to recover the secret key or, by encoding redundancy in the plaintext space, invalidate the proof of security relative to factoring.
Public-key encryption schemes based on the Rabin trapdoor function are used mainly for examples in textbooks.
In contrast, RSA is the basis of standard public-key encryption schemes such as
RSAES-PKCS1-v1_5 and
RSAES-OAEP that are used widely in practice.
History
The Rabin trapdoor function was first published as part of the
Rabin signature
In cryptography, the Rabin signature algorithm is a method of digital signature originally proposed by Michael O. Rabin in 1978.
The Rabin signature algorithm was one of the first digital signature schemes proposed. By introducing the use of hash ...
scheme in 1978 by
Michael O. Rabin
Michael Oser Rabin ( he, מִיכָאֵל עוזר רַבִּין; born September 1, 1931) is an Israeli mathematician and computer scientist and a recipient of the Turing Award.
Biography Early life and education
Rabin was born in 1931 in ...
.
The Rabin signature scheme was the first
digital signature
A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very high confidence that the message was created b ...
scheme where forging a signature could be proven to be as hard as factoring.
The trapdoor function was later repurposed in textbooks as an example of a
public-key encryption
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
scheme,
which came to be known as the Rabin cryptosystem even though Rabin never published it as an encryption scheme.
Encryption Algorithm
Like all asymmetric cryptosystems, the Rabin system uses a key pair: a
public key
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic a ...
for encryption and a
private key
Public-key cryptography, or asymmetric cryptography, is the field of cryptographic systems that use pairs of related keys. Each key pair consists of a public key and a corresponding private key. Key pairs are generated with cryptographic alg ...
for decryption. The public key is published for anyone to use, while the private key remains known only to the recipient of the message.
Key generation
The keys for the Rabin cryptosystem are generated as follows:
# Choose two large distinct
prime numbers
A prime number (or a prime) is a natural number greater than 1 that is not a product of two smaller natural numbers. A natural number greater than 1 that is not prime is called a composite number. For example, 5 is prime because the only ways ...
and
such that
and
.
# Compute
.
Then
is the public key and the pair
is the private key.
Encryption
A message
can be encrypted by first converting it to a number
using a reversible mapping, then computing
. The ciphertext is
.
Decryption
The message
can be recovered from the ciphertext
by taking its square root modulo
as follows.
# Compute the square root of
modulo
and
using these formulas:
#:
# Use the
extended Euclidean algorithm
In arithmetic and computer programming, the extended Euclidean algorithm is an extension to the Euclidean algorithm, and computes, in addition to the greatest common divisor (gcd) of integers ''a'' and ''b'', also the coefficients of Bézout's ...
to find
and
such that
.
# Use the
Chinese remainder theorem
In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer ''n'' by several integers, then one can determine uniquely the remainder of the division of ''n'' by the product of the ...
to find the four square roots of
modulo
:
#:
One of these four values is the original plaintext
, although which of the four is the correct one cannot be determined without additional information.
Computing square roots
We can show that the formulas in step 1 above actually produce the square roots of
as follows. For the first formula, we want to prove that
. Since
the exponent
is an integer. The proof is trivial if
, so we may assume that
does not divide
. Note that
implies that
, so c is a
quadratic residue
In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that:
:x^2\equiv q \pmod.
Otherwise, ''q'' is called a quadratic non ...
modulo
. Then
:
The last step is justified by
Euler's criterion In number theory, Euler's criterion is a formula for determining whether an integer is a quadratic residue modulo a prime. Precisely,
Let ''p'' be an odd prime and ''a'' be an integer coprime to ''p''. Then
:
a^ \equiv
\begin
\;\;\,1\pmod& \tex ...
.
Example
As an example, take
and
, then
. Take
as our plaintext. The ciphertext is thus
.
Decryption proceeds as follows:
# Compute
and
.
# Use the extended Euclidean algorithm to compute
and
. We can confirm that
.
# Compute the four plaintext candidates:
#:
and we see that
is the desired plaintext. Note that all four candidates are square roots of 15 mod 77. That is, for each candidate,
, so each
encrypts to the same value, 15.
Digital Signature Algorithm
The Rabin cryptosystem can be used to create and verify
digital signature
A digital signature is a mathematical scheme for verifying the authenticity of digital messages or documents. A valid digital signature, where the prerequisites are satisfied, gives a recipient very high confidence that the message was created b ...
s. Creating a signature requires the private key
. Verifying a signature requires the public key
.
Signing
A message
can be signed with a private key
as follows.
# Generate a random value
.
# Use a
cryptographic hash function
A cryptographic hash function (CHF) is a hash algorithm (a map of an arbitrary binary string to a binary string with fixed size of n bits) that has special properties desirable for cryptography:
* the probability of a particular n-bit output ...
to compute
, where the double-bar denotes concatenation.
should be an integer less than
.
# Find a square root of
using the private key
. This will produce the usual four results,
.
# One might expect that squaring each
would produce
. However, this will be true only if
happens to be a
quadratic residue
In number theory, an integer ''q'' is called a quadratic residue modulo ''n'' if it is congruent to a perfect square modulo ''n''; i.e., if there exists an integer ''x'' such that:
:x^2\equiv q \pmod.
Otherwise, ''q'' is called a quadratic non ...
modulo
and
. To determine if this is the case, square
. If this does not yield
, repeat this algorithm with a new random
. The expected number of times this algorithm needs to be repeated before finding a suitable
is 4.
# Having found a square root
of
, the signature is
.
Verifying a signature
A signature
for a message
can be verified using the public key
as follows.
# Compute
.
# Compute
# The signature is valid if
and a forgery otherwise.
Evaluation of the algorithm
Effectiveness
Decrypting produces three false results in addition to the correct one, so that the correct result must be guessed. This is the major disadvantage of the Rabin cryptosystem and one of the factors which have prevented it from finding widespread practical use.
If the plaintext is intended to represent a text message, guessing is not difficult; however, if the plaintext is intended to represent a numerical value, this issue becomes a problem that must be resolved by some kind of disambiguation scheme. It is possible to choose plaintexts with special structures, or to add
padding
Padding is thin cushioned material sometimes added to clothes. Padding may also be referred to as batting when used as a layer in lining quilts or as a packaging or stuffing material. When padding is used in clothes, it is often done in an attempt ...
, to eliminate this problem. A way of removing the ambiguity of inversion was suggested by Blum and Williams: the two primes used are restricted to primes congruent to 3 modulo 4 and the domain of the squaring is restricted to the set of quadratic residues. These restrictions make the squaring function into a
trapdoor
A trapdoor is a sliding or hinged door in a floor or ceiling. It is traditionally small in size. It was invented to facilitate the hoisting of grain up through mills, however, its list of uses has grown over time. The trapdoor has played a pivot ...
permutation
In mathematics, a permutation of a set is, loosely speaking, an arrangement of its members into a sequence or linear order, or if the set is already ordered, a rearrangement of its elements. The word "permutation" also refers to the act or p ...
, eliminating the ambiguity.
Efficiency
For encryption, a square modulo ''n'' must be calculated. This is more efficient than
RSA
RSA may refer to:
Organizations Academia and education
* Rabbinical Seminary of America, a yeshiva in New York City
*Regional Science Association International (formerly the Regional Science Association), a US-based learned society
*Renaissance S ...
, which requires the calculation of at least a cube.
For decryption, the
Chinese remainder theorem
In mathematics, the Chinese remainder theorem states that if one knows the remainders of the Euclidean division of an integer ''n'' by several integers, then one can determine uniquely the remainder of the division of ''n'' by the product of the ...
is applied, along with two
modular exponentiation
Modular exponentiation is exponentiation performed over a modulus. It is useful in computer science, especially in the field of public-key cryptography, where it is used in both Diffie-Hellman Key Exchange and RSA public/private keys.
Modul ...
s. Here the efficiency is comparable to RSA.
Disambiguation introduces additional computational costs, and is what has prevented the Rabin cryptosystem from finding widespread practical use.
Security
It has been proven that any algorithm which finds one of the possible plaintexts for every Rabin-encrypted ciphertext can be used to factor the modulus
. Thus, Rabin decryption for random plaintext is at least as hard as the integer factorization problem, something that has not been proven for RSA. It is generally believed that there is no polynomial-time algorithm for factoring, which implies that there is no efficient algorithm for decrypting a random Rabin-encrypted value without the private key
.
The Rabin cryptosystem does not provide
indistinguishability against
chosen plaintext
A chosen-plaintext attack (CPA) is an attack model for cryptanalysis which presumes that the attacker can obtain the ciphertexts for arbitrary plaintexts.Ross Anderson, ''Security Engineering: A Guide to Building Dependable Distributed Systems'' ...
attacks since the process of encryption is deterministic. An adversary, given a ciphertext and a candidate message, can easily determine whether or not the ciphertext encodes the candidate message (by simply checking whether encrypting the candidate message yields the given ciphertext).
The Rabin cryptosystem is insecure against a
chosen ciphertext attack
A chosen-ciphertext attack (CCA) is an attack model for cryptanalysis where the cryptanalyst can gather information by obtaining the decryptions of chosen ciphertexts. From these pieces of information the adversary can attempt to recover the hidden ...
(even when challenge messages are chosen uniformly at random from the message space). By adding redundancies, for example, the repetition of the last 64 bits, the system can be made to produce a single root. This thwarts this specific chosen-ciphertext attack, since the decryption algorithm then only produces the root that the attacker already knows. If this technique is applied, the proof of the equivalence with the factorization problem fails, so it is uncertain as of 2004 if this variant is secure. Th
Handbook of Applied Cryptographyby Menezes, Oorschot and Vanstone considers this equivalence probable, however, as long as the finding of the roots remains a two-part process (1. roots
and
and 2. application of the Chinese remainder theorem).
See also
*
Topics in cryptography
The following outline is provided as an overview of and topical guide to cryptography:
Cryptography (or cryptology) – practice and study of hiding information. Modern cryptography intersects the disciplines of mathematics, computer scie ...
*
Blum Blum Shub
Blum Blum Shub (B.B.S.) is a pseudorandom number generator proposed in 1986 by Lenore Blum, Manuel Blum and Michael Shub that is derived from Michael O. Rabin's one-way function.
__TOC__
Blum Blum Shub takes the form
:x_ = x_n^2 \bmod M,
where ...
*
Shanks–Tonelli algorithm
*
Schmidt–Samoa cryptosystem The Schmidt-Samoa cryptosystem is an asymmetric cryptographic technique, whose security, like Rabin depends on the difficulty of integer factorization. Unlike Rabin this algorithm does not produce an ambiguity in the decryption at a cost of encrypt ...
*
Blum–Goldwasser cryptosystem
The Blum–Goldwasser (BG) cryptosystem is an asymmetric key encryption algorithm proposed by Manuel Blum and Shafi Goldwasser in 1984. Blum–Goldwasser is a probabilistic, semantically secure cryptosystem with a constant-size ciphertext expans ...
*
Kunerth%27s algorithm Kunerth's algorithm is an algorithm for computing the modular square root of a given number.Leonard Eugene Dickson, "History of Numbers", vol 2, pp. 382–384.
The algorithm does not require the factorization of the modulus, and relies on modular op ...
Notes
References
* Buchmann, Johannes. ''Einführung in die Kryptographie''. Second Edition. Berlin: Springer, 2001.
* Menezes, Alfred; van Oorschot, Paul C.; and Vanstone, Scott A. ''Handbook of Applied Cryptography''. CRC Press, October 1996.
* Rabin, Michael.
Digitalized Signatures and Public-Key Functions as Intractable as Factorization' (in PDF). MIT Laboratory for Computer Science, January 1979.
* Scott Lindhurst, An analysis of Shank's algorithm for computing square roots in finite fields. in R Gupta and K S Williams, Proc 5th Conf Can Nr Theo Assoc, 1999, vol 19 CRM Proc & Lec Notes, AMS, Aug 1999.
* R Kumanduri and C Romero, Number Theory w/ Computer Applications, Alg 9.2.9, Prentice Hall, 1997. A probabilistic for square root of a quadratic residue modulo a prime.
External links
Menezes, Oorschot, Vanstone, Scott: ''Handbook of Applied Cryptography'' (free PDF downloads), see Chapter 8
{{Cryptography navbox , public-key
Public-key encryption schemes