Next Article in Journal
Trusted and Secure Blockchain-Based Durable Medium Electronic Service
Previous Article in Journal
A Searchable Encryption Scheme with Biometric Authentication and Authorization for Cloud Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Quantum Identity-Based Encryption from the Learning with Errors Problem

1
State Key Laboratory of Information Security, Institute of Information Engineering, Chinese Academy of Sciences, Beijing 100093, China
2
School of Cyber Security, University of Chinese Academy of Sciences, Beijing 100049, China
*
Authors to whom correspondence should be addressed.
Cryptography 2022, 6(1), 9; https://doi.org/10.3390/cryptography6010009
Submission received: 18 January 2022 / Revised: 1 February 2022 / Accepted: 10 February 2022 / Published: 16 February 2022

Abstract

:
To prevent eavesdropping and tampering, network security protocols take advantage of asymmetric ciphers to establish session-specific shared keys with which further communication is encrypted using symmetric ciphers. Commonly used asymmetric algorithms include public key encryption, key exchange, and identity-based encryption (IBE). However, network security protocols based on classic identity-based encryption schemes do not have perfect forward secrecy. To solve this problem, we construct the first quantum IBE (QIBE) scheme based on the learning with errors (LWE) problem, which is also the first cryptographic scheme that applies the LWE problem to quantum encryption. We prove that our scheme is fully secure under the random oracle model and highlight the following advantages: (1) Network security protocols with our QIBE scheme provide perfect forward secrecy. The ciphertext is transmitted in the form of a quantum state unknown to the adversary and cannot be copied and stored. Thus, in network security protocols based on QIBE construction, the adversary does not have any previous quantum ciphertext to decrypt for obtaining the previous session key, even if the private identity key is threatened. (2) Classic key generation centre (KGC) systems can still be used in the QIBE scheme to generate and distribute private identity keys, reducing the cost when implementing this scheme. The classic KGC systems can be used because the master public and secret keys of our scheme are both in the form of classic bits. Finally, we present quantum circuits to implement this QIBE scheme and analyse its required quantum resources for given numbers of qubits, Hadamard gates, phase gates, T gates, and CNOT (controlled-NOT) gates. One of our main findings is that the quantum resources required by our scheme increase linearly with the number of plaintext bits to be encrypted.

1. Introduction

Identity-based encryption (IBE) is an advanced form of public key encryption, and the notion of IBE was first proposed by Shamir in 1984 [1]. In the IBE scheme, the public key is directly calculated from the receiver’s identity i d R , which may be a phone number, email address, or network address, and the corresponding private identity key s k i d R is generated by a trusted key generation centre (KGC), which owns the master public key mpk and the master secret key msk . When the sender wants to send a message m to the receiver, the sender encrypts the message to obtain a ciphertext c t = Encrypt ( mpk , i d R , m ; r ) , where r is a random number. After receiving the ciphertext c t , the receiver can decrypt it and obtain the message m = Decrypt ( s k R , c t ) . Compared with a public key infrastructure (PKI)-based cryptographic system, an identity-based cryptographic system avoids the high cost of storing and managing public key certificates, simplifies the process of public key management, and reduces the pressure on the system. Therefore, identity-based cryptosystems have been widely developed and applied.
The first practical IBE scheme was proposed by Boneh et al. in 2001 [2], and it was followed by numerous other classic IBE schemes. These classic IBE schemes can be divided into three categories: based on elliptic curve bilinear pairings [2,3,4], based on quadratic residue [5,6,7,8], and based on lattices [9,10,11,12,13]. With the development of quantum computers and quantum algorithms, especially the Shor algorithm [14], the security of IBE schemes based on elliptic curve bilinear pairings and quadratic residue has been seriously threatened. As there is currently no quantum algorithm that can solve lattice-based problems, the construction of lattice-based IBE schemes has become a major research area for cryptographers.
One of the main applications of IBE is the construction of network security protocols, such as the Chinese SSL VPN technology specification [15]. In the IBE-based security protocol, the receiver sends its identity i d R and mpk to the sender, and the sender chooses a s e s s i o n K e y and sends its ciphertext to the receiver. The receiver decrypts the ciphertext to obtain the s e s s i o n K e y . Subsequently, both the sender and the receiver can own this secret session key s e s s i o n K e y with which further communication is encrypted using a symmetric cipher. The entire procedure is briefly described in Figure 1. A security protocol is said to provide perfect forward secrecy [16] if the compromise of long-term keys does not compromise past session keys that were established before the compromise of the long-term key. In security protocols based on classic IBE, all session keys and their ciphertexts are in the form of classic bits. A patient attacker can capture the conversations and store the ciphertexts of the session keys, whose confidentiality is protected by a private identity key (which is the long-term key of the network security protocol based on IBEs) and wait until the long-term key is threatened. Once the patient attacker obtains the long-term key, the attacker can decrypt the ciphertexts of all previous session keys. Ultimately, all encrypted communications and sessions recorded in the past can be retrieved. Therefore, the security protocols based on the classic IBE scheme do not have perfect forward secrecy. This naturally leads to the following question:
Can we construct a fully secure IBE scheme with which the network security protocol can provide perfect forward secrecy?

1.1. Our Contributions

To solve this problem, considering that an adversary cannot replicate an unknown quantum state [17], we propose the notion of quantum identity-based encryption (QIBE) and construct the first QIBE scheme based on the learning with errors (LWE) problem. Then, we prove that our scheme is fully secure under the random oracle model. Our scheme possesses the following advantages:
  • Network security protocols with our QIBE scheme provide perfect forward secrecy. The ciphertext is transmitted in the form of a quantum state that is unknown to the adversary, who cannot duplicate the ciphertext. Thus, in security protocols based on QIBE construction, even if the private identity key is threatened, the adversary does not possess the previous ciphertexts of session keys to decrypt, and therefore cannot threaten the security of the previous session keys. Therefore, security protocols based on QIBE construction have perfect forward secrecy.
  • The classic KGC system can still be used for QIBE schemes to generate and distribute private identity keys, reducing the cost of implementing this scheme. The classic KGC system can be used because the Setup , KeyGen algorithms of our scheme are classic, and the master public and secret keys of our scheme are both in the form of classic bits.
Finally, we present quantum circuits to implement this QIBE scheme and establish its required quantum resource estimates for given numbers of qubits, Hadamard gates, phase gates, T gates, and CNOT gates. One of our primary findings is that the quantum resources required by our scheme increase linearly with the number of plaintext bits to be encrypted.

1.2. Outline of the Paper

The remainder of this paper is organised as follows: In Section 2, we present the necessary background for the paper, including quantum computation, lattices, and classic IBE. In Section 3, we first present the definition of QIBE; then, we describe the concrete construction of the scheme and analyse its correctness, and finally, prove the security of the scheme and discuss its advantages. In Section 4, we discuss the specific quantum circuit implementation for the QIBE scheme and estimate the quantum resources needed. In Section 5, we summarise our work, discuss the drawbacks of our scheme, and suggest directions for future work.

2. Preliminaries

2.1. Quantum Computation

