Next Article in Journal
LM-SODP: Language Model Self-Optimizing Discrete Prompt for Aspect Based Sentiment Analysis
Previous Article in Journal
An Efficient GPU-Accelerated High-Order Upwind Rotated Lattice Boltzmann Flux Solver for Simulating Three-Dimensional Compressible Flows with Strong Shock Waves
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Quantum Security of Nonce-Based Encryption

1
Beijing Electronic Science & Technology Institute, Beijing 100070, China
2
School of Cryptology, University of Chinese Academy of Sciences, Beijing 100049, China
3
State Key Laboratory of Cyberspace Security Defense, Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100085, China
4
School of Cyber Security, University of Chinese Academy of Sciences, Beijing 100049, China
5
National Key Laboratory of Security Communication, Chengdu 610041, China
*
Author to whom correspondence should be addressed.
Entropy 2025, 27(12), 1194; https://doi.org/10.3390/e27121194
Submission received: 3 October 2025 / Revised: 17 November 2025 / Accepted: 24 November 2025 / Published: 24 November 2025
(This article belongs to the Section Quantum Information)

Abstract

We investigate the quantum security of nonce-based encryption under the indistinguishability against quantum chosen-plaintext attacks (IND-qCPA). While classical results establish that IV-based modes such as CBC, CFB, OFB, and CTR achieve IND-qCPA security, we demonstrate that simply replacing the random IV with a nonce undermines both classical and quantum security. To address this, we propose a general transformation from R-IND-qCPA security to N-IND-qCPA security and introduce enhanced variants, namely, CBC2, CFB2, OFB2, and CTR2, that are provably secure in the nonce-based quantum setting. We further show that nonce-based stream cipher encryption inherently satisfies N-IND-qCPA security. These results provide a systematic framework for upgrading IV-based constructions to secure nonce-based counterparts, thereby strengthening practical symmetric encryption against quantum adversaries.

1. Introduction

A block cipher is a basic building block in modern cryptography, usually modeled as a random permutation on fixed-length inputs. In practice, messages are often much longer than a single block and may vary in length, which requires the use of block cipher modes of operation to extend encryption to arbitrary-length inputs. Modes of operation are generally divided into three categories: encryption modes, authentication modes, and authenticated encryption modes. The earliest encryption modes, such as ECB, CBC, OFB, and CFB, provided confidentiality only. To ensure integrity, authentication modes such as CBC-MAC were developed, and later integrated designs such as CCM, GCM, and OCB were proposed to achieve both confidentiality and integrity.
The progress of quantum algorithms has posed serious challenges to these modes. When adversaries are allowed quantum query access to the underlying primitive, algorithms such as Grover’s search [1] and Simon’s algorithm [2] can be applied to mount attacks. Under this setting, reduced-round Feistel and Lai–Massey structures, the Even–Mansour cipher, LRW [3,4,5,6,7], authentication modes including CBC-MAC, PMAC, and GMAC [7], and authenticated encryption modes such as OCB and GCM [7,8,9,10] have been shown to be insecure.
Against this background, the quantum security of encryption modes has become a central research topic. The natural adaptation of the classical indistinguishability under chosen-plaintext attack (IND-CPA) model to the quantum setting is the IND-qCPA model [11], where challenge queries remain classical, encryption queries may be quantum, and the adversary’s distinguishing advantage quantifies security. Because encryption modes aim only at confidentiality, proving IND-qCPA security suffices in the quantum setting. It is important to note that existing quantum security models are probabilistic, in which a random value r is included during the encryption process. Unlike plaintexts and ciphertexts, which may be in quantum superposition, the random value r is always treated as a classical number.
Based on the nature of the random value r, encryption schemes can be categorized into IV-based encryption schemes and nonce-based encryption schemes. Among these, an initialization vector I V is required to be random, whereas a nonce N is required only to be arbitrarily chosen but non-repeating. Compared with random IVs, nonces are easier to generate, avoid reliance on high-quality randomness, and better match practical deployment requirements in modern cryptographic protocols.
The quantum security of encryption schemes varies depending on the type of random value employed. In 2016, Vivekanand et al. [12] demonstrated that encryption modes such as CBC, CFB, OFB, and CTR achieve IND-qCPA security when a random IV is used. In 2021, Bhaumik et al. [8] proposed a new design called QCB, based on OCB, and proved that QCB satisfies IND-qCPA security under the non-adaptive nonce setting. Here, a non-adaptive nonce refers to one that may be arbitrarily chosen but must be selected entirely in advance prior to any encryption queries. In 2025, Lang et al. [13] provided the first formal definition of IND-qCPA security in the adaptive nonce model, although no concrete instantiation has been proposed to date. In addition, there are also studies on the quantum security of block ciphers and their modes of operation [14,15,16,17].
We refer to IV-based IND-qCPA as R-IND-qCPA and nonce-based IND-qCPA as N-IND-qCPA. Although CBC, CFB, OFB, and CTR achieve IND-qCPA security when a random I V is used (that is, they are R-IND-qCPA secure), Section 3 demonstrates that replacing the I V with a nonce N not only fails to provide IND-qCPA security but also undermines even IND-CPA security. Enhancing encryption schemes to achieve N-IND-qCPA security constitutes a primary focus of this work.
The main results in the paper are as follows (Table 1):
  • We present a general transformation that converts any R-IND-qCPA secure encryption scheme into an N-IND-qCPA secure scheme.
  • We propose enhanced variants of CBC, CFB, OFB, and CTR, referred to as CBC2, CFB2, OFB2, and CTR2, and provide formal proofs of their security under the N-IND-qCPA definition.
  • We further show that nonce-based stream cipher encryption inherently satisfies N-IND-qCPA security.
The structure of this paper is organized as follows: Section 2 introduces definitions and notation; Section 3 presents N-IND-CPA attacks against CBC, CFB, OFB, and CTR; Section 4 provides the N-IND-qCPA security proof for CBC2; Section 5 discusses improvements and proofs for other encryption schemes; and Section 6 offers concluding remarks.

