Database synchronous comparison method based on BB84 coding and comparison system thereof

By adopting quantum secret sharing technology based on BB84 encoding and quantum key distribution technology in the synchronization of user privacy data, the security challenges of traditional cryptography in handling user privacy data are solved, and unconditional security database synchronization comparison is achieved.

CN120144673APending Publication Date: 2025-06-13NANJING UNIV +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510299968.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-14
Publication Date
2025-06-13

AI Technical Summary

Technical Problem

Traditional classical cryptography based on computational complex assumptions faces severe security challenges in the process of synchronizing user privacy data. Malicious information thieves may intercept and crack update information of privacy data, resulting in user privacy leakage.

Method used

Quantum secret sharing technology and quantum key distribution technology based on BB84 encoding are used to ensure the security of user privacy data during the update process by verifying whether the data of the two databases is synchronized and consistent without leaking any information.

Benefits of technology

It realizes unconditional security of database synchronization comparison, which can resist malicious information stealers with quantum attack capabilities and unlimited computing capabilities, and ensures the security of user privacy data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120144673A_ABST
    Figure CN120144673A_ABST
Patent Text Reader

Abstract

The invention discloses a database synchronous comparison method based on BB84 coding and a comparison system thereof, and the comparison method comprises the steps: firstly generating associated bit strings among a first database, a second database and an authentication server through employing a quantum secret sharing technology and a quantum key distribution technology; and a secret key is generated between the first database and the second database, and then a synchronous comparison process is carried out, so that the data synchronous comparison process has unconditional security. According to the method, synchronous comparison of the data can be completed under the condition that specific information of the data is not leaked to any participant, the safety of the privacy data of the user in the updating process is guaranteed, the safety is guaranteed through the quantum mechanics basic principle, and therefore it is guaranteed that the database which is not authorized cannot obtain updating information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of quantum communication, and particularly relates to a database synchronization comparison method and a comparison system based on BB84 coding. Background Art

[0002] With the development of big data technology, the information communication field has entered an era with rich data sources and convenient applications. The establishment of user privacy databases, such as databases containing sensitive information such as medical, insurance, and property, can, on the one hand, provide more personalized and accurate services for communication users, and on the other hand, bring the risk of privacy leakage that cannot be ignored. When user privacy data needs to be updated, the updated information needs to be synchronized to all databases authorized by the user to store this privacy. However, with the continuous progress of quantum computing technology, traditional classical cryptography based on computational complexity assumptions faces severe security challenges in processing such synchronization processes. Malicious information stealers may intercept and crack the updated information of privacy data, resulting in the leakage of user privacy.

[0003] Quantum key distribution and quantum secret sharing are the most representative technologies in quantum communication technology. They are based on the basic principles of quantum mechanics and have unconditional security. Even malicious information stealers with quantum attack capabilities and infinite computing capabilities cannot crack the communication process based on quantum key distribution and quantum secret sharing. Utilizing the unconditional security characteristics in quantum communication technology to build a communication system that can ensure database security is an important direction to ensure user privacy security and promote the development of big data science. This solution based on quantum communication technology will provide a highly reliable security guarantee for user privacy data and provide strong support for the secure development of the big data era.

[0004] Therefore, building a database synchronization comparison mechanism with unconditional security, that is, a security guarantee not restricted by any complexity assumptions, is of great significance and wide application value for the development of communication technology and the big data field. Summary of the Invention

[0005] Object of the Invention: To solve the related technical problems raised in the background art, the object of the present invention is to provide a database synchronization comparison method and a comparison system based on BB84 coding. The present invention utilizes quantum secret sharing technology and quantum key distribution technology to verify whether the data in two databases is synchronized and consistent without leaking any information, so as to ensure the security of user privacy data during the update process, cope with potential network security threats, and provide reliable data security guarantees for users.

[0006] Technical Solution: A database synchronization comparison method based on BB84 coding according to the present invention includes the following steps:

[0007] (1) Secret sharing: The first database, the second database, and the authentication server each generate a set of binary bit strings of length n, denoted as B 1 , B 2 and B a respectively; and the bit strings among the first database, the second database, and the authentication server form a secret sharing, that is, they satisfy the relationship

[0008] (2) Key distribution: The first database and the second database use the BB84 encoding to generate a key of length 3n, denoted as K 12 ;

[0009] (3) Criterion calculation: The first database and the second database respectively use the key K 12 to calculate the comparison criteria P 1 and P 2 respectively for the data information to be compared of length m stored in them;

[0010] (4) Encrypted transmission: The first database and the second database encrypt their respective comparison criteria and transmit them to the authentication server through the authentication channel;

[0011] (5) Result announcement: After receiving the encrypted comparison criteria, the authentication server performs authentication calculations and announces the comparison results, that is, whether the data information to be compared of length m stored in the first database and the second database is exactly the same.

[0012] Further, the specific process of the first database and the second database using the BB84 encoding to generate a key of length 3n is as follows:

[0013] (a) The first database sends a series of polarized light pulse signals to the second database. When sending each polarized light pulse signal, it selects an orthogonal basis with a probability of , and a diagonal basis with a probability of ; when selecting the orthogonal basis, it emits a horizontally polarized state with a probability of and records the bit value 0; it emits a vertically polarized state with a probability of and records the bit value 1; when selecting the diagonal basis, it emits a 45° slant polarized state with a probability of and records the bit value 0; it emits a 135° slant polarized state with a probability of and records the bit value 1;

[0014] (b) The second database detects the received polarized light pulse signals. It selects an orthogonal basis with a probability of , and With a certain probability, the diagonal basis is selected; when the orthogonal basis is selected, if the horizontal polarization state is detected, the bit value 0 is recorded; if the vertical polarization state is detected, the bit value 1 is recorded; when the diagonal basis is selected, if the 45° oblique polarization state is detected, the bit value 0 is recorded; if the 135° oblique polarization state is detected, the bit value 1 is recorded;

[0015] (c) The first database announces the basis selection when each polarized light pulse signal is emitted, and the second database announces the basis selection when each polarized light pulse signal is detected. Then, according to the announced information, for the recorded bit strings, the parts with inconsistent basis selections are discarded from the first database and the second database, and the remaining parts are retained as the initial secret key;

[0016] (d) Repeat steps (a) to (c) multiple times until the first database and the second database generate a secret key of length 3n, denoted as K 12 .

[0017] Furthermore, the first database and the second database respectively use the secret key K 12 , and calculate the comparison criteria P 1 and P 2 for the data information to be compared of length m stored in each of them. The specific process is as follows:

[0018] 1) The first database and the second database divide the secret key K 12 of length 3n into three equal parts, denoted as and

[0019] 2) The first database and the second database both use to generate an irreducible polynomial of degree n in GF(2), and select this irreducible polynomial and the secret key as the input random number to generate the hash function H(x);

[0020] 3) The first database and the second database use the data information to be compared of length m stored in each of them as the input of the hash function H(x), and obtain hash values of length n, denoted as H(M 1 ) and H(M 2 ), where M 1 and M 2 are the data information to be compared stored in the first database and the second database respectively;

[0021] 4) The first database and the second database respectively use to perform bitwise exclusive OR on H(M 1 ) and H(M 2 ), and obtain the comparison criteria P 1 and P 2, that is:

[0022]

[0023] Further, the first database and the second database encrypt their respective comparison criteria and transmit them to the authentication server through the authentication channel, which means:

[0024] The first database uses B 1 to encrypt P 1 , obtaining the encrypted criterion The second database uses B 2 to encrypt P 2 , obtaining the encrypted criterion

[0025] Then, the first database and the second database respectively transmit their respective encrypted criteria S 1 and S 2 , to the authentication server through the authentication channel.

[0026] Further, when the authentication server receives the encrypted comparison criteria and performs authentication calculations, it means:

[0027] The authentication server calculates the authentication bit string:

[0028]