In this section, we briefly discuss the basic concepts used in this work. Please refer to [18] for a more detailed introduction to quantum computing. “ ( · ) ¯ ” is defined as the bit-flip of “ ( · ) ”, such as 0 ¯ = 1 , 1 ¯ = 0 , and 101 ¯ = 010 . We begin by introducing some quantum gates.
Fundamental gates. The fundamental gate set we use comprises the NOT gate, the CNOT gate, the CNOT variant gate, the Toffoli (two-controlled NOT) gate, and the Fredkin gate. These four gates are shown in Figure 2. One CNOT variant gate can be obtained by a CNOT gate and two NOT gates. The Fredkin gate is also known as a three-qubit controlled swap gate, that is, if the control qubit is in state | 1 , the two target qubits swap their states; otherwise, they remain in their initial states if the control qubit is in state | 0 . One Fredkin gate can be constructed from one Toffoli gate and two CNOT gates.
Complex Gates. We use four complex gates (Figure 3): the first gate is the -controlled-NOT gate, which can be decomposed into ( 2 3 ) Toffoli gates, the second gate is the variant of the -controlled-NOT gate, which can also be decomposed into ( 2 3 ) Toffoli gates, the third gate is the -combination-CNOT gate, which is a combination of CNOT gates, and the last gate is the -Fredkin gate, which can be constructed from Toffoli gates and 2 CNOT gates.
Quantum Basic Circuits.Figure 4f depicts the controlled copy circuit in which copying the integer d into the quantum register is controlled by | ctrl . If the controlled bit | ctrl = | 0 , the output of the controlled copy circuit is ( | ctrl , | 0 ) . Otherwise, the output is ( | ctrl , | d ) . The output of the controlled copy circuit is ( | ctrl , | ctrl · d ) . We denote the controlled copy circuit by CCopy ( | ctrl , d ) when this algorithm takes a qubit | ctrl and an -bit number d as input. According to the conclusion in [19], copying an integer uses only NOT gates so that a controlled copy circuit only uses CNOT gates. Suppose that d is a uniform integer in { 0 , 1 , , 2 1 } ; then, the controlled copy circuit uses approximately / 2 CNOT gates, where = log d + 1 .
Quantum Arithmetic Circuits. We introduce some quantum arithmetic circuits, including addition, subtraction, modular addition, modular subtraction, and comparison, and describe the corresponding quantum resources required, including the number of qubits and the number of CNOT gates and Toffoli gates. To simplify the description, we only show the simplified form of these quantum arithmetic circuits.
  • Addition and subtraction: Cuccaro et al. [20] proposed a quantum addition circuit. The quantum addition achieves the addition of two registers, that is,
    | a , b | a , a + b .
    To prevent overflows caused by the carry, the second register (initially loaded in state | b ) should be sufficiently large, i.e., if both a and b are encoded on qubits, the second register should be of size + 1 . In the addition circuit, the last carry is the most significant bit of the result and is written in the + 1 -th qubit of the second register. As a result of the reversibility of unitary operations, by reversing the addition circuit, i.e., applying each gate of the circuit in the reversed order, the subtraction circuit is obtained. The addition and subtraction circuits are shown in ( a ) and ( b ) of Figure 4, respectively. In this paper, a circuit with a bar on the left side represents the reversed sequence of elementary gates embedded in the same circuit with the bar on the right side.
    In the subtraction circuit, with the input ( | a , | b ) , the output produces ( | a , | a b ) when a b . When a < b , the output is ( | 2 ( b a ) ) , where the size of the second register is + 1 . i.e.,
    | a , b | a , a b , for a b . | a , b | a , 2 ( b a ) , for a < b .
    When a < b , the significant qubit, that is, the + 1 -th qubit of the second register, which indicates whether an overflow occurred in the subtraction, always contains 1. We denote the addition circuit by Add ( | a , | b ) when this algorithm takes two -qubit states | a and | b as input. Similarly, we denote the subtraction circuit by Sub ( | a , | b ) when this algorithm takes two -qubit states | a and | b as input. To calculate the addition or subtraction of two -bit inputs, a total of 2 + 2 qubits, 2 Toffoli gates, and 4 + 1 CNOT gates are required.
  • Addition and subtraction module q: Liu et al. [21] improved Roetteler’s [22] quantum modular addition circuit and reduced the number of quantum gates required. This quantum circuit produces
    | a , b | a , ( a + b ) mod q ,
    where 0 a , b < q . The simplified form of the addition module q circuit is shown in Figure 4c. The modular subtraction can be obtained by reversing the modular addition circuit, and its bar is on the left-hand side. We denote the modular addition circuit by AddMod ( | a , | b ) when this algorithm takes two log q -qubit states | a and | b as input. Similarly, we denote the modular subtraction circuit by SubMod ( | a , | b ) when this algorithm takes two log q -qubit states | a and | b as input. To calculate the addition or subtraction module q of two log q -bit inputs, a total of 3 · log q + 3 qubits, 8 · log q Toffoli gates, 13 · log q + 6 CNOT gates are required.
  • Comparison: Markov et al. [23] constructed a quantum comparison circuit by comparing | a and | b based on whether the highest bit of | a b is | 0 or | 1 . This circuit is obtained by modifying the previous subtraction circuit so that it outputs only the highest bit of | a b . The comparison circuit achieves the comparison of two registers, that is
    | a , b | 0 | a , b | 0 , for a b . | a , b | 0 | a , b | 1 , for a < b .
    The simplified form of the quantum comparison circuit is shown in Figure 4e. We denote the comparison circuit by Comp ( | a , | b ) when this algorithm takes two -qubit states | a and | b as input. To compare two -bit inputs | a and | b , a total of 2 + 2 qubits, 2 Toffoli gates, and 4 + 1 CNOT gates are required.

2.2. Lattices

Let X and Y be two random variables over some finite set S X , S Y , respectively. The statistical distance Δ ( X , Y ) between X and Y is defined as
Δ ( X , Y ) = 1 2 s S X S Y Pr [ X = s ] Pr [ Y = s ] .
For integer q 2 , Z q denotes the quotient ring of integer modulo q. We use bold capital letters to denote matrices, such as A , B , and bold lowercase letters to denote column vectors, such as x , y . The notation A denotes the transpose of the matrix A .
Let S be a set of vectors, S = { s 1 , , s n } in R m ˜ . We use S ˜ = { s ˜ 1 , , s ˜ n } to denote the Gram–Schmidt orthogonalisation of the vectors s 1 , , s n in that order and S to denote the length of the longest vector in S . For positive integers q , n , m ˜ with q prime, and a matrix A Z q n × m ˜ , the m ˜ -dimensional integer lattices are defined as follows: Λ q ( A ) = { y : y = A s for some s Z n } and Λ q ( A ) = { y : A y = 0 mod q } . Moreover, for u Z q n , the set of syndromes is defined as Λ q u ( A ) = { y : u = A y mod q } .
For x Λ , define the Gaussian function ρ s , c ( x ) over Λ Z m ˜ centred at c R m ˜ with parameter s > 0 as ρ s , c ( x ) = exp ( π | | x c | | / s 2 ) . Let ρ s , c ( Λ ) = x Λ ρ s , c ( x ) , and define the discrete Gaussian distribution over Λ as D Λ , s , c ( x ) = ρ s , c ( x ) ρ s , c ( Λ ) , where x Λ . For simplicity, ρ s , 0 and D Λ , s , 0 are abbreviated as ρ s and D Λ , s , respectively.
Lemma 1
(Adopted from [9,24,25]). Let q , n , m ˜ be positive integers with q 2 and q prime. There exist the following PPT (probabilistic polynomial-time) algorithms:
  • TrapGen ( m ˜ , n , q ) : a randomised algorithm that, when m ˜ 6 n log q , outputs a pair ( A , T A ) Z q n × m ˜ × Z m ˜ × m ˜ such that A is 2 Ω ( n ) close to uniform in Z q n × m ˜ and T A is a basis of Λ q ( A ) , satisfying T A ˜ O ( n log q ) with overwhelming probability.
  • SampleD ( A , T A , u , σ ) : a randomised algorithm that, given a full rank matrix A Z q n × m ˜ ,a basis T A of Λ q ( A ) , a vector u Z q n and σ T A ˜ · ω ( log m ˜ ) , outputs a vector r Z q m ˜ sampled from a distribution 2 Ω ( n ) close to D Λ q u ( A ) , σ .