2. Preliminaries

2.1. Notations

  • Block Cipher. A block cipher E : { 0 , 1 } k × { 0 , 1 } n { 0 , 1 } n is a map with key space { 0 , 1 } k and message space { 0 , 1 } n such that for every key K { 0 , 1 } k , P E ( K , P ) is a permutation on { 0 , 1 } n . Let E K denote the map P E ( K , P ) .
Let x $ { 0 , 1 } n denote selecting an element x from the set { 0 , 1 } n uniformly at random. Let Perm ( n ) be a set of all permutations on { 0 , 1 } n . Let π $ Perm ( n ) be a random permutation on { 0 , 1 } n . A block cipher keyed by K is a function E K Perm ( n ) . We call the input and output of E K as plaintext and ciphertext, respectively. Let Func ( m , n ) be the set of all functions from { 0 , 1 } m to { 0 , 1 } n . We write Func ( n , n ) as Func ( n ) .
  • IV-Based Encryption Scheme. Encryption schemes are typically defined as either probabilistic or stateful. In the context of symmetric cryptography, the randomness or state involved in the encryption process is usually represented explicitly by an initialization vector (IV), meaning that both encryption and decryption can be formalized as deterministic algorithms. The following provides the syntax definition of an IV-based encryption scheme. An IV-based encryption scheme is a pair of algorithms Π = ( E n c , D e c ) , where E n c : Key × IV × Plaintext Ciphertext and D e c : Key × IV × Ciphertext Plaintext are deterministic functions with key space, IV space IV , plaintext space Plaintext , and ciphertext space Ciphertext . We require that D e c ( K , I V , E n c K ( I V , P ) ) = P for any K Key and I V IV and P Plaintext . Note that here, for a probabilistic encryption scheme I V is randomly selected from IV .
  • Nonce-Based Encryption Scheme. If the only requirement on the initialization vector (IV) is that it must not repeat, then even allowing the adversary to choose the IV is acceptable. In this case, the IV is referred to as a nonce, and the corresponding construction is called a nonce-based encryption scheme. Because the syntax of IV-based and nonce-based encryption schemes is identical, the latter simply relaxes the requirements on how the IV is generated. This relaxation greatly facilitates the secure deployment of symmetric encryption, as producing a random IV would otherwise require the additional implementation of a secure random number generator. To highlight the distinction, in the syntax definition the IV space IV is usually replaced by a nonce space Nonce .

2.2. Security Definitions

Let A be an adversary. Let A O = b denote an algorithm that performs queries on the oracle O and produces the bit of b. In the context of a (keyed) function f, for a classical query X, the response is the value f ( X ) . In contrast, a quantum query is given as a quantum superposition state ψ X , Y | X | Y , and the response is given by ψ X , Y | X | Y f ( X ) .
For two oracles O 1 and O 2 , the classical and quantum distinguishing advantage of A is defined respectively as follows:
Adv O 1 , O 2 dist ( A ) : = | Pr [ A O 1 ( · ) = 1 ] Pr [ A O 2 ( · ) = 1 ] | , Adv O 1 , O 2 qdist ( A ) : = | Pr [ A O 1 ( * ) = 1 ] Pr [ A O 2 ( * ) = 1 ] | ,
where we use · to denote a classical query and ⊙ to denote a quantum query.
Definition 1 
(PRF/qPRF). A (quantum-secure) pseudorandom function ((q)PRF) is an efficiently computable function family f : { 0 , 1 } k × { 0 , 1 } s { 0 , 1 } n for all (quantum) algorithms A ,
Pr k $ { 0 , 1 } k A f k = 1 Pr g $ Func ( s , n ) A g = 1 negl ,
where g is a random function from { 0 , 1 } s to { 0 , 1 } n and where we replace the ∗ symbol by · to denote a classical query or to denote a quantum query).
Definition 2 
(PRF/qPRF/PRP/qPRP Advantages). Let F : { 0 , 1 } k × { 0 , 1 } s { 0 , 1 } n be a function. Let E : { 0 , 1 } k × { 0 , 1 } n { 0 , 1 } n be a block cipher. Let f Func ( s , n ) be a random function. Let p Perm ( n ) be a random permutation. We assume that all keys are random. The PRF/qPRF/PRP/qPRP advantages are defined as follows:
Adv F PRF ( A ) = Adv F K , f dist ( A ) , Adv F qPRF ( A ) = Adv F K , f qdist ( A ) , Adv E PRP ( A ) = Adv E K , π dist ( A ) , Adv E qPRP ( A ) = Adv E K , π qdist ( A ) .
Definition 3 
(Secure Stream Cipher). A secure stream cipher is an efficiently computable function S C : { 0 , 1 } k × { 0 , 1 } s { 0 , 1 } L that takes a key k and nonce N, then outputs a keystream of length L. For all probabilistic polynomial-time adversaries A , the following advantage is negligible:
Pr K $ { 0 , 1 } k A S C K ( · ) = 1 Pr g $ Func ( s , L ) A g · = 1 negl ,
where g is a random function from { 0 , 1 } s to { 0 , 1 } L .
In the following, we present the definitions of R-IND-CPA and N-IND-CPA.
Definition 4 
(R-IND-CPA). For an encryption scheme Π = ( Enc , Dec ) and an adversary A , we define the advantage of indistinguishability under a chosen plaintext attack in the random-IV setting (R-IND-CPA) using the following game:
  • Key Generation: The challenger picks a random key K and a random bit b.
  • Queries: A is allowed to make two types of queries:
    • Challenge Queries: A sends two plaintexts P 0 , P 1 , to which the challenger chooses randomness R and responds with C * = R Enc K R , P b .
    • Encryption Queries: For each such query of P, the challenger chooses randomness R and responds with C = R E n c K ( R , P ) .
  • Guess: A produces a bit b and wins if b = b .