[0029] If each bit of the authentication bit string A is 0, it is announced that the comparison is successful, that is, the data information to be compared with length m stored in the first database and the second database is exactly the same; if not, it is announced that the comparison is unsuccessful.

[0030] The present invention also includes a system for a database synchronization comparison method based on BB84 coding according to the above claims. The system includes a first database, a second database, and an authentication server; the first database includes a first sending end and a polarized light emitting end, the second database includes a second sending end and a polarized light receiving end, and the authentication server includes a measurement device end;

[0031] The first sending end and the second sending end are used to generate coherent optical pulses, then perform encoding phase modulation on the coherent optical pulses, and attenuate the coherent optical pulses into weak coherent optical pulses;

[0032] The polarized light emitting end is used to generate coherent optical pulses and perform modulation on the optical intensity and polarization direction of the coherent optical pulses;

[0033] The polarized light receiving end is used to measure the received polarized-modulated coherent light according to a self-selected basis vector;

[0034] The measurement device end is used to perform phase modulation on the weak coherent state optical pulses from the second sending end, interfere and measure the phase-modulated weak coherent state optical pulses from the second sending end with the weak coherent state optical pulses from the first sending end, and make corresponding responses to the results of the interference measurement.

[0035] Further, both the first sending end and the second sending end include a laser, a first phase modulator, and an attenuator. The laser is used to generate coherent optical pulses with consistent phase and intensity; the first phase modulator is used to perform encoded phase modulation on the coherent optical pulses; the attenuator is used to attenuate the modulated coherent optical pulses into weak coherent optical pulses.

[0036] The measurement device end includes a second phase modulator, a beam splitter, a first detector, and a second detector. The second phase modulator is used to perform phase modulation on the weak coherent state optical pulses from the second sending end; the beam splitter is used to interfere the two weak coherent optical pulses for interference measurement of the weak coherent optical pulses; the first detector and the second detector are respectively used to detect the photon detection responses of the corresponding two ports.

[0037] Further, the polarized light emitting end includes a coherent light source, an intensity modulator, and a polarization modulator. The coherent light source is used to emit coherent optical pulses; the intensity modulator is used to adjust the optical intensity of the coherent optical pulses; the polarization modulator is used to adjust the polarization direction of the coherent optical pulses.

[0038] The polarized light receiving end includes a polarization detector, and the polarization detector is used to measure the received polarization-modulated coherent light according to a self-selected basis vector.

[0039] Further, the first database, the second database, and the authentication server also all include a post-processing module. The post-processing module is used to generate a hash function using a secret key and generate a hash value using the hash function, and perform data encryption operations using the secret key.

[0040] Advantages of the present invention:

[0041] (1) The database synchronization and comparison system and method proposed by the present invention can complete data synchronization and comparison without leaking specific data information to any participating party, and can be used for update synchronization authentication of sensitive data to ensure that unauthorized databases will not obtain update information.

[0042] (2) The database synchronization and comparison system and method proposed by the present invention utilize quantum secret sharing technology and quantum key distribution technology, thereby obtaining unconditional security guaranteed by the principles of quantum mechanics and not based on any complexity assumptions. Description of the Drawings

[0043] Figure 1 Schematic diagram of the database synchronization and comparison system of the present invention;

[0044] Figure 2 Schematic diagram of quantum secret sharing among the first sending end, the second sending end and the measuring device end of the present invention;

[0045] Figure 3 Schematic diagram of quantum key distribution between the polarized light emitting end and the polarized light receiving end of the present invention;

[0046] Figure 4 Flow chart of the database synchronization and comparison method of the present invention. Specific embodiments

[0047] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0048] The present invention proposes a database synchronization and comparison method and its comparison system based on BB84 coding. It uses quantum secret sharing technology and quantum key distribution technology to verify whether the data of two databases are synchronized and consistent without leaking any information, so as to ensure the security of user privacy data during the update process, to cope with potential network security threats, and to provide reliable data security guarantee for users; even in the face of malicious information stealers with quantum attack capabilities and infinite computing capabilities, they cannot crack the communication process based on quantum key distribution and quantum secret sharing. The present invention utilizes the unconditional security characteristics in quantum communication technology to construct a database synchronization and comparison system that can guarantee database security, completely getting rid of the security defect of traditional cryptography relying on computational complexity.

