Laboratory of Computer Science, Massachusetts Institute of Technology, Cambridge, Massachusetts 02139
Received February 3, 1983; revised November 8, 1983
A new probabilistic model of data encryption is introduced. For this model, under suitable complexity assumptions, it is proved that extracting any information about the cleartext from the cyphertext is hard on the average for an adversary with polynomially bounded computational resources. The proof holds for any message space with any probability distribution. The first implementation of this model is presented. The security of this implementation is proved under the intractability assumption of deciding Quadratic Residuosity modulo composite numbers whose factorization is unknown.
1 Introduction
This paper proposes an encryption scheme that possesses the following property:
Whatever is efficiently computable about the cleartext given the cyphertext, is also efficiently computable without the cyphertext.
The security of our encryption scheme is based on complexity theory. Thus, when we say that it is "impossible" for an adversary to compute any information about the cleartext from the cyphertext we mean that it is not computationally feasible.
The relatively young field of complexity theory has not yet been able to prove a nonlinear lower bound for even one natural NP-complete problem. At the same time, despite the enormous mathematical effort, some problems in number theory have for centuries refused any "domestication." Thus, for concretely implementing our scheme, we assume the intractability of some problems in number theory such as factoring or deciding quadratic residuosity with respect to composite moduli. In this context, proving that a problem is hard means to prove it equivalent to one of the above mentioned problems. In other words, any threat to the security of the concrete implementation of our encryption scheme will result in an efficient algorithm for deciding quadratic residuosity modulo composite integers.
- This research was done when both authors were students at the University of California at Berkeley and supported in part by NSF Grant MCS 82-04506. The preparation of this manuscript was done when the first author was at the Laboratory of Computer Science at MIT and supported by a Bantrell fellowship and an IBM faculty development award, and the second author was at the Computer Science Department at the University of Toronto.
1.1. Deterministic Encryption: The Trapdoor Function Model
Our encryption scheme benefits from the ideas of Diffie and Hellman [9], Rivest, Shamir, and Adleman [21], and Rabin [20].
Diffie and Hellman [9] introduced the idea of a public key cryptosystem, which is based on the intractability of some underlying computational problem. Intuitively, the idea is to find an encryption function which is easy to compute but difficult to invert unless some secret information, the trapdoor, is known. Such a function is called a trapdoor function. To encrypt a message , anyone simply evaluates , but only those who know the trapdoor information can compute from .
The two implementations of a trapdoor function most relevant and inspiring for this paper are the RSA function [21], due to Rivest, Shamir, and Adleman, and its particularization suggested by Rabin [20].
1.2. Basic Objections to the Trapdoor Function Model
We point out two basic weaknesses of this approach:
(1) The fact that is a trapdoor function does not rule out the possibility of computing from when is of a special form. Usually messages do not consist of numbers chosen at random but possess more structure. Such structural information may help in decoding. For example, a function , which is hard to invert on a generic input, could conceivably be easy to invert on the ASCII representations of English sentences.
(2) The fact that is a trapdoor function does not rule out the possibility of easily computing some partial information about (even every other bit of ) from . Encrypting messages in a way that ensures the secrecy of all partial information is an important goal in cryptography. Assume we want to use encryption to play card games over the telephone. If the suit or color of a card could be compromised the whole game should be invalid. Indeed Lipton [17] has pointed out that one bit of information about cards to remain hidden can be easily computed in the SRA implementation of Mental Poker [22].
Though no one knows how to break the RSA or the Rabin scheme, in none of these schemes is it proved that decoding is hard without any assumptions made on the message space. Rabin shows that, in this scheme, decoding is hard for an adversary if the set of possible messages has some density property. We discuss this further in Section 2.
1.3. Probabilistic Encryption: The New Model
In this paper we switch from a deterministic framework to a probabilistic framework. This enables us to deal with the problems that arose with the trapdoor function model, without imposing any probability structure on the messages we would like to send.
We replace the notion of a trapdoor function with the notion of an unapproximable trapdoor predicate. Briefly, the predicate is trapdoor and unapproximable if anyone can select an such that or such that , but only those who know the trapdoor information can, given , compute the value of . When the trapdoor information is unknown, an adversary with polynomially bounded computational resources can not decide the value of better than guessing at random (see Section 3 for formal definition).
We replace deterministic block encryption by probabilistic encryption of single bits, where there are many different encodings of a “1” and many different encodings of a “0.” To encrypt each message we make use of a fair coin. Thus the encoding of each message will depend on the message plus the result of a sequence of coin tosses. More specifically, a binary message will be encrypted bit-by-bit as follows: a “0” is encoded by randomly selecting an such that and a “1” is encoded by randomly selecting an such that . Consequently, there are many possible encodings for each message. However, messages are always uniquely decodable.
Two properties of the new model are:
(1) Decoding is easy for the legal receiver of a message, who knows the trapdoor information, but provably hard for an adversary. Therefore the spirit of a trapdoor function is maintained. In addition, in our scheme, we do not impose any restrictions on the message space. The security of the scheme is proved for messages belonging to any message space with any probability distribution.
(2) No information about an encrypted message can be obtained by an adversary.
Let be a nonconstant function . Assume that the message space has some probability distribution. Accordingly, let for each , and let be such that . Then, without any special ability, an adversary given the cyphertext, can always guess the value of over the cleartext and be correct with probability . We prove that for a probabilistic encryption scheme, an adversary, given the cyphertext, cannot guess the value of over the cleartext with probability better than . Note that needs not be polynomially computable, or even recursive. Thus, our encryption model passes a polynomially bounded version of Shannon’s perfect secrecy definition; see Subsection 7.3.
This property enabled Goldwasser and Micali [11] to device a scheme for Mental Poker for which, under the Quadratic Residuosity Assumption, no partial information about cards that should remain hidden can be easily computed.
1.4. Concrete Implementation of the New Model
We introduce Quadratic Residuosity modulo composite integers whose factorization is unknown (see Section 6 for precise definition), as the first example of an unapproximable trapdoor predicate. Thus we introduce a new probabilistic public key cryptosystem that is secure in a very strong probabilistic sense if and only if deciding quadratic residuosity with composite moduli is hard (see Section 4). The security offered by this Public Key Cryptosystems extends to all partial information about encrypted messages, to all possible message spaces and to all possible probability distributions for the message space (see Section 5 for formal definition of security).
Another example of such predicates, has appeared in a Goldwasser, Micali, and Tong [12] and in Goldwasser [13]. The predicate they propose is unapproximable if and only if factoring composite numbers is hard. Using the construction of Section 4, we can build a public key cryptosystem based on the predicate they propose. Again, any threat to the security of this last cryptosystem, will result in an efficient factoring algorithm.
In [26], Yao shows that unapproximable trapdoor predicates exist if one-to-one trapdoor functions exist.
1.5. Related Work
Blum and Micali in [5] showed the first example of an unapproximable predicate which is not trapdoor. Their predicate is unapproximable if and only if the discrete logarithm problem is hard.
The quadratic residuosity predicate is not only an example of an unapproximable trapdoor predicate, but possesses other properties which make it particularly attractive for protocol design. It has been widely used since we first proposed it in [10]. The first protocol that uses this predicate was suggested by Goldwasser and Micali in [11]. They design a protocol for two players to play mental poker over the telephone, so that no player can obtain any partial information about cards not in his hand. Other works in which this predicate has proved useful are: Blum, Blum, and Shub’s implementation [4] of a cryptographically strong pseudo random bit generator [5], Brassard’s [7] implementation of authentication tags, Luby, Micali, and Rackoff’s [19] method for simultaneously exchanging a secret bit, and Vazirani and Vazirani’s [25] implementation of one bit disclosures.
2 *Survey of Public Key Cryptosystems Based on Trapdoor Functions*
All the number theoretic notation used in this section will be defined in Section 3.
2.1. What Is a Public Key Cryptosystem?
The concept of a Public Key Cryptosystem was introduced by Diffie and Hellman in their ingenious paper [9]. Let be a finite message space, let be users, and let denote a message. Let be 's encryption function, which is ideally bijective, and be 's decryption function such that for all . In a Public Key Cryptosystem is placed in a public file, and user keeps private. should be difficult to compute knowing only . To send message to takes from the public file, computes and sends this message to . easily computes to obtain .
2.2. The RSA Scheme and the Rabin Scheme
Two implementations of such encryption functions are the RSA function [21] of Rivest et al. and the Rabin function [20].
The key idea in both the RSA scheme and the Rabin scheme consists in the selection of an appropriate number theoretic trapdoor function. In the RSA scheme, user selects , the product of two large distinct primes and , and a number such that and are relatively prime, where is the Euler totient function. puts and in a public file and keeps the factorization of private. Let . For every message , . Clearly, the ability to take th roots mod implies the ability to decode. , who knows the factorization of , can easily take th roots mod . No efficient way to take th roots mod is known when the factorization of is unknown.
Rabin suggested to modify the RSA scheme by choosing . Thus, for all users , . Notice that is a 4–1 function because our is the product of two primes. In fact, every quadratic residue mod , i.e., every such that for some , has four square roots mod : and . As knows the factorization of , upon receiving the encrypted message , she could easily compute its four square roots and get the message . ( may compute square roots mod by first computing square roots mod and , and then by combining them via the Chinese Remainder Theorem.) The following heuristics may be suggested for eliminating ambiguity in decoding: for sending a message , send together with the last 20 bits of . Such extra information cannot effectively help in decoding: one could always guess the last 20 digits of . (To avoid publicizing the last 20 digits of , just select a 20-bit random integer and send together with .)
The following theorem shows how hard it is to invert Rabin’s function .
THEOREM (Rabin). If for a fraction of the quadratic residues one could find one square root of , then one could factor in random polynomial time.
The theorem follows from Lemma 1 which we state without proof.
LEMMA 1. Given such that and , there is a polynomial time algorithm to factor . (In fact the greatest common divisor of and is a factor of .)
Informal Proof of Rabin’s Theorem. Assume that we have a magic box MB such
We will state a simplified version of his method.
that given , a quadratic residue mod , for a fraction of the 's it outputs one square root of . Then we could factor by iterating the following step:
Pick at random in and compute . Feed the magic box MB with . If outputs a square root of different from or , then (by Lemma 1) factor .
The expected number of iterations is low, as at each step, we have a chance of factoring .
2.3. Objections to Cryptosystems Based on Trapdoor Functions
The following problems may arise in the RSA and Rabin schemes and, more generally, in any other Public Key Cryptosystem based on trapdoor functions:
(1) The fact that is a trapdoor function does not rule out the possibility of computing from when is of special form.
(2) The fact that is trapdoor function does not rule out the possibility of easily computing some partial information about from .
2.3.1. Discussion of Objection 1
One may argue that Rabin's Public Key Cryptosystem is as hard to break as factoring in the following way: whoever can get messages from their encryptions for a fraction of the time, is actually realizing the magic box of Rabin's theorem and thus could efficiently factor .
We would like to point out the following fact.
Claim. If , the space of messages, is "sparse" in , the ability to decode for a fraction of all messages does not yield a random polynomial time algorithm for factoring.
By "sparse" we mean that for a randomly chosen , the probability that is a message is virtually 0.
Let . Assume that we are able to invert the function only on . Then, we would have a magic box MB which, on input , where , outputs ; and on input , outputs a correct answer, for a negligible portion of the 's. Using such a magic box we could decode, but not factor efficiently. Let us look at the above informal proof of Rabin's theorem, using this MB. If we pick and input to MB, then we get back and cannot factor. If we pick and input to MB, then the probability that any of the square roots of , which are different from , belong to is practically 0 and we get no answer.
We conclude that for Rabin's function one can decode if and only if one can factor, provided the legal messages are dense in (e.g., and all messages are equally probable).
2.3.2. Discussion of Objection 2
One desirable property for an encryption algorithm is that an adversary should not be able to obtain any partial information about the cleartext from the cyphertext.
For example, let be a hashing function or a nonconstant predicate defined on the message space . Let . If, given the encryption of , an adversary can efficiently compute , then we say that information about can be obtained from the encryption of .
Note that if the encryption algorithm, , is a trapdoor function, then partial information about the cleartext cannot be hidden. In fact, the following predicate , defined on the cleartext, is easy to evaluate from the cyphertext: true if and only if is even. We can avoid such problems using probabilistic encryption.
Let us now discuss a crucial question, raised by Brassard [6], closely related to the security of partial information: how to send a single bit securely in a Public Key Cryptosystem.
2.3.3. Attempts to Send a Single Bit Securely in Public Key Cryptosystems Based on Trapdoor Functions
Suppose that user wants to send a single bit message to user in great secrecy. The bit is equally likely to be a 0 or a 1. wants no adversary to be able to guess correctly his message 51% of the time. knows that user's 's public encryption function is hard to invert and tries to make use of this fact in the following way.
IDEA 1. All users in the system agree on an integer . User selects at random, except for the th bit of , which will be his message. sends to . can decode and thus get the desired bit. But what can an adversary do?
Danger. Let , where is a one way function. Then, given , it could be difficult to compute but not a specific bit of .
EXAMPLE. Let be a large prime such that has at least one large prime factor. Let be a generator for . Then is considered to be a one-way function. But, even though it is difficult to compute from (the index finding problem), it is easy to get the last bit of . In fact, ends in 0 if and only if is a quadratic residue mod , and there are probabilistic polynomial time algorithms for testing whether numbers are quadratic residues modulo primes (see Subsection 3.1).
The following idea was suggested by Donald Johnson.
IDEA 2. constructs a 100-bit integer as follows: he selects at random, and sets the th bit of to the bit he wants to communicate. The remaining 92 bits of are chosen at random, except for the first 7 bits of , which specify location . sends to .
Danger. can be a trapdoor function and yet one could, given , easily compute the first 7 bits of and one of the last 93 bits of . If this is the case, one could correctly compute 's message with probability .
Summarizing, there are many ways in which a single bit could be "embedded" in a binary number . Taking the "exclusive or" of all the digits of is just one more example. However, given , being able to discover single bits embedded in does not contradict the fact that it is hard to compute . Then, what is a secure way to send a single bit? Unapproximable trapdoor predicates will provide a solution to this problem.
3 UNAPPROXIMABLE TRAPDOOR PREDICATES
In Section 4 we introduce the model of a probabilistic public key cryptosystem. We show that this model is highly secure. Our model switches from block encryption to bit-by-bit encryption. For this purpose we must abandon the notion of trapdoor functions for the new notion of unapproximable trapdoor predicates.
Definition (-approximates). A circuit -approximates the predicate if for at least a fraction of the .
We proceed to formally define unapproximable trapdoor predicates.
Let denote the set of natural numbers and be an infinite subset of . For every let denote a subset of the -bit integers and for every let be a subset of the integers with at most bits. Let
be a collection of predicates indexed by an integer of size and
We say that is an unapproximable trapdoor predicate (UTP) if:
(1) ( is unapproximable): Fix polynomials and . Let . Let denote the size of the minimum size circuit such that -approximates for at least a fraction of the . We say that is unapproximable if grows faster than any polynomial in .
(2) ( is trapdoor): For set . We say that is trapdoor if:
(a) There exists a probabilistic polynomial in time Turing machine that on input , where and , selects with uniform probability.
(b) There exists a function such that for some polynomial , for all , and a polynomial time Turing machine such that for all , and for all . We call the secret of .
(c) (constructibility condition): for all it is possible in probabilistic polynomial in time to select any pair , with probability .
Condition (2c), the constructibility condition, guarantees that if someone picks a pair , where and publicizes , it will be hard to compute . Otherwise, suppose the pairs , that could be efficiently selected constituted a very small fraction of all possible pairs. Then, an adversary could, from the public , find out just by repeatedly selecting pairs until .
Remark 3.1. Note that if is an unapproximable predicate and are polynomials, then for all sufficiently large , for a fraction of the , and are both greater than . Otherwise either the trivial circuit that always outputs 0 or the trivial circuit that always outputs 1 would approximate for a fraction at least of the .
3.1. Quadratic Residuosity as a UTP
We demonstrate an example of an unapproximable trapdoor set of predicates, under the intractability assumption of the Quadratic Residuosity Problem (QRP). If needed the number theoretic definitions can be found in Section 7.
Let . Let and denote primes. Set,
And let denote the subset of containing the elements with Jacobi symbol +1. For all , is defined as
Let . Let and be binary strings. We denote by the concatenation of and . Define . Define and set for each . Then is a set of predicates. The presence of the quadratic nonresidue will be needed to show the trapdoorness of .
(1) is unapproximable: This is shown in Theorem 2 (Section 7), under the Quadratic Residuosity Assumption.
(2) is trapdoor: Letting be the factorization of , is a trapdoor set of predicates. In fact, if the factorization of is known, can be computed in time. Moreover, given , a quadratic nonresidue mod , we can generate quadratic nonresidues mod with uniform probability in probabilistic polynomial in time by randomly selecting and computing .
(3) is constructible: Consider the following algorithm that selects one element , where and is a quadratic nonresidue mod .
Step 1. Flip fair coins.
Step 2. Check whether the first outcomes and the second outcomes constitute, respectively, the binary representation of a prime and a prime each of size . If so, let and check if the last bits constitute a quadratic nonresidue . If so then halt: has been selected. Else go to Step 1.
As each element in can be generated by exactly one -long sequence of coin tosses, the above algorithm selects elements in with uniform probability. Due to the Prime Number Theorem and the existence of random polynomial time algorithms for primality checking, the above algorithm runs in random poly time.
We conclude that, under the QRA, is an unapproximable trapdoor predicate.
4 Public Key Cryptosystems and Probabilistic Public Key Cryptosystems
In the last section we defined UTPs. We are now ready to introduce our probabilistic model of encryption. In Subsection 4.2 we formally define the notion of a public key cryptosystem (PKC) which is parameterized by a security parameter. In Subsection 4.3 we define our model of a probabilistic public key cryptosystem (PPKC). In Subsection 4.4 we present a concrete implementations of this model based on the QRA, the intractability assumption for the Quadratic Residuosity Problem.
4.1. Preliminary Notation
The following notation is used throughout the rest of this paper: Let be a probabilistic Turing machine. We write to denote the set of possible outputs of on input . We give the following probability distribution: if then the probability of is the probability that outputs on input .
Let and be Turing machines. By saying that is input to (output by) we mean that a standard encoding of is input to (output by) .
4.2. Public Key Cryptosystems
Informally, we think of a PKC as a server. Each user in the system comes to the PKC with a description of his message space and a common security parameter k. On such inputs, the PKC produces a pair of algorithms: an encryption algorithm (which is possibly probabilistic) and a decryption algorithm. The description of both the encryption algorithm and the decryption algorithm should be short (polynomial in k). Moreover, both algorithms should halt in polynomial time. The user stores the (description of the) encryption algorithm in the public file, and keeps secret the (description of the) decryption algorithm.
We proceed to formally define what a PKC is.
We let k denote a parameter that will be presented in unary to all the algorithms in this paper. Let be a finite set of users.
A message generator is a probabilistic polynomial time Turing machine MG that on input k outputs a string referred to as a message.
Definition. A Public Key Cryptosystem is a probabilistic polynomial time Turing machine that on inputs k and MG outputs the description of two algorithms, E and D such that
(1) for some constants constants c, on inputs of size n, both E and D halt within steps, and
(2) for all , .
We call E an encryption algorithm generated by , and D a decryption algorithm generated by . The encryption algorithms generated by may be probabilistic.
Remark. Let us stress again that is a probabilistic Turing machine, and thus on the same input pair (k, MG) it may output many different (encryption algorithm, decryption algorithm) pairs. When we are only interested in an encryption algorithm E generated by on inputs k and MG, we will write .
4.3. Probabilistic Public Key Cryptosystems
Let , where , be an unapproximable trapdoor predicate. A Probabilistic Public Key Cryptosystem (PPKC) with UTP B is a PKC that takes as input the security parameter k and the message generator MG and outputs a pair , where and is the secret of i. This can be done by the constructibility property of B.
The output of specifies an encryption algorithm E as follows: E takes as input an l-bit binary message . For each in the binary representation of m, E randomly selects an element such that and outputs the l-tuple . In virtue of the trapdoor property of B this can be done in probabilistic time polynomial in k and l. The output of E is bounded by .
In general, consider the binary string , where . We call any l-tuple such that and for all a probabilistic encryption of using predicate . Thus, note that in contrast with PKCs based on a trapdoor function such as the RSA, in a probabilistic public key cryptosystem every message has many possible probabilistic encryptions.
The output of specifies a decryption algorithm as follows: Let be a probabilistic polynomial time Turing machine that on inputs , and computes . Such a exists by the trapdoor property of . Then uses as a subroutine as follows: Let 's input consist of the -tuple , where for every . Then for every , calls with inputs to compute , and writes every one of 's answers on its output tape. As runs in polynomial time, so does .
4.4. The Quadratic Residuosity Implementation of a PPKCS
Let us explicitly describe the implementation of a PPKC based on the Quadratic Residuosity Problem.
Example 1. Let be the unapproximable trapdoor predicate defined in the previous section. Recall, , where and is a quadratic nonresidue mod .
Let be a probabilistic public key cryptosystem based on the unapproximable trapdoor predicate . Let user input the security parameter to . On inputs and message generator MG, works as follows:
(1) it randomly selects two -bit primes and , (2) sets , (3) picks such that is a quadratic nonresidue modulo , (4) outputs as an encryption algorithm some standard encoding of the pair and as a decryption algorithm some standard encoding of the pair .
User publicizes the pair keeps secret the pair .
How to Encrypt
Suppose user want to send a binary string to user . Then, for each , picks at random if sets else sets sends the -tuple .
Encoding an -bit message takes time. In general, one bit of cleartext is expanded into bits of cyphertext.
How to Decrypt
Suppose user C receives , the encryption of a message . Then, for each , C sets . (Note: As C knows the factorization of , he can compute ) C sets .
Computing , from its encryption requires time.
5 THE SECURITY OF A PUBLIC KEY CRYPTOSYSTEM
We proceed to discuss the notion of security of a public key cryptosystem. Clearly, the notion of security in a public key cryptosystem depends on the model of possible behavior of an adversary. In this paper the adversary is a passive line-tapper. This adversary knows the message space and its probability distribution, knows the encryption algorithm, is given the cyphertext, and tries, by computing, to retrieve the cleartext.
5.1. Polynomial Security
Informal Setting
Let the message-finder and the line-tapper be your favorite computational model with polynomially bounded computational resources. Such and may be polynomial time Turing machines, probabilistic polynomial time Turing machine, "small" circuits etc. Intuitively, we say that a public key cryptosystem is polynomially secure if for all message spaces with any probability distribution, the encryption algorithms produced by the server will be such that: the polynomially bounded message finder cannot find two messages and in whose encryptions are distinguishable by the polynomially bounded line-tapper . That is, given (an encryption of either or ) should not have any advantage in understanding which of the two messages is being encoded by . Notice that there might very well be a pair of messages whose encryptions are distinguishable by , but it will be impossible for the polynomially bounded to find such a pair. Note that PKCs generating deterministic encryption algorithms (e.g., RSA) cannot be polynomially secure.
In this paper, the message-finder and the line-tapper are chosen to be circuits.
Formal Setting
Let be a PKC. Let MG be a message generator. We write for MG. Without loss of generality, we assume that all have the same length for some polynomial .
A k-line tapper is a circuit C with one Boolean output and enough Boolean inputs to receive (the description of an encryption algorithm) and , where (see Fig. 1). Let . Let be the probability with which C outputs 1 on inputs and and be the probability with which C outputs 1 on inputs and . We say that C P-distinguishes from with respect to if .
A k-message-finder is a circuit C with Boolean outputs and enough Boolean inputs to describe an . On input , C outputs two messages (see Fig. 2).
Notice that may have a built-in description of MG.
Definition (Polynomially secure public key cryptosystems). Let be polynomials. Let be a public key cryptosystem and MG a message generator. Let , where is a k-line-tapper with less than gates. Let be the size of a minimum size message-finder that with probability greater than on input and MG outputs two messages and in such that -distinguishes from . We say that is a polynomially secure with respect to MG if for any sequence of line-tappers , grows faster than any polynomial in . We say that is a polynomially secure if for any message generator MG, is polynomially secure with respect to MG.
Remark. Notice that in the definition of a polynomially secure public key cryptosystem we are not putting any constraints on the probability of and . Thus, not even two messages that are very unlikely to occur and are distinguishable by can be easily found.
It is intuitive, and will be formally proved that polynomial security implies more traditional notions of security. Informally, if a public key cryptosystem is polynomially secure then no polynomially bounded line-tapper can, given the cyphertext, retrieve the cleartext or any partial information about it.
We first show that the newly introduced probabilistic PKCs are indeed polynomially secure.
Remarks about Theorem 5.1. The underlying idea of the proof of Theorem 5.1 is a sampling walk. Assume that every vertex in a -dimensional hypercube is labeled with a real number in between 0 and 1 and that it is easy to find two vertices and such that . Then it is easy to find two adjacent vertices and such that : just find vertices and in such that ; then consider , a minimum length vertex-walk from to and look at the pairs .
In our case, every vertex of the hypercube is a -bit word. The label is the frequency with which the line-tapper outputs 1 on the probabilistic encryptions of . We quickly approximate these frequencies by sampling. Then we find two adjacent words and with a jump in their associated frequency, and use and to approximate the UTP on which the system is based.
Theorem 5.1. Each probabilistic public key cryptosystem is polynomially secure.
Proof of Theorem 5.1. Let
be an unapproximable trapdoor predicate. Let be a PPKC that on inputs and MG outputs and with probability . This specifies a probabilistic encryption algorithm , as specified in Subsection 4.3. Recall, that , the line-tapper, is a poly() size circuit which upon receiving as input and a probabilistic encoding of in encoded using , outputs either a 0 or a 1.
Let be the frequency with which outputs a 1 when given as input all the probabilistic encodings of using .
Let and be polynomials. For set
and let be a message-finder. Let be an infinite subset of . Assume that for a fraction of the outputs two messages and such that
Then we will show that for all , there is a probabilistic poly time Turing machine with oracles and that with probability , -approximates for a fraction of the .
Consequently, as the size of is bounded by a polynomial in , if also the size of were bounded by a polynomial in , could easily be converted, for each , into a poly size circuit that -approximates for at least a fraction of the . This would contradict the unapproximability of . Thus, the size of must grow faster than any polynomial in and is polynomially secure.
The Hamming distance between and is the number of bits in which and differ, and we say that and are adjacent if the distance between them is 1.
We proceed to construct the Turing machine . Let denote the set of all -long sequences of elements of . On input and , guesses as follows:
Part 1. It calls the oracle with input to find and in such that
Let be the distance between and . Let be a sequence of -bit strings such that , and is adjacent to for . As there must exist , such that .
Assign and the uniform probability distribution. By the trapdoor property of , in probabilistic poly time, such and can be correctly found with probability greater than by means of a Monte Carlo experiment. For notational convenience, let and . Compute and .
As and are adjacent, they differ in exactly one location. Call this location .
Part 2. Assume, without loss of generality, that .
Case 1. .
Then, pick at random among all the elements in such that for and .
(Recall that is the input of .)
if then else if then .
Case 2. and .
Proceed as in Case 1, but set . This completes the description of .
Let us prove that, if and have been correctly found, for a fraction of the 's in , for ,
Remark 5.1. As is unapproximable, by Remark 3.1, for all sufficiently large , for a fraction of the , and . Thus, for a fraction greater than of the 's in , outputs an and such that ; AND both and are greater than .
The -signature, where , will denote the binary string . Then, for such , in Case 1,
In Case 2, following a similar proof, again will -approximate .
5.2. Semantic Security
In this section we define our second criteria of security for a public key cryptosystem, called Semantic Security. Informally, a system is semantically secure if whatever an eavesdropper can compute about the cleartext given the ciphertext, he can also compute without the ciphertext. We prove that every polynomially secure public key cryptosystem is semantically secure. Thus probabilistic PKCs are semantically secure. Thus, our encryption scheme passes a polynomially bounded version of Shannon's [23] perfect secrecy definition: Restricting our attention to adversaries with polynomially bounded resources available for the analysis of intercepted messages, the a posteriori probabilities of an intercepted cryptogram representing various messages, are the same as the a priori probabilities of the same messages before interception.
Informal Setting
Let be any function defined on a message space . Thus need not be fast computable or even recursive. We say that constitutes information about the message . In practice, typical 's of interest are the identity function, a Boolean predicate, a hashing function, etc.
We want that extracting any information about messages from their encoding should be hard even if the probability distribution associated with the message space is known.
Let be a message space and be a function defined on . For all , let . Consider the image . Define and a value in that achieves the maximum probability. Let be an encryption algorithm. Consider the following three games. Let be known to an adversary.
Game 1. Randomly pick (each has probability of being picked). In this game an adversary is asked to guess the value of without being told what is.
If the adversary always guesses he would be right with probability . There is no strategy for the adversary that would give him a better winning probability.
Game 2. Randomly pick . Compute one encryption . Give to the adversary. Now, ask the adversary to guess .
Game 3. Let the adversary pick a function defined on . Randomly pick . Compute one encryption . Give to the adversary. Now, ask the adversary to guess .
Informally, we say that is a semantically secure public key cryptosystem if the adversary cannot win Game 3 with higher probability than Game 1.
Formal Setting
Definition (Semantically secure public-key cryptosystems). Let be a public key cryptosystem. Let MG be a message generator. As before . For all , will denote the probability that MG will output on input . Let be a set of functions on MG. For each let .
Let be a circuit that on input and , where outputs a string . Let be polynomials. We say that -computes from if the for all belonging to a subset having probability at least .
Let be polynomials. Let denote the size of a smallest size circuit that -computes from .
We say that is semantically secure if for all MG, for all , for all , grows faster than any polynomial in .
Theorem 5.2. Each polynomially secure public key cryptosystem is semantically secure.
Proof. Let be a polynomially secure public key cryptosystem. Assume for contradiction that is not semantically secure. Then there are a message generator MG, a set of functions for MG, , polynomials and , an infinite subset and a sequence of circuits such that:
(1) has less than gates, (2) the subset has probability greater than , and (3) for all on inputs and , where , will output with probability (taken over the input ) greater than .
For the remaining part of the proof, will belong to and to . Let and .
Let denote the probability that outputs on inputs and . Then, is the probability that correctly evaluates on inputs and .
Thus, what we assumed for contradiction can be expressed as
Pick from and fix it for the rest of the proof. Define to be the set of messages such that
We observe the following two lemmas.
Lemma A. For all constants , there exists a probabilistic poly() time algorithm that on input and finds a such that
with probability .
Proof. Construct a random sample of encodings of message using encryption algorithm . Let denote this sample. Compute for . Let
and set for all the such that for some between 1 and . There are at most values in for which this frequency is nonzero.
Similarly, construct a random sample of encodings of message using encryption algorithm . Let denote this sample. Set for all the such that for some between 1 and . Examine the two lists (each of size less than s) of 's and 's. If there exists a in at least one of the two lists such that , output .
We claim that for an appropriate choice of sample size s this output is correct with probability . The reasoning is as follows. Set . Then, for the 's such that . (Remember that such a exists as ), the weak law of large numbers guarantees that the,
and
And finally,
And inversely, for a such that , the
Lemma B. .
Proof. Let , , and, respectively, and . includes all messages such that and includes all messages such that is not in . Clearly, . Denote the values in as .
Then,
which (since ) is less than or equal to
After rearranging both sides of the equation we get, .
Lemmas A and B imply that for all there exists a poly() circuit such that on input , produces two messages and in and a value in such that .
works as follows. On inputs it randomly picks a in . Then, it randomly generates an element in . (With probability at least , Lemma B tells us that ; if it is not, do not worry.) A is then sought using Lemma A such that with high probability. If such a is not found, it is probably because was not in after all, and we pick another until success comes after an expected polynomial number of trials. If is found, set and .
Now, define if and 0 otherwise. Then is a poly() linetapper that -distinguishes the two messages and found by . This contradicts the hypothesis that was a polynomially secure public key cryptosystem.
6 THE QUADRATIC RESIDUOSITY PROBLEM (QRP)
We introduce a new trapdoor number theoretic predicate based on the quadratic residuosity assumption.
Let and be integers. The symbol will denote the greatest common divisor of and . The symbol will denote the probability of the event . Let denote the set of positive integers and . Let .
6.1. Background and Notation
Given , is solvable? If is prime, then the answer to this question is easily computed [16]: yes if and no if . If a solution exists, is said to be a quadratic residue mod . Otherwise is said to be a quadratic nonresidue mod . In this section, and will be odd, distinct primes and . Then, is solvable if and only if both and are solvable. Thus, if the factorization of is known, the solvability of is easily decidable.
Lemma 1. Given the prime factorization of a composite integer , deciding whether , is a quadratic residue mod can be done in time.
Some information about deciding whether a number is a quadratic residue mod , when the factorization of is unknown, can be obtained from the Jacobi symbol. Let be an odd prime and , then the Jacobi symbol equals 1 if is a quadratic residue mod and otherwise. The Jacobi symbol , is defined as . Despite the fact that the Jacobi symbol is defined through the factorization of , is computable in polynomial time even when the factorization of is not known!
It is easy to see, from the above definitions that if then must be a quadratic nonresidue mod . In fact, must be a quadratic nonresidue either mod or mod . However, if , then either is a quadratic residue mod or is a quadratic nonresidue modulo both the prime factors of .
In this paper we are interested in those elements of whose Jacobi symbol is . Thus we introduce the set,
Let us count the number of elements of . See [16] for proofs.
Fact 1. Let be an odd prime. Then is a cyclic group.
Fact 2. Let be a generator for , then is a quadratic residue if and only if is even.
COROLLARY 3. Half of the numbers in are quadratic residues and half are quadratic nonresidues.
FACT 4. Let ( and are distinct odd primes). Then half of the numbers in have Jacobi symbol equal to and thus are quadratic nonresidues. The Jacobi symbol of the rest of the numbers is 1. Exactly half of these latter ones are quadratic residues mod .
6.2. The Quadratic Residuosity Assumption
Let be a composite integer, and an element of . The Quadratic Residuosity Problem with parameters and is to decide whether is a quadratic residue mod . If the factorization of is not known, then there is no known efficient procedure for solving the quadratic residuosity problem with parameters and in . This decision problem is a well-known hard problem in Number Theory. It is one of the main four algorithmic problems discussed by Gauss [8] in his "Disquisitiones Arithmeticae" (1801). A polynomial solution for it would imply a polynomial solution to other open problems in Number Theory. One example is deciding whether a composite integer , is the product of 2 or 3 primes (see open problems 9 and 15 in Adleman [2]).
In order to formally state the intractability assumption of the Quadratic Residuosity Problem, let us introduce the predicate and the set of hard composite numbers . For all ; the predicate is defined as:
will denote the set of hard composite integers: Let and denote primes.
The elements of constitute the hardest inputs for any known factoring algorithm.
Quadratic Residuosity Assumption (QRA)
Let be a fixed polynomials. For each integer , let be a circuit with two -bit inputs and one Boolean output. Let be the minimum size of circuits such that for a fraction of the , for all . Then, for all polynomials , for all sufficiently large : .
Next, we show that under the QRA, computing is hard not only for some special , but is hard on the average.
6.3. A Number Theoretic Result
We recall that a circuit ε-approximates the predicate if for at least a fraction of the .
Let us recall the weak law of large numbers:
Weak Law of Large Numbers
Let be independent 0-1 variables such that with probability , and , then for real numbers implies that . Notice that is bounded by a polynomial in and .
Remarks About Theorem 1. Theorem 1 shows that deciding Quadratic Residuosity mod is either “everywhere hard” or “everywhere easy.” The main idea of this theorem is “how to collect a stochastic advantage,” namely, how to turn an oracle that answers most questions correctly, but you do not know which ones, into an oracle that answer every question correctly with arbitrarily high probability.
Theorem 1. Fix polynomial and , and let be an oracle. Let be the set of hard integers such that (1/P_1(|n|))-approximates Q_n. Then there is a probabilistic poly(|n|) algorithm with oracle that, for any and any , with probability greater than correctly decides whether is a quadratic residue mod .
Proof. Let . Take with the uniform probability distribution. For notational simplicity let and . Then, . Let, , and .
The . Therefore, , but can be much less than . We first need to get a good estimate for .
Construct a sample of quadratic residues chosen at random in (the value of will be defined later on). This can be easily done by picking at random in and squaring them modulo . Initialize a counter to 0.
For to , ask the oracle for the value . Increment each time that the oracle answers 1 (i.e., “quadratic residue”).
Let . If is chosen to be suitably large, , the weak law of large numbers assures that is a good ()-estimate for :
i.e., is a good approximation to how well the oracle “guesses” if the inputs are only quadratic residues.
We are now ready to describe a procedure for determining the quadratic residuosity of any element in . Let be an element of that we want to test for quadratic residuosity. Randomly generate quadratic residues, , in and compute for . Notice that
(1) if is a quadratic residue, then the 's are random quadratic residues, (2) if is a quadratic nonresidue in , then the 's are random quadratic nonresidues.
Let us postpone the proof of (1) and (2) and assume, for the time being, that they are true. Initialize a counter to 0. For to call the oracle to get the value . Increment every time that the oracle answers 1. Output "q is a quadratic residue mod n" if and "q is a quadratic nonresidue mod n" otherwise.
Since the
and
then
Thus the quadratic residuosity of any is decided correctly with probability greater than .
We still need to prove (1) and (2). To prove (1) it will suffice to prove that, given any quadratic residue , any other quadratic residue in can be uniquely written as , where is also a quadratic residue mod . Let and be generators for, respectively, and . Let and be such that , , and and . By the Chinese Remainder Theorem such and exist. Then, any element of can be written uniquely as , where and . Moreover, is a quadratic residue mod if and only if it can be written as , where and . Thus if is any quadratic residue there exists a unique quadratic residue mod , , such that . This proves (1); (2) is proved in a similar way.
COROLLARY 1. Fix polynomials and . Let . Let be the size of the minimum size circuit that -approximates for a fraction of the 's in . Under the QRA, for all polynomials , for all sufficiently large : .
Proof. Assume, for contradiction, that there exist polynomials , and and an infinite such that for all : . Then, for each , let contain an fraction of the elements of and be a circuit of size such that for all , for at least of the elements of .
For every , choose the oracle of Theorem 1 to be . That is, set for all and all . Then, by Theorem 1, for all , for all , for all , and for all polynomials , there is a probabilistic polynomial in time algorithm with oracle that correctly decides quadratic residuosity of with probability greater than . As the size of is less than , for all such an algorithm can be transformed into a polynomial in size circuit that correctly decides quadratic residuosity mod for all . As , this contradicts the QRA.
Let be a composite integer whose factorization is unknown. We want to investigate what happens to the difficulty of deciding Quadratic Residuosity modulo when we are given the extra knowledge that a particular is a quadratic non-residue mod .
Remarks about Theorem 2. When the factorization of is secret, no efficient algorithm for selecting a quadratic nonresidue mod is known. Thus it may be that revealing, say, the smallest quadratic nonresidue in may endanger the secrecy of the factorization of or make deciding quadratic residuosity modulo easy.
Theorem 2 shows that the complexity of the quadratic residuosity problem remains unchanged if a randomly selected quadratic nonresidue modulo is revealed. In other words: Assume that for a polynomial fraction of the quadratic nonresidues , knowing that is indeed a quadratic nonresidue mod would lead to an efficient decision procedure for quadratic residuosity mod . Then, quadratic residuosity mod could have been efficiently decided without such extra help.
Theorem 2. Let and be fixed polynomials. For each let contain a fraction of the integers in . For each , let contain a fraction of the quadratic nonresidues in . Let be the size of the smallest circuit such that for all , for all , and for all . Then, for all polynomials , for all sufficiently large : .
Proof. Let . Fix polynomials and . Let be a circuit of size such that for all . The proof is divided into 3 parts:
(1) There exists a probabilistic algorithm , with oracle , that on input , outputs such that, with probability greater than ,
C[n, x, · ] (1/P_2(k))-approximates Q_n(·). Algorithm A_1 terminates in expected time which is polynomial in k.
(2) Algorithm A_1 can be converted into a circuit C_1[·, ·] of size polynomial in k and C_k, such that for all n \in E_k, q \in Z_n^1, C_1[n, q] = Q_n(q).
(3) By the QRA, for all sufficiently large k, the size of C_1 exceeds any given polynomial in k. Therefore, again for sufficiently large k, for any given polynomial Q, C_k > Q(k).
We proceed to prove part (1). On input n \in E_k, define algorithm A_1 as follows:
repeat
(1) select x at random from Z_n^1. (2) select k elements e_1, ..., e_k at random from Z_n^1. (comment: This can be accomplished in probabilistic poly(k) time by selecting elements r \in [1, n] with uniform probability and checking whether r \in Z_n^* and (r/n) = 1). (Comment: with probability greater than 1 - (1/2^k), one of the e_i's is a quadratic nonresidue mod n.) (3) Set e_0 = 1. (4) For i = 0, ..., n, j = 1, ..., k (5) select a sample of random quadratic residues mod n, x_1, ..., x_k, and compute y_{i,j} = e_i x_j \mod n. (Comment: as e_0 = 1, {y_{0,1}, ..., y_{0,k}} is a sample of random quadratic residues mod n. With probability greater than 1 - (1/2^k), for some i > 0, {y_{i,1}, ..., y_{i,k}} is a sample of quadratic nonresidues in Z_n^1). (6) For i = 0, ..., k, (7) set f_i^x = (\sum_{j=0}^k C[n, x, y_{i,j}]/k). (Comment: f_i^x estimates the probability that C[n, x, ·] outputs 1 on elements of Z_n^1 whose quadratic character is the same as that of e_i.) until f_0^x = 1 and f_i^x = 0 for some i \geq 1. output x.
We now prove that, with probability greater than 1 - (1/P_2(k)), algorithm A_1 computes x such that C[n, x, · ] (1/P_2(k))-approximates Q_n(·). Let and . Then, as and for some , then for all sufficiently large k, the weak law of large numbers assures us that . By Theorem 1, this implies that -approximates .
Finally, about 's running time. Note that, if in a given iteration of the algorithm we draw an x from and one of the e_i's is a quadratic nonresidue, then and and the algorithm terminates. Thus, the expected number of iterations performed by algorithm is
As each iteration, can be performed in probabilistic poly(k) time, runs in expected polynomial in time. This proves part (1). Part (2) follows from Corollary 1, and standard transformations of probabilistic algorithms into circuits. Part (3) follows easily from part (2).
COROLLARY 2. Let and be fixed polynomials. For each let contain a fraction of the integers in . For each , let be a fraction of the quadratic nonresidues in . Let be the size of the smallest circuit that on inputs and , . Then, for all polynomials , for all sufficiently large : .
What this corollary says is that, assuming the QRA, when user is presented with where and a quadratic nonresidue in and , he cannot guess with probability greater than .
6.4. A Special Property of Quadratic Residuosity
Let and be a probabilistic encryption of a -bit message using the predicate . Given , anyone, without knowing the factorization of , can reencrypt . In fact he could choose, with uniform probability, another probabilistic encryption of by simply multiplying each by a different, randomly selected, quadratic residue mod .
This property has been used by Luby, Micali, and Rackoff in [19] for fairly exchanging a secret bit.
7 FINAL REMARKS
7.1. Circuits versus Turing Machines
Let be a user in a public key cryptosystem and the number of bits in the description of the encryption algorithm put by in the Public File. Assume one (finally) proves that, for all polynomial time Turing machines , there exists a constant , such that for all , inverting on some message space requires steps. As a passive eavesdropper is entitled to choose after has been put in the public file, what should choose?
It is to remove this difficulty that we have chosen circuit complexity as a complexity measure. It should be noticed that such choice is not needed for proving our theorems. Intractability with respect to probabilistic polynomial time Turing machines could have been assumed and all the theorems would have been proved in essentially the same way.
7.2. Other Types of Adversaries
In a public key cryptosystem, getting hold of the cyphertext by eavesdropping and trying, by computing, to decrypt it, is the most obvious attack. However it is not the only one! Goldwasser, Micali, and Tong [9], show how in the Diffie and Hellman model of a public key cryptosystem, an adversary can, being a user, break the security of the scheme by communicating. They proposed a modification of the Diffie and Hellman model and show that the new model is secure against line tappers and even against chosen cyphertext attack.
7.3. The Relationship between Shannon’s Perfect Secrecy Definition and Semantic Security
Let us describe Shannon’s definition of “perfect secrecy” in [23]. Consider an adversary with unlimited time and manpower available for analysis of intercepted cryptograms. Let the set of all possible messages be finite. These messages have a priori probabilities and are encoded and sent across the wire. When an adversary intercepts an encoded message, he can calculate the a posteriori probabilities for the various messages. Perfect secrecy is achieved if for all encoded messages the a posteriori probabilities are equal to the a priori probabilities. Thus intercepting the message gives the adversary no information. In this paper, we defined a polynomially bounded version of Shannon’s perfect secrecy, called semantic security. Semantic security means that when the adversary has only polynomially bounded resources available, intercepting the encoded message gives him no new information. Moreover, there exists no function defined on the message set that the adversary can compute after intercepting the encoded message which he could not compute without intercepting the message. For further discussion see [26].
Acknowledgments
Our most sincere thanks go to Manuel Blum and Richard Karp, who supervised this research, for their encouragement and wonderful ideas which they so readily shared with us. We are particularly grateful to Zvi Galil, Mike Luby, Charles Rackoff, and Ron Rivest for their generous help in clarifying the ideas and presentation in this paper. Many thanks are also due to Steve Cook, Faith Fich, Jeff Shallit, Mike Sipser, and the referee for many ideas, comments, and criticism on both form and content. Vijai Vazirani helped in the claim of Subsection 2.3.1.