The R-IND-CPA advantage of an adversary A is defined as
Adv Π R - IND - CPA ( A ) = 2 Pr [ A success ] 1 .
Definition 5 
(N-IND-CPA). For an encryption scheme Π = ( Enc , Dec ) and an adversary A , we define the advantage of indistinguishability under a chosen plaintext attack in the nonce setting (N-IND-CPA) using the following game:
  • Key Generation: The challenger picks a random key K and a random bit b.
  • Queries: A is allowed to make two types of queries:
    • Challenge Queries: A sends a nonce N and two plaintexts P 0 , P 1 , to which the challenger responds with C * = Enc K N , P b .
    • Encryption Queries: For each such query of ( N , P ) , the challenger chooses randomness R and responds with C = R E n c K ( N , P ) .
  • Guess: A produces a bit b , and wins if b = b .
We stress that the nonce N in the above game never repeats. The N-IND-CPA advantage of an adversary A is defined as
Adv Π N - IND - CPA ( A ) = 2 Pr [ A success ] 1 .
In the following, we define R-IND-qCPA and N-IND-qCPA.
Definition 6 
(R-IND-qCPA). For an encryption scheme Π = ( Enc , Dec ) and an adversary A , we define the advantage of indistinguishability under a quantum chosen plaintext attack in the random-IV setting (R-IND-qCPA) using the following game:
  • Key Generation: The challenger picks a random key K and a random bit b.
  • Queries: A is allowed to make two types of queries:
    • Challenge Queries: A sends two classical messages P 0 , P 1 , to which the challenger chooses classical randomness R and responds with classical C * = R Enc K R , P b .
    • Encryption Queries: For each such query of P, the challenger chooses classical randomness R and encrypts each plaintext in the quantum superposition using R as the randomness:
      P , C ψ P , C | P , C P , C ψ P , C | P , C ( R Enc K ( R , P ) ) .
  • Guess: A produces a bit b and wins if b = b .
The R-IND-qCPA advantage of an adversary A is defined as
Adv Π R - IND - qCPA ( A ) = 2 Pr [ A success ] 1 .
Definition 7 
(N-IND-qCPA). For an encryption scheme Π = ( Enc , Dec ) and an adversary A , we define the advantage of indistinguishability under a quantum chosen plaintext attack in the nonce setting (N-IND-qCPA) using the following game:
  • Key Generation: The challenger picks a random key K and a random bit b.
  • Queries: A is allowed to make two types of queries:
    • Challenge Queries: A sends a classical nonce N and two classical messages P 0 , P 1 , to which the challenger responds with classical C * = Enc K N , P b .
    • Encryption Queries: For each such query of a classical nonce N and a plaintext in the quantum superposition, the challenger encrypts using the following transformation:
      P , C ψ P , C | P , C P , C ψ P , C | P , C Enc K ( N , P ) .
  • Guess: A produces a bit b and wins if b = b .
The N-IND-qCPA advantage of an adversary A is defined as
Adv Π N - IND - qCPA ( A ) = 2 Pr [ A success ] 1 .

2.3. Encryption Modes

The encryption schemes CBC, CFB, OFB, and CTR (Figure 1) are defined as follows:
Definition 8 
(CBC Mode). Let K Key and I V IV . For a given message P = P 1 P 2 P m , where P i ( i = 1 , 2 , , m ) is a block of the message, the symmetric encryption scheme C B C is defined as follows:
  • Enc: C 0 = I V and C i = E K ( P i C i 1 ) for 1 i m . En c K ( P ) = C 0 C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and C 0 = I V , P i : = E K 1 ( C i ) C i 1 for 1 i m . De c K ( C ) = P 1 P m .
Definition 9 
(CFB Mode). Let K Key and I V IV . For a given message P = P 1 P 2 P m , where P i ( i = 1 , 2 , , m ) is a block of the message, the symmetric encryption scheme C F B is defined as follows:
  • Enc: C 0 = I V and C i = E K ( C i 1 ) P i for 1 i m . En c K ( P ) = C 0 C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and C 0 = I V , P i : = E K ( C i 1 ) C i for 1 i m . De c K ( C ) = P 1 P m .
Definition 10 
(OFB Mode). Let K Key and I V IV . For a given message P = P 1 P 2 P m , where P i ( i = 1 , 2 , , m ) is a block of the message, the symmetric encryption scheme O F B is defined as follows:
  • Enc: C 0 = R 0 = I V , R i = E K ( R i 1 ) and C i = R i 1 P i for 1 i m . En c K ( P ) = C 0 C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and C 0 = I V , P i : = E K ( C i 1 ) C i for 1 i m . De c K ( C ) = P 1 P m .
Definition 11 
(CTR Mode). Let K Key and I V IV . For a given message P = P 1 P 2 P m , where P i ( i = 1 , 2 , , m ) is a block of the message, the symmetric encryption scheme C T R is defined as follows:
  • Enc: C 0 = I V and C i = E K ( C 0 + i ) P i for 1 i m . En c K ( P ) = C 0 C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and C 0 = I V , P i : = E K ( C 0 + i ) C i for 1 i m . De c K ( C ) = P 1 P m .
According to [12], CBC, CFB, OFB and CTR are R-IND-qCPA secure, and therefore R-IND-CPA secure.
Theorem 1 
(Theorem 3 and Theorem 4 in [12]). If the function E is a quantum secure PRF, then C B C , C F B , O F B , and C T R are R-IND-qCPA secure.
However, our research will indicate that none of them are N-IND-CPA secure, and therefore not N-IND-qCPA secure.

3. N-IND-CPA/N-IND-qCPA Attacks with Nonce-Based Encryption Scheme

