Single ticket dynamic encryption and verification system based on quantum key
The dynamic encryption and verification system generated by the quantum key management system solves the problems of quantum attack resistance, key lifecycle management and user privacy protection for subway single-journey tickets, and achieves highly secure electronic credential verification.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ANHUI QASKY QUANTUM SCI & TECH CO LTD
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-17
AI Technical Summary
Existing technologies for electronic credentials suffer from insufficient resistance to quantum attacks, lack of key lifecycle management, and leakage of user privacy. In particular, subway single-journey tickets are easily copied, tampered with, and tracked in public transportation.
A dynamic encryption and verification system based on quantum keys is adopted. Multiple sets of quantum symmetric keys are generated through the quantum key management system. The ticketing terminal generates and writes encrypted data when selling tickets. The device verifies the legitimacy and updates the encrypted data. The national cryptographic algorithms SM2 and SM4 are combined for key transmission and data encryption.
It effectively resists quantum computing attacks, prevents credential forgery and replay, ensures user privacy, enables full lifecycle data management and key self-destruction, and enhances system security and anti-attack capabilities.
Smart Images

Figure CN121887388A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to electronic ticketing information security, specifically to a dynamic encryption and verification system for single-journey tickets based on quantum key distribution. Background Technology
[0002] With the rapid development of mobile internet technology, traditional electronic travel vouchers (such as single-journey tickets) have been widely used in public transportation, event ticket checking, and other scenarios. However, existing technologies have significant security flaws: static electronic vouchers are easily copied, stolen, and subjected to replay attacks, and existing encryption algorithms (such as RSA and AES) face the threat of quantum computing, making electronic vouchers vulnerable to brute-force attacks. Furthermore, user credential information (such as travel information and identity identifiers) is often transmitted in weak encryption or plaintext, lacking a robust key lifecycle management mechanism, and thus failing to effectively prevent the tracking of user movements.
[0003] Currently, due to cost factors, most subway single-journey tickets use unencrypted Ultralight cards. These cards use a fixed key to calculate a Message Authentication Code (MAC) based on the ticket's credentials (such as time and card number), and this MAC is written into the ticket. During ticket verification, the corresponding data is read from the ticket, and the MAC is calculated repeatedly and compared to determine the ticket's legitimacy. This security mechanism is very weak and easily attacked. For example, a certain number of subway single-journey tickets could be purchased, and the ticket data could be cracked using brute-force attacks, differential cryptanalysis, or initialization vector reuse attacks.
[0004] Furthermore, during ticket sales, algorithmic vulnerabilities can be exploited to generate fraudulent tickets (such as price tampering or extended validity periods). At the entrance gate, counterfeit tickets can be used to pass through verification. At the exit gate, by altering ticket data, one can exit beyond the designated mileage range. Additionally, if a user intentionally fails to return their single-journey ticket, technical means (such as signal jamming) can be used to bypass exit fees, allowing the user to exit and re-enter the station with the ticket.
[0005] Therefore, it can be seen that the existing technology mainly has the following technical problems that need to be solved:
[0006] 1) Insufficient resistance to quantum attacks
[0007] Ticket verification systems based on traditional public-key encryption such as RSA and ECC are vulnerable to brute-force attacks using quantum computing, making it difficult to guarantee long-term data security.
[0008] 2) Lack of key lifecycle management
[0009] The lack of dynamic key update and self-destruction mechanisms means that the leakage of long-term valid static keys will lead to large-scale security risks.
[0010] 3) User privacy leaks
[0011] User credentials (such as travel information, identity information, etc.) may be exposed in weakly encrypted or plaintext form during data transmission and storage, posing a risk of privacy leakage. Summary of the Invention
[0012] (a) Technical problems to be solved
[0013] In view of the above-mentioned shortcomings of the existing technology, the present invention provides a dynamic encryption and verification system for single-trip tickets based on quantum keys, which can effectively overcome the deficiencies of the existing technology, such as insufficient resistance to quantum attacks, lack of key lifecycle management, and difficulty in effectively protecting user privacy.
[0014] (II) Technical Solution
[0015] To achieve the above objectives, the present invention provides the following technical solution:
[0016] A quantum key-based dynamic encryption and verification system for single-journey tickets, including a quantum key management system, a ticketing terminal, and the device itself;
[0017] The quantum key management system generates multiple sets of quantum symmetric keys daily at set times.
[0018] The ticketing terminal imports quantum symmetric keys generated by the quantum key management system daily. When selling tickets to customers, it generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket.
[0019] On the device side, encrypted data is read from the one-way ticket, the validity of the one-way ticket is verified based on the encrypted data, and new encrypted data is generated based on the new key information of the one-way ticket after the validity verification is passed. The new encrypted data is written into the one-way ticket and then the passenger is allowed to pass.
[0020] Preferably, the ticketing terminal imports a quantum symmetric key generated by the quantum key management system daily, including:
[0021] S11. The ticketing terminal requests the first quantum random number R1 from the quantum key management system via the network.
[0022] S12. The quantum key management system generates a first quantum random number R1 and encrypts it using its private key to obtain Cr1:
[0023] Cr1=SM2_Encrypt(KeyPrivate[idx],R1);
[0024] Where KeyPrivate[idx] represents the private key selected from the private key pool KeyPrivate corresponding to the key identifier idx. The key identifier idx is used to indicate the key pair used in this communication. SM2_Encrypt is the encryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm.
[0025] The quantum key management system sends Cr and the key identifier idx to the ticketing terminal;
[0026] S13. The ticketing terminal selects the corresponding public key based on the key identifier idx to decrypt Cr and obtain the first quantum random number R1:
[0027] R1=SM2_Decrypt(KeyPublic[idx],Cr);
[0028] Where KeyPublic[idx] represents the public key corresponding to the key identifier idx selected from the public key pool KeyPublic, and SM2_Decrypt is the decryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm;
[0029] The ticketing terminal generates a second quantum random number R2, and then uses the public key to encrypt (R1, R2) to obtain Cr2:
[0030] Cr2=SM2_Encrypt(KeyPublic[idx],(R1,R2));
[0031] And send Cr2 and the key identifier idx to the quantum key management system;
[0032] S14. The quantum key management system selects the corresponding private key based on the key identifier idx to decrypt Cr2 and obtain (R1, R2):
[0033] (R1,R2)=SM2_Decrypt(KeyPrivate[idx],Cr2);
[0034] The quantum key management system uses (R1, R2) to verify whether the ticketing terminal is legitimate. If it is legitimate, (R1, R2) is used as the symmetric key for communication between the two parties.
[0035] S15. The quantum key management system uses (R1, R2) to encrypt the quantum symmetric key KeySet it generates to obtain Ckey:
[0036] Ckey=SM4_Encrypt((R1,R2),KeySet);
[0037] Among them, SM4_Encrypt is a symmetric encryption function based on the Chinese national standard SM4 block cipher algorithm;
[0038] The quantum key management system sends the Ckey to the ticketing terminal;
[0039] S16. The ticket terminal uses (R1,R2) to decrypt Ckey to obtain the quantum symmetric key KeySet, completing the quantum symmetric key filling:
[0040] KeySet=SM4_Decrypt((R1,R2),Ckey);
[0041] Among them, SM4_Decrypt is a symmetric decryption function based on the SM4 block cipher algorithm.
[0042] Preferably, the ticketing terminal imports a quantum symmetric key generated by the quantum key management system daily, including:
[0043] When the network is unavailable, the quantum symmetric key KeySet generated by the quantum key management system is imported offline daily to the ticketing terminal via an encrypted USB flash drive.
[0044] Preferably, when the ticketing terminal sells tickets to ticket buyers, it generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket, including:
[0045] S21. The ticketing terminal generates the hash value Hi of the key information Message for a single-journey ticket;
[0046] S22. The ticketing terminal uses the last two bytes Hi_low2 of the hash value Hi as an index to obtain the target quantum symmetric key KeySet[Hi_low2].
[0047] S23. The ticketing terminal uses the target quantum symmetric key KeySet[Hi_low2] to encrypt the key information Message of the single-journey ticket, resulting in the ciphertext Qi:
[0048] Qi=SM4_Encrypt(KeySet[Hi_low2],Message);
[0049] S24. The ticketing terminal uses the ciphertext Qi and the last two bytes of the hash value Hi, Hi_low2, as encrypted data, writes them into the single-journey ticket, and then sells the ticket to the purchaser.
[0050] Preferably, the device reads encrypted data from the one-way ticket, verifies the legitimacy of the one-way ticket based on the encrypted data, generates new encrypted data based on the new key information of the one-way ticket after passing the legitimacy verification, writes the new encrypted data into the one-way ticket, and then allows passage, including:
[0051] S31. The device reads encrypted data from the one-way ticket, obtains the ciphertext Qi and the last two bytes Hi_low2 of the hash value Hi, and sends the last two bytes Hi_low2 of the hash value Hi as an index to the quantum key management system.
[0052] S32. The quantum key management system obtains the target quantum symmetric key KeySet[Hi_low2], encrypts it using its own private key, and sends it to the device.
[0053] S33. The device uses the corresponding public key to decrypt and obtain the target quantum symmetric key KeySet[Hi_low2];
[0054] S34. The device uses the target quantum symmetric key KeySet[Hi_low2] to decrypt the ciphertext Qi, obtaining the plaintext data Message':
[0055] Message'=SM4_Decrypt(KeySet[Hi_low2],Qi);
[0056] S35. The device generates a hash value Hi' of plaintext data Message', and verifies the legality of the one-way ticket by comparing the last two bytes of hash value Hi' with hash value Hi, and checks whether the plaintext data Message' is reasonable.
[0057] S36. After the one-way ticket is verified to be valid, repeat S21~S24. The device generates new encrypted data based on the new key information of the one-way ticket, writes the new encrypted data into the one-way ticket, and then releases the passenger.
[0058] Preferably, if the one-way ticket is taken away, after a preset time, the quantum key management system automatically cancels the target quantum symmetric key KeySet[Hi_low2] used for the one-way ticket and synchronizes it to the ticketing terminal.
[0059] (III) Beneficial Effects
[0060] Compared with existing technologies, this invention combines quantum key technology with national cryptographic algorithms to propose a quantum key-based dynamic encryption and verification system for single-trip tickets. By using quantum symmetric keys to achieve data encryption, dynamic challenge-response authentication, and key self-destruction mechanism, it effectively solves the security problems faced by traditional solutions, such as credential forgery, replay attacks, and brute-force attacks by quantum computing. This invention can be widely applied in fields requiring high-security electronic credential verification, significantly improving the system's anti-attack capability and data privacy while ensuring a convenient user experience. Attached Figure Description
[0061] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0062] Figure 1 This is a schematic diagram of the quantum symmetric key generation and filling process in this invention;
[0063] Figure 2 This is a schematic diagram of the ticket purchasing process in this invention;
[0064] Figure 3 This is a schematic diagram of the ticket verification process in this invention. Detailed Implementation
[0065] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0066] The following describes the specific functional modules and technical effects of the quantum key-based dynamic encryption and verification system for single-journey tickets provided by this invention, using concrete examples. The system functional modules include: a quantum key management system, a ticketing terminal, and the device itself.
[0067] The quantum key management system generates multiple sets of quantum symmetric keys daily (during non-operational hours);
[0068] The ticketing terminal imports quantum symmetric keys generated by the quantum key management system daily. When selling tickets to customers, it generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket.
[0069] On the device side, encrypted data is read from the one-way ticket, the validity of the one-way ticket is verified based on the encrypted data, and new encrypted data is generated based on the new key information of the one-way ticket after the validity verification is passed. The new encrypted data is written into the one-way ticket and then the passenger is allowed to pass.
[0070] Since the following three stages involve the transmission of multiple keys, in order to ensure the secure transmission of keys, the quantum key management system, ticketing terminal and device can be protected by deploying quantum communication encryption or pre-made master keys. The main purpose of the technical solution in this application is to protect the data security of the subway single-journey ticket itself, and the key transmission protection methods are not described in detail.
[0071] I. Quantum Symmetric Key Generation and Filling Process
[0072] The ticketing terminals import quantum symmetric keys generated by the quantum key management system daily (before operations begin), such as... Figure 1 As shown, it includes:
[0073] S11. The ticketing terminal requests the first quantum random number R1 from the quantum key management system via the network.
[0074] S12. The quantum key management system generates a first quantum random number R1 and encrypts it using its private key to obtain Cr1:
[0075] Cr1=SM2_Encrypt(KeyPrivate[idx],R1);
[0076] Where KeyPrivate[idx] represents the private key selected from the private key pool KeyPrivate corresponding to the key identifier idx. The key identifier idx is used to indicate the key pair used in this communication. SM2_Encrypt is the encryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm.
[0077] The quantum key management system sends Cr and the key identifier idx to the ticketing terminal;
[0078] S13. The ticketing terminal selects the corresponding public key based on the key identifier idx to decrypt Cr and obtain the first quantum random number R1:
[0079] R1=SM2_Decrypt(KeyPublic[idx],Cr);
[0080] Where KeyPublic[idx] represents the public key corresponding to the key identifier idx selected from the public key pool KeyPublic, and SM2_Decrypt is the decryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm;
[0081] The ticketing terminal generates a second quantum random number R2, and then uses the public key to encrypt (R1, R2) to obtain Cr2:
[0082] Cr2=SM2_Encrypt(KeyPublic[idx],(R1,R2));
[0083] And send Cr2 and the key identifier idx to the quantum key management system;
[0084] S14. The quantum key management system selects the corresponding private key based on the key identifier idx to decrypt Cr2 and obtain (R1, R2):
[0085] (R1,R2)=SM2_Decrypt(KeyPrivate[idx],Cr2);
[0086] The quantum key management system uses (R1, R2) to verify whether the ticketing terminal is legitimate. If it is legitimate, (R1, R2) is used as the symmetric key for communication between the two parties.
[0087] S15. The quantum key management system uses (R1, R2) to encrypt the quantum symmetric key KeySet it generates to obtain Ckey:
[0088] Ckey=SM4_Encrypt((R1,R2),KeySet);
[0089] Among them, SM4_Encrypt is a symmetric encryption function based on the Chinese national standard SM4 block cipher algorithm;
[0090] The quantum key management system sends the Ckey to the ticketing terminal;
[0091] S16. The ticket terminal uses (R1,R2) to decrypt Ckey to obtain the quantum symmetric key KeySet, completing the quantum symmetric key filling:
[0092] KeySet=SM4_Decrypt((R1,R2),Ckey);
[0093] Among them, SM4_Decrypt is a symmetric decryption function based on the SM4 block cipher algorithm.
[0094] Meanwhile, the ticketing terminals import quantum symmetric keys generated by the quantum key management system daily, including:
[0095] When the network is unavailable, the quantum symmetric key KeySet generated by the quantum key management system is imported offline daily to the ticketing terminal via an encrypted USB flash drive.
[0096] The above technical solution enhances resistance to quantum attacks by introducing quantum symmetric keys, and further improves security by periodically generating and updating the quantum symmetric keys (during non-operational periods). When the network is normal, updates can be performed online; when the network is unavailable, offline import can be achieved via encrypted USB drives or similar methods.
[0097] II. Ticket Purchase Process
[0098] When selling tickets to customers, the ticketing terminal generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket, such as... Figure 2 As shown, it includes:
[0099] S21. The ticketing terminal generates the hash value Hi (SM3) of the key information Message of a single-journey ticket (such as ticket number, transaction time, validity period, station information, transaction device number, transaction type, etc.).
[0100] S22. The ticketing terminal uses the last two bytes Hi_low2 of the hash value Hi as an index to obtain the target quantum symmetric key KeySet[Hi_low2].
[0101] S23. The ticketing terminal uses the target quantum symmetric key KeySet[Hi_low2] to encrypt the key information Message of the single-journey ticket, resulting in the ciphertext Qi:
[0102] Qi=SM4_Encrypt(KeySet[Hi_low2],Message);
[0103] S24. The ticketing terminal uses the ciphertext Qi and the last two bytes of the hash value Hi, Hi_low2, as encrypted data, writes them into the single-journey ticket, and then sells the ticket to the purchaser.
[0104] III. Ticket Verification
[0105] The device reads encrypted data from the one-way ticket, verifies the ticket's legitimacy based on the encrypted data, and generates new encrypted data based on the new key information of the one-way ticket after successful verification. The device then writes the new encrypted data into the one-way ticket and allows passage. Figure 3 As shown, it includes:
[0106] S31. The device reads encrypted data from the one-way ticket, obtains the ciphertext Qi and the last two bytes Hi_low2 of the hash value Hi, and sends the last two bytes Hi_low2 of the hash value Hi as an index to the quantum key management system.
[0107] S32. The quantum key management system obtains the target quantum symmetric key KeySet[Hi_low2], encrypts it using its own private key, and sends it to the device.
[0108] S33. The device uses the corresponding public key to decrypt and obtain the target quantum symmetric key KeySet[Hi_low2];
[0109] S34. The device uses the target quantum symmetric key KeySet[Hi_low2] to decrypt the ciphertext Qi, obtaining the plaintext data Message':
[0110] Message'=SM4_Decrypt(KeySet[Hi_low2],Qi);
[0111] S35. The device generates a hash value Hi' (SM3) of plaintext data Message'. The legality of the one-way ticket is verified by comparing the last two bytes of hash value Hi' with hash value Hi (while ensuring that the data has not been tampered with), and the validity of plaintext data Message' is checked (such as whether the recorded transaction time meets the transaction rules, whether the station information is valid, etc.).
[0112] S36. After the one-way ticket is verified to be valid, repeat S21~S24. The device generates new encrypted data based on the new key information of the one-way ticket, writes the new encrypted data into the one-way ticket, and then releases the passenger.
[0113] Regarding the ticket purchase and verification processes mentioned above: by setting a large number of quantum symmetric keys and using the last two bytes of the hash value as an index to select one set of keys, the cost of forgery for attackers is increased; at the same time, after the quantum symmetric key is filled on the device, the single-journey ticket can be verified offline.
[0114] In the technical solution of this application, if the ticket purchaser takes away the one-way ticket, after a preset time, the quantum key management system automatically cancels the target quantum symmetric key KeySet[Hi_low2] used for the one-way ticket and synchronizes it to the ticketing terminal.
[0115] The above technical solution establishes a key self-destruction mechanism, which can effectively prevent ticket reuse attacks.
[0116] The innovative points of this invention will be explained in detail below with reference to the above technical solutions:
[0117] 1) Advantages of quantum key distribution: Quantum key distribution is based on the quantum no-cloning principle, which can resist traditional man-in-the-middle attacks;
[0118] 2) Comprehensive defense scenarios: The "dynamic challenge-response + key self-destruction mechanism" effectively prevents forgery, replay, reuse, and side-channel attacks;
[0119] 3) Data lifecycle management: Key information of single-journey tickets is protected by both hash (SM3) and encryption (SM4), and is decrypted only during ticket verification;
[0120] 4) Flexible and convenient: Quantum symmetric keys can be updated online or imported offline.
[0121] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions will not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A quantum key based single journey ticket dynamic encryption and verification system characterized by: This includes a quantum key management system, ticketing terminals, and equipment. The quantum key management system generates multiple sets of quantum symmetric keys daily at set times. The ticketing terminal imports quantum symmetric keys generated by the quantum key management system daily. When selling tickets to customers, it generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket. On the device side, encrypted data is read from the one-way ticket, the validity of the one-way ticket is verified based on the encrypted data, and new encrypted data is generated based on the new key information of the one-way ticket after the validity verification is passed. The new encrypted data is written into the one-way ticket and then the passenger is allowed to pass.
2. The quantum key based single journey ticket dynamic encryption and verification system as claimed in claim 1 wherein: The ticketing terminal imports quantum symmetric keys generated by the quantum key management system daily, including: S11. The ticketing terminal requests the first quantum random number R1 from the quantum key management system via the network. S12. The quantum key management system generates a first quantum random number R1 and encrypts it using its private key to obtain Cr1: Cr1=SM2_Encrypt(KeyPrivate[idx],R1); Where KeyPrivate[idx] represents the private key selected from the private key pool KeyPrivate corresponding to the key identifier idx. The key identifier idx is used to indicate the key pair used in this communication. SM2_Encrypt is the encryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm. The quantum key management system sends Cr and the key identifier idx to the ticketing terminal; S13. The ticketing terminal selects the corresponding public key based on the key identifier idx to decrypt Cr and obtain the first quantum random number R1: R1=SM2_Decrypt(KeyPublic[idx],Cr); Where KeyPublic[idx] represents the public key corresponding to the key identifier idx selected from the public key pool KeyPublic, and SM2_Decrypt is the decryption function based on the national cryptographic SM2 elliptic curve public key cryptography algorithm; The ticketing terminal generates a second quantum random number R2, and then uses the public key to encrypt (R1, R2) to obtain Cr2: Cr2=SM2_Encrypt(KeyPublic[idx],(R1,R2)); And send Cr2 and the key identifier idx to the quantum key management system; S14. The quantum key management system selects the corresponding private key based on the key identifier idx to decrypt Cr2 and obtain (R1, R2): (R1,R2)=SM2_Decrypt(KeyPrivate[idx],Cr2); The quantum key management system uses (R1, R2) to verify whether the ticketing terminal is legitimate. If it is legitimate, (R1, R2) is used as the symmetric key for communication between the two parties. S15. The quantum key management system uses (R1, R2) to encrypt the quantum symmetric key KeySet it generates to obtain Ckey: Ckey=SM4_Encrypt((R1,R2),KeySet); Among them, SM4_Encrypt is a symmetric encryption function based on the Chinese national standard SM4 block cipher algorithm; The quantum key management system sends the Ckey to the ticketing terminal; S16. The ticket terminal uses (R1,R2) to decrypt Ckey to obtain the quantum symmetric key KeySet, completing the quantum symmetric key filling: KeySet=SM4_Decrypt((R1,R2),Ckey); Among them, SM4_Decrypt is a symmetric decryption function based on the SM4 block cipher algorithm.
3. The quantum key based single journey ticket dynamic encryption and verification system as claimed in claim 2, wherein: The ticketing terminal imports quantum symmetric keys generated by the quantum key management system daily, including: When the network is unavailable, the quantum symmetric key KeySet generated by the quantum key management system is imported offline daily to the ticketing terminal via an encrypted USB flash drive.
4. The quantum key based single journey ticket dynamic encryption and verification system as claimed in claim 1, wherein: When selling tickets to customers, the ticketing terminal generates encrypted data based on key information of the single-journey ticket and writes the encrypted data into the single-journey ticket, including: S21. The ticketing terminal generates the hash value Hi of the key information Message for a single-journey ticket; S22. The ticketing terminal uses the last two bytes Hi_low2 of the hash value Hi as an index to obtain the target quantum symmetric key KeySet[Hi_low2]. S23. The ticketing terminal uses the target quantum symmetric key KeySet[Hi_low2] to encrypt the key information Message of the single-journey ticket, resulting in the ciphertext Qi: Qi=SM4_Encrypt(KeySet[Hi_low2],Message); S24. The ticketing terminal uses the ciphertext Qi and the last two bytes of the hash value Hi, Hi_low2, as encrypted data, writes them into the single-journey ticket, and then sells the ticket to the purchaser.
5. The quantum key based single journey ticket dynamic encryption and verification system as claimed in claim 4, wherein: The device reads encrypted data from the one-way ticket, verifies the ticket's legitimacy based on the encrypted data, and generates new encrypted data based on the new key information of the one-way ticket after passing the legitimacy verification. The device then writes the new encrypted data into the one-way ticket and allows passage, including: S31. The device reads encrypted data from the one-way ticket, obtains the ciphertext Qi and the last two bytes Hi_low2 of the hash value Hi, and sends the last two bytes Hi_low2 of the hash value Hi as an index to the quantum key management system. S32. The quantum key management system obtains the target quantum symmetric key KeySet[Hi_low2], encrypts it using its own private key, and sends it to the device. S33. The device uses the corresponding public key to decrypt and obtain the target quantum symmetric key KeySet[Hi_low2]; S34. The device uses the target quantum symmetric key KeySet[Hi_low2] to decrypt the ciphertext Qi, obtaining the plaintext data Message': Message'=SM4_Decrypt(KeySet[Hi_low2],Qi); S35. The device generates a hash value Hi' of plaintext data Message', and verifies the legality of the one-way ticket by comparing the last two bytes of hash value Hi' with hash value Hi, and checks whether the plaintext data Message' is reasonable. S36. After the one-way ticket is verified to be valid, repeat S21~S24. The device generates new encrypted data based on the new key information of the one-way ticket, writes the new encrypted data into the one-way ticket, and then releases the passenger.
6. The quantum key based single journey ticket dynamic encryption and verification system as claimed in claim 5, wherein: If the one-way ticket is taken away, after a preset time, the quantum key management system will automatically cancel the target quantum symmetric key KeySet[Hi_low2] used for the one-way ticket and synchronize it to the ticketing terminal.
Citation Information
Patent Citations
Two-dimensional code e-ticket generation method and system, two-dimensional code e-ticket verification method and verification terminal
CN105678365A
Identity authentication authorization method suitable for quantum key distribution network
CN115276980A
Terminal device authentication method and system based on identification public key, and computer-readable storage medium
WO2024027070A1