Discrete Gaussian Lemmas. The following lemmas are used to manipulate and obtain meaningful bounds on discrete Gaussian vectors.
Lemma 2
(Adopted from [9], Lemma 5.2). Let n, m ˜ , q be positive integers such that m ˜ 2 n log q and q is prime. Let σ be any positive real number such that σ n + log m ˜ . Then, for all but a 2 Ω ( n ) fraction of A Z q n × m ˜ , the distribution of u = Ar m o d q for r D Z m ˜ , σ is 2 Ω ( n ) -close to uniform distribution over Z q n . Furthermore, for a fixed u Z q n , the conditional distribution of r D Z m ˜ , σ , given Ar = u m o d q is D Λ q u ( A ) , σ .
The Learing with Errors Problem. The security of our construction is based on the LWE problem. The LWE problem is a hard problem based on lattices defined by Regev [26]. It is stated as follows: given an input ( A , d ) , where A Z q n × m ˜ for any m ˜ = p o l y ( n ) , integer q 2 is prime, and d Z q m ˜ is either of the form d = ( A s + e ) mod q for s Z q n and e D Z m ˜ , σ or is uniformly random (and independent of A ), distinguish which is the case, with non-negligible advantage. Regev proved that the LWE problem is as hard as approximating standard lattice problems in the worst case using a quantum algorithm.

2.3. Classic Identity-Based Encryption

A classic identity-based encryption scheme consists of the following four algorithms:
  • KeyGen ( 1 λ ) ( mpk , msk ) . The key generation algorithm takes a security parameter 1 λ as input. It outputs a master public key mpk and a master secret key msk .
  • Extract ( mpk , msk , i d ) s k i d . The key extraction algorithm takes a master public key mpk , a master secret key msk , and an identity i d as input. It outputs a private identity key s k i d . We assume that i d is implicitly included in s k i d .
  • Encrypt ( mpk , i d , m ; r ) c t . The encryption algorithm takes a master public key mpk , an identity i d , and the message m as input. It outputs a ciphertext c t .
  • Decrypt ( s k i d , c t ) m . The decryption algorithm takes the master public key mpk , the private identity key s k i d , and the ciphertext c t as input. It outputs the message m. Correctness. For all ( mpk , msk ) $ KeyGen ( 1 λ ) , all identities i d I D , all messages m, and all c Encrypt ( mpk , i d , m ; r ) , we have
    Pr [ Decrypt ( mpk , s k i d , c t ) = m ] = 1 negl ( λ ) .
    Security. The security game is defined by the following experiment, which is played by a challenger and an adversary A :
  • The challenger runs KeyGen to generate ( mpk , msk ) . It gives mpk to the adversary A .
  • The adversary A adaptively requests keys for any identity i d i of its choice. The challenger responds with the corresponding secret key s k i d i , which it generates by running Extract ( mpk , msk , i d i ) .
  • The adversary A submits two messages of equal length, m 0 and m 1 , and a challenge identity i d * with the restriction that i d * is not equal to any identity requested in the previous phase. The challenger picks β $ { 0 , 1 } , encrypts m β under i d * by running the encryption algorithm, and sends the ciphertext to the adversary A .
  • A continues to issue key queries for any identity i d i as in step (2) with the restriction that i d i i d * .
  • The adversary A outputs a guess β for β .
The advantage Adv A IBE ( λ ) of an adversary A is defined as
Adv A IBE ( λ ) = Pr [ β = β ] 1 / 2 .
Definition 1.
An IBE scheme is fully secure if for all probabilistic polynomial-time adversaries A , Adv A IBE ( λ ) is a negligible function in λ.

3. QIBE and Its Construction

3.1. Definition of QIBE

We begin by defining a primitive for identity-based encryption schemes in which some elements may belong to a quantum space.
Definition 2.
We say that an identity-based encryption scheme IBE is a quantum identity-based encryption (QIBE) scheme if there exists at least one quantum algorithm in its algorithms that include KeyGen , Extract , Encrypt , and Decrypt .
Note that the classification of QIBE can be analogous to that of quantum public key encryption [27] and a quantum symmetric-encryption scheme [28]. Since each algorithm in the QIBE schemes could be either classic or quantum, there exist only fifteen types of QIBE schemes in total.

3.2. Our Construction

Then, we design a QIBE scheme by utilising the proposed classic IBE scheme [9] and prove its security based on the LWE problem.
In our QIBE scheme, KeyGen and Extract are classic algorithms while Encrypt and Decrypt are quantum algorithms. To make it easier to distinguish between classic IBE and QIBE, we denote our scheme as QIBE , and our QIBE scheme consists of one tuple ( QKeyGen , QExtract , QEncrypt , QDecrypt ) . Let integer parameters n = O ( λ ) , m ˜ = O ( n ) , σ = O ( n 0.5 ) , q = O ( m ˜ 3.5 ) as specified in [9], where λ is a security parameter.
  • QKeyGen : (1) It runs TrapGen ( m ˜ , n , q ) to obtain a uniformly random n × m ˜ matric A Z q n × m ˜ and T A Z q m ˜ × m ˜ which is a good basis for Λ q ( A ) . (2) Then, it selects a hash function H : { 0 , 1 } n Z q n , which maps an identity to a vector. (3) Finally, it outputs mpk = ( A , q , m ˜ , n , H ) and msk = ( T A ) . (4) In summary, QKeyGen ( λ , q , m ˜ , n ) ( mpk = ( A , q , m ˜ , n , H ) , msk = ( T A ) ) .
  • QExtract : (1) On input mpk , msk and an identity i d { 0 , 1 } n , it computes u = H ( i d ) and generates s k i d = r such that r = SampleD ( A , T A , u , σ ) . It is clear that u = A r mod q . (2) In summary, QExtract ( msk , mpk , i d ) s k i d = r .
  • QEncrypt : (1) On input of an identity i d , mpk , and a bit quantum superposition state | ϕ = m { 0 , 1 } α m | m , it first computes u = H ( i d ) and chooses a uniformly random s Z q n , e 0 D Z , σ and e D Z m ˜ , σ . (2) Then, it sets x = ( u s + e 0 ) mod q and c 1 = ( A s + e ) mod q . More procedures are performed as follows:
    Step 1: Taking | ϕ = m { 0 , 1 } α m | m and q 2 as input, it runs CCopy ( | ϕ , q 2 ) and gets
    m { 0 , 1 } α m | m | m · q 2 .
    Step 2: Taking the second register of the above result and x as input, it runs AddMod and obtains
    m { 0 , 1 } α m | m | ( m · q 2 + x ) mod q .
    Step 3: Finally, taking the two registers of the above result as input, it runs the unentanglement quantum circuit (which is described in Section 4, and we denote it by Unentangle ) to obtain
    | ψ = m { 0 , 1 } α m | ( m · q 2 + x ) mod q .
    (3) In summary, QEncrypt ( i d , | ϕ ) ( c t = ( | ψ , c 1 ) ) .
  • QDecrypt : To decrypt a ciphertext ( | ψ , c 1 ) using an identity secret key s k i d = r , it computes y = r c 1 mod q Z q . Then, more processes are performed as follows:
    Step 1: Taking | ψ = m { 0 , 1 } α m | ( m · q 2 + x ) mod q and | y as input, it runs SubMod ( | ψ , | y ) to obtain
    m { 0 , 1 } α m | ( m · q 2 + x y ) mod q .
    Step 2: Taking the above result and q 2 as input, it runs SubAbs ( SubAbs is a quantum circuit, which takes two -qubit quantum states | a and | b as input and outputs the absolute value of their subtraction, i.e., | Abs ( a b ) ) to obtain
    m { 0 , 1 } α m | Abs ( ( m · q 2 + x y ) mod q q 2 ) .
    Please refer to Section 4.1 for more information about SubAbs .
    Step 3: Taking the above result and q 4 as input, it runs Comp to obtain
    m { 0 , 1 } α m | Abs ( ( m · q 2 + x y ) mod q q 2 ) | m .
    Next, the algorithm QDecrypt will unentangle the first and second registers of this quantum state.
    Step 4: Taking the first register of the above result and q 2 as input, it runs InvSubAbs (The InvSubAbs (which is the inverse of SubAbs ) is a quantum circuit which takes in two -qubit quantum states | Abs ( a b ) and | b as input and outputs one -qubit quantum state, i.e., | a ) to obtain
    m { 0 , 1 } α m | ( m · q 2 + x y ) mod q | m .
    Please refer to Section 4.1 for more information about the inverse of SubAbs .
    Step 5: Taking the first register of the above result and | y as input, it runs AddMod to obtain
    m { 0 , 1 } α m | ( m · q 2 + x ) mod q | m .
    Step 6: Taking the second register of the above result and q 2 as the input, it runs CCopy to obtain
    m { 0 , 1 } α m | ( m · q 2 + x ) mod q | m | m · q 2 .
    Step 7: Taking the first register and the third register of the above result as input, it runs SubMod to obtain
    m { 0 , 1 } α m | x mod q | m | m · q 2 .
    Finally, the algorithm QDecrypt unentangles the second and third registers of the above result.
    Step 8: Taking the third register of the above result and q 2 as input, it performs the inverse of the controlled copy circuit to obtain
    m { 0 , 1 } α m | x mod q | m | 0 .
    The quantum state m { 0 , 1 } α m | m is no longer entangled with other registers and the decryption procedure is completed. In summary,
    QDecrypt ( i d , mpk , r , ( | ψ , c 1 ) ) | ϕ = m { 0 , 1 } α m | m .