We noticed that C B C , C F B , O F B , and C T R only maintain the security of Theorem 1 when C 0 is a random I V . If we replace I V with nonce N (which can be selected but not repeated), then CBC, CFB, OFB, and CTR do not even maintain classical security; therefore, they are not N-IND-qCPA secure. For convenience, we define P i j as the i-th block in the j-th query. It is easy to argue that the advantage of these attacks is 1.
  • IND-CPA attack on CBC mode. The IND-CPA attack on CBC is similar to the attack in [18]. The specific process (Figure 2) is as follows:
  • Encryption query: Let N 1 = P 1 1 ; then, C 1 1 = E K ( 0 n ) .
  • Challenge query: Let P 0 = P 1 2 P 1 1 , P 1 $ { 0 , 1 } n , P 1 P 0 , and N 2 = P 1 2 ; then, b = 0 if C 1 2 = C 1 1 , otherwise b = 1 .
For CBC mode, as long as N 2 = P 1 2 , there will be C 1 2 = C 1 1 ; thus, the probability of adversary A ’s success is 1. The distinguishing advantages are: Adv C B C N - IND - CPA ( A ) = 1 . Therefore, Adv C B C N - IND - qCPA ( A ) = 1 .
  • IND-CPA attack on CFB mode. The steps of the IND-CPA attack (Figure 3) against the CFB scheme are as follows:
  • Encryption query: Let N 1 = P 1 1 = P 2 1 = 0 ; then, C 1 1 = E K ( 0 n ) and C 2 1 = E K ( E K ( 0 n ) ) .
  • Challenge query: Let P 0 = 0 n , P 1 $ { 0 , 1 } n , P 1 P 0 , and N 2 = C 1 1 = E K ( 0 n ) ; then, b = 0 if C 1 2 = C 1 1 , otherwise b = 1 .
For CFB mode, the probability of adversary A ’s success is 1. The distinguishing advantages are: Adv C F B N - IND - CPA ( A ) = 1 . Therefore, Adv C F B N - IND - qCPA ( A ) = 1 .
  • IND-CPA attack on OFB mode. The steps of the IND-CPA attack (Figure 4) against the OFB scheme are as follows:
  • Encryption query: Let N 1 = P 1 1 = P 2 1 = 0 ; then, C 1 1 = E K ( 0 n ) and C 2 1 = E K ( E K ( 0 n ) ) .
  • Challenge query: Let P 0 = 0 n , P 1 $ { 0 , 1 } n , P 1 P 0 and N 2 = C 1 1 = E K ( 0 n ) ; then, b = 0 if C 1 2 = C 1 1 , otherwise b = 1 .
For OFB mode, the probability of adversary A ’s success is 1. The distinguishing advantages are: Adv O F B N - IND - CPA ( A ) = 1 . Therefore, Adv O F B N - IND - qCPA ( A ) = 1 .
  • IND-CPA attack on CTR mode. The steps of the IND-CPA attack (Figure 5) against the CTR scheme are as follows:
  • Encryption query: Let N 1 = P 1 1 = P 2 1 = 0 ; then, C 1 1 = E K ( 1 ) and C 2 1 = E K ( 2 ) .
  • Challenge query: Let P 0 = 0 n , P 1 $ { 0 , 1 } n , P 1 P 0 , and N 2 = 1 ; then, b = 0 if C 1 2 = C 1 1 , otherwise b = 1 .
For CTR mode, the probability of adversary A ’s success is 1. The distinguishing advantages are: Adv C T R N - IND - CPA ( A ) = 1 . Therefore, Adv C T R N - IND - qCPA ( A ) = 1 .

4. CBC2 Mode Is N-IND-qCPA Secure

From Section 3, we know that CBC, CFB, OFB, and CTR are IND-qCPA secure when based on IV, while they are classical insecure when based on nonce. Based on CBC, Rogaway [18] proposed an improved version of CBC2 (Figure 6) which can achieve N-IND-CPA security by adding a key.
Definition 12 
(CBC2 Scheme [18]). Let K 1 , K 2 $ { 0 , 1 } k . For a given message P = P 1 P 2 P m and nonce N, where m is a polynomial in n, the symmetric encryption scheme C B C 2 is defined as follows:
  • Enc: C 0 = E K 1 ( N ) and C i = E K 2 ( P i C i 1 ) for 1 i m . En c K 1 , K 2 ( P ) = C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and N, C 0 = E K 1 ( N ) , P i : = E K 2 1 ( C i ) C i 1 for 1 i m . De c K 1 , K 2 ( C ) = P 1 P m .
For CBC2 scheme, the following theorem holds:
Theorem 2 
(Theorem 1 in [18]). If the function E is a secure PRP, then C B C 2 is N-IND-CPA secure.
Next, we will demonstrate that CBC2 also satisfies N-IND-qCPA security in quantum environments:
Theorem 3. 
If the function E is a quantum secure PRF, then C B C 2 is N-IND-qCPA secure.
From Figure 7, it can be seen that in CBC2, the nonce N is first encrypted using E K 1 and the output at this time is a random value, which can be essentially understood as transforming the adaptive nonce into a random IV through one encryption.
The following theorem ensures the validity of Theorem 3:
Theorem 4 
(From R-IND-qCPA secure to N-IND-qCPA secure.). If the function E is a quantum secure PRF, K 1 , K 2 $ { 0 , 1 } k , then encryption scheme E n c K 2 ( I V , P ) is R-IND-qCPA secure with classical random I V . Let E n c K 1 , K 2 ( N , P ) = E n c K 2 ( E K 1 ( N ) , P ) ; then, E n c K 1 , K 2 ( N , P ) is N-IND-qCPA secure with a classical adaptive nonce N (N cannot be repeated).
Proof. 
We prove this proposition using the game-playing technique. (Table 2).
G 0 : The adversary is given oracle access to the quantum oracle of E n c K 1 , K 2 ( N , P ) = E n c K 2 ( E K 1 ( N ) , P ) .
G 1 : We change E to ideal random function f. Let A 1 be adversary run to the quantum oracle of G 0 or G 1 . Let B 1 be an adversary run to the classical oracle of E or random function f. Adversary B 1 starts by running A 1 and simulating the games G 0 and G 1 for it. In order to simulate the calls to S 1 , B 1 uses its own oracles from the PRF game. Note that N is a classic number, and choosing a non-repeating N is easy. Then, adversary B 1 keeps track of all the sets appearing in the games G 0 or G 1 and enforces the corresponding game rules. In the end, adversary B 1 returns the same bit that A 1 returns. Let A 1 make at most q quantum queries, then let B 1 make at most q quantum queries. It holds that
Adv G 0 , G 1 qdist ( A 1 ) Adv E P R F ( B 1 ) .
G 2 : The adversary is given oracle access to the quantum oracle of E n c K 2 ( I V , P ) . Let A 2 be an adversary run to the quantum oracle of G 1 or G 2 . Let B 2 be an adversary run to the classical oracle of random function f or random I V . B 2 uses its own oracles to simulate S 1 . Then, adversary B 1 starts by running A 1 and simulating the games G 1 and G 2 for it. Adversary B 1 keeps track of all the sets appearing in games G 1 or G 2 and enforces the corresponding game rules. In the end, adversary B 2 returns the same bit that A 2 returns. Let A 2 make at most q quantum queries, then let B 2 make at most q quantum queries. It holds that
Adv G 1 , G 2 qdist ( A 2 ) = 0 .
Thus, we have
Adv G 0 , G 2 qdist ( A ) Adv G 0 , G 1 qdist ( A 1 ) + Adv G 1 , G 2 qdist ( A 2 ) Adv E P R F ( B 1 ) .

