U key equipment based on post quantum cryptography
By using Criystals-Kyber and Criystals-Dilithium technologies in U-shield devices to replace the traditional SM2 and SM9 algorithms, the problem that existing U-shield devices are easily compromised by quantum computers is solved, and higher security and quantum computer resistance is achieved Attack ability.
Patent Information
- Application Number
- CN202410927802.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-11
- Publication Date
- 2024-11-29
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The encryption, decryption and digital signature algorithms of existing U-shield devices are easily compromised by quantum computers, resulting in high risks of information leakage and identity theft.
Criystals-Kyber technology based on post-quantum cryptography is used to replace the traditional SM2 algorithm, and Criystals-Dilithium technology replaces the SM9 algorithm to provide stronger security to resist quantum computer attacks.
It effectively improves the encryption, decryption and digital signature security of U-Shield devices, prevents quantum computer attacks, and reduces the risks of information leakage and identity theft.
Smart Images

Figure CN119051846A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of communication security technology, relates to post-quantum cryptography encryption technology, and specifically relates to a U-shield device based on post-quantum cryptography. Background Art
[0002] At present, encryption, decryption and digital signature methods based on USB shield are widely used in electronic banking, which greatly increases the confidentiality of bank transactions and the security of identity authentication. Electronic banking mainly involves encrypted upload and download of transaction information between the server and the client, as well as user identity authentication operations. Therefore, designing an efficient, reliable, secure USB shield device with encryption, decryption and digital signature functions is of great significance to banking business.
[0003] However, the encryption, decryption and digital signature of current U-shield devices mainly use encryption algorithms such as SM2 and SM9, which are elliptic curve cryptographic algorithms and are difficult to be cracked by ordinary computers. However, with the development of quantum computer technology, these encryption and digital signature algorithms can now be completely broken. Therefore, the U-shield system designed based on these algorithms has a greater risk of information leakage and identity theft. In summary, a more secure U-shield device that can resist quantum computer attacks is urgently needed to solve the above problems. Summary of the invention
[0004] In order to solve the problems in the prior art, the present invention provides a U-shield device based on post-quantum cryptography.
[0005] The U shield device includes on-chip flash, CPU, memory and USB; the on-chip flash is used to store running programs and private keys for encryption and decryption operations, digital signatures and signature verification operations; the CPU is used to perform encryption and decryption operations, digital signatures and signature verification operations. When the CPU processes external input processing instructions and data to be processed, it will read the corresponding running program from the on-chip flash according to the processing instructions, and choose whether to read the private key according to the corresponding running program; at the same time, the intermediate calculation results when the CPU performs data processing will be stored in the memory; the U shield device communicates with external devices through USB, and the USB interacts with the CPU and memory through the system bus.
[0006] Compared with the prior art, the present invention has the following beneficial effects:
[0007] 1) The present invention uses Criystals-Kyber technology to replace algorithms such as SM2 in traditional U-Shield systems, overcoming the problem that encryption and decryption methods in traditional U-Shield systems can be cracked by quantum computers, and can ensure the security of system encryption and decryption.
[0008] 2) The present invention uses Criystals-Dilithium technology to replace algorithms such as SM9 in traditional U-Shield systems, overcoming the problem that digital signatures in traditional U-Shield systems can be cracked by quantum computers, and can ensure the security of digital signatures. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 This is the overall schematic diagram of the U-Shield architecture;
[0010] Figure 2 This is a flowchart of using U-shield to encapsulate keys;
[0011] Figure 3 This is a schematic diagram of the Crystals-Dilithium algorithm;
[0012] Figure 4 This is a schematic diagram of the Crystals-Kyber algorithm. DETAILED DESCRIPTION
[0013] The present invention is further described and illustrated below in conjunction with specific embodiments. The embodiments are merely exemplary of the present disclosure and do not define the scope of limitation. The technical features of each embodiment of the present invention may be combined accordingly without conflicting with each other.
[0014] The present invention aims to design a U-shield system based on post-quantum cryptography technology based on the Cortex-M4 architecture, which has the basic functions of realizing digital signatures and key encapsulation using post-quantum encryption algorithms, and can properly store the user's private key in a secure hardware medium without leakage. The encryption process supports two algorithms to cope with different scenarios. In the digital signature scenario, it uses Crystals-Dilithium technology to sign the data input into the U-shield, and then transfers the signed data back to the computer through the USB interface; in the key encapsulation scenario, it uses Crystals-Kyber technology and supports the general transport layer security protocol (TLS protocol). In both scenarios, the user's private key cannot be accessed from the outside.
[0015] To help understand, firstly, the algorithm involved in the example of this application is described:
[0016] Crystal-Kyber Algorithm:
[0017] like Figure 4As shown in the figure, Crystal-Kyber is a cryptographic algorithm based on lattice problems. It is an asymmetric encryption algorithm that can resist attacks from both ordinary computers and quantum computers and has strong confidentiality. The algorithm first generates a pair of Crystal-Kyber keys by the receiver, where the public key can be published in the network and the private key is only held by the user. The sender encrypts the plaintext with the public key and sends it to the receiver. The receiver can decrypt and restore the plaintext with the private key.
[0018] Specifically, the core theorem of the mutual inversion of encryption and decryption in the Crystal-Kyber algorithm is the error learning problem in the lattice problem. The main operations of the Crystals-Kyber algorithm include key generation (Keypair), encapsulation (Encap) and decapsulation (Decap). Among them, the key generation step obtains the coefficient polynomial matrix through the hash function (for convenience, all hash functions are represented by Keccak-f) and the central binomial distribution sampling, and completes the vector multiplication and addition through NTT (number theoretic transformation), and supplemented by Keccak-f operation to obtain the public key and private key pair. The encapsulation step is more complicated. The first half is the same as the key generation step, but it is necessary to accumulate the random key after Keccak-f operation and INTT (inverse number theoretic transformation), and then Keccak-f again to obtain the ciphertext and shared key. The decapsulation step is relatively simple. After NTT, the ciphertext is multiplied with the private key in the NTT domain, and vector addition is performed after INTT to obtain the plaintext (i.e., the shared key). When evaluating the operating efficiency of the algorithm, a common metric is to add the number of cycles required to run a Keypair, an Encap, and a Decap as the total number of cycles required for Kyber execution.
[0019] Crystal-Dilithium algorithm:
[0020] like Figure 3 As shown in the figure, the Crystal-Dilithium algorithm is a cryptographic algorithm based on the lattice problem. It is an asymmetric encryption algorithm and is considered to be the best digital signature algorithm in the post-quantum era. It can resist attacks from both ordinary computers and quantum computers and has strong security. The algorithm first generates a pair of Crystal-Dilithium keys by the sender, where the public key can be published on the network and the private key is only held by the user. The sender uses the private key to sign the plaintext data to be sent and then sends the data to the receiver. The receiver can use the sender's public key to verify the signature of the data to determine whether the tree comes from the sender.
[0021] Specifically, the core theorem of the inverse of signature and verification in the Crystal-Dilithium algorithm is the error learning problem in the lattice problem. The main operations of the Crystals-Dilithium algorithm include key generation (Keypair), signature (Sign) and verification (Verify). The key generation step first performs rejection sampling and central binomial distribution sampling on the random numbers that have undergone Keccak-f operations. Then, the sampling values after the central binomial distribution sampling are vector multiplied with the sampling values after rejection after the fast number theoretic transformation (NTT). The result after the vector multiplication is subjected to the INTT operation and the Keccak-f operation to generate the public key and private key pair. The signing step is more complicated than Kyber, and it needs to go through multiple NTT-vector multiplication-INTT steps, and the signature itself may fail, and the step needs to be repeated. In the verification step, the operation process to verify whether the signature is correct requires that the public key be vector multiplied with the signature in the NTT form after keccak-f and rejection sampling, and then vector addition is performed after INTT.
[0022] Figure 1 The overall schematic diagram of the U shield architecture. The U shield device proposed in the present invention is implemented based on the STM32F407ZGT6 chip. The U shield device consists of on-chip flash (flash memory), CPU (central processing unit), memory, system bus, RTC (real time clock), USB and GPIO (general-purpose input output). The on-chip flash solidifies the programs required for the normal operation of the system, such as the Crystal-Dilithium algorithm and the Crystal-Kyber algorithm, and the user's private key is also stored in the on-chip flash. The core operations of the system, such as encryption and decryption operations, digital signatures and signature verification operations, all occur on the CPU. When the CPU processes these operations, it needs to read the user's private key from the on-chip flash. When the CPU processes the operation, it also needs to store the results of some intermediate steps in the memory. The USB is responsible for the communication between the system and the outside world, and it interacts with the CPU and memory through the system bus for data. The GPIO is also connected to the CPU through the system bus, and it can be connected to an LED light to mark the working status of the system. RTC (Real Time Clock) is the real-time clock of the system and has a timing function; GPIO, RTC and USB are all mounted on the peripheral bus.
[0023] The following will be combined Figure 2This section introduces the steps of using the U-Shield device to perform data encryption operations. First, the U-Shield reads the public key of the data recipient from the outside world through the USB port and stores it in the memory of the U-Shield device. After that, the CPU uses the Crystal-Kyber algorithm to encrypt the shared key with the public key and sends it to the outside world using USB. After the recipient of the communication receives the encrypted data, it uses the private key to decrypt it to obtain the shared key. After that, the U-Shield can use the shared key to symmetrically encrypt the data. The system can support multiple symmetric encryption algorithms such as AES, SM1, SM4, and DES.
[0024] The following will be combined Figure 2 This section introduces the steps of using the USB device to perform data decryption operations. First, the USB device will read the encrypted data sent by the data sender from the outside through the USB port and store it in the memory of the USB device. After that, the CPU will read the private key from the flash and use the Crystal-Kyber algorithm and private key to decrypt the encrypted data to obtain the shared key for this communication. After that, the USB device can use the shared key to decrypt the sender's message.
[0025] When using the U shield device for data encryption operations, the recipient will generate a public-private key pair and send the public key to the sender. The sender's U shield device will read the data recipient's public key from the external device via USB and store it in the memory of the U shield device; the CPU reads the running program for encryption operations from the on-chip flash and uses the public key to encrypt the preset shared key, and sends the encrypted shared key to the external device via USB; after the data recipient receives the encrypted shared key, it uses the private key to decrypt it to obtain the shared key; and when subsequently transmitting data with the data recipient, the U shield device uses the shared key to encrypt the data to be transmitted input by the external device.
[0026] The sender uses the shared key to encrypt the data to be transmitted input by the external device on its own U-shield device, and then transmits the encrypted data to the external device via USB. The external device transmits the encrypted data to the external device of the receiver. The receiver's U-shield device reads the encrypted data sent by the data sender from the external device via USB and stores it in the memory of the U-shield device; the CPU reads the running program and private key for decryption calculation from the on-chip flash to decrypt the encrypted data and obtain the shared key; and when subsequently transmitting data with the data sender, the U-shield device uses the shared key to decrypt the data sent by the data sender.
[0027] The CPU uses the Crystal-Kyber method for encryption and decryption operations.
[0028] The following are the steps to use the USB shield device to perform digital signature operations.
[0029] When using a USB shield for digital signature, the USB shield will first use the USB interface to read the data that needs to be digitally signed from the outside. Then the CPU of the USB shield device will read the private key from the on-chip flash and use the Crystals-Dilithium algorithm and private key to sign the data. The signed data is then transmitted back to the outside via the USB interface. The Crystals-Dilithium process is as follows: Figure 3 shown.
[0030] In a specific embodiment of the present invention, when the U shield device performs digital signature, the CPU reads the running program and private key for digital signature from the on-chip flash, then performs digital signature processing on the data input into the U shield device, and finally transmits the digitally signed data back to the external device via USB.
[0031] When the U-Shield device performs signature verification, it reads the public key of the data recipient and the signed data from the external device via USB and stores them in the memory of the U-Shield device; the CPU reads the running program for signature verification from the on-chip flash and uses the public key to verify the signed data.
[0032] The CPU uses the Crystals-Dilithium method for digital signing and verification.
[0033] The above-mentioned embodiments only express several implementation modes of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the present invention. For those of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A U-shield device based on post-quantum cryptography, It is characterized in that include: On-chip flash, CPU, memory and USB; The on-chip flash is used to store the running programs and private keys for encryption and decryption operations, digital signatures and signature verification operations; The CPU is used to perform encryption and decryption operations, digital signatures, and signature verification operations. When the CPU processes external input processing instructions and data to be processed, it will read the corresponding running program from the on-chip flash according to the processing instructions, and choose whether to read the private key according to the corresponding running program; at the same time, the intermediate calculation results of the CPU during data processing will be stored in the memory; The U shield device communicates with external devices via USB, and USB interacts with CPU and memory via the system bus for data.
2. The USB shield device according to claim 1, It is characterized in that When the U shield device performs digital signature, the CPU reads the running program and private key for digital signature from the on-chip flash, then performs digital signature processing on the data input to the U shield device, and finally transmits the digitally signed data back to the external device via USB.
3. The USB shield device according to claim 2, It is characterized in that The CPU uses the Crystals-Dilithium method to perform digital signature.
4. The USB shield device according to claim 1, It is characterized in that When the U-shield device performs the signature verification operation, the U-shield device reads the public key of the data recipient and the signed data from the external device via USB and stores them in the memory of the U-shield device; The CPU reads the running program for signature verification from the on-chip flash and uses the public key to verify the signed data.
5. The U-shield device according to claim 4, It is characterized in that The CPU uses the Crystals-Dilithium method to verify the signature.
6. The USB shield device according to claim 1, It is characterized in that When the U-shield device performs data encryption, the U-shield device reads the public key of the data recipient from the external device via USB and stores it in the memory of the U-shield device; The CPU reads the running program for encryption calculation from the on-chip flash and encrypts the preset shared key with the public key, and sends the encrypted shared key to the external device via USB; after receiving the encrypted shared key, the data receiver uses the private key to decrypt it and obtain the shared key; When subsequently transmitting data with the data recipient, the U-shield device uses the shared key to encrypt the data to be transmitted input by the external device.
7. The U-shield device according to claim 6, It is characterized in that The CPU uses the Crystal-Kyber method to perform encryption operations.
8. The U-shield device according to claim 6, It is characterized in that When the U-shield device performs data decryption, the U-shield device reads the encrypted data sent by the data sender from the external device via USB and stores it in the memory of the U-shield device; The CPU reads the running program and private key for decryption operation from the on-chip flash to decrypt the encrypted data and obtain the shared key; and when subsequently transmitting data with the data sender, the U shield device uses the shared key to decrypt the data sent by the data sender.
9. The U-shield device according to claim 8, It is characterized in that The CPU uses the Crystal-Kyber method to perform decryption operations.
Citation Information
Patent Citations
USB (universal serial bus) Key based secure data transmission method and system
CN103546289A
Secure online tax-declaring method based on USBKEY
CN104574176A
Lightweight data protection system based on national cryptographic algorithm
CN113420309A
Information security device of universal serial bus human interface device class and data transmission method for same
US20070208949A1
Cited By
Memory control circuit unit and file security management system
TWI931124B