3.3. Correctness

Considering a ciphertext
( | ψ , c 1 ) = m { 0 , 1 } α m | ( m · q 2 + x ) mod q , ( A s + e ) mod q
of a qubit quantum superposition state | ϕ = m { 0 , 1 } α m | m , it can be observed that | ψ = m { 0 , 1 } α m | c 0 , where c 0 = ( x + m · q 2 ) mod q = u s + e 0 + m · q 2 mod q . In step 2 of QDecrypt , it is clear that
Abs x + q 2 · m mod q y mod q q 2 = Abs c 0 y mod q q 2 ,
which is equal to the absolute value of b in the Decrypt of Theorem A1, i.e., Abs ( b ) . Finally, in step 3 of QDecrypt , we compare Abs ( b ) with q 4 and obtain m. According to Theorem A1, the decryption algorithm Decrypt with the identity secret key s k i d = r i d can decrypt the ciphertext ( c 0 , c 1 ) correctly with a probability of 1 negl ( λ ) . Therefore, the decryption algorithm QDecrypt with the identity secret key s k i d = r i d can decrypt the ciphertext c t = ( | ψ , c 1 ) correctly with a probability of 1 negl ( λ ) .

3.4. Security Proof

Theorem 1.
The above QIBE scheme is fully secure in the random oracle model under the LWE assumption, namely, for any classical PPT adversary A making at most Q H random oracle queries to H and Q ID identity secret key queries, there exists a classical PPT algorithm B such that
Adv A QIBE ( λ ) Q H · Adv B LWE ( λ ) + ( Q H + Q ID + 1 ) · 2 Ω ( n ) .
Proof of Theorem 1.
Without loss of generality, we make some simplifying assumptions about A . First, we assume that whenever A queries a secret key or asks for a challenge ciphertext, the corresponding i d has already been queried to the random oracle H . Second, we assume that A makes the same query for the same random oracle at most once. Third, we assume that A does not repeat secret key queries for the same identity more than once. We show the security of the scheme via the following games. In each game, we define X i as the event that the adversary A wins in Game i .
Game 0 : This is a real security game. At the beginning, ( A , T A ) TrapGen ( 1 n , 1 m , q ) is run, and the adversary A is given A . Then, the challenger samples β { 0 , 1 } and keeps it secret. During the game, A may make random oracle queries, secret key queries, and the challenge query. These queries are handled as follows:
  • Hash queries: When A makes a random oracle query to H on i d , the challenger chooses a random vector u i d Z q n and locally stores the tuple ( i d , u i d , ) , and returns u i d to A .
  • Identity secret key queries: When A queries an identity secret key for i d , the challenger uses the algorithm SampleD , which takes A , T A , σ , u i d as input to compute r i d and returns r i d to A .
  • Challenge ciphertext: When the adversary A submits two messages m 0 0 , 1 α m 0 | m 0 and m 1 0 , 1 α m 1 | m 1 of equal length and a challenge identity i d * with the restriction that i d * is not equal to any identity requested in the previous phase, the challenger picks β $ { 0 , 1 } , and encrypts m β { 0 , 1 } α m β | m β under i d * by running the encryption algorithm QEncrypt to get c t * = ( | ψ , c 1 ) , where | ψ = m β { 0 , 1 } α m β | ( m β · q 2 + x ) mod q and c 1 = ( A s + e ) mod q and x = u s + e 0 mod q . Then, the ciphertext c t * is sent to A .
At the end of the game, A outputs a guess β for β . Finally, the challenger outputs β . By definition, we have
| Pr [ X 0 ] 1 2 | = | Pr [ β = β ] 1 2 | = Adv A QIBE ( λ ) .
Game 1 : In this game, we change the way the random oracle queries to H are answered.
  • Hash queries: When A queries the random oracle H on i d , the challenger generates a pair ( u i d , r i d ) by first sampling r i d $ D Z m ˜ , σ and setting u i d = A · r i d . Then, it locally stores the tuple ( i d , u i d , ) and returns u i d to A .
  • Identity secret key queries: When A makes an identity secret key query for i d , the challenger uses the algorithm SampleD , which takes A , T A , σ , u i d as input to compute r i d and returns r i d to A .
  • Challenge ciphertext: The same as that in the Game 0 .
Note that r i d is independent of r i d , which was generated in the simulation of the random oracle H on input i d . Due to Lemma 2, the distribution of u i d in Game 1 is 2 Ω ( n ) -close to that of Game 0 except for 2 Ω ( n ) fraction of A as we choose σ > n + log m ˜ . Therefore, we have
| Pr [ X 1 ] Pr [ X 0 ] | = Q H · 2 Ω ( n ) .
Game 2 : In this game, we change the way identity secret key queries are answered. By the end of this game, the challenger will no longer require the trapdoor T A to generate the identity secret keys.
  • Hash queries: When A queries the random oracle on i d , the challenger generates a pair ( u i d , r i d ) as in the previous game. Then, it locally stores the tuple ( i d , u i d , r i d ) and returns u i d to A .
  • Identity secret key queries: When A queries an identity secret key for i d , the challenger retrieves the unique tuple ( i d , u i d , r i d ) from the local storage and returns r i d .
  • Challenge ciphertext: The same as that in the Game 1 .
For any fixed u i d , let r i d , 1 and r i d , 2 be random variables that are distributed according to the distributions of s k i d conditional on H ( i d ) = u i d in Game 1 and Game 2 , respectively. Owing to Lemma 1, we have Δ ( r i d , 1 , D Λ q u ( A ) , σ ) 2 Ω ( n ) . Owing to Lemma 2, we have Δ ( r i d , 2 , D Λ q u ( A ) , σ ) 2 Ω ( n ) . Then, we obtain Δ ( r i d , 1 , r i d , 2 ) 2 Ω ( n ) . Therefore, we have
| Pr [ X 2 ] Pr [ X 1 ] | = Q ID · 2 Ω ( n ) .
Game 3 : In this game, we change the way the matrix A is generated. Specifically, the challenger chooses A $ Z q n × m ˜ without generating the associated trapdoor T A .
  • Hash queries: The same as that in the Game 2 .
  • Identity secret key queries: The same as that in the Game 2 .
  • Challenge ciphertext: The same as that in the Game 2 .
