Probabilistic Encryption

About this paperTiếng Việtbeside Tiếng Việt

This paper is under a licence that does not allow it to be reproduced, so what is here is its front matter and a short abstract. Read it at the publisher's page.

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 EE 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 mm, anyone simply evaluates E(m)E(m), but only those who know the trapdoor information can compute mm from E(m)E(m).

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 ff is a trapdoor function does not rule out the possibility of computing xx from f(x)f(x) when xx 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 ff, 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 ff is a trapdoor function does not rule out the possibility of easily computing some partial information about xx (even every other bit of xx) from f(x)f(x). 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 BB is trapdoor and unapproximable if anyone can select an xx such that B(x)=0B(x) = 0 or yy such that B(y)=1B(y) = 1, but only those who know the trapdoor information can, given zz, compute the value of B(z)B(z). When the trapdoor information is unknown, an adversary with polynomially bounded computational resources can not decide the value of B(z)B(z) 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 xx such that B(x)=0B(x) = 0 and a “1” is encoded by randomly selecting an xx such that B(x)=1B(x) = 1. 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 g:M→Vg : M \to V be a nonconstant function mm. Assume that the message space MM has some probability distribution. Accordingly, let pv=prob⁡(g(m)=v∣m∈M)p_v = \operatorname{prob}(g(m) = v \mid m \in M) for each v∈Vv \in V, and let vˉ∈V\bar{v} \in V be such that pvˉ=max⁡v∈Vpvp_{\bar{v}} = \max_{v \in V} p_v. Then, without any special ability, an adversary given the cyphertext, can always guess the value of gg over the cleartext and be correct with probability pvˉp_{\bar{v}}. We prove that for a probabilistic encryption scheme, an adversary, given the cyphertext, cannot guess the value of gg over the cleartext with probability better than pvˉp_{\bar{v}}. Note that gg 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 MM be a finite message space, let {A,B,...}\{A, B, ...\} be users, and let m∈Mm \in M denote a message. Let EA:M→ME_A : M \to M be AA's encryption function, which is ideally bijective, and DAD_A be AA's decryption function such that DA(EA(m))=mD_A(E_A(m)) = m for all m∈Mm \in M. In a Public Key Cryptosystem EAE_A is placed in a public file, and user AA keeps DAD_A private. DAD_A should be difficult to compute knowing only EAE_A. To send message mm to A,BA, B takes EAE_A from the public file, computes EA(m)E_A(m) and sends this message to AA. AA easily computes DA(EA(m))D_A(E_A(m)) to obtain mm.

2.2. The RSA Scheme and the Rabin Scheme

Two implementations of such encryption functions EAE_A 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 scheme1^1 consists in the selection of an appropriate number theoretic trapdoor function. In the RSA scheme, user AA selects nn, the product of two large distinct primes p1p_1 and p2p_2, and a number ss such that ss and φ(n)\varphi(n) are relatively prime, where φ\varphi is the Euler totient function. AA puts nn and ss in a public file and keeps the factorization of nn private. Let Zn∗={x∈N:1≤x≤n−1 and x and n are relatively prime}Z_n^* = \{ x \in N : 1 \leq x \leq n-1 \text{ and } x \text{ and } n \text{ are relatively prime} \}. For every message m∈Zn∗m \in Z_n^*, EA(m)=msmod  nE_A(m) = m^s \mod n. Clearly, the ability to take ssth roots mod nn implies the ability to decode. AA, who knows the factorization of nn, can easily take ssth roots mod nn. No efficient way to take ssth roots mod nn is known when the factorization of nn is unknown.