[0049] As Figure 1 shown, the present invention proposes a database synchronization and comparison system based on BB84 coding. The system includes a first database 1, a second database 2 and an authentication server 3; the first database 1 includes a first sending end 11 and a polarized light emitting end 12, the second database 2 includes a second sending end 21 and a polarized light receiving end 22, and the authentication server 3 includes a measuring device end 31;

[0050] Among them, the first sending end 11 and the second sending end 21 are used to generate coherent optical pulses, then perform encoding phase modulation on the coherent optical pulses, and attenuate the coherent optical pulses into weak coherent optical pulses; the measuring device end 31 is used to perform phase modulation on the weak coherent state optical pulses from the second sending end 21, and perform interference measurement on the weak coherent state optical pulses with phase modulation from the second sending end 21 and the weak coherent state optical pulses from the first sending end 11, and make corresponding responses to the results of the interference measurement. Specifically, as Figure 2As shown, the first transmitting end 11 and the second transmitting end 21 both include a laser 111, a first phase modulator 112, and an attenuator 113. The laser 111 is used to generate coherent optical pulses with consistent phase and intensity. The first phase modulator 112 is used to perform encoded phase modulation on the coherent optical pulses. The attenuator 113 is used to attenuate the modulated coherent optical pulses into weak coherent optical pulses. The measurement device end 31 includes a second phase modulator 311, a beam splitter 312, a first detector 313, and a second detector 314. The second phase modulator 311 is used to perform phase modulation on the weak coherent state optical pulses from the second transmitting end. The beam splitter 312 is used to interfere two beams of weak coherent optical pulses for interference measurement of the weak coherent optical pulses. The first detector 313 and the second detector 314 are respectively used to detect the photon detection responses of the corresponding two ports. The first transmitting end 11, the second transmitting end 21, and the measurement device end 31 construct a quantum secret sharing module according to the existing patent CN115549908A (a quantum secret sharing method and system based on phase encoding), which removes the need for entanglement resources and reduces the requirements for experimental equipment. At the same time, it ensures unconditional security.

[0051] The polarized light emitting end 12 is used to generate coherent optical pulses and modulate the optical intensity and polarization direction of the coherent optical pulses. The polarized light receiving end 22 is used to measure the received polarized modulated coherent light according to a self-selected basis vector. Specifically, as Figure 3 shown, the polarized light emitting end 12 includes a coherent light source 121, an intensity modulator 122, and a polarization modulator 123. The coherent light source 121 is used to emit coherent optical pulses. The intensity modulator 122 is used to adjust the optical intensity of the coherent optical pulses. The polarization modulator 123 is used to adjust the polarization direction of the coherent optical pulses. The polarized light receiving end 22 includes a polarization detector 221, and the polarization detector 221 is used to measure the received polarized modulated coherent light according to a self-selected basis vector. The polarized light emitting end 12 and the polarized light receiving end 22 construct a quantum key distribution module, and this module generates keys based on BB84 encoding.

[0052] Of course, in the database synchronization and comparison system of the present invention, the first database 1, the second database 2, and the authentication server 3 may also all include a post-processing module (not shown in the figure). The post-processing module is used to generate a hash function using a key and generate a hash value using the hash function, as well as perform data encryption operations using the key, etc. Specifically, it is a high-performance computer or a computer, and its main function is to perform data calculations. The database synchronization and comparison system of the present invention utilizes quantum secret sharing technology and quantum key distribution technology, thereby obtaining unconditional security guaranteed by the principles of quantum mechanics and not based on any complexity assumptions.

[0053] As Figure 4As shown in the figure, the present invention also includes a database synchronization and comparison method based on BB84 encoding, which includes the following steps:

[0054] (1) Secret sharing: The first database 1, the second database 2, and the authentication server 3 each generate a set of binary bit strings of length n, denoted as B 1 , B 2 and B a ; and the bit strings among the first database 1, the second database 2, and the authentication server 3 form a secret sharing, that is, the relationship B 1 ⊕ B 2 = B a is satisfied, where ⊕ represents bitwise exclusive OR of bit strings; among them, the method of generating mutually correlated binary bit strings is the method of generating keys using quantum secret sharing technology in the existing patent CN115549908A (a quantum secret sharing method and system based on phase encoding);

[0055] (2) Key distribution: The first database 1 and the second database 2 use BB84 encoding to generate a key of length 3n, denoted as K 12 , and the specific process is as follows:

[0056] (a) The first database 1 uses the polarization light emitting end 12 to send a series of polarization light pulse signals to the second database 2. When sending each polarization light pulse signal, it selects the orthogonal basis with probability and the diagonal basis with probability; when selecting the orthogonal basis, it emits the horizontal polarization state with probability and records the bit value 0; it emits the vertical polarization state with probability and records the bit value 1; when selecting the diagonal basis, it emits the 45° oblique polarization state with probability and records the bit value 0; it emits the 135° oblique polarization state with probability and records the bit value 1;

[0057] (b) The second database 2 uses the polarization light receiving end 22 to detect the received polarization light pulse signals. It selects the orthogonal basis with probability and the diagonal basis with probability; when selecting the orthogonal basis, if the horizontal polarization state is detected, the bit value 0 is recorded; if the vertical polarization state is detected, the bit value 1 is recorded; when selecting the diagonal basis, if the 45° oblique polarization state is detected, the bit value 0 is recorded; if the 135° oblique polarization state is detected, the bit value 1 is recorded;

[0058] (c) The first database 1 announces the basis vector selection when emitting each polarized light pulse signal, and the second database 2 announces the basis vector selection when detecting each polarized light pulse signal. Then, according to the announced information, the first database 1 and the second database 2 discard the parts with inconsistent basis vector selections for the recorded bit strings and retain the remaining parts as the initial key;

[0059] (d) According to the above method, repeat steps (a) to (c) multiple times until the first database 1 and the second database 2 generate a key of length 3n, denoted as K 12 .

[0060] (3) Criterion calculation: The first database 1 and the second database 2 respectively use the key K 12 to calculate the comparison criteria P 1 and P 2 for the data information to be compared with length m stored in each of them. The specific process is as follows:

[0061] 1) The first database 1 and the second database 2 divide the key K of length 3n 12 into three equal - length parts, denoted as and

[0062] 2) Both the first database 1 and the second database 2 use to generate an irreducible polynomial of degree n in GF(2), and select this irreducible polynomial and the key used as the input random number to generate a hash function H(x);

[0063] Generating an irreducible polynomial of degree n in GF(2) means: First, use each bit of n - bit to correspond to the coefficients of each term except the highest - degree term in the polynomial, generating a polynomial of degree n in the GF(2) field, and the coefficient of the highest - degree term is 1; then, verify whether this polynomial is an irreducible polynomial. If the verification result is "no", return to step (2) to re - distribute the key to generate a key of length 3n, and then obtain a new return to step 1) to re - generate the polynomial and verify; if the verification result is "yes", stop the verification and obtain the irreducible polynomial.

[0064] 3) The first database 1 and the second database 2 use the data information to be compared with length m stored in each of them as the input of the hash function H(x), and obtain hash values of length n, denoted as H(M 1 ) and H(M 2 ), where M 1 and M 2 are the data information to be compared stored in the first database 1 and the second database 2 respectively;

[0065] 4) The first database 1 and the second database 2 use to perform bit - by - bit exclusive - OR on H(M 1 ) and H(M 2 ) respectively, obtaining a comparison criterion P 1 and P 2 , that is:

[0066]

[0067] (4) Encrypted transmission: The first database 1 and the second database 2 encrypt their respective comparison criteria and transmit them to the authentication server 3 through the authentication channel. Specifically, it means:

[0068] The first database 1 uses B 1 to encrypt P 1 , obtaining the encrypted criterion The second database 2 uses B 2 to encrypt P 2 , obtaining the encrypted criterion

[0069] Then, the first database 1 and the second database 2 respectively transmit their respective encrypted criteria S 1 and S 2 to the authentication server 3 through the authentication channel.

[0070] (5) Result announcement: After receiving the encrypted comparison criteria, the authentication server 3 performs authentication calculations and announces the comparison result, that is, whether the data information to be compared with length m stored in the first database 1 and the second database 2 is exactly the same.

[0071] Among them, when the authentication server 3 performs authentication calculations after receiving the encrypted comparison criteria, it means:

[0072] The authentication server calculates the authentication bit string:

[0073]

[0074] If each bit of the authentication bit string A is 0, it announces that the comparison is successful, that is, the data information to be compared with length m stored in the first database and the second database is exactly the same; if not, it announces that the comparison is unsuccessful.

[0075] It can be seen that the database synchronization comparison method of the present invention, using quantum secret sharing technology and quantum key distribution technology, can complete data synchronization comparison without leaking the specific data information to any participating party, ensure the security of user privacy data during the update process, can be used for the update synchronization authentication of sensitive data, and ensure that unauthorized databases do not obtain update information.

Claims

1. A database synchronization comparison method based on BB84 encoding, characterized in that: The following steps are involved: (1) Secret Sharing: The first database, the second database, and the authentication server each generate a set of binary bit strings of length n, denoted as B1, B2, and B a ; and the bit strings between the first database, the second database and the authentication server form a secret share, that is, satisfying the relationship (2) Key distribution: The first database and the second database use BB84 encoding to generate a key of length 3n, denoted as K 12 ; (3) Criterion calculation: The first database and the second database each use the key K 12 , calculate the length of the data to be compared stored in each of them, which is m, and obtain the comparison criteria P1 and P2 respectively; (4) Encrypted transmission: The first database and the second database encrypt their respective comparison criteria and transmit them to the authentication server through the authentication channel; (5) Result announcement: After receiving the encrypted comparison criteria, the authentication server performs authentication calculations and announces the comparison results, that is, whether the data information to be compared with a length of m stored in the first database and the second database is completely consistent.

2. A database synchronization comparison method based on BB84 encoding according to claim 1, characterized in that: The specific process of the first database and the second database using BB84 encoding to generate a key of length 3n is as follows: (a) The first database sends a series of polarized light pulse signals to the second database. When sending each polarized light pulse signal, it The probability of choosing an orthogonal basis is The probability of choosing a diagonal basis is ; when choosing an orthogonal basis, The probability of transmitting the horizontal polarization state and recording the bit value 0; The probability of transmitting the vertical polarization state and recording the bit value 1; when the diagonal basis is selected, The probability of transmitting a 45° polarization state and recording a bit value of 0; The probability of transmitting a polarization state oblique to 135° and recording the bit value 1; (b) The second database detects the received polarized light pulse signal. The probability of choosing an orthogonal basis is The probability of selecting the diagonal basis is 0; when the orthogonal basis is selected, if the horizontal polarization state is detected, the bit value 0 is recorded; if the vertical polarization state is detected, the bit value 1 is recorded; when the diagonal basis is selected, if the oblique 45° polarization state is detected, the bit value 0 is recorded; if the oblique 135° polarization state is detected, the bit value 1 is recorded; (c) The first database publishes the basis vector selection when transmitting each polarized light pulse signal, and the second database publishes the basis vector selection when detecting each polarized light pulse signal. Then, the first database and the second database discard the part of the recorded bit string with inconsistent basis vector selection according to the published information, and retain the remaining part as the initial key; (d) Repeat steps (a) to (c) multiple times until the first database and the second database generate a key of length 3n, denoted as K 12 .