By Lemma 1, this makes only 2 Ω ( n ) -statistical difference. As the challenger can answer all the secret key queries without the trapdoor owing to the change made in the previous game, the view of A is altered only by 2 Ω ( n ) . Therefore, we have
| Pr [ X 3 ] Pr [ X 2 ] | = 2 Ω ( n ) .
Game 4 : In this game, we change the way the random oracle queries to H are answered and the challenge ciphertext is created. The challenger chooses an index i * $ [ Q H ] and a vector u Z q n uniformly at random.
  • Hash queries: On A ’s j -th distinct query i d j to H , the challenger does the following: if j = i * , then locally stores the tuple ( i d j , u , ) and returns u to A . Otherwise, for j i * , the challenger selects r i d j and computes u i d j = A r i d j ; then, it locally stores the tuple ( i d j , u i d j , r i d j ) and returns u i d j to A .
  • Identity secret key queries: The same as that in the Game 3 .
  • Challenge ciphertext: When A produces a challenge identity i d * (distinct from all its identity secret key queries) and messages m 0 { 0 , 1 } α m 0 | m 0 , m 1 { 0 , 1 } α m 1 | m 1 , assume without loss of generality that A already queried H on i d * . If i d * i d i * , i.e., if the tuple ( i d i * , u , ) is not in the local storage, then the challenger ignores the output of A and aborts the game (we denote this event as abort ). Otherwise, i.e., if the abort does not occur (we denote this event as abort ¯ ), the challenger picks β $ { 0 , 1 } and encrypts m β { 0 , 1 } α m β | m β under i d * by running the encryption algorithm QEncrypt to obtain c t * = ( | ψ , c 1 ) , where | ψ = m β { 0 , 1 } α m β | ( m β · q 2 + x ) mod q and c 1 = ( A s + e ) mod q , and x = u s + e 0 mod q . Then, the ciphertext c t * is sent to the adversary A .
Conditional on the challenger not aborting, we affirm that the view it provides to A in Game 4 is statistically close to that in Game 3 . Therefore, we have
Pr [ X 4 abort ¯ ] = Pr [ X 3 abort ¯ ] .
By a standard argument, the probability that the challenger does not abort during the simulation is 1 Q H (this is proved by considering a game in which the challenger can answer all identity secret key queries, so that the value of i * is perfectly hidden from A ). Therefore, we have
Pr [ abort ¯ ] = 1 Q H .
Game 5 : In this game, we change the way the challenge ciphertext is created.
  • Hash queries: The same as that in the Game 4 .
  • Identity secret key queries: The same as that in the Game 4 .
  • Challenge ciphertext: When A produces a challenge identity i d * (distinct from all its identity secret key queries) and messages m 0 { 0 , 1 } α m 0 | m 0 , m 1 { 0 , 1 } α m 1 | m 1 , assume without loss of generality that A already queried H on i d * . If i d * i d i , i.e., if the tuple ( i d i , u , ) is not in the local storage, then the challenger ignores the output of A and aborts the game. Otherwise, i.e., if the abort does not occur, the challenger picks β $ { 0 , 1 } and encrypts m β { 0 , 1 } α m β | m β under i d * using two random vectors b $ Z q , b $ Z q m to obtain c t * = ( | ψ , c 1 ) , where | ψ = m β { 0 , 1 } α m β | ( m β · q 2 + x ) mod q and c 1 = b , and x = b . Then, the ciphertext c t * is sent to the adversary A .
It can be seen that if A , u , c 1 , x are valid LWE samples (i.e., c 1 = ( A s + e ) mod q and x = u s + e 0 mod q ), the view of the adversary corresponds to Game 4 . Otherwise (i.e., c 1 $ Z q m ˜ , x $ Z q ), it corresponds to Game 5 . Therefore, we have
Pr [ X 5 abort ¯ ] Pr [ X 4 abort ¯ ] Adv B LWE ( λ ) .
Note that c 1 , x is statistically close to the uniform distribution over Z q m ˜ × Z q , so that
Pr [ X 5 abort ¯ ] = 1 2 .
According to Equations (6)–(9), we can obtain
Pr [ X 3 abort ¯ ] 1 2 Q H · Adv B LWE ( λ ) .
Then, because abort ¯ is independent of X 3 , we get
Pr [ X 3 ] 1 2 Q H · Adv B LWE ( λ ) .
Finally, according to Equations (2)–(5) together with Equation (10), we obtain Equation (1). □

3.5. Advantages of Our QIBE

The proposed QIBE scheme has two main advantages. One is that the network security protocol based on our QIBE scheme has perfect forward secrecy, and the other is that the QIBE scheme can still use the KGC system to generate and distribute private identity keys, thus reducing the cost when this scheme is implemented.
  • A fundamental fact in quantum information theory is that unknown or random quantum states cannot be replicated [17]. The probability amplitude and corresponding basis state of ciphertext | ψ = m { 0 , 1 } α m | ( m · q 2 + x ) mod q are unknown to the adversary, so the ciphertext | ψ is an unknown quantum state and cannot be replicated during transmission. When attempting to attack our QIBE-based network security protocol, an attacker cannot copy and store the ciphertext of the session key, which is encrypted by a private identity key (called a long-term key). Thus, the attacker does not have the quantum ciphertext of the previous session key to decrypt, and the security of the previous session key will not be threatened even if the attacker obtains the long-term key. In other words, all encrypted communications and sessions recorded in the past cannot be retrieved. Therefore, the security protocol based on our QIBE has perfect forward secrecy, which cannot be achieved by the security protocol based on classic IBE.
  • In our QIBE scheme, the KGC uses the algorithms QKeyGen and QExtract to generate the private identity key s k i d when it takes as input a master public key mpk , a master secret key msk , and an identity i d . The key observation is that both the input ( λ , q , m ˜ , n ) and the output ( mpk = ( A , q , m ˜ , n , H ) , msk = ( T A ) ) of QKeyGen are in the form of classic bits, and so are the input ( msk , mpk , i d ) and the output ( s k i d = r ) of QExtract . Therefore, the classic KGC system can still be used in our QIBE scheme to generate and distribute private identity keys, reducing the cost when this scheme is implemented.

4. Quantum Circuit Realisation

The realisation of a quantum scheme requires describing the corresponding quantum circuit. To analyse the realisability of our QIBE scheme, we begin by providing details for the quantum circuits of QEncrypt and QDecrypt , and then, we analyse the complexity of these two quantum circuits.

4.1. Quantum Circuit

Note that the algorithms QKeyGen and QExtract of QIBE are classic, so there is no need to construct quantum circuits for these two algorithms.
The Quantum Circuit of QEncrypt . The main part of QEncrypt is the unentangled quantum circuit Unentangle . Taking an additional quantum state | ( q 2 + x ) mod q as input, Unentangle can transform m { 0 , 1 } α m | m | ( m · q 2 + x ) mod q to a non-entangled quantum state | ψ = m { 0 , 1 } α m | ( m · q 2 + x ) mod q , as shown in Figure 5a. The correctness of Unentangle can be proven by the following facts.
  • On input | ( m · q 2 + x ) mod q , | ( q 2 + x ) mod q and | m , the initial output where the number 1 is located is | ( ( m · q 2 + x ) mod q ) ( q 2 + x ) mod q ) , | ( q 2 + x ) mod q and | m . This is because only one log q -combination-CNOT operation is performed.
  • The output where the number 2 is located is | ( ( m · q 2 + x ) mod q ) ( q 2 + x ) mod q ) , | ( q 2 + x ) mod q and | 0 . This is because only one log q -controlled-NOT variant operation is performed, in which the control bits are | ( ( m · q 2 + x ) mod q ) ( q 2 + x ) mod q ) and the target bit is | m . If | m = | 1 , the control bits are log q -qubit | 0 , and the target qubit | m will change to | 0 . Otherwise, the control bits are not equal to log q -qubit | 0 , and the target qubit | m is | 0 all the time.
  • The final output where the number 3 is located is | ( m · q 2 + x ) mod q , | ( q 2 + x ) mod q and | 0 . Only one log q -combination-CNOT operation is performed, in which the control bits are | ( q 2 + x ) mod q and the target bits are | ( ( m · q 2 + x ) mod q ) ( q 2 + x ) mod q ) ; therefore, it can obtain | ( m · q 2 + x ) mod q .
