Abstract
Large-scale quantum computing poses a major threat to classical public-key cryptography. Recently, strong “quantum access” security models have shown that numerous symmetric-key cryptosystems are also vulnerable. In this paper, we consider classical encryption in a model that grants the adversary quantum oracle access to encryption and decryption, but where we restrict the latter to non-adaptive (i.e., pre-challenge) queries only. We formalize this model using appropriate notions of ciphertext indistinguishability and semantic security (which are equivalent by standard arguments) and call it in analogy to the classical security model. We show that the standard pseudorandom function ()-based encryption schemes are -secure when instantiated with quantum-secure primitives. Our security proofs use a strong bound on quantum random-access codes with shared randomness. Revisiting plain -secure Learning with Errors () encryption, we show that leaking only a single quantum decryption query (and no other leakage or queries of any kind) allows the adversary to recover the full secret key with constant success probability. Information-theoretically, full recovery of the key in the classical setting requires at least a linear number of decryption queries. Our results thus challenge the notion that is unconditionally “just as secure” quantumly as it is classically. The algorithm at the core of our attack is a new variant of the well-known Bernstein–Vazirani algorithm. Finally, we emphasize that our results should not be interpreted as a weakness of these cryptosystems in their stated security setting (i.e., post-quantum chosen-plaintext secrecy). Rather, our results mean that, if these cryptosystems are exposed to chosen-ciphertext attacks (e.g., as a result of deployment in an inappropriate real-world setting) then quantum attacks are even more devastating than classical ones.
1. Introduction
1.1. Background
Full-fledged quantum computers with millions of logical qubits threaten classical cryptography dramatically. The ability of such devices to run Shor’s efficient quantum factoring algorithm (and its variants) would lead to devastation of the currently deployed public-key cryptography infrastructure [1,2]. This threat has led to significant work on so-called “post-quantum” alternatives, where a prominent category is occupied by cryptosystems based on the Learning with Errors () problem of solving noisy linear equations over [3] and its variants [1,4]. The problem is closely related to lattice problems and is widely believed to be intractable even for quantum computers. It thus forms the basis for a number of candidate post-quantum cryptosystems. In addition to motivating significant work on post-quantum cryptosystems, the threat of quantum computers has also spurred general research on secure classical cryptography in the presence of quantum adversaries. One area in particular explores strong security models where a quantum adversary gains precise quantum control over portions of a classical cryptosystem. In such models, a number of basic symmetric-key primitives can be broken by simple quantum attacks based on Simon’s algorithm [5,6,7,8,9]. It is unclear if the assumption behind these models is plausible for typical physical implementations of symmetric-key cryptography. However, attacks which involve quantumly querying a classical function are always available in scenarios where the adversary has access to a circuit for the relevant function. This is certainly the case for hashing, public-key encryption, and circuit obfuscation. Moreover, understanding this model is crucial for gauging the degree to which any physical device involved in cryptography must be resistant to reverse engineering or forced quantum behavior (consider, e.g., the so-called “frozen smart card” example [10]). For instance, one may reasonably ask: what happens to the security of a classical cryptosystem when the device leaks only a single quantum query to the adversary?
When deciding which functions the adversary might have (quantum) access to, it is worth recalling the classical setting. For classical symmetric-key encryption, a standard approach considers the security of cryptosystems when exposed to so-called chosen-plaintext attacks (). This notion encompasses all attacks in which an adversary attempts to defeat security (by, e.g., distinguishing ciphertexts or extracting key information) using oracle access to the function which encrypts plaintexts with the secret key. This approach has been highly successful in developing cryptosystems secure against a wide range of realistic real-world attacks. One devastating attack that allows an adversary to exercise precise control over a cryptosystem is characterized by a chosen-ciphertext attack (). In this scenario, the attacker receives adaptive access to the encryption and decryption procedures of a cryptosystem, i.e., the attacker is able to choose plaintexts and ciphertexts that depend on previous outcomes of the attack. Despite their strong security requirements, chosen-ciphertext attacks are often perfectly realistic. Surprisingly, even widely adopted cryptosystems such as RSA have been shown to be vulnerable. For example, a well-known attack due to Bleichenbacher [11] only requires access to an oracle that decides if the input ciphertext is encrypted according to a particular RSA standard.
In this work, we consider analogues of both and attacks, in which the relevant functions are quantumly accessible to the adversary. Prior works have formalized the quantum-accessible model for classical cryptography in several settings, including unforgeable message authentication codes and digital signatures [12,13], encryption secure against quantum chosen-plaintext attacks () [10,14], and encryption secure against adaptive quantum chosen-ciphertext attacks () [12]. Gagliardoni, Hülsing and Schaffner also consider a wide range of indistinguishability and semantic-security models within the framework [10].
1.2. Our Contributions
1.2.1. The Model
In this work, we consider a quantum-secure model of encryption called . This model grants non-adaptive access to the decryption oracle, and is thus intermediate between and . Studying weaker and intermediate models is a standard and useful practice in theoretical cryptography. In fact, and CCA2 are intermediate models themselves, since they are both strictly weaker than authenticated encryption. Our particular intermediate model is naturally motivated: it is sufficent for a new and interesting quantum attack on encryption. As is typical, the challenge in can be semantic, or take the form of an indistinguishability test, where the adversary supplies two challenge plaintexts , receives a challenge ciphertext for random b, and must correctly guess b. Alternatively, the challenge can be semantic, where the adversary receives partial information about a plaintext m, and is tasked with outputting some additional information about m by making use of its encryption . This leads to natural security notions for symmetric-key encryption, which we call and , respectively. Following previous works, it is straightforward to define both and formally, and prove that they are equivalent [10,12,14].
We then prove security for two symmetric-key encryption schemes, based on standard assumptions. Specifically, we show that the standard encryption schemes based on quantum-secure pseudorandom functions () and quantum-secure pseudorandom permutations () are both . We remark that both s and s can be constructed from quantum-secure one-way functions [15,16]. Our security proofs use a novel technique, in which we control the amount of information that the adversary can extract from the oracles and store in their internal quantum state (prior to the challenge) by means of a certain bound on quantum random-access codes.
1.2.2. A Quantum-Query Attack on
We then revisit the aforementioned question: what happens to a post-quantum cryptosystem if it leaks a single quantum query? Our main result is that standard -secure -based encryption schemes can be completely broken using only a single quantum decryption query and no other queries or leakage of any kind. In our attack, the adversary recovers the complete secret key with constant success probability. In standard bit-by-bit encryption, a single classical decryption query can yield at most one bit of the secret key; The classical analogue of our attack thus requires queries. The attack is essentially an application of a modulo-q variant of the Bernstein–Vazirani algorithm [17]. Our new analysis shows that this algorithm correctly recovers the key with constant success probability, despite the decryption function only returning an inner product which is rounded to one of two values. We show that the attack applies to four variants of standard -secure -based encryption: The symmetric-key and public-key systems originally described by Regev [3], the scheme ( is an -secure building block in the -secure post-quantum cryptosystem “FrodoKEM” [18]. Our results do not affect the post-quantum security of Frodo and do not contradict the security of FrodoKEM.) [18,19], and standard [20,21].
Finally, we consider a setting where the adversary receives one quantum encryption query, including access to the randomness register. We show that a similar algorithm again leads to complete key recovery in this model. In this case, the analysis amounts to the observation of Grilo et al. that the problem becomes easy with access to quantum samples [22].
The novelty of our results on is as follows. First, we show that a variant of the Bernstein–Vazirani algorithm succeeds even if the parameters correspond to a broad cryptographic security model; second, we show that this leads to a dramatic quantum speed-up in an actual attack: full key-recovery with a single quantum query in each case.
1.2.3. Important Caveats
Our results challenge the view that encryption is “just as secure” classically as it is quantum in any real-world application; notably, this intuition stems from the conjecture that quantum computers do not seem to solve the standard problem much faster than classical computers. Nonetheless, the reader is cautioned to interpret our work carefully. Our results do not indicate a weakness in (or any -based cryptosystem) in the standard post-quantum security model. Since it is widely believed that quantum-algorithmic attacks will need to be launched over purely classical channels, post-quantum security does not allow for quantum queries to encryption or decryption oracles. Moreover, while our attack does offer a dramatic quantum speedup (i.e., one query vs. linear queries), the classical attack is already efficient.
The plain -based encryption schemes we consider in this work are already vulnerable to decryption queries in a purely classical attack model. In particular, we remark that one classical decryption query can produce at most one bit of the -bit key. Similarly, a classical encryption query which can access also the randomness used in the encryption can produce at most bits of the key. Our results should thus not be interpreted as a weakness of these cryptosystems in their stated security setting (i.e., ). The proper interpretation is that, if these cryptosystems are exposed to chosen-ciphertext attacks, then quantum attacks can be even more devastating than classical ones. Finally, we remark that schemes we attack can me modified to achieve chosen-ciphertext security [23].
1.2.4. Related Work
We remark that Grilo, Kerenidis and Zijlstra recently observed that a version of with so-called “quantum samples” can be solved efficiently (as a learning problem) using Bernstein–Vazirani [22]. Our result, by contrast, demonstrates an actual cryptographic attack on standard cryptosystems based on , in a plausible security setting. Moreover, in terms of solving the learning problem, our analysis shows that constant success probability is achievable with only a single query, whereas [22] require a number of queries which is at least linear in the modulus q. In particular, our cryptographic attack succeeds with a single query even for superpolynomial modulus.
1.3. Technical Summary of Results
1.3.1. Security Model and Basic Definitions
First, we set down the basic security model, adapting the ideas of [10,13]. Recall that an encryption scheme is a triple of algorithms (key generation, encryption, and decryption, respectively) satisfying for any key and message m. Here, represents a procedure for generating a key, represents the encryption procedure, and the decryption procedure. In what follows, all oracles are quantum, meaning that a function f is accessed via the unitary operator . We define ciphertext indistinguishability and semantic security as follows.
Definition 1
(informal). Π is if no quantum polynomial-time algorithm () can succeed at the following experiment with probability better than .
- 1.
- a key and a uniformly random bit are generated; gets access to oracles and , and outputs ;
- 2.
- receives and gets access to an oracle for only, and outputs a bit ; wins if .
Definition 2
(informal). Consider the following game with a .
- 1.
- a key is generated; gets access to oracles , and outputs circuits ;
- 2.
- Sample ; receives , , and access to an oracle for only, and outputs a string s; wins if .
Then Π is if for every there exists a with the same winning probability but which does not get in step 2.
The following fact is straightforward.
Theorem 1.
A classical symmetric-key encryption scheme is if and only if it is .
1.3.2. Secure Constructions
Next, we show that standard pseudorandom-function-based encryption is -secure, provided that the underlying is quantum-secure (i.e., is a .) a can be constructed from any quantum-secure one-way function, or directly from the assumption [15]. Given a , define to be the scheme which encrypts a plaintext m using randomness r via and decrypts in the obvious way.
Theorem 2.
If f is a , then is -secure.
We also analyze a standard permutation-based scheme. Quantum-secure s (i.e., s) can be obtained from quantum-secure one-way functions [16]. Given a , define to be the scheme that encrypts a plaintext m using randomness r via , where denotes concatenation; to decrypt, one applies and discards the randomness bits. We show the following.
Theorem 3.
If P is a , then is -secure.
We briefly describe our proof techniques for Theorems 2 and 3. In the indistinguishability game, the adversary can use the decryption oracle prior to the challenge to (quantumly) encode information about the relevant pseudorandom function instance (i.e., or ) in their private, poly-sized quantum memory. From this point of view, establishing security means showing that this encoded information cannot help the adversary compute the value of the relevant function at the particular randomness used in the challenge. To prove this, we use a bound on quantum random access codes (). Informally, a is a mapping from N-bit strings x to d-dimensional quantum states , such that given , and any index , the bit can be recovered with some probability . The average bias of such a code is the expected value of , over uniform x and j. A with shared randomness further allows the encoding and decoding procedures to both depend on some random variable.
Lemma 1.
The average bias of a quantum random access code with shared randomness that encodes N bits into a d-dimensional quantum state is . In particular, if and the bias is .
The proof of Theorem 3 is similar to that of Theorem 2.
1.3.3. Key Recovery Against LWE
Our attack on encryption will make use of a new analysis of the performance of a large-modulus variant of the Bernstein–Vazirani algorithm [17], in the presence of a certain type of “rounding” noise.
1.3.4. Quantum Algorithm for Linear Rounding Functions
In the simplest case we analyze, the oracle outputs 0 if the inner product is small, and 1 otherwise. Specifically, given integers and , we consider keyed families of (binary) linear rounding functions, , with key , as follows:
Here, denotes the inner product modulo q. Our main technical contribution is the following.
Theorem 4
(informal). There exists a quantum algorithm which runs in time , makes one quantum query to (with and unknown ), and outputs with probability at least .
We also show that the same algorithm succeeds against more generalized function classes, in which the oracle indicates which “segment” of the exact inner product belongs to.
1.3.5. One Quantum Query Against
Finally, we revisit our central question of interest: what happens to a post-quantum cryptosystem if it leaks a single quantum query? we show that, in standard -based schemes, the decryption function can (with some simple modifications) be viewed as a special case of a linear rounding function, as above. In standard symmetric-key or public-key , for instance, we decrypt a ciphertext with key by outputting 0 if and 1 otherwise. In standard , we decrypt a ciphertext with key k (here are polynomials in ) by outputting 0 if the constant coefficient of is small, and 1 otherwise.
Each of these schemes is secure against adversaries with classical encryption oracle access, under the assumption. If adversaries also gain classical decryption access, then it is not hard to see that a linear number of queries is necessary and sufficient to recover the private key. Our main result is that, by contrast, only a single quantum decryption query is required to achieve this total break. Indeed, in all three constructions described above, one can use the decryption oracle to build an associated oracle for a linear rounding function which hides the secret key. The following can then be shown using Theorem 4.
Theorem 5
(informal). Let Π be standard or standard encryption (either symmetric-key, or public-key.) Let n be the security parameter. Then there is an efficient quantum algorithm that runs in time , uses one quantum query to the decryption function of Π, and outputs the secret key with constant probability.
1.4. Organization
The remainder of this paper is organized as follows. In Section 2, we outline preliminary ideas that we will make use of, including cryptographic concepts, and notions from quantum algorithms. In Section 3, we define the model, including the two equivalent versions and . In Section 4, we define the and scheme, and show that they are -secure. In Section 5, we show how a generalization of the Bernstein–Vazirani algorithm works with probability bounded from below by a constant, even when the oracle outputs some rounded value of (i.e., the oracle is a linear rounding function). In Section 6, we use the results of Section 5 to prove that a single quantum decryption query is enough to recover the secret key in various versions of -encryption; we also observe a similar result for a model in which the adversary can make one quantum encryption query with partial access to the randomness register.
2. Preliminaries
2.1. Basic Notation and Conventions
Selecting an element x uniformly at random from a finite set X will be written as . If we are generating a vector or matrix with entries in by sampling each entry independently according to a distribution on , we will write, e.g., . Given a matrix , will denote the transpose of A. We will view elements of as column vectors; The notation then denotes the corresponding row vector. We use bold fonts to discriminate between vectors (or matrices) and scalars. The Kronecker delta of two nonnegative integers i and j is equal to 1 if , and 0 otherwise. The notation denotes some function of n which is smaller than every inverse-polynomial. We denote the concatenation of strings x and y by . We abbreviate classical probabilistic polynomial-time algorithms as algorithms. By quantum algorithm (or ) we mean a polynomial-time uniform family of quantum circuits, where each circuit in the family is described by a sequence of unitary gates and measurements. In general, such an algorithm may receive (mixed) quantum states as inputs and produce (mixed) quantum states as outputs. Sometimes we will restrict s implicitly; for example, if we write for a , it is implicit that we are only considering those s that output a single classical bit. The notation denotes the probability that a outputs 1 in some security game .
Every function determines a unitary operator on qubits where and . In this work, when we say that a quantum algorithm gets (adaptive) oracle access to f (written ), we mean that can apply the oracle unitary . This quantum oracle will sometimes also be denoted by .
Recall that a symmetric-key encryption scheme is a triple of classical probabilistic algorithms whose run-times are polynomial in some security parameter n. Such a scheme must satisfy the following property: when a key k is sampled by running , then it holds that for all m except with negligible probability in n. In this work, all encryption schemes will be fixed-length, i.e., the length of the message m will be a fixed (at most polynomial) function of n.
Since the security notions we study are unachievable in the information-theoretic setting, all adversaries will be modeled by s. When security experiments require multiple rounds of interaction with the adversary, it is implicit that is split into multiple s (one for each round), and that these algorithms forward their internal (quantum) state to the next algorithm in the sequence.
2.2. Basic Number Theory Notation
We briefly review the following mathematical conventions. We denote the greatest common divisor (gcd) between two integers as . The multiplicative group of integers modulo a prime q is denoted as . Recall that for , the Euler totient function counts the number of positive integers up to m that are relatively prime to m. The Möbius function is defined as the sum of the primitive n-th roots of unity. Finally, we also recall that denotes the prime omega function which counts the number of distinct prime factors of an integer .
2.3. Quantum-Secure Pseudorandomness
A pseudorandom function is a family of deterministic and efficiently computable functions that appear random to any adversary with adaptive (classical) oracle access. Similarly, a quantum-secure pseudorandom function achieves security against adversaries with adaptive quantum oracle access. More specifically, let be an efficiently computable function, where are integers and where f defines a family of functions with . We say f is a quantum-secure pseudorandom function (or ) if, for every ,
Here, denotes the set of all functions from to . The standard method for constructing a pseudorandom function from a one-way function produces a , provided that the one-way function is quantum-secure [15,24,25].
A quantum-secure pseudorandom permutation is a a bijective function family of quantum-secure pseudorandom functions. More specifically, consider a function , where n and m are integers, such that each function in the corresponding family is bijective. We say P is a quantum-secure pseudorandom permutation (or ) if, for every with access to both the function and its inverse,
where denotes the set of permutations over m-bit strings. Throughout this work, we shall assume strong s under the above definition, i.e., such that the security is maintained despite additional access to an inverse. One can construct s from quantum-secure one-way functions [16].
2.4. Quantum Random Access Codes
A quantum random access code () is a two-party scheme for the following scenario involving two parties Alice and Bob [26]:
- Alice gets and encodes it as a d-dimensional quantum state .
- Bob receives from Alice, and some index , and is asked to recover the i-th bit of x, by performing some measurement on .
- They win if Bob’s output agrees with and lose otherwise.
We can view a scheme as a pair of (not necessarily efficient) quantum algorithms: one for encoding, and another for decoding. We remark that the definition of a does not require a bound on the number of qubits; The interesting question is with what parameters a can actually exist.
A variation of the above scenario allows Alice and Bob to use shared randomness in their encoding and decoding operations [27] (note that shared randomness per se does not allow them to communicate). Hence, Alice and Bob can pursue probabilistic strategies with access to the same random variable. Finally, the definition also takes into account that the encoder and decoder are allowed to share an entangled state as part of .
Define the average bias of a with shared randomness as , where is the winning probability averaged over and .
2.5. Quantum Fourier Transform
For any positive integer q, the quantum Fourier transform over is defined by the operation
where . Due to early work by Kitaev [28], this variant of the Fourier transform can be implemented using quantum phase estimation in complexity polynomial in . An improved approximate implementation of this operation is due to Hales and Hallgren [29].
3. The QCCA1 Security Model
3.1. Quantum Oracles
In our setting, adversaries will (at various times) have quantum oracle access to the classical functions and . The case of the deterministic decryption function is simple: The adversary gets access to the unitary operator For encryption, to satisfy security, must be probabilistic and thus does not correspond to any single unitary operator. Instead, each encryption oracle call of the adversary will be answered by applying a unitary sampled uniformly from the family where
and r varies over all the possible values of the randomness register of . Note that, since and are required to be probabilistic polynomial-time algorithms provided by the underlying classical symmetric-key encryption scheme, both and correspond to efficient and reversible quantum operations. For the sake of brevity, we adopt the convenient notation and to refer to the above quantum oracles for encryption and decryption respectively.
3.2. Ciphertext Indistinguishability
We now define indistinguishability of encryptions (for classical, symmetric-key schemes) against non-adaptive quantum chosen-ciphertext attacks.
Definition 3
(). Let be an encryption scheme, a , and n the security parameter. Define as follows.
- 1.
- Setup: a key and a bit are generated;
- 2.
- Pre-challenge: gets access to oracles and , and outputs ;
- 3.
- Challenge: gets and access to only, and outputs a bit ;
- 4.
- Resolution: wins if .
Then Π has indistinguishable encryptions under non-adaptive quantum chosen ciphertext attack (or is ) if, for every ,
By inspection, one immediately sees that our definition lies between the established notions of and [10,12,14]. It will later be convenient to work with a variant of the game , which we now define.
Definition 4
(). We define the experiment just as , except that in the pre-challenge phase only outputs a single message m, and in the challenge phase receives if , and for a uniformly random message x if .
Working with rather than does not change security. Specifically (as we show in Appendix A.2), is if and only if, for every ,
3.3. Semantic Security
In semantic security, rather than choosing a pair of challenge plaintexts, the adversary chooses a challenge template: a triple of circuits , where outputs plaintexts from some distribution , and h and f are functions with domain the support of . The intuition is that is a distribution of plaintexts m for which the adversary, if given information about m together with an encryption of m, can produce some new information .
Definition 5
(). Let be an encryption scheme, and consider the experiment (with parameter ) with a , defined as follows.
- 1.
- Setup:a key is generated;
- 2.
- Pre-challenge: gets access to oracles and , and outputs a challenge template ;
- 3.
- Challenge: a plaintext is generated; receives and gets access to an oracle for only; if , also receives ; outputs a string s;
- 4.
- Resolution: wins if .
Π has semantic security under non-adaptive quantum chosen ciphertext attack (or is ) if, for every , there exists a such that the challenge templates output by and are identically distributed, and
Our definition is a straightforward modification of [10,12]; The modification is to give and oracle access to in the pre-challenge phase.
Theorem 6.
Let be a symmetric-key encryption scheme. Then, Π is -secure if and only if Π is -secure.
The classical proof of the above (see, e.g., [30]) carries over directly to the quantum case. This was already observed for the case of by [10], and extends straightforwardly to the case where both the adversary and the simulator gain oracle access to in the pre-challenge phase. In fact, the proof works even if access is maintained during the challenge, so the result is really that is equivalent to .
4. Secure Constructions
4.1. Scheme
Let us first recall the standard symmetric-key encryption based on pseudorandom functions.
Construction 1
( scheme). Let n be the security parameter and let be an efficient family of functions . The symmetric-key encryption scheme is defined by the following efficient algorithms:
- 1.
- : output a key ;
- 2.
- : to encrypt a message , choose a random string and output ;
- 3.
- : to decrypt a ciphertext , output ;
For simplicity, we chose a particularly simple set of parameters for the , so that key length, input size, and output size are all equal to the security parameter. It is straightforward to check that the definition (and our results below) are valid for arbitrary polynomial-size parameter choices.
We show that the above scheme satisfies , provided that the underlying is secure against quantum queries.
Theorem 7.
If f is a , then is -secure.
Proof.
Fix a adversary against and let n denote the security parameter. It will be convenient to split into the pre-challenge algorithm and the challenge algorithm .
We will work with the single-message variant of , , described below as Game 0. In Appendix A.2, we show that is if and only if no adversary can win with non-negligible bias. We first show that a version of where we replace f with a random function, called Game 1 below, is indistinguishable from , so that the winning probabilities cannot differ by a non-negligible amount. We then prove that no adversary can win Game 1 with non-negligible bias by showing how any adversary for Game 1 can be used to make a quantum random access code with the same bias.
- Game 0:
- This is the game , which we briefly review for convenience (see also Figure 1). In the pre-challenge phase, gets access to oracles and , and outputs a message while keeping a private state for the challenge phase. In the challenge phase, a random bit is sampled, and is run on input and a challenge ciphertextHere, where and x are sampled uniformly at random. In the challenge phase, only has access to and must output a bit . wins if , so we call the outcome of the game.
Figure 1. from Definition 4. - Game 1:
- This is the same game as Game 0, except we replace with a uniformly random function .
First, we show that for any adversary , the outcome when plays Game 0 is at most negligibly different from the outcome when plays Game 1. We do this by constructing a quantum oracle distinguisher that distinguishes between the and a true random function, with distinguishing advantage
which must then be negligible since f is a . The distinguisher gets quantum oracle access to a function g, which is either , for a random k, or a random function, and proceeds by simulating playing as follows:
- Run , answering encryption queries using classical calls to g in place of , and answering decryption queries using quantum oracle calls to g:
- Simulate the challenge phase by sampling and encrypting the challenge using g in place of ; run and simulate encryption queries as before;
- When outputs , output .
It remains to show that no adversary can win Game 1 with non-negligible probability. To do this, we design a quantum random access code from any adversary, and use the lower bound on the bias given in Lemma 1.
Intuition. We first give some intuition. In an encryption query, the adversary, either or , queries a message, or a superposition of messages , and gets back for a random r, from which he can easily get a sample . Thus, in essence, an encryption query is just classically sampling a random point of F.
In a decryption query, which is only available to , the adversary sends a ciphertext, or a superposition of ciphertexts, and gets back , from which he can learn . Thus, a decryption query allows to query F, in superposition. Later in the challenge phase, gets an encryption and must decide if . Since no longer has access to the decryption oracle, which allows him to query F, it follows there seem to be only two possible ways could learn :
- gets lucky in one of his at most many queries to and happens to sample the challenge pair ;
- Or, the adversary is somehow able to use what he learned while he had access to , and thus F, to learn , meaning that the -sized quantum memory sends to , that can depend on queries to F, but which cannot depend on , allows to learn .
The first possibility is exponentially unlikely, since there are possibilities for . As we will see shortly, the second possibility would imply a very strong quantum random access code. It would essentially allow to interact with F, which contains values, and make a state, which must necessarily be of polynomial size, such that can use that state to recover for any of the possible values of , with high probability. We now formalize this intuition. To clarify notation, we will use boldface to denote the shared randomness bitstrings.
Construction of a quantum random access code. Let be a adversary with winning probability p. Let be an upper bound on the number of queries made by . Recall that a random access code consists of an encoding procedure that takes (in this case) bits , and outputs a state of dimension (in this case) , such that a decoding procedure, given and an index outputs with some success probability. We define a quantum random access code as follows (see also Figure 2).
Figure 2.
Quantum random access code construction for the pseudorandom function () scheme.
- Encoding.
- Let be the string to be encoded. Let be given by the first bits of the shared randomness, and let be the next bits. Define a function as follows. For , we will slightly abuse notation by letting r denote the corresponding integer value between 1 and . Define . Run , answering encryption and decryption queries using in place of F. Let and be the outputs of (see Figure 1). Output .
- Decoding.
- Let be the index of the bit to be decoded (so given as above, the goal is to recover ). Decoding will make use of the values given by the shared randomness. Upon receiving a query , run with inputs and . On ’s i-th encryption oracle call, use randomness , so that if the input to the oracle is , the state returned is (note that is given as part of ). Return the bit output by .
Average bias of the code. we claim that the average probability of decoding correctly, taken over all choices of and , is exactly p, the success probability of . To see this, first note that from ’s perspective, this is exactly Game 1: The function is a uniformly random function, and the queries are responded to just as in Game 1. Further, note that if , then , so the correct guess for would be 0, and if , then for the uniformly random string , so the correct guess for would be 1.
Therefore, the average bias of the code is . We also observe that has dimension at most , since must be a -qubit state ( only runs for time), and ℓ, the number of queries made by must be , since only runs for time. As this code encodes bits into a state of dimension , by Lemma 1 (proven in Appendix A.1), the bias is , so . □
4.2. Scheme
We now prove the security of a standard encryption scheme based on pseudorandom permutations.
Construction 2
( scheme). Let n be the security parameter and let be an efficient family of permutations . The symmetric-key scheme is defined by the following efficient algorithms:
- 1.
- : output ;
- 2.
- : to encrypt , choose and output ;
- 3.
- : to decrypt , output the first n bits of .
As before, we chose a simple set of parameters; in general, the randomness length, plaintext length, and security parameter can be related by arbitrary polynomials.
Theorem 8.
If P is a , then is -secure.
Proof.
We follow a similar proof strategy as with the scheme. Fix a adversary against . We have that is if and only if no adversary can win with non-negligible bias. First, we show that a version of where we replace P with a random permutation, described below as Game 1, is indistinguishable from , so that the winning probabilities cannot differ by a non-negligible amount. We then prove that no adversary can win Game 1 with non-negligible bias, by showing how any adversary for Game 1 can be used to make a quantum random access code with the same bias.
- Game 0:
- in the pre-challenge phase, gets access to oracles and . in the challenge phase, outputs m and its private data ; a random bit is sampled, and is run on input and a challenge ciphertextwhere and x is sampled uniformly at random. In the challenge phase, has oracle access to only and outputs a bit . The outcome of the game is simply the bit .
- Game 1:
- This is the same game as Game 0, except we now replace with a perfectly random permutation .
We show that for any adversary , the outcome when plays Game 0 is at most negligibly different from the outcome when plays Game 1. We construct a quantum oracle distinguisher that distinguishes between and a perfectly random permutation, with distinguishing advantage
which must then be negligible since is a . Here, the distinguisher receives quantum oracle access to a function , which is either for a random k, or a random permutation , and proceeds by simulating playing as follows:
- Run , answering encryption queries using oracle calls to in place of , where for a given input and via randomness r,Answer decryption queries using quantum oracle calls to , a function that first computes but then (analogous to the construction) discards the last n bits of the pre-image corresponding to the randomness, i.e.
- Simulate the challenge phase by sampling and encrypting using a randomness together with a classical call to in place of ; run and simulate encryption queries as before.
- When outputs , output .
It remains to show that no adversary can win Game 1 with non-negligible probability. To do this, we will again design a random access code from any adversary’s strategy with success probability p, and use the lower bound on the bias given in Lemma 1. We will then construct a with bias from this adversary, and hence conclude that .
Construction of a quantum random access code. Let be a adversary with winning probability p and let be an upper bound on the number of queries made by . When constructing a for the scheme, we shall also assume for simplicity that both the encoder and decoder share a random permutation (as part of the shared randomness). According to the well known coupon collector’s problem [31], it is sufficient for the encoder and decoder to share around random strings on average, where N denotes the number of distinct random strings required to make up the desired permutation. We define a quantum random access code as follows (see also Figure 3).
Figure 3.
Quantum random access code construction for the pseudorandom permutation () scheme.
- Encoding.
- Let be the string to be encoded and let the shared randomness be given by a random string together with a random permutation and a set of random strings . Using , we define a new random permutation by letting ( remains a permutation since ). Now run by answering encryption and decryption queries using in place of (for decryption, use and discard the last n bits). Let and be the outputs of . Then, output .
- Decoding.
- Let be the index of the bit to be decoded; so given as above, we will recover by making use of the shared randomness defined above. Upon receiving a query , run with inputs and . Return the bit output by .
Average bias of the code. we claim that the average probability of decoding correctly, taken over all choices of and , is exactly p, the success probability of . To see this, first note that from ’s perspective, this is exactly Game 1: The function is a uniformly random permutation, and the queries are responded to just as in Game 1. Further, note that if , the challenge amounts to , so the correct guess for would be 0, and if , then is an encryption of a uniformly random string , so the correct guess for would be 1.
Therefore, the average bias of the code is . We now proceed with a similar analysis as with the scheme. Note that has dimension at most , since must be a -qubit state ( only runs for time), and ℓ, the number of queries made by must be , since only runs for time. As this code encodes bits into a state of dimension , by Lemma 1, the bias is , so . □
5. Quantum Algorithm for Linear Rounding Functions
In this section, we analyze the performance of the Bernstein–Vazirani algorithm [17] with a modified version of the oracle. While the original oracle computes the inner product modulo q, our version only gives partial information about it by rounding its value to one of blocks of size b, for some (if b does not divide q, one of the blocks will have size ).
Definition 6.
Let be an integer and be an integer modulus. Let , and . We partition into c disjoint blocks (most of them of size b) starting from a as follows (see Figure 4):
Figure 4.
Dividing into blocks, starting from a. The first blocks, labelled , have size b and the last, labelled , contains the remaining elements of .
Based on this partition, we define a family of keyed linear rounding functions, with key , as follows:
In words, we divide the cyclic group into c blocks, beginning at a: The first have size b, and the last one has size (see Figure 4). Then, the rounding function, , classifies by which of these blocks the value falls into.
The following theorem shows that the modulo-q variant of the Bernstein–Vazirani algorithm (Algorithm 1) can recover with constant probability of success by using only a single quantum query to .
| Algorithm 1: Bernstein–Vazirani for linear rounding functions |
| Parameters: n, q, , . |
|
|
Theorem 9.
Let be the quantum oracle for the linear rounding function with modulus , block size , and an unknown , and unknown key such that has at least one entry that is a unit modulo q. By making one query to the oracle , Algorithm 1 recovers the key with probability at least .
Proof.
For an integer m, let . Several times in this proof, we will make use of the identity .
Let and . Throughout this proof, let . By querying with in the second register, we are using the standard phase kickback technique, which puts the output of the oracle directly into the phase:
Thus, after querying the uniform superposition over the cipherspace with in the second register, we arrive at the state
Note that . If we discard the last register and apply , we get
We then perform a complete measurement in the computational basis. The probability of obtaining the key is given by
We are assuming that has at least one entry that is a unit modulo q. For simplicity, suppose that entry is . Let denote the first entries of . Then, for any :
(recall the definition of from Definition 6). Since is a unit, for each , there is a unique such that . Thus, for a fixed , letting , we have:
which we can plug into (4) to get:
We can perform a similar analysis for the remaining case when . Recall that so and we get
This is slightly different from the case, shown in (5), but very similar. If we substitute in (5) and compare it to (6), we get
Above, we have used the facts , and when . Now, plugging (5) into (3) for all the terms, and using (7) and the triangle inequality for the term, we get:
Since , we can bound the sum as follows:
To get the inequalities (9) and (10) and, we used and the assumption that (if , the claim of the theorem is trivial), which implies that . The last inequality follows from .
Next, we bound . When , , so we have . We also have . Thus,
on the other hand, when , we must have and . In that case
Since and , and by the assumption that , we get
Thus, in both cases,
Plugging this and (10) into (8), and again and using the assumption , we get:
completing the proof. □
6. Key Recovery Against LWE
In this section, we consider various -based encryption schemes and show using Theorem 9 that the decryption key can be efficiently recovered using a single quantum decryption query (Section 6.1, Section 6.2 and Section 6.3). Then, in Section 6.4, we show that a single quantum encryption query can be used to recover the secret key in a symmetric-key version of , as long as the querying algorithm also has control over part of the randomness used in the encryption procedure.
6.1. Key Recovery via One Decryption Query in Symmetric-Key LWE
Recall the following standard construction of an symmetric-key encryption scheme based on the assumption [3].
Construction 3
( [3]). Let be an integer, let be an integer modulus and let χ be a discrete and symmetric error distribution. Then, the symmetric-key encryption scheme is defined as follows:
- 1.
- : output ;
- 2.
- : to encrypt , sample , and output ;
- 3.
- : to decrypt , output 0 if , else output 1.
We refer to an encryption scheme as correct if . To guarantee that the above scheme is correct, we need to restrict the support of the discrete error distribution by fixing the noise magnitude so that for all .
As a corollary of Theorem 9, an adversary that is granted a single quantum decryption query can recover the key with probability at least :
Corollary 1.
There is a quantum algorithm that makes one quantum query to and recovers the entire key with probability at least .
Proof.
Note that coincides with a linear rounding function for a key , which has a unit in its last entry. We consider the following two cases: if q is not , set , , hence we get . If , set , , and then we have . Our claim follows in both cases. Thus, by Theorem 9, Algorithm 1 makes one quantum query to , which can be implemented using one quantum query to , and recovers , and thus , with probability at least . □
Note that the key in this scheme consists of uniformly random bits, and that a classical decryption query yields at most a single bit of output. It follows that any algorithm making t classical queries to the decryption oracle recovers the entire key with probability at most . Using a linear number of classical queries, a straightforward key-recovery algorithm does in fact recover the key with constant success probability. One can simply query “unit vectors” of the form in order to recover one entry of the key at a time by averaging over errors.
6.2. Key Recovery via One Decryption Query in Public-Key LWE
The key-recovery attack described in Corollary 3 required nothing more than the fact that the decryption procedure of is just a linear rounding function whose key contains the decryption key. as a result, the attack is naturally applicable to other variants of . In this section, we consider two public-key variants. The first is the standard construction of public-key encryption based on the assumption, as introduced by Regev [3]. The second is the -secure public-key encryption scheme [18], which is based on a construction of Lindner and Peikert [19]. In both cases, we demonstrate a dramatic speedup in key recovery using quantum decryption queries.
We emphasize once again that key recovery against these schemes was already possible classically using a linear number of decryption queries. Our results should thus not be interpreted as a weakness of these cryptosystems in their stated security setting (i.e., ). The proper interpretation is that, if these cryptosystems are exposed to chosen-ciphertext attacks, then quantum attacks can be even more devastating than classical ones.
6.2.1. Regev’s Public-Key Scheme
The standard construction of an public-key encryption scheme based on is the following.
Construction 4
( [3]). Let be integers, let be an integer modulus, and let χ be a discrete error distribution over . The public-key scheme is defined by the following efficient algorithms:
- 1.
- : output a secret key and a public key , where , , and all arithmetic is done modulo
- 2.
- : to encrypt , pick a random with Hamming weight roughly and output , where denotes the transpose of .
- 3.
- : to decrypt , output 0 if , else output 1.
Although the encryption is now done in a public-key manner, all that matters for our purposes is the decryption procedure, which is identical to the symmetric-key case, . We thus have the following corollary, whose proof is identical to that of Corollary 3:
Corollary 2.
There is a quantum algorithm that makes one quantum query to and recovers the entire key with probability at least .
6.2.2. Frodo Public-Key Scheme
Next, we consider the -secure public-key encryption scheme , which is based on a construction by Lindner and Peikert [19]. Compared to , this scheme significantly reduces the key-size and achieves better security estimates than the initial proposal by Regev [3]. For a detailed discussion of , we refer to [18]. We present the entire scheme for completeness, but the important part for our purposes is the decryption procedure.
Construction 5
( [18]). Let be integer parameters, let be an integer power of 2, let B denote the number of bits used for encoding, and let χ be a discrete symmetric error distribution. The public-key encryption scheme is defined as follows:
- 1.
- : generate a matrix and matrices ; compute ; output the key-pair with public key and secret key .
- 2.
- : to encrypt (encoded as a matrix with each entry having 0 s in all but the B most significant bits) with public key , sample error matrices and ; compute and ; output the ciphertext .
- 3.
- : to decrypt with secret-key , compute . For each , output the first B bits of .
We now show how to recover of the columns of the secret key using a single quantum query to . If , as in sample parameters given in [18], then this algorithm recovers completely.
Theorem 10.
There exists a quantum algorithm that makes one quantum query to and recovers any choice of of the columns of . For each of the chosen columns, if that column has at least one odd entry, then the algorithm succeeds in recovering the column with probability at least .
Proof.
Let be the columns of . Let U denote the map:
for any and . We first argue that one call to can be used to implement . Then we show that one call to U can be used to recover any choice of the columns of with probability , as long as it has at least one entry that is odd.
Let denote the map that takes to the integer represented by the B most significant bits of the binary representation of x. We have, for any , , and any :
Above, represents the -th entry of . If denote the rows of , then . Thus, , the linear rounding function with block size , which is an integer since q is a power of 2, and . Note that we have also assumed that the plaintext is subtracted rather than added to the last register; this is purely for convenience of analysis, and can easily be accounted for by adjusting Algorithm 1 (e.g., by using inverse- instead of .)
Discarding the second register (containing ), the right-hand side of (13) becomes
Reordering the registers of (14), we get:
Thus, we can implement using a single call to .
Next we show that for any particular , a single call to U can be used to recover , the j-th column of , with probability at least , as long as at least one entry of is odd. To do this, we show how one use of U can be used to implement one phase query to . Then the result follows from the proof of Theorem 9.
Let , and define
Then for any , we have:
since addition here is modulo , and
Thus:
Thus, by the proof of Theorem 9, if we apply U to , Fourier transform the first register, and then measure, assuming has at least one entry that is a unit (since q is a power of 2, this is just an odd number) we will measure with probability at least .
Thus, if we want to recover columns of , we apply our procedure for , which costs one query to , to the state
Fourier transform each of the registers, and then measure. □
6.3. Key Recovery via One Decryption Query in Public-Key Ring-LWE
Next, we analyze key-recovery with a single quantum decryption query against Ring- encryption. Unlike the plain -based encryption schemes we considered in the previous sections, Ring- encryption uses noisy samples over a polynomial ring. In the following, we consider the basic, bit-by-bit Ring- public-key encryption scheme introduced in [20,21]. It is based on the rings and for some power-of-two integer n and -bounded prime modulus q. The details of the error distribution below will not be relevant to our results.
In order to generate samples, we assume a symmetric error distribution that samples “small” error polynomials from . For example, a typical choice (under a particular representation for ) is to use an n-dimensional Gaussian, more specifically the product of n centered one-dimensional Gaussian distributions.
Let us first recall the basic public-key encryption scheme based on Ring-. We restrict our analysis to single-bit encryption only.
Construction 6
(Ring-- [20,21]). Let be an integer, let be an integer modulus, and let χ be an error distribution over . The public-key encryption scheme - is defined as follows:
- 1.
- : sample and ; output and .
- 2.
- : to encrypt , sample and output a ciphertext pair , where and .
- 3.
- : to decrypt , compute ; output 0 if the constant term of the polynomial is closer to 0 than , else output 1.
We note that our choice of placing single-bit encryption in the constant term of the polynomial is somewhat arbitrary. Indeed, it is straightforward to extend our results to encryption with respect to other monomials. To speed up multiplication of large polynomials, various embeddings are adopted in practice that represent elements in as vectors in [20]. For example, one can adopt the number-theoretic transform (NTT) to reduce polynomial multiplication to the much faster component-wise multiplication, such as in the post-quantum proposal New Hope [32]. We emphasize that our results are independent of the actual embedding used in practice, as long as the representation is an isomorphism between and . The same is true for the choice of ring under a cyclotomic polynomial, and ultimately results in only slightly different classical post-processing. We show the following corollary to Theorem 9.
Corollary 3.
There is a quantum algorithm that makes one quantum query to - and recovers the entire key s with probability at least .
Proof.
Let us first analyze the decryption function. We let denote the constant term of a polynomial . Then, for any two polynomials and , we can identify the constant term of as
since in . We show that the outcome of - coincides with a binary linear rounding function over . Let denote the coefficient vectors of respectively, and define a constant polynomial and vector , for some . We find that - rounds the inner product , where
Thus, we can run the Bernstein–Vazirani algorithm for binary linear rounding functions on a uniform superposition over and recover from with simple classical post-processing. Note also that any choice of isomorphism between and necessarily preserves the inner product in Equation (15), and hence any measurement outcome can be mapped back to the standard basis prior to post-processing—independently of the actual ring representation used in practice.
By Theorem 9, Algorithm 1 makes one quantum query to , which can be implemented using one quantum query to -, and recovers the string , and thus also , with probability . □
6.4. Key Recovery via a Randomness-Access Query
While a linear number of classical decryption queries can be used to break -based schemes, we have shown that only a single quantum decryption query is required. A natural question to ask is whether a similar statement can be made for encryption queries. Classically, it is known that the symmetric key version of described in Construction 3, , can be broken using a linear number of classical encryption queries when the adversary is also allowed to choose the randomness used by the query: The adversary simply sets the value to each time, with taking n linearly independent values.
In case the adversary is allowed to make quantum encryption queries with randomness access, a single quantum query suffice to recover the entire key with non-negligible probability, even when the adversary only has control over a part of the randomness used by the encryption: The randomness used to prepare vectors , but not the randomness used to select the error e. Specifically, the adversary is given quantum oracle access to the randomness-access encryption oracle such that, on input , the adversary receives
where . We extend this to a quantum randomness-access oracle by answering each element of the superposition using i.i.d. errors :
This model is identical to the noisy learning model considered by Grilo et al. [22] which was inspired by the original noise model of Bshouty and Jackson [33]. First, it is not hard to see that algorithms making classical queries to the above oracle can extract at most bits of key from each query (specifically, from the last component of the ciphertext), and thus still require a linear number of queries to recover the complete key with non-negligible probability.
On the other hand, by a slight generalization of the proof of Theorem IV from Ref. [22], we can recover the entire key with inverse polynomial success probability using a single query to , as long as the noise magnitute is polynomial in n. While Grilo et al. show how to apply Bernstein–Vazirani to solve a certain computational learning version of with quantum samples, we adopt a wider set of cryptographic security parameters and show that this algorithm leads to a dramatic quantum speed-up in an actual attack. Specifically, our improved analysis shows that the modulus need not be prime. In particular, in the case of only a single query to a quantum randomness-access encryption oracle, the entire key can be recovered with inverse polynomial success probability, as long as the noise magnitude is polynomial in n. This is certainly the case for the vast majority of schemes in practice. Recall that denotes the Euler totient function. Specifically, for , counts the number of integers up to m that are relative prime to m. If m is prime, then . Our algorithm to recover the key is as follows.
Theorem 11.
Consider with an arbitrary integer modulus and a symmetric error distribution χ of noise magnitude η. Then, Algorithm 2 makes one query to a randomness-accessible quantum encryption oracle for and recovers the entire key with probability at least .
Proof.
We follow a similar analysis as in Theorem IV in [22]. Let denote the key as sampled by . After querying upon a state corresponding to an encryption of a message , together with a choice of uniform superposition over the randomness register,
| Algorithm 2: Bernstein–Vazirani for randomness-accessible encryption |
| input: Quantum randomness-access oracle for |
| output: with probability |
|
Algorithm 2 receives a sample where, for unknown independent errors of noise magnitude ,
Thus, when discarding the first register and applying the quantum Fourier transform, we find
When measuring in the standard basis, the probability of obtaining outcome is
In particular, the probability that and also that z is prime relative to q (i.e., and thus ) is given by
in the last inequality, we used the fact that , as well as a standard identity on the Euler totient function which we state in Lemma A2: Let be integers and let be the prime omega function. Then, the following identity holds:
Therefore, Algorithm 2 outputs the correct key with probability at least . Note that, because , the success probability is inverse polynomial so long as the noise magnitude is polynomial in n. □
For completeness, we also consider a slightly different and yet plausible error model for quantum randomness-access queries. Unlike the previous model of i.i.d. errors, we now consider a single error being sampled for every branch of the superposition of a single query. Our algorithm will crucially exploit the property that the error does not depend on any of the particular vectors in the respective branches of the wave function.
Surprisingly, we find that the error model of choice does matter, and greatly impacts the analysis of the algorithm. In fact, as we show next, one can now recover with certainty using only a single query to the randomness access encryption oracle. We adapt Algorithm 2 as follows:
We are left with the following Corollary.
Corollary 4.
Consider with an arbitrary integer modulus and a symmetric error distribution χ of noise magnitude η. Then, there exists a quantum algorithm that makes one query to a single-error randomness-accessible quantum encryption oracle for and recovers the entire key with probability 1.
Proof.
The result follows straight from the definition of the quantum Fourier transform. After applying the transformation in step 3 of Algorithm 3, the register contains the entries . □
| Algorithm 3: Bernstein–Vazirani for (single-error) randomness-accessible encryption |
|
|
Author Contributions
All authors contributed equally to this work. Conceptualization, G.A., S.J., M.O. and A.P.; formal analysis, G.A., S.J., M.O. and A.P.; writing—original draft preparation, G.A., S.J., M.O. and A.P.; writing—review and editing, G.A., S.J., M.O. and A.P. All authors have read and agreed to the published version of the manuscript.
Funding
GA is supported by National Science Foundation (NSF) grant CCF-1763736. SJ is supported by an NWO WISE Grant and NWO Veni Innovational Research Grant under project number 639.021.752. MO is supported by Leverhulme Trust Early Career Fellowship (ECF-2015-256). AP is partially supported by AFOSR YIP award number FA9550-16-1-0495, the IQIM—an NSF Physics Frontiers Center (NSF Grant PHY- 1733907), and the Kortschak Scholars program.
Acknowledgments
We thank Ronald de Wolf for helpful discussions, Jop Brit for Lemma A1 and Peter Humphries for providing us with a simple proof of Lemma A2.
Conflicts of Interest
The authors declare no conflict of interest.
Appendix A
Appendix A.1. Bound for Quantum Random Access Codes
Recall that a quantum random access code () is the following scenario involving two parties, Alice and Bob [26]:
- Alice receives an N-bit string x and encodes it as a quantum state .
- Bob receives from Alice and is asked to recover the i-th bit of x, for some , by measuring the state.
- They win if Bob’s output agrees with and lose otherwise.
A variation of this scenario allows Alice and Bob to use shared randomness in their encoding and decoding operations [27] (note that shared randomness per se does not allow them to communicate). If we denote the shared random variable by , Alice’s can now produce
We are interested in bounding the average bias of a quantum random access code with shared randomness, where is the winning probability averaged over and .
Lemma A1.
The average bias of a quantum random access code with shared randomness that encodes N bits into a d-dimensional quantum state is . In particular, if and the bias is .
Proof.
A quantum random access code with shared randomness that encodes N bits into a d-dimensional quantum state is specified by the following:
- a shared random variable ,
- for each , a d-dimensional quantum state encoding x,
- for each , an observable for recovering the i-th bit.
Formally, and are Hermitian matrices such that , , and where denotes the operator norm of . Note that both and depend on the shared random variable , meaning that Alice and Bob can coordinate their strategies.
The bias of correctly guessing , for a given x and i, is Moreover, if the average bias of the code is , then We can rearrange this expression and upper bound each term using its operator norm, and then apply the noncommutative Khintchine inequality [34]:
for some constant c. In other words, in the particular case we are interested in, and so completing the proof. □
Appendix A.2. Equivalence of QCCA Models
Recall that the notion is based on the security game defined in Definition 3. In the alternative security game (see Definition 4), the adversary provides only one plaintext m and must decide if the challenge is an encryption of m or an encryption of a random string. In this section, we prove the following:
Proposition A1.
An encryption scheme Π is if and only if for every ,
Proof.
Fix a scheme . For one direction, suppose is and let be an adversary against . Define an adversary against as follows: (i.) run until it outputs a challenge plaintext m, (ii.) sample random r and output , (iii.) run the rest of and output what it outputs. The output distribution of is then identical to , which in turn must be negligibly close to uniform by security of .
For the other direction, suppose no adversary can win with probability better than , and let be an adversary against . Now, define two adversaries and against as follows. The adversary does: (i.) run until it outputs a challenge , (ii.) output , (iii.) run the rest of and output what it outputs. Note that the pre-challenge algorithm is identical for , , and ; define random variables , and R given by the two challenges and a uniformly random plaintext, respectively. The post-challenge algorithm is also identical for all three adversaries; call it . The advantage of over random guessing is then bounded by
where the last inequality follows from our initial assumption, applied to both and . It follows that is . □
Lemma A2.
Let be integers. Then, the following holds where is the prime omega function:
For completeness, we include a short and simple proof of the above statement.
Proof ([35])
Here, denotes the Möbius function. The sum over is equal to . Therefore,
Putting everything together, we arrive at the equation,
thereby completing the proof. □
References
- Chen, L.; Jordan, S.; Liu, Y.K.; Moody, D.; Peralta, R.; Perlner, R.; Smith-Tone, D. Report on Post-Quantum Cryptography; Technical Report; National Institute of Standards and Technology: Gaithersburg, MD, USA, 2016. [CrossRef]
- Shor, P.W. Algorithms for quantum computation: Discrete logarithms and factoring. In Proceedings of the 35th Annual Symposium on Foundations of Computer Science, Santa Fe, NM, USA, 20–22 November 1994; IEEE: Piscataway, NJ, USA, 1994; pp. 124–134. [Google Scholar] [CrossRef]
- Regev, O. On lattices, learning with errors, random linear codes, and cryptography. J. ACM 2005, 56, 34:1–34:40. [Google Scholar] [CrossRef]
- National Institute of Standards and Technology (NIST). Post-Quantum Cryptography; NIST: Gaithersburg, MD, USA, 2017.
- Kuwakado, H.; Morii, M. Quantum distinguisher between the 3-round Feistel cipher and the random permutation. In Proceedings of the 2010 IEEE International Symposium on Information Theory, Austin, TX, USA, 13–18 June 2010; IEEE: Piscataway, NJ, USA, 2010; pp. 2682–2685. [Google Scholar] [CrossRef]
- Kuwakado, H.; Morii, M. Security on the quantum-type Even-Mansour cipher. In Proceedings of the 2012 International Symposium on Information Theory and its Applications, Honolulu, HI, USA, 28–31 October 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 312–316. [Google Scholar]
- Kaplan, M.; Leurent, G.; Leverrier, A.; Naya-Plasencia, M. Breaking symmetric cryptosystems using quantum period finding. In Advances in Cryptology—CRYPTO 2016; Robshaw, M., Katz, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2016; pp. 207–237. [Google Scholar] [CrossRef]
- Santoli, T.; Schaffner, C. Using Simon’s algorithm to attack symmetric-key cryptographic primitives. In Quantum Information & Computation; Rinton Press: Paramus, NJ, USA, 2017; pp. 65–78. [Google Scholar] [CrossRef]
- Simon, D.R. On the power of quantum computation. SIAM J. Comput. 1997, 26, 1474–1483. [Google Scholar] [CrossRef]
- Gagliardoni, T.; Hülsing, A.; Schaffner, C. Semantic security and indistinguishability in the quantum world. In Advances in Cryptology—CRYPTO 2016; Robshaw, M., Katz, J., Eds.; Springer: Berlin/Heidelberg, Germany, 2016; pp. 60–89. [Google Scholar] [CrossRef]
- Bleichenbacher, D. Chosen ciphertext attacks against protocols based on the RSA encryption standard PKCS #1. In Advances in Cryptology—CRYPTO ’98; Krawczyk, H., Ed.; Springer: Berlin/Heidelberg, Germany, 1998; pp. 1–12. [Google Scholar] [CrossRef]
- Boneh, D.; Zhandry, M. Secure signatures and chosen ciphertext security in a quantum computing world. In Advances in Cryptology—CRYPTO 2013; Canetti, R., Garay, J.A., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 361–379. [Google Scholar] [CrossRef]
- Boneh, D.; Zhandry, M. Quantum-secure message authentication codes. In Advances in Cryptology—EUROCRYPT 2013; Johansson, T., Nguyen, P.Q., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 592–608. [Google Scholar] [CrossRef]
- Broadbent, A.; Jeffery, S. Quantum homomorphic encryption for circuits of low T-gate complexity. In Advances in Cryptology—CRYPTO 2015; Gennaro, R., Robshaw, M., Eds.; Springer: Berlin/Heidelberg, Germany, 2015; pp. 609–629. [Google Scholar] [CrossRef]
- Zhandry, M. How to construct quantum random functions. In Proceedings of the 2012 IEEE 53rd Annual Symposium on Foundations of Computer Science, New Brunswick, NJ, USA, 20–23 October 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 679–687. [Google Scholar] [CrossRef]
- Zhandry, M. A note on quantum-secure PRPs. arXiv 2016, arXiv:1611.05564. [Google Scholar]
- Bernstein, E.; Vazirani, U. Quantum complexity theory. SIAM J. Comput. 1997, 26, 1411–1473. [Google Scholar] [CrossRef]
- Alkim, E.; Bos, J.W.; Ducas, L.; Longa, P.; Mironov, I.; Naehrig, M.; Nikolaenko, V.; Peikert, C.; Raghunathan, A.; Stebila, D.; et al. FrodoKEM—Learning With Errors Key Encapsulation; Submission to the NIST Post-Quantum Cryptography standardization project; Round 2. Revised July 2, 2019. unpublished work.
- Lindner, R.; Peikert, C. Better key sizes (and attacks) for LWE-based encryption. In Topics in Cryptology—CT-RSA 2011; Kiayias, A., Ed.; Springer: Berlin/Heidelberg, Germany, 2011; pp. 319–339. [Google Scholar] [CrossRef]
- Lyubashevsky, V.; Peikert, C.; Regev, O. A toolkit for ring-LWE cryptography. In Advances in Cryptology—EUROCRYPT 2013; Johansson, T., Nguyen, P.Q., Eds.; Springer: Berlin/Heidelberg, Germany, 2013; pp. 35–54. [Google Scholar] [CrossRef]
- Lyubashevsky, V.; Peikert, C.; Regev, O. On ideal lattices and learning with errors over rings. J. ACM 2013, 60, 43:1–43:35. [Google Scholar] [CrossRef]
- Grilo, A.B.; Kerenidis, I.; Zijlstra, T. Learning with errors is easy with quantum samples. arXiv 2017, arXiv:1702.08255. [Google Scholar] [CrossRef]
- Fujisaki, E.; Okamoto, T. Secure integration of asymmetric and symmetric encryption schemes. In Advances in Cryptography—CRYPTO 1999; Springer: Berlin/Heidelberg, Germany, 1999; pp. 537–554. [Google Scholar]
- Goldreich, O.; Levin, L.A. A hard-core predicate for all one-way functions. In Proceedings of the Twenty-first Annual ACM Symposium on Theory of Computing (STOC ’89), Seattle, WA, USA, 14–17 May 1989; ACM: New York, NY, USA, 1989; pp. 25–32. [Google Scholar] [CrossRef]
- Goldreich, O.; Goldwasser, S.; Micali, S. How to construct random functions. J. ACM 1986, 33, 792–807. [Google Scholar] [CrossRef]
- Nayak, A. Optimal lower bounds for quantum automata and random access codes. In Proceedings of the 40th Annual Symposium on Foundations of Computer Science, New York City, NY, USA, 17–19 October 1999; pp. 369–376. [Google Scholar] [CrossRef]
- Ambainis, A.; Leung, D.; Mancinska, L.; Ozols, M. Quantum random access codes with shared randomness. arXiv 2008, arXiv:0810.2937. [Google Scholar]
- Kitaev, A.Y. Quantum measurements and the abelian stabilizer problem. arXiv 1995, arXiv:quant-ph/9511026. [Google Scholar]
- Hales, L.; Hallgren, S. An improved quantum Fourier transform algorithm and applications. In Proceedings of the 41st Annual Symposium on Foundations of Computer Science, Redondo Beach, CA, USA, 12–14 November 2000; pp. 515–525. [Google Scholar] [CrossRef]
- Goldreich, O. Foundations of Cryptography: Volume 2, Basic Applications; Cambridge University Press: Cambridge, UK, 2009. [Google Scholar]
- Cormen, T.H.; Leiserson, C.E.; Rivest, R.L.; Stein, C. Introduction to Algorithms, 2nd ed.; The MIT Press: Cambridge, MA, USA, 2001. [Google Scholar]
- Alkim, E.; Ducas, L.; Pöppelmann, T.; Schwabe, P. Post-quantum key exchange—A new hope. In Proceedings of the 25th USENIX Security Symposium (USENIX Security 16), Austin, TX, USA, 10–12 August 2016; USENIX Association: Austin, TX, USA, 2016; pp. 327–343. [Google Scholar]
- Bshouty, N.H.; Jackson, J.C. Learning DNF over the uniform distribution using a quantum example oracle. SIAM J. Comput. 1998, 28, 1136–1153. [Google Scholar] [CrossRef]
- Tomczak-Jaegermann, N. The moduli of smoothness and convexity and the Rademacher averages of the trace classes Sp (1≤p<∞). Stud. Math. 1974, 50, 163–182. [Google Scholar]
- Humphries, P. Reference for Euler Totient Function Identity? Mathematics Stack Exchange. Available online: https://math.stackexchange.com/q/2889027 (accessed on 8 May 2012).
© 2020 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).