3. The database synchronization comparison method based on BB84 encoding according to claim 1 is characterized in that: The first database and the second database each use a key K 12 , the specific process of calculating the length of the to-be-compared data information stored in each of the lengths m to obtain the comparison criteria P1 and P2 is as follows: 1) The first database and the second database use the key K of length 3n 12 Divide into three equal parts, record as and 2) Both the first database and the second database use Generate an irreducible polynomial of order n in GF(2), select the irreducible polynomial and the key as the input random number Generate a hash function H(x); 3) The first database and the second database use the data information to be compared of length m stored in each of them as the input of the hash function H(x), and obtain hash values ​​of length n, which are recorded as H(M1) and H(M2), where M1 and M2 are the data information to be compared stored in the first database and the second database respectively; 4) Utilization of the first database and the second database Perform bit-by-bit XOR on H(M1) and H(M2) to obtain comparison criteria P1 and P2 of length n, namely:

4. The database synchronization comparison method based on BB84 encoding according to claim 1 is characterized in that: The first database and the second database encrypt their respective comparison criteria and transmit them to the authentication server through the authentication channel, which means: The first database uses B1 to encrypt P1 and obtain the encryption criterion The second database uses B2 to encrypt P2 and obtain the encryption criterion Then, the first database and the second database transmit their encryption criteria S1 and S2 respectively to the authentication server through the authentication channel.

5. A database synchronization comparison method based on BB84 encoding according to claim 4, characterized in that: The authentication server performs authentication calculation after receiving the encrypted comparison criteria: The authentication server calculates the authentication bit string: If each bit of the authentication bit string A is 0, the comparison is announced to be successful, that is, the data information to be compared of length m stored in the first database and the second database are completely consistent; if not, the comparison is announced to be unsuccessful.

6. A system based on the database synchronization comparison method based on BB84 encoding according to any one of claims 1 to 5, characterized in that: The system includes a first database, a second database and an authentication server; the first database includes a first transmitting end and a polarized light transmitting end, the second database includes a second transmitting end and a polarized light receiving end, and the authentication server includes a measuring device end; The first transmitting end and the second transmitting end are used to generate coherent optical pulses, then perform coded phase modulation on the coherent optical pulses, and attenuate the coherent optical pulses into weak coherent optical pulses; The polarized light emitting end is used to generate coherent light pulses and modulate the light intensity and polarization direction of the coherent light pulses; The polarized light receiving end is used to measure the received polarization-modulated coherent light according to a self-selected basis vector; The measuring device is used to phase modulate the weak coherent state light pulse from the second transmitting end, perform interference measurement on the phase modulated weak coherent state light pulse from the second transmitting end and the weak coherent state light pulse from the first transmitting end, and respond accordingly to the result of the interference measurement.

7. The system according to claim 6, characterized in that: The first transmitting end and the second transmitting end both include a laser, a first phase modulator and an attenuator, wherein the laser is used to generate coherent optical pulses with consistent phase and intensity; the first phase modulator is used to perform coded phase modulation on the coherent optical pulses; and the attenuator is used to attenuate the modulated coherent optical pulses into weak coherent optical pulses; The measuring device end includes a second phase modulator, a beam splitter, a first detector and a second detector. The second phase modulator is used to phase modulate the weak coherent light pulse from the second transmitting end; the beam splitter is used to interfere two weak coherent light pulses to perform interference measurement of the weak coherent light pulses; the first detector and the second detector are respectively used to detect the photon detection responses of the corresponding two ports.

8. The system according to claim 6, characterized in that: The polarized light emitting end comprises a coherent light source, an intensity modulator and a polarization modulator, wherein the coherent light source is used to emit coherent light pulses; the intensity modulator is used to adjust the light intensity of the coherent light pulses; and the polarization modulator is used to adjust the polarization direction of the coherent light pulses; The polarized light receiving end comprises a polarization detector, and the polarization detector is used to measure the received polarization-modulated coherent light according to a self-selected basis vector.

9. The system according to claim 6, characterized in that: The first database, the second database and the authentication server also include a post-processing module, which is used to generate a hash function using a key and generate a hash value using the hash function, and perform data encryption operations using the key.