Note that one unentangled quantum circuit is composed of two log q -combination-CNOT gates and one log q -controlled-NOT variant gate. Thus, one unentangled quantum circuit is composed of 2 · log q CNOT gates and 2 log q 3 Toffoli gates.
Using the unentangled quantum circuit Unentangle , we can provide details for the quantum circuit of QEncrypt , which is depicted in Figure 5b. Note that one QEncrypt is composed of one controlled copy circuit, one modular addition circuit, and one unentangled quantum circuit. To encrypt one qubit, a total of 4 · log q + 4 qubits, 10 · log q 3 Toffoli gates and 15.5 · log q + 6 CNOT gates are required.
The Quantum Circuit of QDecrypt . The main part of QDecrypt is SubAbs and the inverse of SubAbs . In the SubAbs circuit, with the input ( | a , | b , | 0 ) , the output will produce ( | a , | Abs ( a b ) , | 0 ) when a b . When a < b , the output is ( | b , | Abs ( a b ) , | 1 ) .
| a , b , 0 | a , a b , 0 , for a b . | a , b , 0 | b , b a , 1 , for a < b .
On the inverse of the SubAbs circuit, i.e., InvSubAbs , with the input ( | a , | a b , | 0 ) , the output will produce ( | a , | b , | 0 ) when a b . When a < b , the input is ( | b , | b a , | 1 ) and the output is ( | a , | b , | 0 ) .
| a , a b , 0 | a , b , 0 , for a b . | b , b a , 1 | a , b , 0 , for a < b .
The quantum circuit of SubAbs is depicted in Figure 6, and the correctness of the quantum circuit SubAbs can be easily verified. As a result of the reversibility of unitary operations, by reversing the circuit of SubAbs , that is, by applying each gate of the circuit in the reversed order, the quantum circuit of InvSubAbs can be obtained.
Note that one SubAbs is composed of one comparison circuit and one subtraction quantum circuit. To compute the absolute value of the subtraction of two -bit inputs | a and | b , a total of 2 + 4 qubits, 5 Toffoli gates, and 10 + 2 CNOT gates are required. The conclusion is also applicable to the inverse of SubAbs , that is, InvSubAbs .
Using the quantum circuit SubAbs and its reverse InvSubAbs , we can provide particulars for the quantum circuit of QDecrypt which is depicted in Figure 7. Note that one QDecrypt is composed of two subtraction modular circuits, one quantum circuit of SubAbs , one comparison quantum circuit, one quantum circuit of InvSubAbs , one modular addition circuit, and two controlled copy quantum circuits. To decrypt one ciphertext that encrypts one qubit, a total of 6 · log q + 5 qubits, 36 · log q Toffoli gates, and 64 · log q + 23 CNOT gates are required.

4.2. Complexity Analysis

To measure the complexity of a quantum circuit, we should consider the quantum resources required by the circuit.
Quantum resources. When analysing the complexity of a quantum circuit, a gate set that arises frequently and that has been studied often in the literature, but by no means the only conceivable gate set, is the so-called Clifford+T gate set. This gate set consists of the Hadamard gate, the phase gate, and the controlled NOT (CNOT) gate, along with the T gate. The Clifford+T gate set is known to be universal [18]. This comes from that any unitary operator can be accurately expressed using single-qubit gates and CNOT gates [29], and Hadamard gates, phase gates, and T gates can used to approximate any single-qubit gates with arbitrary precision [18]. In conclusion, these four types of quantum gates form a universal quantum gate group. As a result, when assessing the complexity of a quantum circuit, we need to compute the number of needed Hadamard gates, phase gates, CNOT gates, and T gates.
Quantum resources needed by QEncrypt and QDecrypt . In Section 4.1, we have concluded the following:
  • QEncrypt : To encrypt one qubit, a total of 4 · log q + 4 qubits, 10 · log q 3 Toffoli gates, and 15.5 · log q + 6 CNOT gates are required.
  • QDecrypt : To decrypt one ciphertext that encrypts one qubit, a total of 6 · log q + 5 qubits, 36 · log q Toffoli gates, and 64 · log q + 23 CNOT gates are required.
According to [30], one Toffoli gate can be broken down into two Hadamard gates, one phase gate, seven T gates, and six CNOT gates. Furthermore, to save quantum resources, auxiliary bits can be reused according to the sequence of calculations in each circuit [19]. Based on the previous results and analysis, we estimate the quantum resources needed when encrypting one qubit quantum state m { 0 , 1 } α m | m with the algorithm QEncrypt and decrypting the corresponding ciphertext with the algorithm QDecrypt in our QIBE scheme, including the number of qubits and the number of Hadamard, phase, T, and CNOT gates. The result is shown in Table 1.
Note that our QIBE scheme can encrypt one qubit at a time. By integrating our scheme and the IBE scheme encrypting n-bit message (The IBE scheme is described in Appendix A), we can easily construct a new QIBE that can encrypt n-qubit at a time. It is evident that the quantum resources required by this new QIBE scheme increase linearly with the number of plaintext bits to be encrypted.

5. Conclusions and Future Work

In this paper, we proposed the first QIBE scheme based on the learning with errors problem. Then, we proved that our scheme is fully secure under the random oracle model. Furthermore, we explained that our scheme possesses the following advantages:
  • The network security protocol with our QIBE scheme provides perfect forward secrecy. The ciphertext is transmitted in the form of a quantum state that is unknown to the adversary and cannot be copied and stored. Thus, in network security protocols based on our QIBE construction, the adversary cannot have access to any previous quantum ciphertext to decrypt and obtain the previous session key, even if the private identity key is threatened.
  • Classic KGC systems still can be used in our QIBE scheme to generate and distribute private identity keys, thus reducing the cost when this scheme is implemented. The classic KGC systems can be used because the master public and secret keys of our scheme are both in the form of classic bits.
Finally, to analyse the realisability of this QIBE scheme, we provided particulars for the quantum circuits of QEncrypt and QDecrypt , and we analysed their required quantum resources for given numbers of qubits, Hadamard gates, phase gates, T gates, and CNOT gates. We concluded that the quantum resources required by our scheme increase linearly with the number of plaintext bits to be encrypted.
As aforementioned, network security protocols based on our QIBE scheme have forward secrecy, unlike the classic IBE. However, our QIBE scheme has certain drawbacks. In terms of quantum circuit realisation, we do not yet have a method to obtain the optimal circuit and find the lower bound of the quantum resources required by this scheme. Furthermore, this construction is a theoretical achievement, and any practical application remains a distant goal before the advent of universal quantum computers.
Our scheme is one of fifteen types of QIBE schemes described in Section 3.1, and the other fourteen types are yet to be studied. Therefore, the focus of our next work is to study and design the other fourteen types of QIBE schemes and their quantum circuit implementations, and to explore ways to find the lower bound of the quantum resources required by these schemes. Moreover, to make our scheme more practical, our next work includes making an implementation in Q# and providing a Github repository for it.

Author Contributions

Conceptualisation, W.G. and L.Y.; methodology, W.G.; formal analysis, D.Z; writing—original draft preparation, W.G; writing—review and editing, W.G., D.Z. and X.L.; supervision, L.Y.; funding acquisition, L.Y. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported by the National Natural Science Foundation of China (Grant No. 61672517), National Natural Science Foundation of China (Key Program, Grant No. 61732021).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

Appendix A. Classic IBE Scheme