5. N-IND-qCPA Secure Modification Modes

According to Theorem 4, CFB and OFB can be enhanced to N-IND-qCPA secure versions, which we denote as CFB2 and OFB2, respectively. Additionally, we define the improved CTR version, denoted as CTR2, which is N-IND-qCPA secure.

5.1. CFB2 Mode

We use different keys K 3 and K 2 to encrypt adaptive nonce N and message P, respectively. The improved version of CFB with N-IND-qCPA secure is shown in Figure 8.
Let E K 1 = def E K 2 E K 3 . We can obtain a simplified version of CFB2 (Figure 9) as follows:
Definition 13 
(CFB2 Mode). Let K 1 , K 2 $ { 0 , 1 } k . For a given message P = P 1 P 2 P m and nonce N, where m is a polynomial in n, the symmetric encryption scheme C F B 2 is defined as follows:
  • Enc: C 1 = E K 1 ( N ) P 1 and C i = E K 2 ( C i 1 ) P i for 2 i m . En c K 1 , K 2 ( P ) = C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m , P i : = E K 2 ( C i 1 ) C i for 2 i m , P 1 = E K 1 ( N ) C 1 . De c K 1 , K 2 ( C ) = P 1 P m .
Theorem 4 directly implies the following theorem.
Theorem 5. 
If the function E is a quantum secure PRF, then C F B 2 is N-IND-qCPA secure.

5.2. OFB2 Mode

Similar to Section 5.1, we define the OFB2 scheme (Figure 10) as follows:
Definition 14 
(OFB2 Mode). Let K 1 , K 2 $ { 0 , 1 } k . For a given message P = P 1 P 2 P m and nonce N, where m is a polynomial in n, the symmetric encryption scheme O F B 2 is defined as follows:
  • Enc: R 0 = E K 1 ( N ) , R i = E K 2 ( R i 1 ) for 2 i m . Then C i = R i 1 P i for 1 i m . En c K 1 , K 2 ( P ) = C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m , C 0 = E K 1 ( N ) , P 1 = C 0 C 1 , P i : = E K 2 ( C i 1 ) C i for 2 i m . De c K 1 , K 2 ( C ) = P 1 P m .
Theorem 4 directly implies the following theorem.
Theorem 6. 
If the function E is a quantum secure PRF, then O F B 2 is N-IND-qCPA secure.

5.3. CTR2 Mode

Because each message block of CTR2 has nonce N as an input, directly referencing the conclusion of Theorem 4 would lead to a significant increase in the number of keys. Therefore, we consider making improvements in terms of the input. We divide the input into two parts, N and i , i = 1 , 2 , 3 , and concatenate them directly. Correspondingly, the length of the block cipher E K used at this time is 2 n , and the lengths of P i and C i are also 2 n . We define the N-IND-qCPA secure CTR2 scheme (Figure 11) as follows:
Definition 15 
(CTR2 Mode). Let K $ { 0 , 1 } k . For a given message P = P 1 P 2 P m and nonce N, where m is a polynomial in n, the symmetric encryption scheme C T R 2 is defined as follows:
  • Enc: C 0 = N and C i = E K ( C 0 i ) P i for 1 i m . En c K ( P ) = C 1 C m .
  • Dec: For a given ciphertext C = C 1 C m and C 0 = N , P i : = E K ( C 0 i ) C i for 1 i m . De c K ( C ) = P 1 P m .
