CN114640449B - Multi-user high-dimensional quantum privacy block query method - Google Patents
Multi-user high-dimensional quantum privacy block query method Download PDFInfo
- Publication number
- CN114640449B CN114640449B CN202210320072.9A CN202210320072A CN114640449B CN 114640449 B CN114640449 B CN 114640449B CN 202210320072 A CN202210320072 A CN 202210320072A CN 114640449 B CN114640449 B CN 114640449B
- Authority
- CN
- China
- Prior art keywords
- quantum
- sequence
- bob
- alice
- measurement
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 45
- 238000010845 search algorithm Methods 0.000 claims abstract description 8
- 238000005259 measurement Methods 0.000 claims description 134
- ZPUCINDJVBIVPJ-LJISPDSOSA-N cocaine Chemical compound O([C@H]1C[C@@H]2CC[C@@H](N2C)[C@H]1C(=O)OC)C(=O)C1=CC=CC=C1 ZPUCINDJVBIVPJ-LJISPDSOSA-N 0.000 claims description 72
- 239000002245 particle Substances 0.000 claims description 61
- 230000008569 process Effects 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 16
- 230000003993 interaction Effects 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 claims description 8
- 230000009466 transformation Effects 0.000 claims description 8
- 239000000284 extract Substances 0.000 claims description 3
- 238000011084 recovery Methods 0.000 claims description 3
- 238000006243 chemical reaction Methods 0.000 claims description 2
- 239000004744 fabric Substances 0.000 claims description 2
- 230000008707 rearrangement Effects 0.000 description 6
- 238000013479 data entry Methods 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0852—Quantum cryptography
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0819—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s)
- H04L9/083—Key transport or distribution, i.e. key establishment techniques where one party creates or otherwise obtains a secret value, and securely transfers it to the other(s) involving central third party, e.g. key distribution center [KDC] or trusted third party [TTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0816—Key establishment, i.e. cryptographic processes or cryptographic protocols whereby a shared secret becomes available to two or more parties, for subsequent use
- H04L9/0852—Quantum cryptography
- H04L9/0858—Details about key distillation or coding, e.g. reconciliation, error correction, privacy amplification, polarisation coding or phase coding
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Electromagnetism (AREA)
- Theoretical Computer Science (AREA)
- Optical Communication System (AREA)
Abstract
Description
技术领域Technical Field
本发明属于量子计算和量子信息领域,具体涉及一种多用户的高维量子隐私块查询方法。The present invention belongs to the field of quantum computing and quantum information, and in particular relates to a multi-user high-dimensional quantum privacy block query method.
背景技术Background Art
隐私信息检索旨在保护用户的个人隐私,当用户访问数据库时,数据库并不知道Alice感兴趣的是哪个数据条目。同样对于数据库来说,数据库不想让用户获得更多的隐私信息。对于经典对称隐私信息检索(Symmetrical Private Information Retrieval,SPIR),该协议不仅能保护用户隐私,还能保证Alice除了能访问感兴趣的那个数据条目以外不能访问其它任何信息。Private information retrieval aims to protect the user's personal privacy. When a user accesses the database, the database does not know which data entry Alice is interested in. Similarly, the database does not want users to obtain more private information. For classic symmetric private information retrieval (SPIR), the protocol can not only protect user privacy, but also ensure that Alice cannot access any information other than the data entry she is interested in.
Giovannetti等人将经典的对称私有信息检索协议(SPIR)拓展到量子世界,提出了第一个基于酉操作的量子隐私查询协议(GLM)。在该协议中,使用酉操作将数据信息编码到检索态上。用户访问数据库使用两个量子态,一个量子态用于信息查询,另外一个量子态用于查询数据库是否存在欺骗行为,用来保证两方的隐私和安全。GLM协议使用了欺骗敏感策略检测数据库Bob是否窃取了用户Alice的隐私信息。Giovannetti et al. extended the classical symmetric private information retrieval protocol (SPIR) to the quantum world and proposed the first quantum privacy query protocol (GLM) based on unitary operation. In this protocol, unitary operation is used to encode data information into the retrieval state. Users use two quantum states to access the database, one quantum state is used for information query, and the other quantum state is used to query the database for deception, which is used to ensure the privacy and security of both parties. The GLM protocol uses a deception-sensitive strategy to detect whether the database Bob has stolen the private information of the user Alice.
Jakobi等人提出了使用SARG04量子密钥分配协议的实用性QPQ协议。这个协议主要有三个步骤:首先,Alice和Bob协商出不对称的初始密钥,即Alice仅知道密钥的一部分,Bob知道所有密钥;然后,通过按位加对密钥进行稀释,旨在减少Alice对密钥知道的信息,得到最终密钥;最后,用户方通过最终密钥查询到自己想要的信息。Jakobi et al. proposed a practical QPQ protocol using the SARG04 quantum key distribution protocol. This protocol has three main steps: first, Alice and Bob negotiate an asymmetric initial key, that is, Alice only knows part of the key and Bob knows all the keys; then, the key is diluted by bitwise addition to reduce the information Alice knows about the key and obtain the final key; finally, the user can query the information he wants through the final key.
综上可知,量子隐私查询协议主要分为两类:一种是基于酉操作的量子隐私查询协议,一种是基于量子密钥分配的量子隐私查询协议。但是第一种协议的难以应用在大型数据库当中,因为高维的酉操作在量子计算机中难以实现。第二种协议大多数只考虑了单用户和单比特数据信息的查询,实用性和效率性差。In summary, quantum privacy query protocols are mainly divided into two categories: one is a quantum privacy query protocol based on unitary operations, and the other is a quantum privacy query protocol based on quantum key distribution. However, the first protocol is difficult to apply to large databases because high-dimensional unitary operations are difficult to implement in quantum computers. Most of the second protocols only consider the query of single-user and single-bit data information, which is poor in practicality and efficiency.
发明内容Summary of the invention
为解决以上现有技术存在的问题,本发明提出了一种多用户的高维量子隐私块查询方法,该方法包括:构建多用户量子隐私块查询系统,该系统包括查询用户{Alice1,Alice2,...,Alicen}、数据库持有者Bob以及半可信量子服务器Charlie,Alicen表示第n个查询用户;采用量子密钥分配方法分别对隐私块查询系统中的查询用户和数据库持有者分配量子密钥;数据库持有者和查询用户采用分配的量子密钥对数据库中的数据进行加密,得到密文数据库;查询用户采用Grover量子搜索算法对密文数据库进行搜索,得到密文;查询用户根据量子密钥对密文进行解密,得到明文。To solve the problems existing in the above prior art, the present invention proposes a multi-user high-dimensional quantum privacy block query method, which comprises: constructing a multi-user quantum privacy block query system, the system comprising query users {Alice 1 , Alice 2 , ..., Alice n }, a database holder Bob and a semi-trusted quantum server Charlie, Alice n represents the nth query user; using a quantum key distribution method to distribute quantum keys to query users and database holders in the privacy block query system respectively; the database holder and the query user use the distributed quantum keys to encrypt data in the database to obtain a ciphertext database; the query user uses the Grover quantum search algorithm to search the ciphertext database to obtain a ciphertext; the query user decrypts the ciphertext according to the quantum key to obtain a plaintext.
优选的,采用量子密钥分配方法对查询用户和数据库持有者分配量子密钥的过程包括:Preferably, the process of distributing quantum keys to query users and database holders using a quantum key distribution method includes:
S1:初始化系统,并构建密钥编码规则;S1: Initialize the system and build key encoding rules;
S2:半可信量子服务器Charlie构建d维单光子乘积态序列S,该序列长度为N=n+q+χ+δ,其中n表示数据库大小,q表示Bob与Charlie之间交互所需要的单光子乘积态的数量,χ表示查询用户与Charlie之间交互所需要的单光子乘积态的数量,δ表示Bob与查询用户之间交互所需要的单光子乘积态的数量;根据d维单光子乘积态序列S构建子序列S1和子序列S2,其中子序列S1的长度为n+q+δ,子序列S2的长度为χ;在子序列S2中依次选出第i列,将选出第i列作为子序列Charlie将子序列S1发送给数据库持有者Bob,将子序列发送给对应的查询用户;S2: The semi-trusted quantum server Charlie constructs a d-dimensional single-photon product state sequence S, the length of which is N=n+q+χ+δ, where n represents the database size, q represents the number of single-photon product states required for the interaction between Bob and Charlie, χ represents the number of single-photon product states required for the interaction between the query user and Charlie, and δ represents the number of single-photon product states required for the interaction between Bob and the query user; construct subsequences S1 and S2 based on the d-dimensional single-photon product state sequence S, where the length of subsequence S1 is n+q+δ, and the length of subsequence S2 is χ; select the i-th column in subsequence S2 in turn, and use the selected i-th column as the subsequence Charlie sends subsequence S 1 to the database owner Bob, Send to the corresponding query user;
S3:查询用户记录子序列的初始位置和该序列对应的测量基,并对子序列进行重新排列,得到新序列SCA;查询用户将测量基和序列SCA发送给Charlie;S3: Querying a Subsequence of User Records The initial position of the sequence and the measurement basis corresponding to the sequence, and the subsequence Rearrange and obtain a new sequence S CA ; the query user sends the measurement basis and the sequence S CA to Charlie;
S4:Charlie根据测量基对序列SCA进行测量,并将测量结果反馈给Alicei;S4: Charlie measures the sequence S CA according to the measurement basis and feeds back the measurement result to Alice i ;
S5:Alicei根据子序列的初始位置对测量结果进行恢复;Charlie和Alicei通过序列SCA中的粒子执行第一次安全检测;S5: Alice i according to the subsequence The measurement results are restored from the initial position; Charlie and Alice i perform the first safety check through the particles in the sequence S CA ;
S6:Bob记录子序列S1的初始位置和该序列对应的测量基,并对子序列S1进行重新排列;在重新排列的子序列中随机选取q个序列中的粒子构成安全检测序列SBC,其他粒子构成序列SBA;S6: Bob records the initial position of subsequence S 1 and the measurement basis corresponding to the sequence, and rearranges subsequence S 1 ; randomly selects particles from q sequences in the rearranged subsequence to form a safety detection sequence S BC , and the other particles form a sequence S BA ;
S7:Bob将SBC和测量机发送给Charlie,Charlie根据测量基对序列SBC中的粒子进行测量,并将测量结果反馈给Bob;S7: Bob sends S BC and the measuring machine to Charlie. Charlie measures the particles in the sequence S BC according to the measurement basis and feeds back the measurement results to Bob.
S8:Bob根据子序列S1的初始位置对测量结果进行恢复;Bob和Alicei通过序列SBC中的粒子执行第二次安全检测;S8: Bob recovers the measurement result according to the initial position of subsequence S 1 ; Bob and Alice i perform a second security check using particles in sequence S BC ;
S9:Bob从序列SBA中抽取n个粒子,构成序列获取序列SBA中δ个位置上粒子的测量基,将δ个位置上粒子的测量基和序列发送给查询用户;查询用户对序列中的qudit进行重排,得到序列并将序列转换为单光子乘积态S′BA序列;查询用户将S′BA中δ个粒子和测量基发送给Charlie;其中,qudit表示高维量子态;S9: Bob extracts n particles from the sequence S BA to form the sequence Get the measurement basis of the particles at δ positions in the sequence S BA , and replace the measurement basis of the particles at δ positions with the sequence Sent to the query user; the query user has a query on the sequence Rearrange the qudit in to get the sequence And the sequence Convert to single-photon product state S′ BA sequence; the query user sends δ particles and measurement basis in S′ BA to Charlie; where qudit represents a high-dimensional quantum state;
S10:Charlie根据测量基对S′BA中的粒子进行测量,并将测量结果返回给查询用户;查询用户和Bob对S′BA中的δ个粒子进行第三次安全检测;S10: Charlie measures the particles in S′ BA according to the measurement basis and returns the measurement results to the querying user; the querying user and Bob perform a third safety check on the δ particles in S′ BA ;
S11:将SBA中的其余n个粒子进行排序,形成序列S″BA;Charlie对S″BA中的粒子进行测量,并将测量结果反馈给Alicei;Alicei对测量结果的位置进行恢复,得到恢复序列其中,表示测量结果,该结果为十进制数值;S11: Sort the remaining n particles in S BA to form a sequence S″ BA ; Charlie measures the particles in S″ BA and feeds the measurement results back to Alice i ; Alice i restores the position of the measurement results to obtain the restored sequence in, Indicates the measurement result, which is a decimal value;
S12:Bob将非正交qudit对公布到系统中,其中|q>为Bob手中的qudit,|q>与均为非正交的量子态,表示经过量子傅里叶变换的量子态符号,| >表示量子中的Dirac符号;S12: Bob converts the non-orthogonal qudit pair Published to the system, where |q> is the qudit in Bob's hand, |q> and are all non-orthogonal quantum states, represents the quantum state symbol after quantum Fourier transformation, | > represents the Dirac symbol in quantum;
S13:Alicei根据Bob公布的非正交qudit对和恢复序列SM采用密钥编码规则进行密钥推测;S13: Alice i uses the non-orthogonal qudit pair published by Bob to and the recovery sequence S M uses the key encoding rule to guess the key;
S14:对推理出的密钥进行分发。S14: Distribute the inferred key.
优选的,密钥编码规则包括:Bob和n个查询用户Alicei(i=1,2,...,n)协商对应的密钥编码规则,编码规则包括:Preferably, the key encoding rule includes: Bob and n query users Alice i (i=1, 2, ..., n) negotiate the corresponding key encoding rule, and the encoding rule includes:
其中,|0>表示量子态0,表示对量子态0执行量子傅里叶变换后得到的量子态,其中量子傅里叶变换是指量子领域中对量子态的操作,表示的是对量子态d-1执行量子傅里叶变换后的量子态,d表示维数。Among them, |0> represents the quantum state 0, represents the quantum state obtained by performing a quantum Fourier transform on quantum state 0, where quantum Fourier transform refers to the operation of quantum states in the quantum field. It represents the quantum state after performing quantum Fourier transform on quantum state d-1, where d represents the dimension.
优选的,测量基包括Zd和Xd;Zd的表达式为:Preferably, the measurement basis includes Z d and X d ; the expression of Z d is:
Xd的表达式为:The expression of Xd is:
其中,Zd表示d维下的测量基,d表示维数,|j>表示量子态j,j表示为十进制的数值,Xd表示经过量子傅里叶变换的测量基,表示量子态j经过量子傅里叶变化得到的量子态,k为十进制数值。Among them, Z d represents the measurement basis in d dimensions, d represents the dimension, |j> represents the quantum state j, j represents a decimal value, X d represents the measurement basis after quantum Fourier transformation, It represents the quantum state obtained by quantum Fourier transformation of quantum state j, and k is a decimal value.
优选的,Charlie根据测量基对序列进行测量的过程包括:Preferably, the process of Charlie measuring the sequence according to the measurement basis includes:
Charlie获取量子系统的状态|q>,并构建测量算子{Mm}={M0,M1,...,Md-1};Charlie obtains the state of the quantum system |q> and constructs the measurement operator {M m } = {M 0 ,M 1 ,...,M d-1 };
根据测量算子计算测量结果为m=ν的概率,概率计算的表达式为:The probability that the measurement result is m=ν is calculated according to the measurement operator. The expression for probability calculation is:
其中,Md-1表示测量算子,其中d表示维数;m为十进制数值,v为十进制数值,p(v)表示测量结果为m=ν的概率,表示Mv的共轭转置,Mv表示测量算子,<q|表示量子态q,|q>表示量子态q;Among them, M d-1 represents the measurement operator, where d represents the dimension; m is a decimal value, v is a decimal value, and p(v) represents the probability that the measurement result is m=v. represents the conjugate transpose of M v , M v represents the measurement operator, <q| represents the quantum state q, |q> represents the quantum state q;
经过测量后,量子系统的状态为:After measurement, the state of the quantum system is:
其中,表示测量后的量子态 in, Represents the quantum state after measurement
优选的,执行安全检测的过程包括:设置错误阈值τ,将Charlie和Alicei分别作为实体A和B;获取待安全检测序列中粒子的数量l;实体B根据初始粒子信息对实体A发送的测量结果进行对比,并根据待安全检测序列中粒子的数量l计算序列的错误率;若错误率高于设置的错误阈值,则检测终止,否则继续进行检测,直到所有的粒子检测完成。Preferably, the process of performing safety detection includes: setting an error threshold τ, taking Charlie and Alice i as entities A and B respectively; obtaining the number l of particles in the sequence to be safely detected; entity B compares the measurement result sent by entity A based on the initial particle information, and calculates the error rate of the sequence based on the number l of particles in the sequence to be safely detected; if the error rate is higher than the set error threshold, the detection is terminated, otherwise the detection continues until all particle detections are completed.
优选的,进行密钥推测的过程包括:获取Bob的量子态|q>,并将量子态发送给Alicei;Alicei随机选取测量基,将测量基合接收到的量子态发送给Charlie;Charlie根据测量基对量子态进行测量,得到测量结果并将测量结果返回给Alicei;从中随机选择一个将和|q>组成布qudit对Bob公布qudit对其中表示对|κ>执行量子傅里叶变换的量子态Alicei采用选取的测量基分别对|q>和进行测量,分别得到|q>和的测量结果,根据测量结果确定Bob的量子态|q>,采用编码转换规则将|q>转化为十进制,得到q,该q为Alicei得到的密钥。Preferably, the process of performing key inference includes: obtaining Bob's quantum state |q> and sending the quantum state to Alice i ; Alice i randomly selects a measurement basis and sends the measurement basis and the received quantum state to Charlie; Charlie measures the quantum state according to the measurement basis to obtain a measurement result And return the measurement result to Alice i ; from Randomly select one Will and |q> form a cloth qudit pair Bob publishes qudit in represents the quantum state of the quantum Fourier transform of |κ> Alice i uses the selected measurement basis to measure |q> and We measure and obtain |q> and The measurement result of Bob is used to determine the quantum state |q> of Bob. The encoding conversion rule is used to convert |q> into decimal to obtain q, which is the key obtained by Alice i .
优选的,对推理出的密钥进行分发的过程包括:查询用户与Bob共享一组非对称密钥Kr={k0,k1,...,kn-1},其中,ki表示Kr中的第i个密钥;在非对称密钥中Bob知道所有的非对称密钥,查询用户知道自己对应的密钥;Bob对每一个ki计算其中,其中Qi为十进制数值,ι为十进制数值;根据Qi计算Qi′=Qimodd,其中,mod为求余符号;将所有的Q′i进行集合,得到Bob的最终密钥Kf={Q′0,Q′1,...,Q′n-1};查询用户执行和Bob相同的操作,判断查询用户中的密钥数,若密钥数小于1,则重新计算查询用户中的密钥,否则查询用户得到不同位置的密钥0≤i0,i1,...,in-1≤n-1,其中下标i0,i1,...,in-1表示位置。Preferably, the process of distributing the inferred key includes: the query user and Bob share a set of asymmetric keys K r ={k 0 ,k 1 ,...,k n-1 }, where k i represents the i-th key in K r ; Bob knows all asymmetric keys in the asymmetric key, and the query user knows his corresponding key; Bob calculates for each k i in, Where Qi is a decimal value and ι is a decimal value; calculate Qi ′= Qi modd according to Qi , where mod is the remainder symbol; collect all Q′i to obtain Bob’s final key Kf ={ Q′0 , Q′1 , ..., Q′n -1 }; the query user performs the same operation as Bob to determine the number of keys in the query user. If the number of keys is less than 1, recalculate the key in the query user, otherwise the query user obtains the key in a different position. 0≤i 0 ,i 1 ,...,i n-1 ≤n-1, where the subscripts i 0 ,i 1 ,...,i n-1 represent positions.
优选的,采用量子密钥对数据库中的数据进行加密的过程包括:Alicei获取Kf中第i0,i1,...,in-1个位置的密钥并检索第j0,j1,...,jn-1个项目其中0<=j0,j1,...,jn-1<=n-1;Alicei分别计算移位数s0,s1,...sn-1,其中sλ=jλ-iλ,其中λ为十进制数值,范围在{0,1,...,n-1};把计算出的位移数s0,s1,...sn-1发送给Bob,Bob通过s0,s1,...sn-1分别对密钥Kf进行移位,形成n个采用n个分别对数据库中的数据进行加密,形成密文数据库ED0,ED1,...,EDn-1,其中 表示第i个密文数据库中的第n-1个密文。Preferably, the process of encrypting data in a database using a quantum key includes: Alice i obtains the key at the i 0 th , i 1 th , ..., i n-1 th position in K f and retrieve the j 0 ,j 1 ,...,j n-1 items Where 0<=j 0 ,j 1 ,...,j n-1 <=n-1; Alice i calculates the shift numbers s 0 ,s 1 ,...s n-1 respectively, where s λ =j λ -i λ , where λ is a decimal value in the range of {0,1,...,n-1}; sends the calculated shift numbers s 0 ,s 1 ,...s n-1 to Bob, who shifts the key K f by s 0 ,s 1 ,...s n-1 respectively to form n Use n Encrypt the data in the database respectively to form a ciphertext database ED 0 , ED 1 ,..., ED n-1 , where Represents the n-1th ciphertext in the i-th ciphertext database.
优选的,查询用户采用Grover量子搜索算法搜索密文的过程包括:Preferably, the process of the query user using the Grover quantum search algorithm to search for ciphertext includes:
步骤1:获取密文数据库中的元素个数;Step 1: Get the number of elements in the ciphertext database;
步骤2:计算初始量子态|υ>,初始量子态的计算公式为:Step 2: Calculate the initial quantum state |υ>. The calculation formula for the initial quantum state is:
其中,H表示的是量子门,表示σ个H门进行张量积,σ表示比特数,表示量子中的张量积符号,|x>表示量子态x,n表示密文数据库中的元素个数;Among them, H represents the quantum gate, represents the tensor product of σ H gates, σ represents the number of bits, represents the tensor product symbol in quantum, |x> represents the quantum state x, and n represents the number of elements in the ciphertext database;
步骤3:对初始量子态|υ>进行k次G迭代,得到当前数据库的状态;其计算公式为:Step 3: Perform k G iterations on the initial quantum state |υ> to obtain the current database state; the calculation formula is:
其中,G表示的是Grover算法中的一个酉算子,k表示迭代次数,θ表示角度,|j0>表示量子态j0,j0是查询用户所要找的索引下标;Among them, G represents a unitary operator in Grover's algorithm, k represents the number of iterations, θ represents the angle, |j 0 > represents the quantum state j 0 , and j 0 is the index subscript that the query user wants to find;
步骤4:根据数据库的状态得到查询用户的索引下标j0;Step 4: Get the index subscript j 0 of the query user according to the database status;
步骤5:根据索引下标得到查询用户待查询的密文。Step 5: Get the ciphertext to be queried by the querying user according to the index subscript.
本发明的有益效果:Beneficial effects of the present invention:
1)本发明在只需要用户方和数据库方具备近乎经典的量子能力(量子重排,接入量子信道),由第三方量子服务器Charlie提供完全量子能力。通过半量子技术大大减少用户方和数据库方的量子成本;1) The present invention only requires the user and database to have nearly classical quantum capabilities (quantum rearrangement, access to quantum channels), and the third-party quantum server Charlie provides full quantum capabilities. The semi-quantum technology greatly reduces the quantum costs of the user and database;
2)本发明通过应用Grover量子搜索算法来提高用户查询想要密文的速度,查询时间复杂为大大提高整个方法的效率;2) The present invention improves the speed of users querying the desired ciphertext by applying the Grover quantum search algorithm. The query time complexity is Greatly improve the efficiency of the entire method;
3)本发明可以支持多用户访问数据库不同位置上的一整块信息,使得本方法具有更好的实用性和高效性。3) The present invention can support multiple users to access a whole block of information at different locations in the database, making the method more practical and efficient.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本发明的多用户量子隐私块查询方法流程图;FIG1 is a flow chart of a multi-user quantum privacy block query method of the present invention;
图2为本发明中的单光子乘积态序列结构图。FIG. 2 is a structural diagram of a single-photon product state sequence in the present invention.
具体实施方式DETAILED DESCRIPTION
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
一种多用户的高维量子隐私块查询方法的具体实施方式,该方法具体如下:构建多用户量子隐私块查询系统,该系统包括查询用户{Alice1,Alice2,...,Alicen}、数据库持有者Bob以及半可信量子服务器Charlie,Alicen表示第n个查询用户;采用量子密钥分配方法分别对隐私块查询系统中的查询用户和数据库持有者分配量子密钥;数据库持有者和查询用户采用分配的量子密钥对数据库中的数据进行加密,得到密文数据库;查询用户采用Grover量子搜索算法对密文数据库进行搜索,得到密文;查询用户根据量子密钥对密文进行解密,得到明文。A specific implementation method of a multi-user high-dimensional quantum privacy block query method, the method is specifically as follows: construct a multi-user quantum privacy block query system, the system includes query users {Alice 1 , Alice 2 , ..., Alice n }, database holder Bob and semi-trusted quantum server Charlie, Alice n represents the nth query user; a quantum key distribution method is used to distribute quantum keys to query users and database holders in the privacy block query system respectively; the database holder and the query user use the distributed quantum keys to encrypt data in the database to obtain a ciphertext database; the query user uses the Grover quantum search algorithm to search the ciphertext database to obtain a ciphertext; the query user decrypts the ciphertext according to the quantum key to obtain a plaintext.
本发明中的多用户量子隐私块查询系统主要包括3类实体,即n个查询用户{Alice1,Alice2,...,Alicen},数据库D的持有者Bob,半可信量子服务器Charlie。在数据库D中存储着n个明文{D0,D1,…,Dn-1},其中Di(i=0,1,...,n-1)是一个二进制比特串,Di(i=0,1,...,n-1)的比特串长度l取决维数d,即其中,表示向上取整;{Alice1,Alice2,...,Alicen}和Bob只具备接入量子信道和重排量子态的能力。The multi-user quantum privacy block query system in the present invention mainly includes three types of entities, namely, n query users {Alice 1 , Alice 2 , ..., Alice n }, Bob, the holder of database D, and semi-trusted quantum server Charlie. In database D, n plaintexts {D 0 , D 1 , ..., D n-1 } are stored, where Di (i = 0, 1, ..., n-1) is a binary bit string, and the bit string length l of Di (i = 0, 1, ..., n-1) depends on the dimension d, that is, in, represents rounding up; {Alice 1 , Alice 2 , ..., Alice n } and Bob only have the ability to access the quantum channel and rearrange the quantum state.
Charlie具备全量子能力,用于量子制备和量子测量,Charlie制备的量子态为d维单光子态集合M1和M2;其表达式为:Charlie has full quantum capabilities, which are used for quantum preparation and quantum measurement. The quantum state prepared by Charlie is a d-dimensional single-photon state set M 1 and M 2 ; its expression is:
其中,d表示维数,|j>表示量子态j,j表示为十进制的数值,表示量子态j经过量子傅里叶变化得到的量子态,k为十进制数值Where d represents the dimension, |j> represents the quantum state j, and j is a decimal value. It represents the quantum state obtained by quantum Fourier transformation of quantum state j, and k is a decimal value.
将d维单光子态集合M1和M2中的每个元素相互正交。Charlie执行测量操作所使用的测量基为:Each element in the d-dimensional single-photon state sets M1 and M2 is orthogonal to each other. The measurement basis used by Charlie to perform the measurement operation is:
其中,Zd表示d维下的测量基,Xd表示经过量子傅里叶变换的测量基。Among them, Z d represents the measurement basis in d dimensions, and X d represents the measurement basis after quantum Fourier transform.
采用量子密钥分配方法对查询用户和数据库持有者分配量子密钥的过程包括:The process of distributing quantum keys to query users and database holders using the quantum key distribution method includes:
S1:初始化系统,并构建密钥编码规则;S1: Initialize the system and build key encoding rules;
S2:半可信量子服务器Charlie构建d维单光子乘积态序列S,该序列长度为N=n+q+χ+δ,其中n表示数据库大小,q表示Bob与Charlie之间交互所需要的单光子乘积态的数量,χ表示查询用户与Charlie之间交互所需要的单光子乘积态的数量,δ表示Bob与查询用户之间交互所需要的单光子乘积态的数量;根据d维单光子乘积态序列S构建子序列S1和子序列S2,其中子序列S1的长度为n+q+δ,子序列S2的长度为χ;在子序列S2中依次选出第i列,将选出第i列作为子序列Charlie将子序列S1发送给数据库持有者Bob,将子序列发送给对应的查询用户;S2: The semi-trusted quantum server Charlie constructs a d-dimensional single-photon product state sequence S, the length of which is N=n+q+χ+δ, where n represents the database size, q represents the number of single-photon product states required for the interaction between Bob and Charlie, χ represents the number of single-photon product states required for the interaction between the query user and Charlie, and δ represents the number of single-photon product states required for the interaction between Bob and the query user; construct subsequences S1 and S2 based on the d-dimensional single-photon product state sequence S, where the length of subsequence S1 is n+q+δ, and the length of subsequence S2 is χ; select the i-th column in subsequence S2 in turn, and use the selected i-th column as the subsequence Charlie sends subsequence S 1 to the database owner Bob, Send to the corresponding query user;
S3:查询用户记录子序列的初始位置和该序列对应的测量基,并对子序列进行重新排列,得到新序列SCA;查询用户将测量基和序列SCA发送给Charlie;S3: Querying a Subsequence of User Records The initial position of the sequence and the measurement basis corresponding to the sequence, and the subsequence Rearrange and obtain a new sequence S CA ; the query user sends the measurement basis and the sequence S CA to Charlie;
S4:Charlie根据测量基对序列SCA进行测量,并将测量结果反馈给Alicei;S4: Charlie measures the sequence S CA according to the measurement basis and feeds back the measurement result to Alice i ;
S5:Alicei根据子序列的初始位置对测量结果进行恢复;Charlie和Alicei通过序列SCA中的粒子执行第一次安全检测;S5: Alice i according to the subsequence The measurement results are restored from the initial position; Charlie and Alice i perform the first safety check through the particles in the sequence S CA ;
S6:Bob记录子序列S1的初始位置和该序列对应的测量基,并对子序列S1进行重新排列;在重新排列的子序列中随机选取q个序列中的粒子构成安全检测序列SBC,其他粒子构成序列SBA;S6: Bob records the initial position of subsequence S 1 and the measurement basis corresponding to the sequence, and rearranges subsequence S 1 ; randomly selects particles from q sequences in the rearranged subsequence to form a safety detection sequence S BC , and the other particles form a sequence S BA ;
S7:Bob将SBC和测量机发送给Charlie,Charlie根据测量基对序列SBC中的粒子进行测量,并将测量结果反馈给Bob;S7: Bob sends S BC and the measuring machine to Charlie. Charlie measures the particles in the sequence S BC according to the measurement basis and feeds back the measurement results to Bob.
S8:Bob根据子序列S1的初始位置对测量结果进行恢复;Bob和Alicei通过序列SBC中的粒子执行第二次安全检测;S8: Bob recovers the measurement result according to the initial position of subsequence S 1 ; Bob and Alice i perform a second security check using particles in sequence S BC ;
S9:Bob从序列SBA中抽取n个粒子,构成序列获取序列SBA中δ个位置上粒子的测量基,将δ个位置上粒子的测量基和序列发送给查询用户;查询用户对序列中的qudit进行重排,得到序列并将序列转换为单光子乘积态S′BA序列;查询用户将S′BA中δ个粒子和测量基发送给Charlie;其中,qudit表示高维量子态;S9: Bob extracts n particles from the sequence S BA to form the sequence Get the measurement basis of the particles at δ positions in the sequence S BA , and replace the measurement basis of the particles at δ positions with the sequence Sent to the query user; the query user has a query on the sequence Rearrange the qudit in to get the sequence And the sequence Convert to single-photon product state S′ BA sequence; the query user sends δ particles and measurement basis in S′ BA to Charlie; where qudit represents a high-dimensional quantum state;
S10:Charlie根据测量基对S′BA中的粒子进行测量,并将测量结果返回给查询用户;查询用户和Bob对S′BA中的δ个粒子进行第三次安全检测;S10: Charlie measures the particles in S′ BA according to the measurement basis and returns the measurement results to the querying user; the querying user and Bob perform a third safety check on the δ particles in S′ BA ;
S11:将SBA中的其余n个粒子进行排序,形成序列S″BA;Charlie对S″BA中的粒子进行测量,并将测量结果反馈给Alicei;Alicei对测量结果的位置进行恢复,得到恢复序列其中,表示测量结果,该结果为十进制数值;S11: Sort the remaining n particles in S BA to form a sequence S″ BA ; Charlie measures the particles in S″ BA and feeds the measurement results back to Alice i ; Alice i restores the position of the measurement results to obtain the restored sequence in, Indicates the measurement result, which is a decimal value;
S12:Bob将非正交qudit对公布到系统中,其中|q>为Bob手中的qudit,|q>与均为非正交的量子态,表示经过量子傅里叶变换的量子态符号,|>表示量子中的Dirac符号;S12: Bob converts the non-orthogonal qudit pair Published to the system, where |q> is the qudit in Bob's hand, |q> and are all non-orthogonal quantum states, represents the quantum state symbol after quantum Fourier transformation, |> represents the Dirac symbol in quantum;
S13:Alicei根据Bob公布的非正交qudit对和恢复序列SM采用密钥编码规则进行密钥推测;S13: Alice i uses the non-orthogonal qudit pair published by Bob to and the recovery sequence S M uses the key encoding rule to guess the key;
S14:对推理出的密钥进行分发。S14: Distribute the inferred key.
一种多用户的高维量子隐私块查询方法的具体实施方式,该方法如图1所述,在图1中(1.1)-(8.1)和协议过程中的序号一一对应,其中实线表示量子信道,虚线表示经典信道,G代表Grover算法。A specific implementation method of a multi-user high-dimensional quantum privacy block query method, the method is as described in Figure 1, in which (1.1)-(8.1) correspond to the sequence numbers in the protocol process one by one, where the solid line represents the quantum channel, the dotted line represents the classical channel, and G represents the Grover algorithm.
Step1:系统初始化Step 1: System Initialization
(1.1)协商编码规则(1.1) Negotiated encoding rules
在系统初始化过程中,数据库持有者Bob,n个查询用户Alicei(i=1,2,...,n)和量子服务器Charlie协商传输错误率τ。Bob和n个查询用户Alicei(i=1,2,...,n)之间一开始协商对应的密钥编码规则:During the system initialization process, the database holder Bob, n query users Alice i (i=1,2,...,n) and the quantum server Charlie negotiate the transmission error rate τ. Bob and the n query users Alice i (i=1,2,...,n) initially negotiate the corresponding key encoding rules:
其中,|0>表示量子态0,表示对量子态0执行量子傅里叶变换后得到的量子态,其中量子傅里叶变换是指量子领域中对量子态的操作;表示的是对量子态d-1执行量子傅里叶变换后的量子态,d表示维数。Among them, |0> represents the quantum state 0, represents the quantum state obtained by performing a quantum Fourier transform on quantum state 0, where quantum Fourier transform refers to the operation on quantum states in the quantum field; It represents the quantum state after performing quantum Fourier transform on quantum state d-1, where d represents the dimension.
(1.2)发送序列S1和S2 (1.2) Send sequences S 1 and S 2
Charlie制备长度为N=n+q+χ+δ的d维单光子乘积态序列S,其中n+q+δ个单光子乘积态按照Bob要求进行制备,χ个单光子乘积态按照{Alice1,Alice2,...,Alicen}要求进行制备,单光子乘积态从中随机选择;。其中,n表示数据库的大小;χ表示在第一次安全检测中{Alice1,Alice2,...,Alicen}与Charlie之间交互所需要的单光子乘积态的数量;q表示在第二次安全检测中Bob与Charlie之间交互所需要的单光子乘积态的数量;δ表示在第三次安全检测中Bob与{Alice1,Alice2,...,Alicen}之间交互所需要的单光子乘积态的数量。Charlie prepares a d-dimensional single-photon product state sequence S of length N = n + q + x + δ, where n + q + δ single-photon product states are prepared according to Bob's requirements, x single-photon product states are prepared according to {Alice 1 , Alice 2 , ..., Alice n }, and the single-photon product states are prepared from Randomly select from ;. Where n represents the size of the database; χ represents the number of single-photon product states required for the interaction between {Alice 1 , Alice 2 , ..., Alice n } and Charlie in the first safety check; q represents the number of single-photon product states required for the interaction between Bob and Charlie in the second safety check; δ represents the number of single-photon product states required for the interaction between Bob and {Alice 1 , Alice 2 , ..., Alice n } in the third safety check.
如图2.a所示,将序列S中的n+q+δ个单光子乘积态组成序列S1;如图2.b所示,χ个单光子乘积态组成序列S2,从S2中依次选出第i(i=1,2,...,n)列,生成子序列Charlie将序列S1发送给Bob,将子序列分别发送给Alicei(i=1,2,...,n)。As shown in Fig. 2.a, the n+q+δ single-photon product states in sequence S form sequence S 1 ; as shown in Fig. 2.b, the x single-photon product states form sequence S 2 , and the i-th (i=1,2,...,n) column is selected from S 2 in sequence to generate a subsequence Charlie sends the sequence S 1 to Bob, and the subsequence Send them to Alice i (i=1,2,...,n) respectively.
Step2:粒子重排和发送Step 2: Particle rearrangement and sending
(2.1)发送重排后序列SCA和SBC和SBA (2.1) Send the rearranged sequences S CA , S BC and S BA
对于序列S2中每一个成功到达Alicei(i=1,2,...,n)处的子序列Alicei(i=1,2,...,n)首先记录其对应的初始位置并选择对应的测量基,然后各个Alicei(i=1,2,...,n)共同选择一个随机数重排粒子中的qudit,形成序列SCA。并将SCA和测量基发送给Charlie,Charlie根据Alicei(i=1,2,...,n)告知的测量基对SCA中的粒子进行测量,并将测量结果反馈给Alicei(i=1,2,...,n),Alicei(i=1,2,...,n)将测量结果恢复至重排前位置。Charlie和Alicei(i=1,2,...,n)通过序列SCA中的粒子执行第一次安全检测,调用安全检测过程。For each subsequence in sequence S2 that successfully reaches Alice i (i=1,2,...,n) Alice i (i=1,2,...,n) first records its corresponding initial position and selects the corresponding measurement basis, and then each Alice i (i=1,2,...,n) jointly selects a random number to rearrange the particle qudit in the sequence S CA . S CA and the measurement basis are sent to Charlie. Charlie measures the particles in S CA according to the measurement basis informed by Alice i (i=1,2,...,n), and feeds back the measurement results to Alice i (i=1,2,...,n). Alice i (i=1,2,...,n) restores the measurement results to the position before the rearrangement. Charlie and Alice i (i=1,2,...,n) perform the first security check on the particles in the sequence S CA and call the security check process.
对于序列S1中每一个成功到达Bob处的单光子乘积态,Bob也记录其对应的初始位置并选择对应的测量基,然后对接收到的n+q+δ个单光子乘积态进行量子重排。其次,Bob从n+q+δ个单光子乘积态中随机选取q个组成安全检测序列SBC,并将SBC和测量基发送给Charlie,Charlie根据Bob告知的测量基对SBC中的粒子进行测量,并将测量结果反馈给Bob。Bob将测量结果恢复至重排前位置。此时Charlie和Bob通过序列SBC中的粒子执行第二次安全检测,调用安全检测过程。For each single-photon product state in sequence S1 that successfully reaches Bob, Bob also records its corresponding initial position and selects the corresponding measurement basis, and then performs quantum rearrangement on the received n+q+δ single-photon product states. Secondly, Bob randomly selects q from the n+q+δ single-photon product states to form a safety detection sequence S BC , and sends S BC and the measurement basis to Charlie. Charlie measures the particles in S BC according to the measurement basis informed by Bob, and feeds the measurement results back to Bob. Bob restores the measurement results to the position before the rearrangement. At this time, Charlie and Bob perform a second safety detection through the particles in the sequence S BC , calling the safety detection process.
Bob将剩下的n+δ个单光子乘积态组成序列SBA,并将其中δ个位置上单光子乘积态对应的测量基和SBA的第1,2,...,n列形成子序列序列依次发给Alicei(i=1,2,...,n)。每一个用户Alicei(i=1,2,...,n)接收到Bob发送过来的(i=1,2,...,n)和δ个位置上的测量基,每一个用户Alicei(i=1,2,...,n)共同选择一个随机数ζ重排序列中qudit。各个用户将重排后的序列形成单光子乘积态S′BA序列。Alicei(i=1,2,...,n)先将S′BA中δ个位置上的单光子乘积态和测量基发送给Charlie,之后Charlie根据测量基对接收的粒子进行测量,返回测量结果给Alicei(i=1,2,...,n)并恢复到原来的位置上。Alicei(i=1,2,...,n)和Bob通过S′BA序列中δ个单光子乘积态执行第三次安全检测,调用安全检测过程。至此只剩下n个单光子乘积态,形成序列S″BA。Bob forms the remaining n+δ single-photon product states into a sequence S BA , and forms a subsequence of the measurement basis corresponding to the single-photon product states at the δ positions and the 1st, 2nd, ..., nth columns of S BA The sequence is sent to Alice i (i=1,2,...,n) in sequence. Each user Alice i (i=1,2,...,n) receives the sequence sent by Bob. (i=1,2,...,n) and the measurement basis at δ positions, each user Alice i (i=1,2,...,n) jointly selects a random number ζ to rearrange the sequence Each user will rearrange the sequence A single-photon product state S′ BA sequence is formed. Alice i (i=1,2,...,n) first sends the single-photon product states and measurement basis at δ positions in S′ BA to Charlie. Then Charlie measures the received particles according to the measurement basis, returns the measurement results to Alice i (i=1,2,...,n) and restores them to the original positions. Alice i (i=1,2,...,n) and Bob perform the third safety check through δ single-photon product states in the S′ BA sequence, calling the safety check process. At this point, only n single-photon product states are left, forming the sequence S″ BA .
执行安全检测的过程包括:设置错误阈值τ,将Charlie和Alicei分别作为实体A和B;获取待安全检测序列中粒子的数量l;实体B根据初始粒子信息对实体A发送的测量结果进行对比,并根据待安全检测序列中粒子的数量l计算序列的错误率;若错误率高于设置的错误阈值,则检测终止,否则继续进行检测,直到所有的粒子检测完成。即:The process of performing safety detection includes: setting the error threshold τ, taking Charlie and Alice i as entities A and B respectively; obtaining the number of particles l in the sequence to be detected; entity B compares the measurement results sent by entity A based on the initial particle information, and calculates the error rate of the sequence based on the number of particles l in the sequence to be detected; if the error rate is higher than the set error threshold, the detection is terminated, otherwise the detection continues until all particles are detected. That is:
Step3:粒子传输与测量Step 3: Particle transport and measurement
(3.1)Charlie对S″BA中的粒子进行测量(3.1) Charlie measures the particle in S″ BA
当第三次安全检测完成后,Alicei(i=1,2,...,n)对S″BA中的粒子随机选择Zd或Xd基,之后把S″BA中的n个单光子乘积态和选择的测量基发送给Charlie。然后,Charlie进行相应的测量操作并把对应的测量结果反馈给Alicei(i=1,2,...,n)。最后Alicei(i=1,2,...,n)将测量结果的位置恢复到重排之前的位置,恢复后的测量结果序列为序列的长度为n。After the third security check is completed, Alice i (i=1,2,...,n) randomly selects the Z d or X d basis for the particles in S″ BA , and then sends the n single-photon product states in S″ BA and the selected measurement basis to Charlie. Then, Charlie performs the corresponding measurement operation and feeds back the corresponding measurement results to Alice i (i=1,2,...,n). Finally, Alice i (i=1,2,...,n) restores the position of the measurement results to the position before the rearrangement, and the restored measurement result sequence is The length of the sequence is n.
一种根据测量基对序列进行测量的具体实施方式,该方法包括:d=4,测量基测量算子表示为{Mm}={M0,M1,M2,M3};在测量前量子系统的状态为|2>,则结果m=2发生的可能性为:A specific implementation method for measuring a sequence according to a measurement basis, the method comprises: d=4, the measurement basis The measurement operator is expressed as {M m } = {M 0 ,M 1 ,M 2 ,M 3 }; before the measurement, the state of the quantum system is |2>, then the probability of the result m = 2 is:
其中,p表示概率,表示测量算子M2的共轭转置,M2表示测量算子ω表示相位;则的表达式为:Among them, p represents the probability, represents the conjugate transpose of the measurement operator M2 , where M2 represents the measurement operator ω represents Phase; The expression is:
测量后的状态为:The status after measurement is:
Step4:密钥推测Step 4: Key guessing
(4.1)Alicei(i=1,2,...,n)进行密钥推测(4.1) Alice i (i=1,2,...,n) performs key estimation
每个用户Alicei(i=1,2,...,n)具有n个测量结果序列。Bob将公布非正交qudit其中|q>是Bob手中的qudit,|q>是与非正交的量子态。Alicei(i=1,2,...,n)根据Bob公布的和自己的测量结果序列进行密钥推测。如表1所示,表中列举了d=4维下Alicei具体的密钥推测规则。Each user Alice i (i=1,2,...,n) has n measurement result sequences. Bob will publish non-orthogonal qudit Where |q> is the qudit in Bob's hand, |q> is Non-orthogonal quantum states. Alice i (i=1,2,...,n) according to Bob's published and your own measurement result sequence As shown in Table 1, the table lists the specific key guessing rules of Alice i in the dimension d=4.
假设d=4维,其中假设Bob的量子态为|2>,此时Bob会把量子态发送给Alicei,但是Alicei并不知道量子态的具体状态是什么,所以会要求Charlie对量子态进行测量。此时Alicei会随机选择Z4或X4让Charlie进行测量,假设Alicei选择X4测量基交给Charlie测量,Charlie测量的结果可能是此时Bob会公布qudit对其中|2>是Bob所知道的,Bob从随机选择 和|2>非正交。Alicei根据自己的测量结果和Bob公布的进行猜测,由于|2>通过X4基进行测量可能得到但是通过X4基测量只能得出不可能得出所以Alicei能肯定知道Bob的量子态为|2>,|2>最终转换成十进制密钥2。Assume d = 4 dimensions, and assume that Bob's quantum state is |2>. At this time, Bob will send the quantum state to Alice i , but Alice i does not know the specific state of the quantum state, so she will ask Charlie to measure the quantum state. At this time, Alice i will randomly choose Z 4 or X 4 for Charlie to measure. Assuming Alice i chooses X 4 measurement basis and gives it to Charlie for measurement, the result of Charlie's measurement may be At this time, Bob will announce qudit Where |2> is what Bob knows, Bob gets from Random Selection and |2> are not orthogonal. Alice i uses her own measurement results and Bob's We can make a guess, since |2> can be measured through the X 4 basis. but Through X 4 basis measurement, we can only get It is impossible to conclude Therefore, Alice i can know for sure that Bob's quantum state is |2>, which is eventually converted into the decimal key 2.
表1 d=4维下的Alicei密钥推测Table 1 Alice i key guessing in d=4 dimensions
Step5:密钥后处理及密文发送Step 5: Key post-processing and ciphertext sending
(5.1)密钥后处理(5.1) Key post-processing
经过Step4后,根据密钥编码规则,所有用户Alicei(i=1,2,...,n)与Bob共享一组非对称密钥Kr,其中,Kr中每一个密钥是一个十进制,Kr对于Bob来说完全是已知的,每个用户Alicei(i=1,2,...,n)只知道其中一部份密钥。Kr由k0,k1,...,kn-1组成,ki(i=0,1,...,n-1)表示Kr的第i个密钥。首先,Bob对每一个ki计算其中i=0,1,...,n-1,这里的ι取值可以控制用户所获取的密钥数,然后计算Q′i=Qimod d,最后生成最终密钥Kf,Kf由Q′0,Q′1,...,Q′n-1组成,Bob获取Kf中全部密钥。Alicei(i=1,2,...,n)分别执行和Bob相同的操作,如果Alicei(i=1,2,...,n)中获取密钥数小于1,那么协议重新开始;否则,Alicei(i=1,2,...,n)将分别获得一个不尽相同位置的密钥其中下标i0,i1,...,in-1表示位置,0<=i0,i1,...,in-1<=n-1。After Step 4, according to the key encoding rule, all users Alice i (i=1,2,...,n) share a set of asymmetric keys K r with Bob, where each key in K r is a decimal. K r is completely known to Bob, and each user Alice i (i=1,2,...,n) only knows part of the key. K r consists of k 0 ,k 1 ,...,k n-1 , and k i (i=0,1,...,n-1) represents the i-th key of K r . First, Bob calculates for each k i in i=0,1,...,n-1, where the value of ι can control the number of keys obtained by the user, and then calculate Q′ i =Q i mod d, and finally generate the final key K f , K f is composed of Q′ 0 ,Q′ 1 ,...,Q′ n-1 , and Bob obtains all the keys in K f . Alice i (i=1,2,...,n) performs the same operation as Bob. If the number of keys obtained by Alice i (i=1,2,...,n) is less than 1, the protocol restarts; otherwise, Alice i (i=1,2,...,n) will obtain a key in a different position. The subscripts i 0 , i 1 , ..., in-1 represent positions, and 0<=i 0 , i 1 , ..., in -1 <=n-1.
Step6:加密Step 6: Encryption
(6.1)生成密文(6.1) Generate ciphertext
Alicei(i=1,2,...,n)知道Kf中第i0,i1,...,in-1个位置的密钥并试图检索第j0,j1,...,jn-1个项目其中0<=j0,j1,...,jn-1<=n-1。Alicei(i=1,2,...,n)分别计算移位数s0,s1,...sn-1,其中sλ=jλ-iλ(λ=0,1,...,n-1),把s0,s1,...sn-1发送给Bob,Bob通过s0,s1,...sn-1分别对密钥Kf进行移位,移位后的形成n个分别用于加密数据库D,形成密文数据库ED0,ED1,...,EDn-1,其中 Alice i (i=1,2,...,n) knows the key of the i 0 th ,i 1 th ,...,i n-1 th position in K f and tries to retrieve the j 0 , j 1 , ..., j n-1 items Where 0<=j 0 ,j 1 ,...,j n-1 <=n-1. Alice i (i=1,2,...,n) calculates the shift numbers s 0 ,s 1 ,...s n-1 , where s λ =j λ -i λ (λ=0,1,...,n-1) and sends s 0 ,s 1 ,...s n-1 to Bob. Bob shifts the key K f by s 0 ,s 1 ,...s n-1 to form n shifted keys. They are used to encrypt database D to form ciphertext databases ED 0 , ED 1 ,..., ED n-1 , where
Step7:量子搜索Step 7: Quantum Search
(7.1)Grover算法应用(7.1) Application of Grover's algorithm
Alicei(i=1,2,...,n)分别对密文数据库EDi(i=0,1,...,n-1)进行Grover搜索,密文数据库如果用户Alice1采用经典算法搜索ED0数据库中下标第j0个密文数据其中0<=j0<=n-1,那么搜索的时间复杂度为O(n),这导致搜索效率很差。用户Alice1通过Grover量子搜索算法搜索密文将大大提高搜索效率。Alice1采用Grover算法的具体过程如下:Alice i (i=1,2,...,n) performs Grover search on the ciphertext database ED i (i=0,1,...,n-1). If user Alice 1 uses the classic algorithm to search for the ciphertext data with index j 0 in the ED 0 database Where 0 <= j 0 <= n-1, then the time complexity of the search is O(n), which leads to poor search efficiency. User Alice 1 searches for ciphertext using the Grover quantum search algorithm This will greatly improve the search efficiency. The specific process of Alice 1 using the Grover algorithm is as follows:
步骤1:获取密文数据库中的元素个数;Step 1: Get the number of elements in the ciphertext database;
步骤2:计算初始量子态|υ>,初始量子态的计算公式为:Step 2: Calculate the initial quantum state |υ>. The calculation formula for the initial quantum state is:
其中,H表示的是量子门,表示σ个H门进行张量积,σ表示比特数,表示量子中的张量积符号,|x>表示量子态x,n表示密文数据库中的元素个数;Among them, H represents the quantum gate, represents the tensor product of σ H gates, σ represents the number of bits, represents the tensor product symbol in quantum, |x> represents the quantum state x, and n represents the number of elements in the ciphertext database;
步骤3:对初始量子态|υ>进行k次G迭代,得到当前数据库的状态;其计算公式为:Step 3: Perform k G iterations on the initial quantum state |υ> to obtain the current database state; the calculation formula is:
其中,G表示的是Grover算法中的一个酉算子,k表示迭代次数,θ表示角度,|j0>表示量子态j0,j0是查询用户所要找的索引下标;Among them, G represents a unitary operator in Grover's algorithm, k represents the number of iterations, θ represents the angle, |j 0 > represents the quantum state j 0 , and j 0 is the index subscript that the query user wants to find;
步骤4:根据数据库的状态得到查询用户的索引下标j0;Step 4: Get the index subscript j 0 of the query user according to the database status;
步骤5:根据索引下标得到查询用户待查询的密文。Step 5: Get the ciphertext to be queried by the querying user according to the index subscript.
运行算子G进行k次后,检测出待测的量子态可能性为 After running operator G k times, the probability of detecting the quantum state to be tested is
Step8:解密Step 8: Decryption
(8.1)解密获取到所要的明文(8.1) Decryption to obtain the required plaintext
Alicei(i=1,2,...,n)通过密钥对密文进行解密,获得对应的明文 Alice i (i=1,2,...,n) passes Key pair ciphertext Decrypt and obtain the corresponding plaintext
以上所举实施例,对本发明的目的、技术方案和优点进行了进一步的详细说明,所应理解的是,以上所举实施例仅为本发明的优选实施方式而已,并不用以限制本发明,凡在本发明的精神和原则之内对本发明所作的任何修改、等同替换、改进等,均应包含在本发明的保护范围之内。The above embodiments further illustrate the purpose, technical solutions and advantages of the present invention in detail. It should be understood that the above embodiments are only preferred implementation modes of the present invention and are not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made to the present invention within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims (3)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210320072.9A CN114640449B (en) | 2022-03-29 | 2022-03-29 | Multi-user high-dimensional quantum privacy block query method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202210320072.9A CN114640449B (en) | 2022-03-29 | 2022-03-29 | Multi-user high-dimensional quantum privacy block query method |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114640449A CN114640449A (en) | 2022-06-17 |
CN114640449B true CN114640449B (en) | 2024-05-28 |
Family
ID=81951852
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202210320072.9A Active CN114640449B (en) | 2022-03-29 | 2022-03-29 | Multi-user high-dimensional quantum privacy block query method |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114640449B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5855018A (en) * | 1995-10-20 | 1998-12-29 | Yeda Research And Development Co. Ltd. | Private information retrieval |
CN107992632A (en) * | 2017-12-28 | 2018-05-04 | 江苏亨通问天量子信息研究院有限公司 | Quantum communications secret querying method and system |
CN110336775A (en) * | 2019-04-24 | 2019-10-15 | 重庆邮电大学 | A Quantum Swarm Authentication Method Based on Grover Algorithm |
CN112036445A (en) * | 2020-08-06 | 2020-12-04 | 中国人民解放军战略支援部队信息工程大学 | Cross-social network user identification method based on neural tensor network |
CN113114456A (en) * | 2021-03-16 | 2021-07-13 | 重庆邮电大学 | Multi-user quantum privacy query method with authentication |
-
2022
- 2022-03-29 CN CN202210320072.9A patent/CN114640449B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5855018A (en) * | 1995-10-20 | 1998-12-29 | Yeda Research And Development Co. Ltd. | Private information retrieval |
CN107992632A (en) * | 2017-12-28 | 2018-05-04 | 江苏亨通问天量子信息研究院有限公司 | Quantum communications secret querying method and system |
CN110336775A (en) * | 2019-04-24 | 2019-10-15 | 重庆邮电大学 | A Quantum Swarm Authentication Method Based on Grover Algorithm |
CN112036445A (en) * | 2020-08-06 | 2020-12-04 | 中国人民解放军战略支援部队信息工程大学 | Cross-social network user identification method based on neural tensor network |
CN113114456A (en) * | 2021-03-16 | 2021-07-13 | 重庆邮电大学 | Multi-user quantum privacy query method with authentication |
Non-Patent Citations (2)
Title |
---|
Quantum Private Query of Blocks Based on D-dimensional Bell State;Siwen Hu;《 Proceedings of the 6th International Conference on Big Data and Computing》;全文 * |
多用户量子隐私查询;杨豪;《硕士电子期刊》;全文 * |
Also Published As
Publication number | Publication date |
---|---|
CN114640449A (en) | 2022-06-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110011784B (en) | KNN classification service system and method supporting privacy protection | |
Olejnik | Secure quantum private information retrieval using phase-encoded queries | |
Jiang | Semi-quantum private comparison based on Bell states | |
Lien et al. | A novel privacy preserving location-based service protocol with secret circular shift for k-nn search | |
Boufounos et al. | Secure binary embeddings for privacy preserving nearest neighbors | |
Yang et al. | Private database queries using one quantum state | |
CN101540760B (en) | Quantum key agreement method | |
WO2022099495A1 (en) | Ciphertext search method, system, and device in cloud computing environment | |
CN104038349A (en) | Effective and verifiable public key searching encryption method based on KP-ABE | |
CN106603232B (en) | Nearest privacy query method based on careless quantum key distribution | |
Cai et al. | Multi-party quantum key agreement with five-qubit brown states | |
CN109714158B (en) | Bell state-based semi-quantum privacy comparison method and system | |
Shi | Efficient quantum protocol for private set intersection cardinality | |
CN110929294A (en) | One-way transmission quantum database privacy query method | |
Wang et al. | Efficient semiquantum key distribution without entanglement | |
CN106453393B (en) | Verifiable privacy-preserving data type matching method in participatory sensing | |
Wang et al. | An efficient and privacy-preserving range query over encrypted cloud data | |
Guo et al. | Quantum key agreement protocols with GHZ states under collective noise channels | |
CN112507362A (en) | Data outsourcing privacy protection method, system and storage medium | |
CN114640449B (en) | Multi-user high-dimensional quantum privacy block query method | |
CN111291413B (en) | Joint noise resistant semi-quantum multi-user privacy query method | |
Wang et al. | Multi-user quantum private query using symmetric multi-particle w state | |
Ye et al. | Semi-quantum private query protocol without invoking the measurement capability of classical user | |
Peng et al. | A novel quantum solution to secure two-party distance computation | |
CN113468553B (en) | Privacy protection analysis system and method for industrial big data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20240422 Address after: Room 301, 3rd floor, 9 shangdijiu street, Haidian District, Beijing Applicant after: Beijing Shenzhou Digital Cloud Information Technology Co.,Ltd. Country or region after: China Applicant after: Shenzhou Kuntai (Xiamen) Information Technology Co.,Ltd. Address before: 400065 Chongwen Road, Nanshan Street, Nanan District, Chongqing Applicant before: CHONGQING University OF POSTS AND TELECOMMUNICATIONS Country or region before: China |
|
TA01 | Transfer of patent application right | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
TR01 | Transfer of patent right |
Effective date of registration: 20250214 Address after: Room 301, 3rd floor, 9 shangdijiu street, Haidian District, Beijing Patentee after: Beijing Shenzhou Digital Cloud Information Technology Co.,Ltd. Country or region after: China Patentee after: Hefei Shenzhou Kuntai Information Technology Co.,Ltd. Address before: Room 301, 3rd floor, 9 shangdijiu street, Haidian District, Beijing Patentee before: Beijing Shenzhou Digital Cloud Information Technology Co.,Ltd. Country or region before: China Patentee before: Shenzhou Kuntai (Xiamen) Information Technology Co.,Ltd. |
|
TR01 | Transfer of patent right |