IBE encrypting one-bit message. In [9], Gentry et al. proposed the first lattice-based IBE scheme IBE = ( KeyGen , Extract , Encrypt , Decrypt ) from the learning with errors problem. In this scheme, let integer parameters n = O ( λ ) , m ˜ = O ( n ) , σ = O ( n 0.5 ) , q = O ( m ˜ 3.5 ) , where λ is a security parameter. This scheme can encrypt one bit once, and it can also encrypt n bits at a time. At first, we show the scheme which can encrypt one bit.
  • KeyGen : (1) It runs TrapGen ( m ˜ , n , q ) to obtain a uniformly random n × m ˜ matric A Z q n × m ˜ and T A Z q m ˜ × m ˜ which is a good basis for Λ q ( A ) . (2) Then, it selects a hash function H : { 0 , 1 } n Z q n which maps an identity to a vector. (3) Finally, it outputs mpk = ( A , q , m ˜ , n , H ) and msk = ( T A ) . (4) In summary, KeyGen ( λ , q , m ˜ , n ) ( mpk = ( A , q , m ˜ , n , H ) , msk = ( T A ) ) .
  • Extract : (1) On input mpk , msk and an identity i d { 0 , 1 } n , it computes u = H ( i d ) and generates s k i d = r such that r = SampleD ( A , T A , u , σ ) . It is clear that u = A r mod q . (2) In summary, Extract ( msk , mpk , i d ) s k i d = r .
  • Encrypt : (1) On input of an identity i d , mpk , and a bit message m { 0 , 1 } , it first computes u = H ( i d ) and chooses a uniformly random s Z q n , e 0 D Z , σ and e D Z m ˜ , σ . (2) Then, it computes x = ( u s + e 0 ) mod q and c 1 = ( A s + e ) mod q , and sets c t = ( c 0 , c 1 ) , where c 0 = x + q 2 · m mod q . (3) In summary, Encrypt ( i d , mpk , m ) c t = ( c 0 , c 1 ) .
  • Decrypt : (1) To decrypt a ciphertext c t = ( c 0 , c 1 ) using an identity secret key s k i d = r , it computes y = r c 1 mod q . (2) Then, it computes
    b = c 0 y mod q q 2 .
    (3) Furthermore, it treats b as an integer in Z , and sets m = 1 if Abs ( b ) < q 4 ; otherwise, m = 0 . (4) Finally, it returns the plaintext m. (5) In summary, Decrypt ( i d , mpk , s k i d , c t ) m .
Theorem A1.
Let integer parameters n = O ( λ ) , m ˜ = O ( n ) , σ = O ( n 0.5 ) , q = O ( m ˜ 3.5 ) . Consider a cipertext
( c 0 , c 1 ) = u s + e 0 + q 2 · m , A s + e m o d q
of one bit message m. Then, the decryption algorithm Decrypt with the identity secret key s k i d = r can decrypt the ciphertext c t correctly with a probability 1 negl ( λ ) .
IBE encrypting n-bit message. Then, we show the scheme that can encrypt more than one bit at a time.
  • KeyGen : (1) It runs TrapGen ( m ˜ , n , q ) to obtain a uniformly random n × m ˜ matric A Z q n × m ˜ and T A Z q m ˜ × m ˜ which is a good basis for Λ q ( A ) . (2) Then, it selects a hash function H : { 0 , 1 } n Z q n × n which maps an identity to a matrix. (3) Finally, it outputs mpk = ( A , q , m ˜ , n , H ) and msk = ( T A ) . (4) In summary, KeyGen ( λ , q , m ˜ , n ) ( mpk = ( A , q , m ˜ , n , H ) , msk = ( T A ) ) .
  • Extract : (1) On input mpk , msk , and an identity i d { 0 , 1 } n , it computes U = H ( i d ) which is an n × n -matrix. (2) It takes advantage of the algorithm SampleD to generate the identity secret key s k i d = R such that R is composed of r i = SampleD ( A , T A , u i , σ ) where u i is the i-th column of U . It is easy to see that U = A R mod q . (3) In a word, Extract ( msk , mpk , i d ) s k i d = R .
  • Encrypt : (1) On input of an identity i d , mpk , and one n-bit message m { 0 , 1 } n , it first computes U = H ( i d ) and chooses a uniformly random s Z q n , e 0 D Z n , σ and e D Z m ˜ , σ . (2) Then, it computes x = U s + e 0 and c 1 = ( A s + e ) mod q , and sets c t = ( c 0 , c 1 ) , where c 0 = x + q 2 · m mod q . (3) In summary, Encrypt ( i d , mpk , m ) c t = ( c 0 , c 1 ) .
  • Decrypt : (1) To decrypt a ciphertext c t = ( c 0 , c 1 ) using an identity secret key s k i d = R , it computes y = R c 1 mod q . (2) Then, it computes
    b = c 0 y mod q q 2 · ( 1 , 1 , , 1 ) .
    (3) Furthermore, it treats each coordinate of b = ( b 1 , , b n ) as an integer in Z , and sets m i = 1 if Abs ( b i ) < q 4 , else m i = 0 . (4) Finally, it returns the plaintext m . (5) In a word, Decrypt ( i d , mpk , s k i d , c t ) m .
Theorem A2.
Let integer parameters n = O ( λ ) , m ˜ = O ( n ) , σ = O ( n 0.5 ) , q = O ( m ˜ 3.5 ) . Consider a cipertext
( c 0 , c 1 ) = U s + e 0 + q 2 · m , A s + e m o d q
of n-bit message m . Then, the decryption algorithm Decrypt with the identity secret key s k i d = R can decrypt the ciphertext c t correctly with a probability 1 negl ( λ ) .