For the CTR2 scheme, the following theorem holds:
Theorem 7. 
If the function E is a secure PRF, then C T R 2 is N-IND-qCPA secure.
Proof. 
We prove this proposition using the game-playing technique. (Table 3).
G 0 : The adversary is given oracle access to the quantum oracle of C T R 2 .
G i , 2 i m : We change the ith E to ideal random function f. Let A i be an adversary run to the quantum oracle of G i 1 or G i . Let B i be an adversary run to the classical oracle of E or random function f. Adversary B i starts by running A i and simulating the games G i 1 and G i for it. In order to simulate the calls to S 1 i , B i uses its own oracles from PRF game. Note that N is a classic number, and choosing a non-repeating N is easy. Then, adversary B i keeps track of all the sets appearing in the games G i 1 or G i and enforces the corresponding game rules. In the end, adversary B i returns the same bit that A i returns. Let A i make at most q quantum queries, then let B i make at most q quantum queries. It holds that
Adv G i 1 , G i qdist ( A i ) Adv E P R F ( B i ) .
For quantum states P, game G m returns the XOR value between a quantum message block and a classical random number. Therefore, game G m returns a random quantum state. It holds that
Adv G 0 , G m qdist ( A i ) Adv G 0 , G 1 qdist ( A i ) + Adv G 1 , G 2 qdist ( A i ) + + Adv G m 1 , G m qdist ( A i ) 1 i m Adv E P R F ( B i ) .
We note that CTR2 is a stream cipher, and the conclusion and proof of Theorem 7 can be correspondingly extended to stream ciphers.
Theorem 8. 
[Nonce-based stream cipher encryption is N-IND-qCPA] Let G be a secure nonce-based stream cipher, E n c K ( N , P ) = G K ( N ) P ; then, E n c K ( N , P ) is N-IND-qCPA secure.
Proof. 
The proof of this theorem is similar to Theorem 7. We prove this proposition using the game-playing technique. (Table 4).
G 0 : The adversary is given oracle access to the quantum oracle of E n c K ( N , P ) .
G 1 : We change G to an ideal random function f. Let A 1 be an adversary run to the quantum oracle of G 0 or G 1 . Let B 1 be an adversary run to the classical oracle of G or random function f. Similar to the previous proof, we have
Adv G 0 , G 1 qdist ( A 1 ) Adv G P R F ( B 1 ) .
G 2 : We change random function f to random S 1 $ { 0 , 1 } | G K ( N ) | . Let A 2 be an adversary run to the quantum oracle of G 1 or G 2 , and let
Adv G 1 , G 2 qdist ( A 2 ) = 0 .
Thus, we have
Adv G 0 , G 2 qdist ( A ) Adv G 0 , G 1 qdist ( A 1 ) + Adv G 1 , G 2 qdist ( A 2 ) Adv G P R F ( B 1 ) .
For quantum states P, game G 2 returns the XOR value between a quantum message block and a classical random number. Therefore, game G 2 returns a random quantum state, and E n c K ( N , P ) is N-IND-qCPA secure. □
Note that if OFB2 is also a stream cipher, the N-IND-qCPA security of O F B 2 (Theorem 6) can also be directly derived from Theorem 8.

6. Conclusions

The first contribution of this paper is a general conversion method from R-IND-qCPA to N-IND-qCPA security (Theorem 4). Specifically, if an encryption scheme E n c K 2 ( I V , P ) is R-IND-qCPA secure with random I V , then the construction E n c K 2 ( E K 1 ( N ) , P ) achieves N-IND-qCPA security with adaptive but non-repeating nonce N. Conceptually, this transformation encrypts the adaptive nonce once, thereby turning it into a random IV. As a direct application, CBC2 is proven N-IND-qCPA secure. We note, however, that this method generally incurs one additional encryption operation.
In contrast, for CFB and OFB, the situation is more favorable; since these schemes already involve encrypting the IV once, the additional operation can be merged. Thus, the modified variants CFB2 and OFB2 achieve N-IND-qCPA security without extra computational overhead, requiring only distinct keys for the initial block and the subsequent blocks.
Our final result establishes that nonce-based stream ciphers are inherently N-IND-qCPA secure (Theorem 8). If G is a secure nonce-based stream cipher, then G K ( N ) P satisfies N-IND-qCPA security. This can be understood as XORing quantum plaintext states with classical randomness. As a corollary, we derive the N-IND-qCPA secure version CTR2.
When compared to random IVs, nonces that are selectable yet non-repeating offer better alignment with practical deployment requirements. Future research should focus on extending these techniques to further enhance the N-IND-qCPA security of other IV-based encryption schemes. Meanwhile, integrating confidentiality with integrity to develop quantum-secure authenticated encryption schemes represents another important direction for future research.

Author Contributions

Conceptualization, P.W.; methodology, S.M.; writing—original draft, S.M.; writing—review and editing, P.W., Y.J. and G.L.; visualization, S.M. and B.L.; supervision, G.L. and B.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by National Key Laboratory of Security Communication Foundation (2024, 6142103042409) and the Fundamental Research Funds for the Central Universities (Grant Number: 3282025001).

Data Availability Statement

No new data were created or analyzed in this study. Data sharing is not applicable to this article.

Conflicts of Interest

The authors declare no conflicts of interest.

Abbreviations

The following abbreviations are used in this manuscript:
IND-CPAIndistinguishability under Chosen-Plaintext Attack
IND-qCPAIndistinguishability under quantum Chosen-Plaintext Attack
IVInitialization Vector
NNonce
R-IND-CPAIndistinguishability under Chosen-Plaintext Attack in the random-IV setting
N-IND-CPAIndistinguishability under Chosen-Plaintext Attack in the nonce setting
R-IND-qCPAIndistinguishability under quantum Chosen-Plaintext Attack in the random-IV setting
N-IND-qCPAIndistinguishability under quantum Chosen-Plaintext Attack in the nonce setting
CBCCipher Block Chaining
CFBCipher FeedBack Mode
OFBOutput FeedBack Mode
CTRCounTeR Mode