Rabin suggested to modify the RSA scheme by choosing s=2s = 2. Thus, for all users AA, EA(x)=x2mod  nE_A(x) = x^2 \mod n. Notice that EAE_A is a 4–1 function because our nn is the product of two primes. In fact, every quadratic residue mod nn, i.e., every qq such that q≡x2mod  nq \equiv x^2 \mod n for some x∈Zn∗x \in Z_n^*, has four square roots mod nn: ±xmod  n\pm x \mod n and ±ymod  n\pm y \mod n. As AA knows the factorization of nn, upon receiving the encrypted message m2mod  nm^2 \mod n, she could easily compute its four square roots and get the message mm. (AA may compute square roots mod nn by first computing square roots mod p1p_1 and p2p_2, 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 mm, send m2mod  nm^2 \mod n together with the last 20 bits of mm. Such extra information cannot effectively help in decoding: one could always guess the last 20 digits of mm. (To avoid publicizing the last 20 digits of mm, just select a 20-bit random integer rr and send (m220+r)2mod  n(m2^{20} + r)^2 \mod n together with rr.)

The following theorem shows how hard it is to invert Rabin’s function x2mod  nx^2 \mod n.

THEOREM (Rabin). If for a 1/log⁡n1/\log n fraction of the quadratic residues qmod  nq \mod n one could find one square root of qq, then one could factor nn in random polynomial time.

The theorem follows from Lemma 1 which we state without proof.

LEMMA 1. Given x,y∈Zn∗x, y \in Z_n^* such that x2≡y2mod  nx^2 \equiv y^2 \mod n and x≠±ymod  nx \neq \pm y \mod n, there is a polynomial time algorithm to factor nn. (In fact the greatest common divisor of nn and x±yx \pm y is a factor of nn.)

Informal Proof of Rabin’s Theorem. Assume that we have a magic box MB such

1^1 We will state a simplified version of his method.

that given qq, a quadratic residue mod nn, for a fraction 1/log⁡n1/\log n of the qq's it outputs one square root of qmod  nq \mod n. Then we could factor nn by iterating the following step:

Pick ii at random in Zn∗Z_n^* and compute q=i2mod  nq = i^2 \mod n. Feed the magic box MB with qq. If MM outputs a square root of qq different from ii or −imod  n-i \mod n, then (by Lemma 1) factor nn.

The expected number of iterations is low, as at each step, we have a 1/2log⁡n1/2 \log n chance of factoring nn.

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 ff is a trapdoor function does not rule out the possibility of computing xx from f(x)f(x) when xx is of special form.

(2) The fact that ff is trapdoor function does not rule out the possibility of easily computing some partial information about xx from f(x)f(x).

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 mm from their encryptions m2mod  nm^2 \mod n for a fraction 1/log⁡n1/\log n of the time, is actually realizing the magic box of Rabin's theorem and thus could efficiently factor nn.

We would like to point out the following fact.

Claim. If MM, the space of messages, is "sparse" in Zn∗Z_n^*, the ability to decode for a fraction 1/log⁡n1/\log n of all messages does not yield a random polynomial time algorithm for factoring.

By "sparse" we mean that for a randomly chosen x∈Zn∗x \in Z_n^*, the probability that xx is a message is virtually 0.

Let f(x)=x2mod  nf(x) = x^2 \mod n. Assume that we are able to invert the function ff only on f(M)f(M). Then, we would have a magic box MB which, on input m2mod  nm^2 \mod n, where m∈Mm \in M, outputs mm; and on input q∉{m2mod  n∣m∈M}q \notin \{ m^2 \mod n \mid m \in M \}, outputs a correct answer, for a negligible portion of the qq's. Using such a magic box we could decode, but not factor nn efficiently. Let us look at the above informal proof of Rabin's theorem, using this MB. If we pick m∈Mm \in M and input m2mod  nm^2 \mod n to MB, then we get mm back and cannot factor. If we pick i∉Mi \notin M and input i2mod  ni^2 \mod n to MB, then the probability that any of the square roots of i2mod  ni^2 \mod n, which are different from ii, belong to MM 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 Zn∗Z_n^* (e.g., M=Zn∗M = Z_n^* 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 ff be a hashing function or a nonconstant predicate defined on the message space MM. Let m∈Mm \in M. If, given the encryption of mm, an adversary can efficiently compute f(m)f(m), then we say that information about mm can be obtained from the encryption of mm.

Note that if the encryption algorithm, EE, is a trapdoor function, then partial information about the cleartext cannot be hidden. In fact, the following predicate BB, defined on the cleartext, is easy to evaluate from the cyphertext: B(x)=B(x) = true if and only if E(x)E(x) 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 BB wants to send a single bit message to user AA in great secrecy. The bit is equally likely to be a 0 or a 1. BB wants no adversary to be able to guess correctly his message 51% of the time. BB knows that user's AA's public encryption function EAE_A 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 ii. User BB selects r∈Mr \in M at random, except for the iith bit of rr, which will be his message. BB sends EA(r)E_A(r) to AA. AA can decode and thus get the desired bit. But what can an adversary do?

Danger. Let y=EA(x)y = E_A(x), where EAE_A is a one way function. Then, given yy, it could be difficult to compute xx but not a specific bit of xx.

EXAMPLE. Let pp be a large prime such that p−1p - 1 has at least one large prime factor. Let gg be a generator for Zp∗Z_p^*. Then y≡gxmod  py \equiv g^x \mod p is considered to be a one-way function. But, even though it is difficult to compute xx from gxmod  pg^x \mod p (the index finding problem), it is easy to get the last bit of xx. In fact, xx ends in 0 if and only if yy is a quadratic residue mod pp, and there are probabilistic polynomial time algorithms for testing whether numbers are quadratic residues modulo primes pp (see Subsection 3.1).

The following idea was suggested by Donald Johnson.

IDEA 2. BB constructs a 100-bit integer xx as follows: he selects 8≤i≤1008 \leq i \leq 100 at random, and sets the iith bit of xx to the bit he wants to communicate. The remaining 92 bits of xx are chosen at random, except for the first 7 bits of xx, which specify location ii. BB sends EA(x)E_A(x) to AA.

Danger. EAE_A can be a trapdoor function and yet one could, given EA(x)E_A(x), easily compute the first 7 bits of xx and one of the last 93 bits of xx. If this is the case, one could correctly compute BB's message xx with probability 192+12⋅9192\frac{1}{92} + \frac{1}{2} \cdot \frac{91}{92}.

Summarizing, there are many ways in which a single bit could be "embedded" in a binary number xx. Taking the "exclusive or" of all the digits of xx is just one more example. However, given y=EA(x)y = E_A(x), being able to discover single bits embedded in xx does not contradict the fact that it is hard to compute xx. 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 (ε\varepsilon-approximates). A circuit C[⋅]C[\cdot] ε\varepsilon-approximates the predicate B:Ω→{0,1}B : \Omega \to \{0, 1\} if C[x]=B[x]C[x] = B[x] for at least a fraction 12+ε\frac{1}{2} + \varepsilon of the x∈Ωx \in \Omega.

We proceed to formally define unapproximable trapdoor predicates.

Let NN denote the set of natural numbers and N′N' be an infinite subset of NN. For every k∈N′k \in N' let SkS_k denote a subset of the kk-bit integers and for every i∈Ski \in S_k let Ωi\Omega_i be a subset of the integers with at most kk bits. Let

Bk={Bi:Ωi→{0,1}∣i∈Sk}B_k = \{ B_i : \Omega_i \to \{0, 1\} \mid i \in S_k \}

be a collection of predicates indexed by an integer of size kk and

B=⋃k∈N′Bk.B = \bigcup_{k \in N'} B_k.

We say that BB is an unapproximable trapdoor predicate (UTP) if:

(1) (BB is unapproximable): Fix polynomials P1P_1 and P2P_2. Let k∈N′k \in N'. Let ckc_k denote the size of the minimum size circuit C[ ,]C[\ , ] such that C ,i)C\ , i)-approximates BiB_i for at least a fraction 1/P2(k)1/P_2(k) of the i∈Ski \in S_k. We say that BB is unapproximable if ckc_k grows faster than any polynomial in kk.

(2) (BB is trapdoor): For v∈{0,1}v \in \{0, 1\} set Ωiv={x∈{Ωi}∣Bi(x)=v}\Omega_i^v = \{ x \in \{ \Omega_i \} \mid B_i(x) = v \}. We say that BB is trapdoor if:

(a) There exists a probabilistic polynomial in kk time Turing machine T1T_1 that on input (i,v)(i, v), where i∈Ski \in S_k and v∈{0,1}v \in \{0, 1\}, selects x∈Ωivx \in \Omega_i^v with uniform probability.

(b) There exists a function σ:⋃k∈V′Sk→N\sigma: \bigcup_{k \in V'} S_k \to N such that for some polynomial QQ, for all x,∣σ(x)∣<Q(∣x∣)x, |\sigma(x)| < Q(|x|), and a polynomial time Turing machine T2T_2 such that T2[i,σ(i),x]=Bi(x)T_2[i, \sigma(i), x] = B_i(x) for all i∈Ski \in S_k, and for all x∈Ωix \in \Omega_i. We call σ(i)\sigma(i) the secret of ii.

(c) (constructibility condition): for all k∈N′k \in N' it is possible in probabilistic polynomial in kk time to select any pair (i∈Sk,σ(i))(i \in S_k, \sigma(i)), with probability 1/∣Sk∣1/|S_k|.

Condition (2c), the constructibility condition, guarantees that if someone picks a pair (i,σ(i))(i, \sigma(i)), where i∈Ski \in S_k and publicizes ii, it will be hard to compute Bi(x)B_i(x). Otherwise, suppose the pairs (i,σ(i)),i∈Sk(i, \sigma(i)), i \in S_k, that could be efficiently selected constituted a very small fraction of all possible pairs. Then, an adversary could, from the public ii, find out σ(i)\sigma(i) just by repeatedly selecting pairs (j,σ(j))(j, \sigma(j)) until j=ij = i.

Remark 3.1. Note that if BB is an unapproximable predicate and P1,P2P_1, P_2 are polynomials, then for all sufficiently large kk, for a fraction 1−(1/P1(k))1 - (1/P_1(k)) of the i∈Ski \in S_k, ∣Ωi0∣/∣Ωi∣|\Omega_i^0|/|\Omega_i| and ∣Ωi1∣/∣Ωi∣|\Omega_i^1|/|\Omega_i| are both greater than 12−(1/P2(k))\frac{1}{2} - (1/P_2(k)). Otherwise either the trivial circuit CkC_k that always outputs 0 or the trivial circuit that always outputs 1 would (1/P2(k))−(1/P_2(k))- approximate BiB_i for a fraction at least 1/P1(k)1/P_1(k) of the i∈Ski \in S_k.

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 k∈Nk \in N. Let p1p_1 and p2p_2 denote primes. Set,

Hk={n∣n=p1p2, where ∣p1∣=∣p2∣=k},H_k = \{ n \mid n = p_1 p_2, \text{ where } |p_1| = |p_2| = k \},
Zn∗={x≤n∣(x,n)=1}.Z_n^* = \{ x \leq n \mid (x, n) = 1 \}.

And let Zn1Z_n^1 denote the subset of Zn∗Z_n^* containing the elements with Jacobi symbol +1. For all x∈Zn1x \in Z_n^1, QnQ_n is defined as

Qn(x)=1if x is a quadratic residue mod n,Q_n(x) = 1 \quad \text{if } x \text{ is a quadratic residue mod } n,
=0if x is a quadratic nonresidue mod n.= 0 \quad \text{if } x \text{ is a quadratic nonresidue mod } n.

Let k∈Nk \in N. Let xx and yy be binary strings. We denote by x#yx \# y the concatenation of xx and yy. Define S4k={n#y∣n∈Hk and y∈Zn1 is a quadratic nonresidue mod n}S_{4k} = \{ n \# y \mid n \in H_k \text{ and } y \in Z_n^1 \text{ is a quadratic nonresidue mod } n \}. Define Ωn#y=Zn1\Omega_{n \# y} = Z_n^1 and set Qn#y(x)=Qn(x)Q_{n \# y}(x) = Q_n(x) for each x∈Zn1x \in Z_n^1. Then Q∗={Qn#y∣n#y∈S4k}Q^* = \{ Q_{n \# y} \mid n \# y \in S_{4k} \} is a set of predicates. The presence of the quadratic nonresidue yy will be needed to show the trapdoorness of Q∗Q^*.

(1) Q∗Q^* is unapproximable: This is shown in Theorem 2 (Section 7), under the Quadratic Residuosity Assumption.

(2) Q∗Q^* is trapdoor: Letting σ4k(n#y)\sigma_{4k}(n \# y) be the factorization of nn, Q∗Q^* is a trapdoor set of predicates. In fact, if the factorization of nn is known, Qn(⋅)Q_n(\cdot) can be computed in O(k3)O(k^3) time. Moreover, given yy, a quadratic nonresidue mod nn, we can generate quadratic nonresidues mod nn with uniform probability in probabilistic polynomial in kk time by randomly selecting x∈Zn∗x \in Z_n^* and computing r=yx2mod  nr = yx^2 \mod n.

(3) Q∗Q^* is constructible: Consider the following algorithm that selects one element n#y∈S4kn \# y \in S_{4k}, where n∈Hkn \in H_k and y∈Zn+1y \in Z_n^{+1} is a quadratic nonresidue mod nn.

Step 1. Flip 4k4k fair coins.

Step 2. Check whether the first kk outcomes and the second kk outcomes constitute, respectively, the binary representation of a prime p1p_1 and a prime p2p_2 each of size kk. If so, let n=p1p2n = p_1 p_2 and check if the last 2k2k bits constitute a quadratic nonresidue ymod  ny \mod n. If so then halt: p1⋅p2#yp_1 \cdot p_2 \# y has been selected. Else go to Step 1.

As each element in S4kS_{4k} can be generated by exactly one 4k4k-long sequence of coin tosses, the above algorithm selects elements in S4kS_{4k} 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(k)(k) time.

We conclude that, under the QRA, Q∗Q^* 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 Γ\Gamma be a probabilistic Turing machine. We write Γ[β]\Gamma[\beta] to denote the set of possible outputs of Γ\Gamma on input β\beta. We give Γ[β]\Gamma[\beta] the following probability distribution: if α∈Γ[β]\alpha \in \Gamma[\beta] then the probability of α\alpha is the probability that Γ\Gamma outputs α\alpha on input β\beta.

Let T1T_1 and T2T_2 be Turing machines. By saying that T1T_1 is input to (output by) T2T_2 we mean that a standard encoding of T1T_1 is input to (output by) T2T_2.

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 U={A,B,...}U = \{A, B, ...\} 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 Π\Pi 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 ncn^c steps, and

(2) for all m∈MG[k]m \in \mathrm{MG}[k], D(E(m))=mD(E(m)) = m.

We call E an encryption algorithm generated by Π\Pi, and D a decryption algorithm generated by Π\Pi. The encryption algorithms generated by Π\Pi may be probabilistic.

Remark. Let us stress again that Π\Pi 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 Π\Pi on inputs k and MG, we will write E∈Π(k,MG)E \in \Pi(k, \mathrm{MG}).

4.3. Probabilistic Public Key Cryptosystems

Let B=⋃k∈N′Bk\mathbf{B} = \bigcup_{k \in N'} \mathbf{B}_k, where Bk={Bi:Ωi→{0,1}∣i∈Sk}\mathbf{B}_k = \{ B_i : \Omega_i \to \{0, 1\} \mid i \in S_k \}, be an unapproximable trapdoor predicate. A Probabilistic Public Key Cryptosystem (PPKC) with UTP B is a PKC Π\Pi that takes as input the security parameter k and the message generator MG and outputs a pair (i,σ(i))(i, \sigma(i)), where i∈Ski \in S_k and σ(i)\sigma(i) is the secret of i. This can be done by the constructibility property of B.

The output i∈Ski \in S_k of Π\Pi specifies an encryption algorithm E as follows: E takes as input an l-bit binary message m=m1m2⋯mlm = m_1 m_2 \cdots m_l. For each mjm_j in the binary representation of m, E randomly selects an element xj∈Ωjx_j \in \Omega_j such that Bi(xj)=mjB_i(x_j) = m_j and outputs the l-tuple (x1,...,xl)(x_1, ..., x_l). 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 O(kl)O(kl).

In general, consider the binary string b=b1⋯blb = b_1 \cdots b_l, where bj∈{0,1}b_j \in \{0, 1\}. We call any l-tuple (x1,...,xl)(x_1, ..., x_l) such that xj∈Ωix_j \in \Omega_i and Bi(xj)=bjB_i(x_j) = b_j for all 1≤j≤l1 \leq j \leq l a probabilistic encryption of bb using predicate BiB_i. Thus, note that in contrast with PKCs based on a trapdoor function such as the RSA, in a probabilistic public key cryptosystem every message mm has many possible probabilistic encryptions.

The output σ(i)\sigma(i) of Π\Pi specifies a decryption algorithm DD as follows: Let TT be a probabilistic polynomial time Turing machine that on inputs i∈Sk,x∈Ωii \in S_k, x \in \Omega_i, and σ(i)\sigma(i) computes Bi(x)B_i(x). Such a TT exists by the trapdoor property of BB. Then DD uses TT as a subroutine as follows: Let DD's input consist of the ll-tuple (x1,...,xl)(x_1, ..., x_l), where xj∈Ωix_j \in \Omega_i for every 1≤j≤l1 \leq j \leq l. Then for every 1≤j≤l1 \leq j \leq l, DD calls TT with inputs i,σ(i),xji, \sigma(i), x_j to compute Bi(xj)B_i(x_j), and writes every one of TT's ll answers on its output tape. As TT runs in polynomial time, so does DD.

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 Q∗Q^* be the unapproximable trapdoor predicate defined in the previous section. Recall, Q∗={Qn#y∣n#y∈S4k}Q^* = \{ Q_{n\#y} | n \# y \in S_{4k} \}, where n∈Hkn \in H_k and y∈Zn1y \in Z_n^1 is a quadratic nonresidue mod nn.

Let Π\Pi be a probabilistic public key cryptosystem based on the unapproximable trapdoor predicate Q∗Q^*. Let user input the security parameter kk to Π\Pi. On inputs kk and message generator MG, Π\Pi works as follows:

(1) it randomly selects two kk-bit primes p1p_1 and p2p_2, (2) sets n=p1p2n = p_1 p_2, (3) picks y∈Zn1y \in Z_n^1 such that yy is a quadratic nonresidue modulo nn, (4) outputs as an encryption algorithm some standard encoding of the pair (n,y)(n, y) and as a decryption algorithm some standard encoding of the pair (p1,p2)(p_1, p_2).

User CC publicizes the pair (n,y)(n, y) keeps secret the pair (p1,p2)(p_1, p_2).

How to Encrypt

Suppose user BB want to send a binary string b=b1⋯blb = b_1 \cdots b_l to user CC. Then, for each bi∈bb_i \in b, BB picks x∈Zn∗x \in Z_n^* at random if bi=1b_i = 1 BB sets ei=yx2mod  ne_i = y x^2 \mod n else BB sets ei=x2mod  ne_i = x^2 \mod n BB sends CC the ll-tuple (e1,...,el)=En(b)(e_1, ..., e_l) = E_n(b).

Encoding an ll-bit message bb takes O(lk2)O(l k^2) time. In general, one bit of cleartext is expanded into kk bits of cyphertext.

How to Decrypt

Suppose user C receives (e1,...,el)(e_1, ..., e_l), the encryption of a message bb. Then, for each ei∈ee_i \in e, C sets bi=Qn(ei)b_i = Q_n(e_i). (Note: As C knows the factorization of nn, he can compute Qn(x)Q_n(x)) C sets b=b1⋯blb = b_1 \cdots b_l.

Computing b,∣b∣=lb, |b| = l, from its encryption requires O(lk3)O(lk^3) 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 FF and the line-tapper TT be your favorite computational model with polynomially bounded computational resources. Such FF and TT 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 MM with any probability distribution, the encryption algorithms produced by the server will be such that: the polynomially bounded message finder FF cannot find two messages m1m_1 and m2m_2 in MM whose encryptions are distinguishable by the polynomially bounded line-tapper TT. That is, given α\alpha (an encryption of either m1m_1 or m2m_2) TT should not have any advantage in understanding which of the two messages is being encoded by α\alpha. Notice that there might very well be a pair of messages whose encryptions are distinguishable by TT, but it will be impossible for the polynomially bounded FF 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 Π\Pi be a PKC. Let MG be a message generator. We write MkM_k for MGkk. Without loss of generality, we assume that all m∈Mkm \in M_k have the same length lk=Q(k)l_k = Q(k) for some polynomial QQ.

A k-line tapper is a circuit C with one Boolean output and enough Boolean inputs to receive (the description of an encryption algorithm) E∈Π(k,MG)E \in \Pi(k, MG) and α∈E(m)\alpha \in E(m), where m∈Mkm \in M_k (see Fig. 1). Let m1,m2∈Mkm_1, m_2 \in M_k. Let p1Ep_1^E be the probability with which C outputs 1 on inputs E∈Π(k,MG)E \in \Pi(k, MG) and α∈E(m1)\alpha \in E(m_1) and p2Ep_2^E be the probability with which C outputs 1 on inputs E∈Π(k,MG)E \in \Pi(k, MG) and α∈E(m2)\alpha \in E(m_2). We say that C P-distinguishes m1m_1 from m2m_2 with respect to EE if ∣p1E−p2E∣>1/P(k)|p_1^E - p_2^E| > 1/P(k).

A k-message-finder is a circuit C with 2lk2l_k Boolean outputs and enough Boolean inputs to describe an E∈Π[k,MG]E \in \Pi[k, MG]. On input EE, C outputs two messages m1,m2∈Mkm_1, m_2 \in M_k (see Fig. 2).

Notice that FkF_k may have a built-in description of MG.

Definition (Polynomially secure public key cryptosystems). Let Q,P1,P2Q, P_1, P_2 be polynomials. Let Π\Pi be a public key cryptosystem and MG a message generator. Let T={Tk}T = \{T_k\}, where TkT_k is a k-line-tapper with less than Q(k)Q(k) gates. Let skTs_k^T be the size of a minimum size message-finder FF that with probability greater than 1/P1(k)1/P_1(k) on input E∈Π(k,MG)E \in \Pi(k, MG) and MG outputs two messages m1m_1 and m2m_2 in MkM_k such that TkT_k P2P_2-distinguishes m1m_1 from m2m_2. We say that Π\Pi is a polynomially secure with respect to MG if for any sequence of line-tappers TT, skTs_k^T grows faster than any polynomial in kk. We say that Π\Pi is a polynomially secure if for any message generator MG, Π\Pi 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 m1m_1 and m2m_2. Thus, not even two messages that are very unlikely to occur and are distinguishable by TkT_k 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 TT 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 vv in a dd-dimensional hypercube CC is labeled with a real number λ(v)\lambda(v) in between 0 and 1 and that it is easy to find two vertices uu and vv such that ∣λ(u)−λ(v)∣>ε|\lambda(u) - \lambda(v)| > \varepsilon. Then it is easy to find two adjacent vertices ss and tt such that ∣λ(s)−λ(t)∣>ε/d|\lambda(s) - \lambda(t)| > \varepsilon / d: just find vertices uu and vv in CC such that ∣λ(u)−λ(v)∣>ε|\lambda(u) - \lambda(v)| > \varepsilon; then consider (ω0,...,ωk)(\omega_0, ..., \omega_k), a minimum length vertex-walk from uu to vv and look at the pairs (ωl,ωl+1)(\omega_l, \omega_{l+1}).

In our case, every vertex vv of the hypercube is a dd-bit word. The label λ(v)\lambda(v) is the frequency with which the line-tapper outputs 1 on the probabilistic encryptions of vv. We quickly approximate these frequencies by sampling. Then we find two adjacent words ss and tt with a jump in their associated frequency, and use ss and tt 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

B={Bi:Ωi→{0,1}∣i∈Sk and k∈N′}B = \{ B_i : \Omega_i \to \{0, 1\} \mid i \in S_k \text{ and } k \in N' \}

be an unapproximable trapdoor predicate. Let Π\Pi be a PPKC that on inputs kk and MG outputs i∈Ski \in S_k and σ(i)\sigma(i) with probability 1/∣Sk∣1/|S_k|. This specifies a probabilistic encryption algorithm EE, as specified in Subsection 4.3. Recall, that TkT_k, the line-tapper, is a poly(kk) size circuit which upon receiving as input ii and a probabilistic encoding of mm in MkM_k encoded using BiB_i, outputs either a 0 or a 1.

Let fi,mf_{i,m} be the frequency with which TkT_k outputs a 1 when given as input all the probabilistic encodings of mm using BiB_i.

Let P1P_1 and P2P_2 be polynomials. For k∈Nk \in N set

εk=1P1(k)andηk=1P2(k)\varepsilon_k = \frac{1}{P_1(k)} \quad \text{and} \quad \eta_k = \frac{1}{P_2(k)}

and let FkF_k be a message-finder. Let N′′N'' be an infinite subset of N′N'. Assume that for a fraction ηk\eta_k of the i∈Ski \in S_k FkF_k outputs two messages m1im_1^i and m2im_2^i such that

∣fi,m1i−fi,m2i∣>εk.|f_{i,m_1^i} - f_{i,m_2^i}| > \varepsilon_k.

Then we will show that for all k∈N′′k \in N'', there is a probabilistic poly(k,δ−1)(k, \delta^{-1}) time Turing machine GG with oracles FkF_k and TkT_k that with probability 1−δ1 - \delta, (εk/5lk)(\varepsilon_k/5l_k)-approximates BiB_i for a fraction ηk/2\eta_k/2 of the i∈Ski \in S_k.

Consequently, as the size of TkT_k is bounded by a polynomial in kk, if also the size of FkF_k were bounded by a polynomial in kk, GG could easily be converted, for each k∈N′′k \in N'', into a poly(k)(k) size circuit CkC_k that (εk/5lk)(\varepsilon_k/5l_k)-approximates BiB_i for at least a fraction ηk/2\eta_k/2 of the i∈Ski \in S_k. This would contradict the unapproximability of BB. Thus, the size of FkF_k must grow faster than any polynomial in kk and Π\Pi is polynomially secure.

The Hamming distance between aa and b∈{0,1}lkb \in \{0, 1\}^{l_k} is the number of bits in which aa and bb differ, and we say that aa and bb are adjacent if the distance between them is 1.

We proceed to construct the Turing machine GG. Let Ωilk\Omega_i^{l_k} denote the set of all lkl_k-long sequences of elements of Ωi\Omega_i. On input i∈Ski \in S_k and y∈Ωiy \in \Omega_i, GG guesses Bi(y)B_i(y) as follows:

Part 1. It calls the oracle FkF_k with input ii to find m1im_1^i and m2im_2^i in MkM_k such that

∣fi,m1i−fi,m2i∣>εk.|f_{i,m_1^i} - f_{i,m_2^i}| > \varepsilon_k.

Let Δ\Delta be the distance between m1im_1^i and m2im_2^i. Let a0,a1,...,aΔa_0, a_1, ..., a_\Delta be a sequence of lkl_k-bit strings such that a0=m1a_0 = m_1, aΔ=m2a_\Delta = m_2 and aja_j is adjacent to aj+1a_{j+1} for 0≤j<Δ0 \leq j < \Delta. As ∣fi,m1i−fi,m2i∣>εk|f_{i,m_1^i} - f_{i,m_2^i}| > \varepsilon_k there must exist x,0≤x≤Δ−1x, 0 \leq x \leq \Delta - 1, such that ∣fi,ax−fi,ax+1∣>εk/lk|f_{i,a_x} - f_{i,a_{x+1}}| > \varepsilon_k/l_k.

Assign Ωi\Omega_i and Ωilk\Omega_i^{l_k} the uniform probability distribution. By the trapdoor property of BB, in probabilistic poly(k,δ−1)(k, \delta^{-1}) time, such axa_x and ax+1a_{x+1} can be correctly found with probability greater than 1−δ1 - \delta by means of a Monte Carlo experiment. For notational convenience, let s=axs = a_x and t=ax+1t = a_{x+1}. Compute fi,sf_{i,s} and fi,tf_{i,t}.

As s=(s1,...,slk)s = (s_1, ..., s_{l_k}) and t=(t1,...,tlk)t = (t_1, ..., t_{l_k}) are adjacent, they differ in exactly one location. Call this location dd.

Part 2. Assume, without loss of generality, that fi,s>fi,tf_{i,s} > f_{i,t}.

Case 1. sd=1,td=0s_d = 1, t_d = 0.

Then, pick x=(x1,x2,...,xlk)∈Ωilkx = (x_1, x_2, ..., x_{l_k}) \in \Omega_i^{l_k} at random among all the elements e=(e1,...,elk)e = (e_1, ..., e_{l_k}) in Ωilk\Omega_i^{l_k} such that Bi(ej)=sj=tjB_i(e_j) = s_j = t_j for j≠dj \neq d and ed=ye_d = y.

(Recall that yy is the input of GG.)

if Tk(x)=1T_k(x) = 1 then G[y]=1G[y] = 1 else if Tk(x)=0T_k(x) = 0 then G[y]=0G[y] = 0.

Case 2. sd=0s_d = 0 and td=1t_d = 1.

Proceed as in Case 1, but set G[y]=1−Tk[x]G[y] = 1 - T_k[x]. This completes the description of GG.

Let us prove that, if ss and tt have been correctly found, for a fraction ηk/2\eta_k/2 of the ii's in SkS_k, for y∈Ωiy \in \Omega_i,

Pr⁡(G[y]=Bi[y])>12+εk5lk.\Pr(G[y] = B_i[y]) > \frac{1}{2} + \frac{\varepsilon_k}{5l_k}.

Remark 5.1. As BB is unapproximable, by Remark 3.1, for all sufficiently large kk, for a fraction 1−(ηk/2)1 - (\eta_k/2) of the i∈Ski \in S_k, ∣Ωi0∣/∣Ωi∣>12−(εk/4lk)|\Omega_i^0|/|\Omega_i| > \frac{1}{2} - (\varepsilon_k/4l_k) and ∣Ωi1∣/∣Ωi∣>12−(εk/4lk)|\Omega_i^1|/|\Omega_i| > \frac{1}{2} - (\varepsilon_k/4l_k). Thus, for a fraction greater than ηk(1−(ηk/2))>(ηk/2)\eta_k(1 - (\eta_k/2)) > (\eta_k/2) of the ii's in SkS_k, FkF_k outputs an m1im_1^i and m2im_2^i such that ∣fi,m1i−fi,m2i∣>εk|f_{i,m_1^i} - f_{i,m_2^i}| > \varepsilon_k; AND both ∣Ωi0∣/∣Ωi∣|\Omega_i^0|/|\Omega_i| and ∣Ωi1∣/∣Ωi∣|\Omega_i^1|/|\Omega_i| are greater than 12−(εk/4lk)\frac{1}{2} - (\varepsilon_k/4l_k).

The ii-signature(x)(x), where x=(x1,...,xlk)∈Ωi,klkx = (x_1, ..., x_{l_k}) \in \Omega_{i,k}^{l_k}, will denote the binary string Bi(x1)⋯Bi(xlk)B_i(x_1) \cdots B_i(x_{l_k}). Then, for such ii, in Case 1,

Pr⁡(G[y]=Bi(y))=∑c=0,1(Pr⁡(G[y]=c∣Bi(y)=c)Pr⁡(Bi(y)=c))\Pr(G[y] = B_i(y)) = \sum_{c=0,1} (\Pr(G[y] = c \mid B_i(y) = c) \Pr(B_i(y) = c))
>(12−εk4lk)[Pr⁡(G[y]=1∣Bi(y)=1)+Pr⁡(G[y]=0∣Bi(y)=0)]> \left( \frac{1}{2} - \frac{\varepsilon_k}{4l_k} \right) [\Pr(G[y] = 1 \mid B_i(y) = 1) + \Pr(G[y] = 0 \mid B_i(y) = 0)]
=(12−εk4lk)[Pr⁡(Tk[x]=1∣i-signature(x)=s)]= \left( \frac{1}{2} - \frac{\varepsilon_k}{4l_k} \right) [\Pr(T_k[x] = 1 \mid i\text{-signature}(x) = s)]
+Pr⁡[Tk[x]=0∣i-signature(x)=t]]+ \Pr[T_k[x] = 0 \mid i\text{-signature}(x) = t]]
=(12−εk4lk)(fi,s+(1−fi,t))= \left( \frac{1}{2} - \frac{\varepsilon_k}{4l_k} \right) (f_{i,s} + (1 - f_{i,t}))
>(12−εk4lk)(1+εklk)> \left( \frac{1}{2} - \frac{\varepsilon_k}{4l_k} \right) \left( 1 + \frac{\varepsilon_k}{l_k} \right)
>12+εk5lk.> \frac{1}{2} + \frac{\varepsilon_k}{5l_k}.

In Case 2, following a similar proof, again GG will (εk/5lk)(\varepsilon_k/5l_k)-approximate BiB_i.

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 ff be any function defined on a message space MM. Thus ff need not be fast computable or even recursive. We say that f(m)f(m) constitutes information about the message m∈Mm \in M. In practice, typical ff'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 MM be a message space and ff be a function defined on MM. For all m∈Mm \in M, let pm=Prob⁡(x=m∣x∈M)p_m = \operatorname{Prob}(x = m \mid x \in M). Consider the image f(M)f(M). Define pM=max⁡v∈V(∑m∈f−1(v)pm)p^M = \max_{v \in V} (\sum_{m \in f^{-1}(v)} p_m) and vMv^M a value in f(M)f(M) that achieves the maximum probability. Let EE be an encryption algorithm. Consider the following three games. Let EE be known to an adversary.

Game 1. Randomly pick m∈Mm \in M (each x∈Mx \in M has probability pxp_x of being picked). In this game an adversary is asked to guess the value of f(m)f(m) without being told what mm is.

If the adversary always guesses vMv^M he would be right with probability pMp^M. There is no strategy for the adversary that would give him a better winning probability.

Game 2. Randomly pick m∈Mm \in M. Compute one encryption α∈E(m)\alpha \in E(m). Give α\alpha to the adversary. Now, ask the adversary to guess f(m)f(m).

Game 3. Let the adversary pick a function fEf_E defined on MM. Randomly pick m∈Mm \in M. Compute one encryption α∈E(m)\alpha \in E(m). Give α\alpha to the adversary. Now, ask the adversary to guess fE(m)f_E(m).

Informally, we say that Π\Pi 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 Π\Pi be a public key cryptosystem. Let MG be a message generator. As before Mk=MG[k]M_k = \mathrm{MG}[k]. For all m∈Mkm \in M_k, pmp_m will denote the probability that MG will output mm on input kk. Let fMG={fE:Mk→V∣E∈Π(k,MG),k∈N}f_{MG} = \{ f_E : M_k \to V \mid E \in \Pi(k, \mathrm{MG}), k \in N \} be a set of functions on MG. For each E∈Π(k,MG)E \in \Pi(k, \mathrm{MG}) let pE=max⁡v∈V(∑m∈fE−1pm)p_E = \max_{v \in V} (\sum_{m \in f_E^{-1}} p_m).

Let CC be a circuit that on input E∈Π(k,MG)E \in \Pi(k, \mathrm{MG}) and α∈E(m)\alpha \in E(m), where m∈Mkm \in M_k outputs a string yy. Let P,QP, Q be polynomials. We say that CC (P,Q,k)(P, Q, k)-computes fMGf_{MG} from Π\Pi if the Prob⁡(y=fE(m)∣m∈Mk,α∈E(m))>pE+(1/Q(k))\operatorname{Prob}(y = f_E(m) \mid m \in M_k, \alpha \in E(m)) > p_E + (1/Q(k)) for all EE belonging to a subset S⊆Π(k,MG)S \subseteq \Pi(k, \mathrm{MG}) having probability at least 1/P(k)1/P(k).

Let P,QP, Q be polynomials. Let CkQ,PC_k^{Q,P} denote the size of a smallest size circuit CC that (P,Q,k)(P, Q, k)-computes fMGf_{MG} from Π\Pi.

We say that Π\Pi is semantically secure if for all MG, for all fMGf_{MG}, for all P,QP, Q, CkP,QC_k^{P,Q} grows faster than any polynomial in kk.

Theorem 5.2. Each polynomially secure public key cryptosystem is semantically secure.

Proof. Let Π\Pi be a polynomially secure public key cryptosystem. Assume for contradiction that Π\Pi is not semantically secure. Then there are a message generator MG, a set of functions for MG, fMG={fE}f_{MG} = \{ f_E \}, polynomials P1,P2P_1, P_2 and QQ, an infinite subset N′⊆NN' \subseteq N and a sequence of circuits {Ck}\{ C_k \} such that:

(1) CkC_k has less than P2(k)P_2(k) gates, (2) the subset Sk⊆Π(k,MG)S_k \subseteq \Pi(k, MG) has probability greater than 1/P(k)1/P(k), and (3) for all E∈SkE \in S_k on inputs EE and α∈E(m)\alpha \in E(m), where m∈MG[k]m \in MG[k], CC will output fE(m)f_E(m) with probability (taken over the input α\alpha) greater than pE+(1/Q(k))p_E + (1/Q(k)).

For the remaining part of the proof, kk will belong to N′N' and ii to SkS_k. Let εk=1/Q(k)\varepsilon_k = 1/Q(k) and pE=max⁡ν∈V∑m∈fE−1(ν)pmp_E = \max_{\nu \in V} \sum_{m \in f_E^{-1}(\nu)} p_m.

Let rm,yEr_{m,y}^E denote the probability that CkC_k outputs yy on inputs EE and α∈E(m)\alpha \in E(m). Then, rm,fE(m)Er_{m,f_E(m)}^E is the probability that CkC_k correctly evaluates fEf_E on inputs EE and α∈E(m)\alpha \in E(m).

Thus, what we assumed for contradiction can be expressed as

∑m∈Mkpmrm,fE(m)E>pE+εk.\sum_{m \in M_k} p_m r_{m,f_E(m)}^E > p_E + \varepsilon_k.

Pick μ\mu from MkM_k and fix it for the rest of the proof. Define M‾⊆Mk\overline{M} \subseteq M_k to be the set of messages mm such that

∣rm,νE−rμ,νE∣>εk210for some ν∈V.|r_{m,\nu}^E - r_{\mu,\nu}^E| > \frac{\varepsilon_k^2}{10} \quad \text{for some } \nu \in V.

We observe the following two lemmas.

Lemma A. For all constants c>0c > 0, there exists a probabilistic poly(kk) time algorithm that on input i∈Ski \in S_k and ξ∈M‾\xi \in \overline{M} finds a ν∈V\nu \in V such that

∣rξ,νE−rμ,νE∣>εk220|r_{\xi,\nu}^E - r_{\mu,\nu}^E| > \frac{\varepsilon_k^2}{20}

with probability 1−(1/kc)1 - (1/k^c).

Proof. Construct a random sample of encodings of message ξ\xi using encryption algorithm EE. Let {x1,...,xs}\{ x_1, ..., x_s \} denote this sample. Compute Ck[E,xj]C_k[E, x_j] for 1≤j≤s1 \leq j \leq s. Let

Iν(x)={1if Ck[E,x]=ν,0if Ck[E,x]≠ν,I_\nu(x) = \begin{cases} 1 & \text{if } C_k[E, x] = \nu, \\ 0 & \text{if } C_k[E, x] \neq \nu, \end{cases}

and set αν=∑1<j<sIν(xj)/s\alpha_\nu = \sum_{1 < j < s} I_\nu(x_j)/s for all the ν∈V\nu \in V such that C[E,xj]=νC[E, x_j] = \nu for some jj between 1 and ss. There are at most ss values in VV for which this frequency is nonzero.

Similarly, construct a random sample of encodings of message μ\mu using encryption algorithm E1E_1. Let {y1,...,ys}\{ y_1, ..., y_s \} denote this sample. Set βν=∑1<j<sIν(yj)/s\beta_\nu = \sum_{1 < j < s} I_\nu(y_j)/s for all the ν∈V\nu \in V such that Ck[E,yj]=νC_k[E, y_j] = \nu for some jj between 1 and ss. Examine the two lists (each of size less than s) of αv\alpha_v's and βv\beta_v's. If there exists a vˉ\bar{v} in at least one of the two lists such that ∣αvˉ−βvˉ∣>3εk2/40|\alpha_{\bar{v}} - \beta_{\bar{v}}| > 3\varepsilon_k^2/40, output vˉ\bar{v}.

We claim that for an appropriate choice of sample size s this output is correct with probability 1−1/kc1 - 1/k^c. The reasoning is as follows. Set s=1/(4[1/2kc][εk2/80]2)s = 1/(4[1/2k^c][\varepsilon_k^2/80]^2). Then, for the vv's such that ∣ru,vE−rt,vE∣>εk2/10|r_{u,v}^E - r_{t,v}^E| > \varepsilon_k^2/10. (Remember that such a vv exists as ξ∈Mˉ\xi \in \bar{M}), the weak law of large numbers guarantees that the,

Prob⁡(∣αv−ru,vE∣<εk280)>1−12kc\operatorname{Prob}\left(|\alpha_v - r_{u,v}^E| < \frac{\varepsilon_k^2}{80}\right) > 1 - \frac{1}{2k^c}

and

Prob⁡(∣βv−rt,vE∣<εk280)>1−12kc.\operatorname{Prob}\left(|\beta_v - r_{t,v}^E| < \frac{\varepsilon_k^2}{80}\right) > 1 - \frac{1}{2k^c}.

And finally,

Prob⁡(∣αv−βv∣>3εk240)\operatorname{Prob}\left(|\alpha_v - \beta_v| > \frac{3\varepsilon_k^2}{40}\right)
>Prob⁡(∣αv−ru,vE∣<εk280)⋅Prob⁡(∣βv−rt,vE∣<εk280)> \operatorname{Prob}\left(|\alpha_v - r_{u,v}^E| < \frac{\varepsilon_k^2}{80}\right) \cdot \operatorname{Prob}\left(|\beta_v - r_{t,v}^E| < \frac{\varepsilon_k^2}{80}\right)
>(1−12kc)2>1−1kc.> \left(1 - \frac{1}{2k^c}\right)^2 > 1 - \frac{1}{k^c}.

And inversely, for a vv such that ∣αv−βv∣>3εk2/40|\alpha_v - \beta_v| > 3\varepsilon_k^2/40, the

Prob⁡(∣ru,vE−rt,vE∣>εk220)>1−1kc.\operatorname{Prob}\left(|r_{u,v}^E - r_{t,v}^E| > \frac{\varepsilon_k^2}{20}\right) > 1 - \frac{1}{k^c}.

Lemma B. ∑m∈Mˉpm>εk/10\sum_{m \in \bar{M}} p_m > \varepsilon_k/10.

Proof. Let V3={v∈V∣ru,v>εk/6}V_3 = \{v \in V \mid r_{u,v} > \varepsilon_k/6\}, V4={v∈V∣ru,v≤εk/6}V_4 = \{v \in V \mid r_{u,v} \leq \varepsilon_k/6\}, and, respectively, M3={m∈Mk−Mˉ∣ru,sE(m)>εk/6}M_3 = \{m \in M_k - \bar{M} \mid r_{u,s_E(m)} > \varepsilon_k/6\} and M4=Mk−Mˉ−M3M_4 = M_k - \bar{M} - M_3. M3M_3 includes all messages m∉Mˉm \notin \bar{M} such that fE(m)∈V3f_E(m) \in V_3 and M4M_4 includes all messages m∉Mˉm \notin \bar{M} such that fE(m)f_E(m) is not in V3V_3. Clearly, l=∣V3∣<6/εkl = |V_3| < 6/\varepsilon_k. Denote the values in V3V_3 as {v1,...,vl}\{v_1, ..., v_l\}.

Then,

pE+εk<∑m∈Mkpmrm,sE(m)Ep_E + \varepsilon_k < \sum_{m \in M_k} p_m r_{m,s_E(m)}^E
=∑m∈Mˉpmrm,sE(m)E+∑m∈Mk−Mˉpmrm,sE(m)E= \sum_{m \in \bar{M}} p_m r_{m,s_E(m)}^E + \sum_{m \in M_k - \bar{M}} p_m r_{m,s_E(m)}^E
≤∑m∈Mˉpm+∑m∈M3pmrm,sE(m)E+∑m∈M4pmrm,sE(m)E,\leq \sum_{m \in \bar{M}} p_m + \sum_{m \in M_3} p_m r_{m,s_E(m)}^E + \sum_{m \in M_4} p_m r_{m,s_E(m)}^E,

which (since ∀m∉M‾,∣rm,fE(m)E−rμ,fE(m)E∣<εk2/10\forall m \notin \overline{M}, |r_{m,f_E(m)}^E - r_{\mu,f_E(m)}^E| < \varepsilon_k^2/10) is less than or equal to

∑m∈M‾pm+∑m∈M3pm(rμ,fE(m)E+εk210)+∑m∈M4pm(rμ,fE(m)E+εk210)\sum_{m \in \overline{M}} p_m + \sum_{m \in M_3} p_m \left( r_{\mu,f_E(m)}^E + \frac{\varepsilon_k^2}{10} \right) + \sum_{m \in M_4} p_m \left( r_{\mu,f_E(m)}^E + \frac{\varepsilon_k^2}{10} \right)
=∑m∈M‾pm+∑m∈fE−1(V3)pm(rμ,fE(m)E+εk210)+∑m∈M4pm(εk6+εk210)= \sum_{m \in \overline{M}} p_m + \sum_{m \in f_E^{-1}(V_3)} p_m \left( r_{\mu,f_E(m)}^E + \frac{\varepsilon_k^2}{10} \right) + \sum_{m \in M_4} p_m \left( \frac{\varepsilon_k}{6} + \frac{\varepsilon_k^2}{10} \right)
≤∑m∈M‾pm+∑m∈fE−1(v1)pm(rμ,v1E+εk210)\leq \sum_{m \in \overline{M}} p_m + \sum_{m \in f_E^{-1}(v_1)} p_m \left( r_{\mu,v_1}^E + \frac{\varepsilon_k^2}{10} \right)
+⋯+∑m∈fE−1(vl)pm(rμ,v1E+εk210)+(εk6+εk210)+ \cdots + \sum_{m \in f_E^{-1}(v_l)} p_m \left( r_{\mu,v_1}^E + \frac{\varepsilon_k^2}{10} \right) + \left( \frac{\varepsilon_k}{6} + \frac{\varepsilon_k^2}{10} \right)
≤∑m∈M‾pm+(εk6+εk210)\leq \sum_{m \in \overline{M}} p_m + \left( \frac{\varepsilon_k}{6} + \frac{\varepsilon_k^2}{10} \right)
+(lεk210+(rμ,v1E+⋯+rμ,vlE))⋅max⁡1≤j≤l{∑m∈fE−1(vj)pm}+ \left( \frac{l \varepsilon_k^2}{10} + (r_{\mu,v_1}^E + \cdots + r_{\mu,v_l}^E) \right) \cdot \max_{1 \leq j \leq l} \left\{ \sum_{m \in f_E^{-1}(v_j)} p_m \right\}
≤∑m∈M‾pm+(εk6+εk210)+6εk2pE10εk+(rμ,v1E+⋯+rμ,vlE)pE\leq \sum_{m \in \overline{M}} p_m + \left( \frac{\varepsilon_k}{6} + \frac{\varepsilon_k^2}{10} \right) + \frac{6 \varepsilon_k^2 p_E}{10 \varepsilon_k} + (r_{\mu,v_1}^E + \cdots + r_{\mu,v_l}^E) p_E
≤∑m∈M‾pm+(εk6+εk210)+6εk10⋅1+1⋅pE\leq \sum_{m \in \overline{M}} p_m + \left( \frac{\varepsilon_k}{6} + \frac{\varepsilon_k^2}{10} \right) + \frac{6 \varepsilon_k}{10} \cdot 1 + 1 \cdot p_E
≤∑m∈M‾pm+pE+13εk15.\leq \sum_{m \in \overline{M}} p_m + p_E + \frac{13 \varepsilon_k}{15}.

After rearranging both sides of the equation we get, ∑m∈M‾pm>εk/10\sum_{m \in \overline{M}} p_m > \varepsilon_k/10.

Lemmas A and B imply that for all k∈N′k \in N' there exists a poly(kk) circuit FkF_k such that on input E∈SkE \in S_k, FkF_k produces two messages m1m_1 and m2m_2 in MkM_k and a value vv in f−1(Mk)f^{-1}(M_k) such that ∣rm1,vE−rm2,vE∣>εk2/20|r_{m_1,v}^E - r_{m_2,v}^E| > \varepsilon_k^2/20.

FkF_k works as follows. On inputs EE it randomly picks a μ\mu in MkM_k. Then, it randomly generates an element ξ\xi in MkM_k. (With probability at least εk/10\varepsilon_k/10, Lemma B tells us that ξ∈M‾\xi \in \overline{M}; if it is not, do not worry.) A v∈Vv \in V is then sought using Lemma A such that ∣rξ,v−rμ,v∣>εk2/20|r_{\xi,v} - r_{\mu,v}| > \varepsilon_k^2/20 with high probability. If such a vv is not found, it is probably because ξ\xi was not in M‾\overline{M} after all, and we pick another ξ\xi until success comes after an expected polynomial number of trials. If vv is found, set m1=ξm_1 = \xi and m2=μm_2 = \mu.

Now, define Tk[i,x]=1T_k[i,x] = 1 if Ck[i,x]=vC_k[i,x] = v and 0 otherwise. Then TkT_k is a poly(kk) linetapper that (εk2/20)(\varepsilon_k^2/20)-distinguishes the two messages m1m_1 and m2m_2 found by FkF_k. This contradicts the hypothesis that Π\Pi 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 xx and yy be integers. The symbol (x,y)(x, y) will denote the greatest common divisor of xx and nn. The symbol Prob(X)\mathrm{Prob}(X) will denote the probability of the event XX. Let NN denote the set of positive integers and n∈Nn \in N. Let Zn∗={x∣1≤x≤n−1 and (x,n)=1}Z_n^* = \{ x \mid 1 \leq x \leq n - 1 \text{ and } (x, n) = 1 \}.

6.1. Background and Notation

Given q∈Zn∗q \in Z_n^*, is q≡x2mod  nq \equiv x^2 \mod n solvable? If nn is prime, then the answer to this question is easily computed [16]: yes if q(n−1)/2mod  n=1q^{(n-1)/2} \mod n = 1 and no if q(n−1)/2mod  n=−1q^{(n-1)/2} \mod n = -1. If a solution exists, qq is said to be a quadratic residue mod nn. Otherwise qq is said to be a quadratic nonresidue mod nn. In this section, p1p_1 and p2p_2 will be odd, distinct primes and n=p1p2n = p_1 p_2. Then, q≡x2mod  nq \equiv x^2 \mod n is solvable if and only if both q≡x2mod  p1q \equiv x^2 \mod p_1 and q≡x2mod  p2q \equiv x^2 \mod p_2 are solvable. Thus, if the factorization of nn is known, the solvability of q≡x2mod  nq \equiv x^2 \mod n is easily decidable.

Lemma 1. Given the prime factorization of a composite integer nn, deciding whether q∈Zn∗q \in Z_n^*, is a quadratic residue mod nn can be done in O(∣n∣3)O(|n|^3) time.

Some information about deciding whether a number is a quadratic residue mod nn, when the factorization of nn is unknown, can be obtained from the Jacobi symbol. Let pp be an odd prime and q∈Zp∗q \in Z_p^*, then the Jacobi symbol (q/p)(q/p) equals 1 if qq is a quadratic residue mod pp and −1-1 otherwise. The Jacobi symbol (q/n)(q/n), is defined as (q/n)=(q/p1)(q/p2)(q/n) = (q/p_1)(q/p_2). Despite the fact that the Jacobi symbol (q/n)(q/n) is defined through the factorization of nn, (q/n)(q/n) is computable in polynomial time even when the factorization of nn is not known!

It is easy to see, from the above definitions that if (q/n)=−1(q/n) = -1 then qq must be a quadratic nonresidue mod nn. In fact, qq must be a quadratic nonresidue either mod p1p_1 or mod p2p_2. However, if (q/n)=+1(q/n) = +1, then either qq is a quadratic residue mod nn or qq is a quadratic nonresidue modulo both the prime factors of nn.

In this paper we are interested in those elements of Zn∗Z_n^* whose Jacobi symbol is +1+1. Thus we introduce the set,

Zn1={x∣x∈Zn∗ and (x/n)=1}.Z_n^1 = \{ x \mid x \in Z_n^* \text{ and } (x/n) = 1 \}.

Let us count the number of elements of Zn+1Z_n^{+1}. See [16] for proofs.

Fact 1. Let pp be an odd prime. Then Zp∗Z_p^* is a cyclic group.

Fact 2. Let gg be a generator for Zp∗Z_p^*, then gsmod  pg^s \mod p is a quadratic residue if and only if ss is even.

COROLLARY 3. Half of the numbers in Zp∗Z_p^* are quadratic residues and half are quadratic nonresidues.

FACT 4. Let n=p1p2n = p_1 p_2 (p1p_1 and p2p_2 are distinct odd primes). Then half of the numbers in Zn∗Z_n^* have Jacobi symbol equal to −1-1 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 nn.

6.2. The Quadratic Residuosity Assumption

Let nn be a composite integer, and qq an element of Zn+1Z_n^{+1}. The Quadratic Residuosity Problem with parameters qq and nn is to decide whether qq is a quadratic residue mod nn. If the factorization of nn is not known, then there is no known efficient procedure for solving the quadratic residuosity problem with parameters nn and qq in Zn+1Z_n^{+1}. 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 nn, 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 QnQ_n and the set of hard composite numbers HkH_k. For all x∈Zn1x \in Z_n^1; the predicate QnQ_n is defined as:

Qn(x)=1if x is a quadratic residue mod n,Q_n(x) = 1 \quad \text{if } x \text{ is a quadratic residue mod } n,
=0if x is a quadratic nonresidue mod n.= 0 \quad \text{if } x \text{ is a quadratic nonresidue mod } n.

HkH_k will denote the set of hard composite integers: Let p1p_1 and p2p_2 denote primes.

Hk={n∣n=p1p2,where ∣p1∣=∣p2∣=k}.H_k = \{ n \mid n = p_1 p_2, \text{where } |p_1| = |p_2| = k \}.

The elements of HkH_k constitute the hardest inputs for any known factoring algorithm.

Quadratic Residuosity Assumption (QRA)

Let P1P_1 be a fixed polynomials. For each integer kk, let CC be a circuit with two 2k2k-bit inputs and one Boolean output. Let CkC_k be the minimum size of circuits CC such that for a fraction 1/P1(k)1/P_1(k) of the n∈Hkn \in H_k, C[n,x]=Qn(x)C[n, x] = Q_n(x) for all x∈Zn+1x \in Z_n^{+1}. Then, for all polynomials QQ, for all sufficiently large kk: Ck>Q(k)C_k > Q(k).

Next, we show that under the QRA, computing Qn(x)Q_n(x) is hard not only for some special x∈Zn1x \in Z_n^1, but is hard on the average.

6.3. A Number Theoretic Result

We recall that a circuit C[⋅]C[\cdot] ε-approximates the predicate B:Ω→{0,1}B : \Omega \to \{0, 1\} if C[x]=B[x]C[x] = B[x] for at least a fraction 12+ε\frac{1}{2} + \varepsilon of the x∈Ωx \in \Omega.

Let us recall the weak law of large numbers:

Weak Law of Large Numbers

Let y1,y2,...,yry_1, y_2, ..., y_r be rr independent 0-1 variables such that yi=1y_i = 1 with probability pp, and Sr=∑i=1ryiS_r = \sum_{i=1}^r y_i, then for real numbers ψ,δ>0,r≥1/4δψ2\psi, \delta > 0, r \geq 1/4\delta\psi^2 implies that Prob⁡(∣(Sr/r)−p∣>ψ)<δ\operatorname{Prob}(|(S_r/r) - p| > \psi) < \delta. Notice that rr is bounded by a polynomial in ψ−1\psi^{-1} and δ−1\delta^{-1}.

Remarks About Theorem 1. Theorem 1 shows that deciding Quadratic Residuosity mod nn 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 P1P_1 and P2P_2, and let O[⋅,⋅]:N×N→{0,1}O[\cdot, \cdot] : N \times N \to \{0, 1\} be an oracle. Let SS be the set of hard integers nn such that O[⋅,n]O[\cdot, n] (1/P_1(|n|))-approximates Q_n. Then there is a probabilistic poly(|n|) algorithm with oracle OO that, for any n∈Sn \in S and any x∈Zn1x \in Z_n^1, with probability greater than 1−(1/P2(∣n∣))1 - (1/P_2(|n|)) correctly decides whether xx is a quadratic residue mod nn.

Proof. Let n∈Sn \in S. Take Zn1Z_n^1 with the uniform probability distribution. For notational simplicity let ε=1/P1(∣n∣)\varepsilon = 1/P_1(|n|) and δ=1/P2(∣n∣)\delta = 1/P_2(|n|). Then, Prob⁡(O[q,n]=Qn(q)∣q∈Zn1)>12+ε\operatorname{Prob}(O[q, n] = Q_n(q) | q \in Z_n^1) > \frac{1}{2} + \varepsilon. Let, α=Prob⁡(O[q,n]=1∣Qn(q)=1)\alpha = \operatorname{Prob}(O[q, n] = 1 | Q_n(q) = 1), and β=Prob⁡(O[q,n]=1∣Qn(q)=0)\beta = \operatorname{Prob}(O[q, n] = 1 | Q_n(q) = 0).

The Prob⁡(O[q,n]=Qn(q)∣q∈Zn1)=12α+12(1−β)>12+ε\operatorname{Prob}(O[q, n] = Q_n(q) | q \in Z_n^1) = \frac{1}{2}\alpha + \frac{1}{2}(1 - \beta) > \frac{1}{2} + \varepsilon. Therefore, α−β≥2ε\alpha - \beta \geq 2\varepsilon, but α\alpha can be much less than 12+ε\frac{1}{2} + \varepsilon. We first need to get a good estimate for α\alpha.

Construct a sample of rr quadratic residues chosen at random in Zn∗Z_n^* (the value of rr will be defined later on). This can be easily done by picking s1,...,srs_1, ..., s_r at random in Zn∗Z_n^* and squaring them modulo nn. Initialize a counter CC to 0.

For i=1i = 1 to rr, ask the oracle for the value O[si2mod  n,n]O[s_i^2 \mod n, n]. Increment CC each time that the oracle answers 1 (i.e., “quadratic residue”).

Let ψ=ε/2\psi = \varepsilon/2. If rr is chosen to be suitably large, r=1/δψ2r = 1/\delta\psi^2, the weak law of large numbers assures that C/rC/r is a good (ε/2\varepsilon/2)-estimate for α\alpha:

Prob⁡(∣α−Cr∣≤ε2)>1−δ2,\operatorname{Prob} \left( \left| \alpha - \frac{C}{r} \right| \leq \frac{\varepsilon}{2} \right) > 1 - \frac{\delta}{2},

i.e., C/rC/r is a good approximation to how well the oracle “guesses” QnQ_n if the inputs are only quadratic residues.

We are now ready to describe a procedure for determining the quadratic residuosity of any element in Zn1Z_n^1. Let qq be an element of Zn1Z_n^1 that we want to test for quadratic residuosity. Randomly generate rr quadratic residues, x1,...,xrx_1, ..., x_r, in Zn1Z_n^1 and compute yi≡qximod  ny_i \equiv qx_i \mod n for i=1,...,ri = 1, ..., r. Notice that

(1) if qq is a quadratic residue, then the yiy_i's are random quadratic residues, (2) if qq is a quadratic nonresidue in Zn1Z_n^1, then the yiy_i'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 Cˉ\bar{C} to 0. For i=1i = 1 to kk call the oracle to get the value O[yi,n]O[y_i, n]. Increment Cˉ\bar{C} every time that the oracle answers 1. Output "q is a quadratic residue mod n" if ∣(C/r)−(Cˉ/r)∣<ε|(C/r) - (\bar{C}/r)| < \varepsilon and "q is a quadratic nonresidue mod n" otherwise.

Since the

Prob⁡(∣Cˉr−α∣<ε2∣q is a quadratic residue)>1−δ2\operatorname{Prob}\left(\left|\frac{\bar{C}}{r} - \alpha\right| < \frac{\varepsilon}{2} \mid q \text{ is a quadratic residue}\right) > 1 - \frac{\delta}{2}

and

Prob⁡(∣Cˉr−β∣<ε2∣q is a quadratic nonresidue)>1−δ2,\operatorname{Prob}\left(\left|\frac{\bar{C}}{r} - \beta\right| < \frac{\varepsilon}{2} \mid q \text{ is a quadratic nonresidue}\right) > 1 - \frac{\delta}{2},

then

Prob⁡(answering q is a quadratic nonresidue∣q is a quadratic nonresidue)\operatorname{Prob}(\text{answering } q \text{ is a quadratic nonresidue} \mid q \text{ is a quadratic nonresidue})
=Prob⁡(∣Cr−Cˉr∣<ε∣q is a quadratic nonresidue)= \operatorname{Prob}\left(\left|\frac{C}{r} - \frac{\bar{C}}{r}\right| < \varepsilon \mid q \text{ is a quadratic nonresidue}\right)
>Prob⁡(∣Cr−α∣<ε2)×Prob⁡(∣Cˉr−β∣<ε2)>(1−δ2)2>(1−δ).> \operatorname{Prob}\left(\left|\frac{C}{r} - \alpha\right| < \frac{\varepsilon}{2}\right) \times \operatorname{Prob}\left(\left|\frac{\bar{C}}{r} - \beta\right| < \frac{\varepsilon}{2}\right) > \left(1 - \frac{\delta}{2}\right)^2 > (1 - \delta).

Thus the quadratic residuosity of any q∈Zn1q \in Z_n^1 is decided correctly with probability greater than 1−δ1 - \delta.

We still need to prove (1) and (2). To prove (1) it will suffice to prove that, given any quadratic residue qq, any other quadratic residue yy in Zn∗Z_n^* can be uniquely written as y=qxmod  ny = qx \mod n, where xx is also a quadratic residue mod nn. Let g1g_1 and g2g_2 be generators for, respectively, Zp1∗Z_{p_1}^* and Zp2∗Z_{p_2}^*. Let aa and bb be such that a≡g1mod  p1a \equiv g_1 \mod p_1, a≡1mod  p2a \equiv 1 \mod p_2, and b≡1mod  p1b \equiv 1 \mod p_1 and b≡g2mod  p2b \equiv g_2 \mod p_2. By the Chinese Remainder Theorem such aa and bb exist. Then, any element of Zn∗Z_n^* can be written uniquely as aibjmod  na^i b^j \mod n, where 1≤i≤p1−11 \leq i \leq p_1 - 1 and 1≤j≤p2−11 \leq j \leq p_2 - 1. Moreover, qq is a quadratic residue mod nn if and only if it can be written as q=a2ib2jmod  nq = a^{2i} b^{2j} \mod n, where 1≤2i≤p1−11 \leq 2i \leq p_1 - 1 and 1≤2j≤p2−11 \leq 2j \leq p_2 - 1. Thus if y=a2sb2tmod  ny = a^{2s} b^{2t} \mod n is any quadratic residue there exists a unique xx quadratic residue mod nn, x=a2(s−i)b2(t−j)x = a^{2(s-i)} b^{2(t-j)}, such that y=qxmod  ny = qx \mod n. This proves (1); (2) is proved in a similar way.

COROLLARY 1. Fix polynomials P1P_1 and P2P_2. Let k∈Nk \in N. Let CkC_k be the size of the minimum size circuit CC that (1/P2(k))(1/P_2(k))-approximates QnQ_n for a fraction 1/P1(k)1/P_1(k) of the nn's in HkH_k. Under the QRA, for all polynomials QQ, for all sufficiently large kk: Ck>Q(k)C_k > Q(k).

Proof. Assume, for contradiction, that there exist polynomials P1,P2P_1, P_2, and QQ and an infinite Nˉ⊆N\bar{N} \subseteq N such that for all k∈Nˉk \in \bar{N}: Ck<Q(k)C_k < Q(k). Then, for each k∈Nˉk \in \bar{N}, let SkS_k contain an 1/P1(k)1/P_1(k) fraction of the elements of HkH_k and Cˉk\bar{C}_k be a circuit of size CkC_k such that for all n∈Skn \in S_k, Cˉk[x,n]=QRn(x)\bar{C}_k[x, n] = QR_n(x) for at least 12+(1/P2(k))\frac{1}{2} + (1/P_2(k)) of the elements of Zn+1Z_n^{+1}.

For every k∈Nˉk \in \bar{N}, choose the oracle OO of Theorem 1 to be Cˉk\bar{C}_k. That is, set O[x,n]=Cˉk[x,n]O[x, n] = \bar{C}_k[x, n] for all n∈Skn \in S_k and all x∈Zn1x \in Z_n^1. Then, by Theorem 1, for all k∈Nˉk \in \bar{N}, for all n∈Skn \in S_k, for all x∈Zn1x \in Z_n^1, and for all polynomials PjP_j, there is a probabilistic polynomial in kk time algorithm with oracle Cˉk\bar{C}_k that correctly decides quadratic residuosity of xmod  nx \mod n with probability greater than 1−(1/P3(k))1 - (1/P_3(k)). As the size of CkC_k is less than Q(k)Q(k), for all k∈Nˉk \in \bar{N} such an algorithm can be transformed into a polynomial in kk size circuit that correctly decides quadratic residuosity mod nn for all n∈Skn \in S_k. As ∣Sk∣>(1/P1(k))∣Hk∣|S_k| > (1/P_1(k))|H_k|, this contradicts the QRA. ■\blacksquare

Let nn be a composite integer whose factorization is unknown. We want to investigate what happens to the difficulty of deciding Quadratic Residuosity modulo nn when we are given the extra knowledge that a particular y∈Zn1y \in Z_n^1 is a quadratic non-residue mod nn.

Remarks about Theorem 2. When the factorization of nn is secret, no efficient algorithm for selecting a quadratic nonresidue mod nn is known. Thus it may be that revealing, say, the smallest quadratic nonresidue in Zn1Z_n^1 may endanger the secrecy of the factorization of nn or make deciding quadratic residuosity modulo nn easy.

Theorem 2 shows that the complexity of the quadratic residuosity problem remains unchanged if a randomly selected quadratic nonresidue modulo nn is revealed. In other words: Assume that for a polynomial fraction of the quadratic nonresidues x∈Zn1x \in Z_n^1, knowing that xx is indeed a quadratic nonresidue mod nn would lead to an efficient decision procedure for quadratic residuosity mod nn. Then, quadratic residuosity mod nn could have been efficiently decided without such extra help.

Theorem 2. Let P1P_1 and P2P_2 be fixed polynomials. For each k∈Nk \in N let Ek⊆HkE_k \subseteq H_k contain a fraction 1/P1(k)1/P_1(k) of the integers in HkH_k. For each n∈Ekn \in E_k, let SnS_n contain a 1/P2(k)1/P_2(k) fraction of the quadratic nonresidues in Zn1Z_n^1. Let CkC_k be the size of the smallest circuit C[⋅,⋅,⋅]C[\cdot, \cdot, \cdot] such that for all n∈Ekn \in E_k, for all s∈Sns \in S_n, and for all x∈Zn1x \in Z_n^1 C[n,s,x]=Qn(x)C[n, s, x] = Q_n(x). Then, for all polynomials QQ, for all sufficiently large kk: Ck>Q(k)C_k > Q(k).

Proof. Let k∈Nk \in N. Fix polynomials P1P_1 and P2P_2. Let C[⋅,⋅,⋅]C[\cdot, \cdot, \cdot] be a circuit of size CkC_k such that C[n,y,q]=Qn(q)C[n, y, q] = Q_n(q) for all n∈Ek,y∈Sn,q∈Zn1n \in E_k, y \in S_n, q \in Z_n^1. The proof is divided into 3 parts:

(1) There exists a probabilistic algorithm A1A_1, with oracle C[⋅,⋅,⋅]C[\cdot, \cdot, \cdot], that on input n∈Ekn \in E_k, outputs x∈Zn1x \in Z_n^1 such that, with probability greater than 1−(1/P2(k))1 - (1/P_2(k)),

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 αx=Prob⁡(C[n,x,q]=0∣Qn(q)=0)\alpha_x = \operatorname{Prob}(C[n, x, q] = 0 | Q_n(q) = 0) and βx=Prob⁡(C[n,x,q]=0∣Qn(q)=1)\beta_x = \operatorname{Prob}(C[n, x, q] = 0 | Q_n(q) = 1). Then, as f0x=1f_0^x = 1 and fix=0f_i^x = 0 for some i≥1i \geq 1, then for all sufficiently large k, the weak law of large numbers assures us that ∣αx−βx∣>(1/2P2(k))|\alpha_x - \beta_x| > (1/2P_2(k)). By Theorem 1, this implies that C[n,x,⋅]P2(k)C[n, x, · ] P_2(k)-approximates Qn(⋅)Q_n(·).

Finally, about A1A_1's running time. Note that, if in a given iteration of the algorithm we draw an x from SnS_n and one of the e_i's is a quadratic nonresidue, then f0x=1f_0^x = 1 and fix=0f_i^x = 0 and the algorithm terminates. Thus, the expected number of iterations performed by algorithm A1A_1 is

1(1−(1/2k))P2(k).\frac{1}{(1 - (1/2^k)) P_2(k)}.

As each iteration, can be performed in probabilistic poly(k) time, A1A_1 runs in expected polynomial in kk 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 P1,P2,P_1, P_2, and P3P_3 be fixed polynomials. For each k∈Nk \in N let Ek⊆HkE_k \subseteq H_k contain a fraction 1/P1(k)1/P_1(k) of the integers in HkH_k. For each n∈Ekn \in E_k, let SnS_n be a 1/P2(k)1/P_2(k) fraction of the quadratic nonresidues in Zn1Z_n^1. Let CkC_k be the size of the smallest circuit C[⋅,⋅,⋅]C[\cdot, \cdot, \cdot] that on inputs n∈Ekn \in E_k and s∈Sns \in S_n, (1/P3(k))−approximatesQn(1/P_3(k))-approximates Q_n. Then, for all polynomials QQ, for all sufficiently large kk: Ck>Q(k)C_k > Q(k).

What this corollary says is that, assuming the QRA, when user BB is presented with (n,y)(n, y) where n∈Hkn \in H_k and yy a quadratic nonresidue in Zn1Z_n^1 and x∈Zn1x \in Z_n^1, he cannot guess Qn(x)Q_n(x) with probability greater than 12\frac{1}{2}.

6.4. A Special Property of Quadratic Residuosity

Let n∈Hkn \in H_k and α=(x1,...,xk)\alpha = (x_1, ..., x_k) be a probabilistic encryption of a kk-bit message mm using the predicate QnQ_n. Given α\alpha, anyone, without knowing the factorization of nn, can reencrypt mm. In fact he could choose, with uniform probability, another probabilistic encryption of mm by simply multiplying each xix_i by a different, randomly selected, quadratic residue mod nn.

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 AA be a user in a public key cryptosystem and kk the number of bits in the description of the encryption algorithm EAE_A put by AA in the Public File. Assume one (finally) proves that, for all polynomial time Turing machines MM, there exists a constant kMk_M, such that for all k>kMk > k_M, inverting EAE_A on some message space requires Ω(2k)\Omega(2^{\sqrt{k}}) steps. As a passive eavesdropper is entitled to choose MM after EAE_A has been put in the public file, what kk should AA 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.

References

  1. L. Adleman, K. Manders, and G. Miller, On taking roots in finite fields, in “Proceedings of the 18th Annual IEEE Symposium on Foundations of Computer Science,” pp. 175–177, 1977.
  2. L. Adleman, On distinguishing prime numbers from composite numbers, in “Proceedings of the 21st IEEE Symposium on the Foundations of Computer Science,” pp. 387–408, Syracuse, N.Y., 1980.
  3. M. BLUM, Coin flipping by telephone, in "Proceedings of the IEEE, Spring Comp-Con, pp. 133-137, 1982.
  4. L. BLUM, M. BLUM, AND M. SHUB, "A Simple Secure Pseudo-Random Number Generator," CRYPTO, 1982.
  5. M. BLUM AND S. MICALI, How to generate cryptographically strong sequences of pseudo random bits, in "Proceedings of the 23rd IEEE on the Foundations of Computer Science," Chicago, Ill., 1982.
  6. G. BRASSARD, Relativized cryptography, in "Proceedings of the 20th IEEE Symposium on the Foundations of Computer Science," pp. 383-391, San Juan, Puerto Rico, 1979.
  7. G. BRASSARD, On computationally secure authentication tags requiring short secret shared keys, CRYPTO, 1982.
  8. C. F. GAUSS, "Disquisitiones Arithmeticae," 1801, translated by A. Arthur and S. J. Clark, Yale Univ. Press, New Haven, 1966.
  9. W. DIFFIE AND M. E. HELLMAN, New direction in cryptography, IEEE Trans. Inform. Theory IT-22 (6) (1976), 644-654.
  10. S. GOLDWASSER AND S. MICALI, "A Bit by Bit Secure Public Key Cryptosystem," Memorandum No. UCB/ERL M81/88, University of California, Berkeley, December 1981.
  11. S. GOLDWASSER AND S. MICALI, Probabilistic encryption & how to play mental poker, keeping secret all partial information, in "Proceeding of 14th STOC Conference," San Francisco, 1982.
  12. S. GOLDWASSER, S. MICALI, AND P. TONG, Why and how to establish a private code in a public network, in "Proceedings of the 23rd Symposium on Foundations of Computer Science," Chicago, Ill., 1982.
  13. S. GOLDWASSER, "Probabilistic Encryption: Theory and Applications," Ph.D. thesis, Univ. of California at Berkeley, 1983.
  14. S. GOLDWASSER, S. MICALI, AND A. YAO, Strong signature schemes and authentication, in "Proceedings, 15th STOC," Boston, Mass., 1983.
  15. K. R. GUY, How to factor a number, in "Proceedings of Fifth Manitoba Conference on Numerical Math.," pp. 49-89, 1975.
  16. D. KNUTH, "The Art of Computer Programming," Vol. 2, 2nd ed., Addison-Wellesley, Reading, Mass., 1981.
  17. R. LIPTON, How to cheat at mental poker, in "Proceeding of the AMS Short Course on Cryptology," January 1981.
  18. G. MILLER, Riemann's hypothesis and tests for primality, Ph.D. thesis, U.C. Berkeley, 1975.
  19. M. LUBY, S. MICALI, AND C. RACKOFF, How to simultaneously exchange a secret bit by flipping a symmetrically-biased coin, FOCS 1983.
  20. M. RABIN, Digitalized signatures and public-key functions as intractable as factorization, MIT/LCS/TR-212, Technical Memo MIT, 1979.
  21. R. RIVEST, A. SHAMIR, AND L. ADLEMAN, A method for obtaining digital signatures and public key cryptosystems, Communications of the ACM, February 1978.
  22. A. SHAMIR, R. RIVEST, AND L. ADLEMAN, "Mental Poker," MIT Technical Report, 1978.
  23. C. E. SHANNON, Communication theory of secrecy systems, Bell System Tech. J. 28 (1949), 656-715.
  24. D. SHANKS, "Solved and Unsolved Problems in Number Theory," Chelsea, New York, 1978.
  25. V. VAZIRANI AND U. VAZIRANI, Secure one-bit disclosures using a pseudo random number generator, in "Proceedings, FOCS," 1983.
  26. A. YAO, On the theory and application of trapdoor functions, in "Proceedings of the 23rd Symposium on the Foundations of Computer Science," Chicago, Ill., November 1982.

Read off the page by a vision model reading the page images using olmOCR-2-7B-1025-FP8.