References

  1. Shamir, A. Identity-Based Cryptosystems and Signature Schemes. In Advances in Cryptology, Proceedings of CRYPTO; Springer: Berlin/Heidelberg, Germany, 1984; Volume 196, pp. 47–53. [Google Scholar]
  2. Boneh, D.; Franklin, M.K. Identity-Based Encryption from the Weil Pairing. In Advances in Cryptology—CRYPTO 2001; Springer: Berlin/Heidelberg, Germany, 2001; Volume 2139, pp. 213–229. [Google Scholar]
  3. Boneh, D.; Boyen, X. Efficient Selective-ID Secure Identity-Based Encryption Without Random Oracles. In Advances in Cryptology—EUROCRYPT 2004; Springer: Berlin/Heidelberg, Germany, 2004; Volume 3027, pp. 223–238. [Google Scholar]
  4. Waters, B. Efficient Identity-Based Encryption Without Random Oracles. In Advances in Cryptology—EUROCRYPT 2005; Springer: Berlin/Heidelberg, Germany, 2005; Volume 3494, pp. 114–127. [Google Scholar]
  5. Cocks, C.C. An Identity Based Encryption Scheme Based on Quadratic Residues. In Cryptography and Coding, 8th IMA International Conference; Springer: Berlin/Heidelberg, Germany, 2001; Volume 2260, pp. 360–363. [Google Scholar]
  6. Boneh, D.; Gentry, C.; Hamburg, M. Space-Efficient Identity Based Encryption Without Pairings. In Proceedings of the 48th Annual IEEE Symposium on Foundations of Computer Science (FOCS’07), Providence, RI, USA, 21–23 October 2007; pp. 647–657. [Google Scholar]
  7. Jhanwar, M.P.; Barua, R. A Variant of Boneh-Gentry-Hamburg’s Pairing-Free Identity Based Encryption Scheme. In Information Security and Cryptology; Springer: Berlin/Heidelberg, Germany, 2008; Volume 5487, pp. 314–331. [Google Scholar]
  8. Joye, M. Identity-Based Cryptosystems and Quadratic Residuosity. In Public-Key Cryptography; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9614, pp. 225–254. [Google Scholar]
  9. Gentry, C.; Peikert, C.; Vaikuntanathan, V. Trapdoors for hard lattices and new cryptographic constructions. In Proceedings of the 40th Annual Symposium on Theory of Computing, Victoria, BC, Canada, 17–20 May 2008; pp. 197–206. [Google Scholar]
  10. Cash, D.; Hofheinz, D.; Kiltz, E.; Peikert, C. Bonsai Trees, or How to Delegate a Lattice Basis. In Advances in Cryptology—EUROCRYPT 2010; Springer: Berlin/Heidelberg, Germany, 2010; Volume 6110, pp. 523–552. [Google Scholar]
  11. Agrawal, S.; Boneh, D.; Boyen, X. Efficient Lattice (H)IBE in the Standard Model. In Advances in Cryptology—EUROCRYPT 2010; Gilbert, H., Ed.; Springer: Berlin/Heidelberg, Germany, 2010; Volume 6110, pp. 553–572. [Google Scholar] [CrossRef] [Green Version]
  12. Xie, X.; Xue, R.; Zhang, R. Deterministic Public Key Encryption and Identity-Based Encryption from Lattices in the Auxiliary-Input Setting. In Security and Cryptography for Networks; Springer: Berlin/Heidelberg, Germany, 2012; Volume 7485, pp. 1–18. [Google Scholar]
  13. Yamada, S. Adaptively Secure Identity-Based Encryption from Lattices with Asymptotically Shorter Public Parameters. In Advances in Cryptology—EUROCRYPT 2016; Springer: Berlin/Heidelberg, Germany, 2016; Volume 9666, pp. 32–62. [Google Scholar]
  14. Shor, P.W. Polynomial-Time Algorithms for Prime Factorization and Discrete Logarithms on a Quantum Computer. SIAM J. Comput. 1997, 26, 1484–1509. [Google Scholar] [CrossRef] [Green Version]
  15. Chinese-State-Cryptography-Administration. Chinese SSL VPN Technology Specification. Available online: http://gmbz.org.cn/main/viewfile/20180110021416665180.html (accessed on 1 January 2022).
  16. Van Oorschot, P.C.; Menezes, A.J.; Vanstone, S.A. Handbook of Applied Cryptography; CRC Press: Boca Raton, FL, USA, 1996. [Google Scholar]
  17. Wootters, W.K.; Zurek, W.H. A single quantum cannot be cloned. Nature 1982, 299, 802–803. [Google Scholar] [CrossRef]
  18. Nielsen, M.A.; Chuang, I. Quantum Computation and Quantum Information; American. Assoc. Phys. Teach. 2002, 70, 558–559. [Google Scholar]
  19. Häner, T.; Jaques, S.; Naehrig, M.; Roetteler, M.; Soeken, M. Improved quantum circuits for elliptic curve discrete logarithms. In International Conference on Post-Quantum Cryptography; Springer: Berlin/Heidelberg, Germany, 2020; pp. 425–444. [Google Scholar]
  20. Cuccaro, S.A.; Draper, T.G.; Kutin, S.A.; Moulton, D.P. A new quantum ripple-carry addition circuit. arXiv 2004, arXiv:0410184. [Google Scholar]
  21. Liu, X.; Yang, H.; Yang, L. CNOT-count optimized quantum circuit of the extended Shor’s algorithm for ECDLP. arXiv 2021, arXiv:2112.11358. [Google Scholar]
  22. Roetteler, M.; Naehrig, M.; Svore, K.M.; Lauter, K. Quantum resource estimates for computing elliptic curve discrete logarithms. In Proceedings of the International Conference on the Theory and Application of Cryptology and Information Security, Hong Kong, China, 3–7 December 2017; pp. 241–270. [Google Scholar]
  23. Markov, I.L.; Saeedi, M. Constant-Optimized Quantum Circuits for Modular Multiplication and Exponentiation. Quantum Inf. Comput. 2012, 12, 361–394. [Google Scholar] [CrossRef]
  24. Ajtai, M. Generating Hard Instances of the Short Basis Problem; Springer: Berlin/Heidelberg, Germany, 1999; pp. 1–9. [Google Scholar]
  25. Alwen, J.; Peikert, C. Generating Shorter Bases for Hard Random Lattices; STACS Schloss Dagstuhl–Leibniz-Zentrum für Informatik: Dagstuhl, Germany, 2009; pp. 75–86. [Google Scholar]
  26. Regev, O. On lattices, learning with errors, random linear codes, and cryptography. STOC 2005, 56, 84–93. [Google Scholar]
  27. Wu, C.; Yang, L. A complete classification of quantum public-key encryption protocols. In Electro-Optical and Infrared Systems; International Society for Optics and Photonics: Bellingham, WA, USA, 2015; Volume 9648, p. 964818. [Google Scholar]
  28. Xiang, C.; Yang, L.; Peng, Y.; Chen, D. The classification of quantum symmetric-key encryption protocols. In Quantum and Nonlinear Optics III; International Society for Optics and Photonics: Bellingham, WA, USA, 2014; Volume 9269, p. 926909. [Google Scholar]
  29. Deutsch, D. Quantum theory, the Church–Turing principle and the universal quantum computer. Proc. R. Soc. Lond. A Math. Phys. Sci. 1985, 400, 97–117. [Google Scholar]
  30. Amy, M.; Maslov, D.; Mosca, M.; Roetteler, M. A meet-in-the-middle algorithm for fast synthesis of depth-optimal quantum circuits. IEEE Trans. Comput.-Aided Des. Integr. Circuits Syst. 2013, 32, 818–830. [Google Scholar] [CrossRef] [Green Version]
Figure 1. Security protocols based on IBE. The “Hello” message means that the sender wants to communicate with the receiver.
Figure 1. Security protocols based on IBE. The “Hello” message means that the sender wants to communicate with the receiver.
Cryptography 06 00009 g001
Figure 2. Fundamental gates. The CNOT gate is shown in (a); the CNOT variant gate is shown in (b); the Toffoli gate is shown in (c); and the Fredkin gate is shown in (d).
Figure 2. Fundamental gates. The CNOT gate is shown in (a); the CNOT variant gate is shown in (b); the Toffoli gate is shown in (c); and the Fredkin gate is shown in (d).
Cryptography 06 00009 g002
Figure 3. Complex gates. The -controlled-NOT gate is shown in (a); the variant of the -controlled-NOT gate is shown in (b); the -combination-CNOT gate is shown in (c); and the -Fredkin gate is shown in (d).
Figure 3. Complex gates. The -controlled-NOT gate is shown in (a); the variant of the -controlled-NOT gate is shown in (b); the -combination-CNOT gate is shown in (c); and the -Fredkin gate is shown in (d).
Cryptography 06 00009 g003
Figure 4. Some quantum basic and arithmetic circuits. In the Figure, (a) shows the addition circuit while (b) shows the subtraction circuit; (c) depicts the modular addition circuit while (d) depicts the modular subtraction circuit; (e) illustrates the comparison circuit; and the controlled copy circuit is shown in (f).
Figure 4. Some quantum basic and arithmetic circuits. In the Figure, (a) shows the addition circuit while (b) shows the subtraction circuit; (c) depicts the modular addition circuit while (d) depicts the modular subtraction circuit; (e) illustrates the comparison circuit; and the controlled copy circuit is shown in (f).
Cryptography 06 00009 g004
Figure 5. The quantum circuits of Unentangle and QEncrypt . In this figure, (a) shows the Unentangle circuit, and (b) depicts the QEncrypt circuit.
Figure 5. The quantum circuits of Unentangle and QEncrypt . In this figure, (a) shows the Unentangle circuit, and (b) depicts the QEncrypt circuit.
Cryptography 06 00009 g005
Figure 6. The quantum circuit of SubAbs .
Figure 6. The quantum circuit of SubAbs .
Cryptography 06 00009 g006
Figure 7. The quantum circuit of QDecrypt .
Figure 7. The quantum circuit of QDecrypt .
Cryptography 06 00009 g007
Table 1. Quantum resource.
Table 1. Quantum resource.
Quantum Resource QEncrypt QDecrypt
Qubit 4 · log q + 4 6 · log q + 5
Hadamard gate 20 · log q 6 72 · log q
phase gate 10 · log q 3 36 · log q
T gate 70 · log q 21 252 · log q
CNOT gate 75.5 · log q 12 280 · log q + 23
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Gao, W.; Yang, L.; Zhang, D.; Liu, X. Quantum Identity-Based Encryption from the Learning with Errors Problem. Cryptography 2022, 6, 9. https://doi.org/10.3390/cryptography6010009

AMA Style

Gao W, Yang L, Zhang D, Liu X. Quantum Identity-Based Encryption from the Learning with Errors Problem. Cryptography. 2022; 6(1):9. https://doi.org/10.3390/cryptography6010009

Chicago/Turabian Style

Gao, Wenhua, Li Yang, Daode Zhang, and Xia Liu. 2022. "Quantum Identity-Based Encryption from the Learning with Errors Problem" Cryptography 6, no. 1: 9. https://doi.org/10.3390/cryptography6010009

Article Metrics

Back to TopTop