References

  1. Grover, L.K. A Fast Quantum Mechanical Algorithm for Database Search. In Proceedings of the Twenty-Eighth Annual ACM Symposium on the Theory of Computing, Philadelphia, PA, USA, 22–24 May 1996; pp. 212–219. [Google Scholar]
  2. Simon, D.R. On the Power of Quantum Computation. SIAM J. Comput. 1997, 26, 1474–1483. [Google Scholar] [CrossRef]
  3. Kuwakado, H.; Morii, M. Quantum distinguisher between the 3-round Feistel cipher and the random permutation. In Proceedings of the IEEE International Symposium on Information Theory, ISIT, Austin, TX, USA, 12–18 June 2010; pp. 2682–2685. [Google Scholar]
  4. Mao, S.; Guo, T.; Wang, P.; Hu, L. Quantum Attacks on Lai-Massey Structure. In Proceedings of the Post-Quantum Cryptography, PQCrypto 2022, Virtual, 28–30 September 2022; Volume 13512, pp. 205–229. [Google Scholar]
  5. Ito, G.; Hosoyamada, A.; Matsumoto, R.; Sasaki, Y.; Iwata, T. Quantum Chosen-Ciphertext Attacks Against Feistel Ciphers. In Proceedings of the Topics in Cryptology—CT-RSA 2019—The Cryptographers’ Track at the RSA Conference 2019, San Francisco, CA, USA, 4–8 March 2019; Volume 11405, pp. 391–411. [Google Scholar]
  6. Luo, Y.; Yan, H.; Wang, L.; Hu, H.; Lai, X. Study on block cipher structures against simon’s quantum algorithm. J. Cryptologic Res. 2019, 6, 561–573. (In Chinese) [Google Scholar]
  7. Kaplan, M.; Leurent, G.; Leverrier, A.; Naya-Plasencia, M. Breaking Symmetric Cryptosystems Using Quantum Period Finding. In Proceedings of the Advances in Cryptology—CRYPTO 2016, Santa Barbara, CA, USA, 14–18 August 2016; Volume 9815, pp. 207–237. [Google Scholar]
  8. Bhaumik, R.; Bonnetain, X.; Chailloux, A.; Leurent, G.; Naya-Plasencia, M.; Schrottenloher, A.; Seurin, Y. QCB: Efficient Quantum-Secure Authenticated Encryption. In Proceedings of the Advances in Cryptology—ASIACRYPT 2021, Singapore, 6–10 December 2021; pp. 668–698. [Google Scholar]
  9. Bonnetain, X.; Leurent, G.; Naya-Plasencia, M.; Schrottenloher, A. Quantum Linearization Attacks. In Proceedings of the Advances in Cryptology—ASIACRYPT 2021—27th International Conference on the Theory and Application of Cryptology and Information Security, Singapore, 6–10 December 2021, Proceedings, Part I; Tibouchi, M., Wang, H., Eds.; Lecture Notes in Computer Science; Springer: Berlin/Heidelberg, Germany, 2021; Volume 13090, pp. 422–452. [Google Scholar] [CrossRef]
  10. Maram, V.; Masny, D.; Patranabis, S.; Raghuraman, S. On the Quantum Security of OCB. IACR Trans. Symmetric Cryptol. 2022, 2022, 379–414. [Google Scholar] [CrossRef]
  11. Boneh, D.; Zhandry, M. Secure Signatures and Chosen Ciphertext Security in a Quantum Computing World. In Proceedings of the Advances in Cryptology—CRYPTO 2013, Santa Barbara, CA, USA, 18–22 August 2013; Volume 8043, pp. 361–379. [Google Scholar]
  12. Anand, M.V.; Targhi, E.E.; Tabia, G.N.; Unruh, D. Post-Quantum Security of the CBC, CFB, OFB, CTR, and XTS Modes of Operation. In Proceedings of the Post-Quantum Cryptography, PQCrypto 2016, Fukuoka, Japan, 24–26 February 2016; Volume 9606, pp. 44–63. [Google Scholar]
  13. Lang, N.; Leuther, J.; Lucks, S. Generic Composition: From Classical to Quantum Security. Cryptology ePrint Archive, Paper 2025/387. 2025. Available online: https://eprint.iacr.org/2025/387 (accessed on 3 October 2025).
  14. Bootsma, S.E.; De Vries, M. A Survey on the Quantum Security of Block Cipher-Based Cryptography. IEEE Access 2024, 12, 194711–194727. [Google Scholar] [CrossRef]
  15. Mao, S.; Guo, T.; Wang, P.; Xu, R.; Chen, Y.; Hu, L. A quantum-secure partial parallel MAC QPCBC. Des. Codes Cryptogr. 2024, 92, 4453–4486. [Google Scholar] [CrossRef]
  16. Adomnicai, A.; Minematsu, K.; Shikata, J. Lightweight Yet Nonce-Misuse Secure Authenticated Encryption for Very Short Inputs. IEEE Internet Things J. 2025, 12, 2807–2824. [Google Scholar] [CrossRef]
  17. Chethana, R.V.; Vrindavanam, J.; Roy, S.; Deshmukh, P.C. A Review of Block Ciphers and Its Post-Quantum Considerations. IEEE Access 2025, 13, 57834–57846. [Google Scholar] [CrossRef]
  18. Rogaway, P. Nonce-Based Symmetric Encryption. In Proceedings of the Fast Software Encryption, FSE 2004, Graz, Austria, 14–16 February 2004; Volume 3017, pp. 348–359. [Google Scholar]
Figure 1. Encryption modes ( m = 3 ).
Figure 1. Encryption modes ( m = 3 ).
Entropy 27 01194 g001
Figure 2. IND-CPA attack on CBC scheme.
Figure 2. IND-CPA attack on CBC scheme.
Entropy 27 01194 g002
Figure 3. IND-CPA attack on CFB scheme.
Figure 3. IND-CPA attack on CFB scheme.
Entropy 27 01194 g003
Figure 4. IND-CPA attack on OFB scheme.
Figure 4. IND-CPA attack on OFB scheme.
Entropy 27 01194 g004
Figure 5. IND-CPA attack on CTR scheme.
Figure 5. IND-CPA attack on CTR scheme.
Entropy 27 01194 g005
Figure 6. CBC2 scheme ( m = 3 ).
Figure 6. CBC2 scheme ( m = 3 ).
Entropy 27 01194 g006
Figure 7. CBC2 scheme and CBC scheme.
Figure 7. CBC2 scheme and CBC scheme.
Entropy 27 01194 g007
Figure 8. CFB2 scheme (standard construction with m = 3 ).
Figure 8. CFB2 scheme (standard construction with m = 3 ).
Entropy 27 01194 g008
Figure 9. CFB2 scheme (simplified construction with m = 3 ).
Figure 9. CFB2 scheme (simplified construction with m = 3 ).
Entropy 27 01194 g009
Figure 10. OFB2 scheme ( m = 3 ).
Figure 10. OFB2 scheme ( m = 3 ).
Entropy 27 01194 g010
Figure 11. CTR2 scheme ( m = 3 ).
Figure 11. CTR2 scheme ( m = 3 ).
Entropy 27 01194 g011
Table 1. R-IND-CPA, N-IND-CPA, R-IND-qCPA, N-IND-qCPA security of encryption schemes.
Table 1. R-IND-CPA, N-IND-CPA, R-IND-qCPA, N-IND-qCPA security of encryption schemes.
Encryption
Schemes
R-IND-CPAN-IND-CPAR-IND-qCPAN-IND-qCPARef.
CBCyesnoyesno[12], Section 3
CFByesnoyesno[12], Section 3
OFByesnoyesno[12], Section 3
CTRyesnoyesno[12], Section 3
CBC2yesyesyesyesSection 4
CFB2yesyesyesyesSection 5
OFB2yesyesyesyesSection 5
CTR2yesyesyesyesSection 5
Table 2. The games G 0 , G 1 and G 2 .
Table 2. The games G 0 , G 1 and G 2 .
Game G 0 Game G 1 Game G 2
InitializationInitializationInitialization
K 1 , K 2 $ { 0 , 1 } k K 1 , K 2 $ { 0 , 1 } k K 2 $ { 0 , 1 } k
On query  ( N , P ψ P | P ) On query  ( N , P ψ P | P ) On query  ( I V , P ψ P | P )
S 1 = E K 1 ( N ) S 1 = f K 1 ( N ) S 1 = I V
P , S 2 ψ P , S 2 | P , S 2 = P , S 2 ψ P , S 2 | P , S 2 = P , S 2 ψ P , S 2 | P , S 2 =
    P , S 2 ψ P , S 2 | P , S 2 E n c K 2 ( S 1 , P )     P , S 2 ψ P , S 2 | P , S 2 E n c K 2 ( S 1 , P )     P , S 2 ψ P , S 2 | P , S 2 E n c K 2 ( S 1 , P )
return S 2 ψ S 2 | S 2 return S 2 ψ S 2 | S 2 return S 2 ψ S 2 | S 2
Table 3. The games G 0 , G 1 ,…, G m .
Table 3. The games G 0 , G 1 ,…, G m .
Game G 0 Game G 1 Game G m
InitializationInitializationInitialization
K $ { 0 , 1 } k K $ { 0 , 1 } k K $ { 0 , 1 } k
On query  ( N , P ψ P | P ) On query  ( N , P ψ P | P ) On query  ( N , P ψ P | P )
S 1 1 = f K ( N 1 )
P 1 , S 2 1 ψ P 1 , S 2 1 | P 1 , S 2 1 =
    P 1 , S 2 1 ψ P 1 , S 2 1 | P 1 , S 2 1 S 1 1 P 1
for 1 i m for 2 i m for 1 i m
    S 1 i = E K ( N i )     S 1 i = E K ( N i )     S 1 i = f K ( N i )
    P i , S 2 i ψ P i , S 2 i | P i , S 2 i =     P i , S 2 i ψ P i , S 2 i | P i , S 2 i =     P i , S 2 i ψ P i , S 2 i | P i , S 2 i =
       P i , S 2 i ψ P i , S 2 i | P i , S 2 i S 1 i P i        P i , S 2 i ψ P i , S 2 i | P i , S 2 i S 1 i P i        P i , S 2 ψ P i , S 2 | P i , S 2 S 1 i P i
end forend forend for
return S 2 1 , , S 2 m ψ S 2 1 , , S 2 m | S 2 1 , , S 2 m return S 2 1 , , S 2 m ψ S 2 1 , , S 2 m | S 2 1 , , S 2 m return S 2 1 , , S 2 m ψ S 2 1 , , S 2 m | S 2 1 , , S 2 m
Table 4. The games G 0 , G 1 and G 2 .
Table 4. The games G 0 , G 1 and G 2 .
Game G 0 Game G 1 Game G 2
InitializationInitializationInitialization
K $ { 0 , 1 } k K $ { 0 , 1 } k K $ { 0 , 1 } k
On query ( N , P ψ P | P ) On query ( N , P ψ P | P ) On query ( N , P ψ P | P )
S 1 = G K ( N ) S 1 = f K ( N ) S 1 $ { 0 , 1 } | G K ( N ) |
P , S 2 ψ P , S 2 | P , S 2 = P , S 2 ψ P , S 2 | P , S 2 = P , S 2 ψ P , S 2 | P , S 2 =
    P , S 2 ψ P , S 2 | P , S 2 S 1 P     P , S 2 ψ P , S 2 | P , S 2 S 1 P     P , S 2 ψ P , S 2 | P , S 2 S 1 P
return S 2 ψ S 2 | S 2 return S 2 ψ S 2 | S 2 return S 2 ψ S 2 | S 2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Mao, S.; Wang, P.; Jia, Y.; Liu, G.; Liu, B. Quantum Security of Nonce-Based Encryption. Entropy 2025, 27, 1194. https://doi.org/10.3390/e27121194

AMA Style

Mao S, Wang P, Jia Y, Liu G, Liu B. Quantum Security of Nonce-Based Encryption. Entropy. 2025; 27(12):1194. https://doi.org/10.3390/e27121194

Chicago/Turabian Style

Mao, Shuping, Peng Wang, Yan Jia, Gang Liu, and Bing Liu. 2025. "Quantum Security of Nonce-Based Encryption" Entropy 27, no. 12: 1194. https://doi.org/10.3390/e27121194

APA Style

Mao, S., Wang, P., Jia, Y., Liu, G., & Liu, B. (2025). Quantum Security of Nonce-Based Encryption. Entropy, 27(12), 1194. https://doi.org/10.3390/e27121194

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop