Encryption method, device, equipment and storage medium based on quantum key

By using quantum key-based encryption methods in mobile storage devices to verify identity information and generate quantum keys to encrypt data, the problem of low data security levels in mobile storage devices is solved and a higher level of data protection is achieved.

CN114329541BActive Publication Date: 2025-01-24INST OF ADVANCED TECH UNIV OF SCI & TECH OF CHINA +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111607746.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-23
Publication Date
2025-01-24
Estimated Expiration
2041-12-23

AI Technical Summary

Technical Problem

The data security level in existing mobile storage devices is low, and data leakage is prone to loss or theft.

Method used

An encryption method based on quantum keys is adopted to ensure the security of data files by receiving and verifying encrypted identity information, generating and using quantum keys to encrypt data.

Benefits of technology

It improves the security of data in the mobile storage device, prevent data from leaking when the device is lost or theft, and enhances the protection level of data files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114329541B_ABST
    Figure CN114329541B_ABST
Patent Text Reader

Abstract

The present application discloses an encryption method, device, equipment and storage medium based on quantum key, the method comprising: receiving a verification request sent by a second device connected to a first device, wherein the verification request comprises encrypted encrypted identity information and instruction information; verifying the encrypted identity information; when the verification passes, obtaining the data file to be transmitted, generating a first quantum key pair in response to the instruction information, wherein the first quantum key pair comprises a first encrypted quantum key; encrypting the data file by the first encrypted quantum key, and storing the encrypted data file to ensure the security of the data file. The authority to transmit the data file is obtained by verifying the identity information between the first device and the second device, and the data file can be transmitted only after obtaining the authority; when obtaining the data file at the same time, a quantum key pair corresponding to the data file is generated in real time, and the data file is encrypted by the quantum key pair to ensure the security of the data file.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of mobile storage devices, and in particular to an encryption method, apparatus, device and storage medium based on quantum keys. Background Art

[0002] With the rapid development and widespread application of the Internet, individuals have an increasing demand for mobile storage. For example, mobile hard disks have been used in more and more occasions due to their large capacity, fast speed and easy portability. However, existing mobile hard disks use hardware encryption and software encryption to protect data files in the hard disk, which cannot guarantee the security of users' data files. Once the mobile hard disk is lost or stolen, the data files will be leaked. Therefore, it is particularly important to encrypt and protect the data in the mobile hard disk to improve the data security level. Summary of the invention

[0003] The main purpose of this application is to provide an encryption method, device, equipment and storage medium based on quantum key, aiming to solve the technical problem of low data security level in existing mobile storage.

[0004] To achieve the above object, the present application provides an encryption method based on a quantum key, the encryption method based on a quantum key comprising:

[0005] receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information;

[0006] verifying the encrypted identity information;

[0007] When the verification is passed, the data file to be transmitted is obtained, and a first quantum key pair is generated in response to the instruction information, wherein the first quantum key pair includes a first encryption quantum key;

[0008] The data file is encrypted using the first encryption quantum key, and the encrypted data file is stored to ensure the security of the data file.

[0009] Optionally, before the step of receiving a verification request sent by a second device connected to the first device, the method includes:

[0010] Receive the registration instruction corresponding to the identity binding operation;

[0011] In response to the registration instruction, generating a second quantum key pair for encrypting or decrypting identity information, the second quantum key pair comprising a second encryption quantum key and a second decryption quantum key;

[0012] Obtain user identity information, encrypt the user identity information through a second encryption quantum key to obtain the encrypted identity information, complete identity registration, and send the encrypted identity information to the second device so that the second device stores the encrypted identity information for identity verification when using the first device.

[0013] Optionally, the step of verifying the encrypted identity information includes:

[0014] Acquire an identity authority information library, wherein the identity authority information library includes at least one identity information;

[0015] determining whether the encrypted identity information matches the at least one identity information;

[0016] If they match, verification succeeds.

[0017] Optionally, the step of determining whether the encrypted identity information matches the at least one identity information includes:

[0018] According to the key attribute of the second encryption quantum key, obtaining a second decryption quantum key corresponding to the second encryption quantum key;

[0019] Decrypting the encrypted identity information using the second decryption quantum key to obtain the user identity information;

[0020] The at least one identity information in the identity authority information library is matched based on the user identity information.

[0021] Optionally, the instruction information includes a storage instruction, and when the verification is passed, the step of obtaining the data file to be transmitted and generating the first quantum key pair in response to the instruction information includes:

[0022] When the verification is successful, establishing a connection between the first device and the external terminal device;

[0023] Acquiring the data file sent by the external terminal device;

[0024] When the action information of acquiring the data file is monitored, a first quantum key pair corresponding to the data file is generated in response to the storage instruction.

[0025] Optionally, the first quantum key pair further includes a first decryption quantum key, and the instruction information includes a read instruction.

[0026] After the step of verifying the encrypted identity information, the method comprises:

[0027] When the verification is passed, responding to the read instruction;

[0028] Acquire a data file to be read, wherein the data file to be read includes a first encryption quantum key;

[0029] Obtaining a first decryption quantum key corresponding to the first encryption quantum key;

[0030] The data file to be read is decrypted by using the first decryption quantum key to obtain a decrypted data file, and the decrypted data file is output.

[0031] Optionally, after the step of encrypting the data file by using the first encryption quantum key and storing the encrypted data file to ensure the security of the data file, the method includes:

[0032] After detecting that the encryption processing operation is completed, a destruction procedure is started to destroy the first encryption quantum key to prevent the first encryption quantum key from being leaked.

[0033] The present application also provides an encryption device based on a quantum key, characterized in that the encryption device based on a quantum key comprises:

[0034] A receiving module, receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information;

[0035] A verification module, verifying the encrypted identity information;

[0036] A generation module, when the verification is passed, obtains the data file to be transmitted, and generates a first quantum key pair in response to the instruction information, wherein the first quantum key pair includes a first encryption quantum key;

[0037] The data encryption module encrypts the data file using the first encryption quantum key and stores the encrypted data file to ensure the security of the data file.

[0038] The present application also provides a quantum key-based encryption device, the quantum key-based encryption device comprising: a memory, a processor, and a program stored in the memory for implementing the quantum key-based encryption method;

[0039] The memory is used to store a program for implementing an encryption method based on a quantum key;

[0040] The processor is used to execute a program for implementing the quantum key-based encryption method. When the program for the quantum key-based encryption method is executed by the processor, the steps of the quantum key-based encryption method as described above can be implemented.

[0041] The present application also provides a computer-readable storage medium, on which is stored a program for implementing the above-mentioned quantum key-based encryption method. When the program for the quantum key-based encryption method is executed by a processor, the steps of the above-mentioned quantum key-based encryption method are implemented.

[0042] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned quantum key-based encryption method when executed by a processor.

[0043] The present application provides a quantum key-based encryption method, device, equipment and storage medium. Compared with the low data security level in mobile storage in the prior art, in the present application, a verification request sent by a second device connected to the first device is received, wherein the verification request includes encrypted encrypted identity information and instruction information; the encrypted identity information is verified; when the verification is passed, the data file to be transmitted is obtained, and a first quantum key pair is generated in response to the instruction information, wherein the first quantum key pair includes a first encrypted quantum key; the data file is encrypted by the first encrypted quantum key, and the encrypted data file is stored to ensure the security of the data file. In the above manner, the identity information between the first device and the second device is verified to obtain the permission to transmit the data file, and the data file can be transmitted only after obtaining the permission; when the data file is obtained at the same time, the quantum key pair corresponding to the data file is generated in real time, and the data file is encrypted by the quantum key pair to ensure the security of the data file. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0046] Figure 1 This is a flow chart of the first embodiment of the encryption method based on quantum key of the present application;

[0047] Figure 2 This is a schematic diagram of the functional modules of the first device and the second device in the encryption method based on quantum key of the present application;

[0048] Figure 3 This is a functional module diagram of a preferred embodiment of the encryption device based on quantum key of the present application;

[0049] Figure 4 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0050] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0051] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0052] Reference Figure 1 , Figure 1 The overall operation diagram of the encryption method based on quantum key is shown to assist the description of the following embodiments. When data needs to be protected, the implementation process of the encryption method based on quantum key of the present invention is shown (here, it specifically refers to the data encryption phenomenon in mobile storage media. If other fields use this method or device to implement other types of data encryption, they should be included in this protection scope)

[0053] The present application embodiment provides an encryption method based on a quantum key. In the first embodiment of the encryption method based on a quantum key of the present application, the encryption method is applied to a first device, referring to Figure 1 , the quantum key-based encryption method includes:

[0054] Step S10, receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information;

[0055] Step S20, verifying the encrypted identity information;

[0056] Step S30, when the verification is passed, obtaining the data file to be transmitted, and generating a first quantum key pair in response to the instruction information, wherein the first quantum key pair includes a first encryption quantum key;

[0057] Step S40: encrypt the data file using the first encryption quantum key, and store the encrypted data file to ensure the security of the data file.

[0058] Based on the first embodiment of the quantum key-based encryption method, reference is made to Figure 1 , the specific steps are as follows:

[0059] Step S10, receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information;

[0060] In this embodiment, the encryption method based on quantum key can be applied to a first device, such as a mobile storage device. The first device has a transmission interface and can be wired to an external terminal device or a second device to transmit data. The first device belongs to an encryption system based on quantum key. The encryption system based on quantum key can also include a second device, such as an external identity key device. It should be noted that the first device can also be replaced by other mobile storage media, such as a mobile hard disk, etc. The following is a detailed analysis using a mobile storage device as an example. The specific implementation methods of other devices are basically the same and will not be repeated here.

[0061] Figure 2 is a block diagram showing a mobile memory for data processing according to an exemplary embodiment. Various modules and connection relationships for performing various functions of data processing are configured in the mobile memory, for example, the mobile memory includes a first identity authentication module, a control module, a first interface module, a quantum key generation module, a quantum encryption and decryption module, and a quantum memory, wherein the interface module, the quantum key generation module, the quantum encryption and decryption module, and the quantum memory are connected:

[0062] The first identity authentication module is used to match the second identity authentication module of the external identity key device, verify the user's identity information, and set the data transmission authority between the mobile storage and the external terminal device.

[0063] Control module: The control module uses the control chip as the control core and can execute preset programs, including communication with each module, identity authentication, data encryption and decryption, and data storage. It is used to open data transmission permissions with external terminal devices when the identity is authenticated.

[0064] The interface module includes a data interface and a power interface. The data interface is used to connect the mobile storage device and the external terminal device to realize data transmission between the mobile storage device and the external terminal device. The data interface is also used to transmit identity information with the external identity key device. The power interface is used to supply power to the mobile storage device.

[0065] The quantum key generation module is used to generate quantum keys to provide protection for the encryption of identity information and data transmission, ensuring the security of identity information and transmitted data. The quantum key generation module is configured as a quantum random number generator chip, and the quantum key it generates is a random key, which can ensure a higher level of data security.

[0066] The quantum encryption and decryption module is used to encrypt and decrypt identity information and data transmission using the quantum key generated by the quantum key generation module.

[0067] Quantum memory, the quantum memory is configured as a FLASH storage array, which is used to store data files encrypted by quantum keys.

[0068] It should be noted that the mobile storage is communicatively connected to the second device, and the second device refers to a terminal device with an identity authentication function that can be connected to the first device by wire. The following detailed analysis is taken as an example of an external identity key device. The specific implementation methods of other second devices are basically the same and will not be repeated here.

[0069] Figure 2 is a block diagram showing a second device (such as an external identity key device) for data encryption according to an exemplary embodiment. Various modules and connection relationships for performing various functions of identity information authentication are configured in the second device. For example, the external identity key device may include a second interface module and a second identity authentication module, wherein:

[0070] The second interface module is used to connect to a mobile storage device to transmit identity information and to supply power to an external identity key device.

[0071] The second identity authentication module is used to match the identity authentication module of the mobile storage device and store the identity information encrypted by the quantum key.

[0072] In this embodiment, the specific application scenario may be: the existing mobile storage media (such as mobile hard disks) have been used in more and more occasions due to their large capacity, fast speed and easy portability. However, the existing mobile hard disks use hardware encryption and software encryption to protect the data files in the hard disk, which cannot guarantee the security of the user's data files. Once the mobile hard disk is lost or stolen, the data files will be leaked. Therefore, it is particularly important to encrypt and protect the data in the mobile hard disk to improve the data security level.

[0073] In this embodiment, the data in the mobile storage is encrypted. When others obtain the mobile storage, they must pass identity authentication to obtain the data in the mobile storage. The data obtained at this time is encrypted data, so it is also necessary to obtain a quantum key to decrypt the data to obtain the original data. Therefore, by encrypting and decrypting the data and authenticating the user's identity, the data security level in the mobile storage medium is improved.

[0074] It should be noted that the mobile storage corresponds to multiple external identity key devices. A user has his own external identity key device. Before data information is transmitted, the mobile storage, the external identity key device, and the external terminal device need to be connected. Specifically, the data interface in the second interface module of the external identity key device connects the mobile storage and the external terminal device by wired connection to realize data transmission between the mobile storage and the external terminal device. The data interface is also connected to the external identity key device by wired connection to realize the transmission of identity information encrypted by quantum key. The power interface is connected to the charging device by wired connection to power the mobile storage. The first interface module and the second interface module are configured as universal USB interfaces, and can also be customized as dedicated data interfaces according to user needs.

[0075] In this embodiment, when the user uses the mobile storage device for data transmission, the identity information authentication is first performed. It can be understood that a verification request sent by an external identity key device connected to the mobile storage device is received, and the verification request includes encrypted encrypted identity information, and the identity information refers to the user identity information stored in the external identity key device. The verification request also includes instruction information, and the instruction information refers to storage instructions and read instructions, wherein the storage instruction refers to the need to store data through the mobile storage device, that is, to transfer data from the external terminal device to the mobile storage device; the read instruction refers to the need to read data through the mobile storage device, that is, to transfer data from the mobile storage device to the external terminal device. Therefore, after the identity information is verified, different data transmission operations are performed according to different instruction information.

[0076] Further, before receiving the verification request sent by the second device connected to the first device, the following steps S11-S13 are included:

[0077] Step S11, receiving a registration instruction corresponding to the identity binding operation;

[0078] Step S12, in response to the registration instruction, generating a second quantum key pair for encrypting or decrypting identity information, wherein the second quantum key pair includes a second encryption quantum key and a second decryption quantum key;

[0079] Step S13, obtain user identity information, encrypt the user identity information through the second encryption quantum key to obtain the encrypted identity information, complete identity registration, and send the encrypted identity information to the second device, so that the second device stores the encrypted identity information for identity verification when using the first device.

[0080] In this embodiment, before using the external identity key device for identity authentication, it is necessary to register the identity information in the mobile memory. Only the user corresponding to the registered identity information can have the authority to use the mobile memory, that is, the authority to transmit data with the external terminal device. At the same time, in order to improve the security of the identity information, it is necessary to encrypt the identity information. Specifically, a registration instruction corresponding to the identity binding operation is received, and in response to the registration instruction, the quantum key generation module in the mobile memory generates a second quantum key pair for encrypting or decrypting the identity information. The second quantum key pair includes a second encryption quantum key and a second decryption quantum key. The user identity information is obtained, and the registered user identity information is encrypted by the second encryption quantum key to obtain the encrypted identity information, and the identity registration is completed. The encrypted encrypted identity information is sent to the external identity key device, so that the second identity authentication module in the external identity key device stores the encrypted identity information, and when the mobile memory is used, the encrypted identity information is used for identity authentication. At the same time, the first identity authentication module in the mobile memory stores the registered user identity information and the second decryption quantum key, which are used to verify the encrypted identity information when performing identity authentication.

[0081] It should be noted that when a user uses a mobile storage device to connect to an external terminal device for the first time, he needs to register his identity information so as to bind the identity information through the second identity authentication module. After successful registration, when the mobile storage device is used to transmit data again, there is no need to repeat the binding and encryption of the identity information.

[0082] Step S20, verifying the encrypted identity information;

[0083] In this embodiment, the mobile storage device needs to verify the encrypted identity information of the user. If the first identity authentication module of the mobile storage device fails to verify, the data transmission permission with the external terminal device will not be opened. Only after the identity authentication is passed, the data transmission permission with the external terminal device will be opened.

[0084] Further, verifying the encrypted identity information includes the following steps S21-S23:

[0085] Step S21, obtaining an identity authority information database, wherein the identity authority information database includes at least one identity information;

[0086] Step S22, determining whether the encrypted identity information matches the at least one identity information;

[0087] Step S23: If they match, the verification is successful.

[0088] In this embodiment, the identity authority database refers to all identity information that has been successfully registered in the mobile storage and bound to the first identity authentication module. Therefore, the identity authority information database includes at least one identity information, and at least one identity information has the authority to use the mobile storage for data transmission. Therefore, when verifying the identity information, it is necessary to determine whether the encrypted identity information matches at least one identity information in the identity authority database, that is, whether the encrypted identity information belongs to the identity information stored in the identity authority database. If it matches, the user corresponding to the encrypted identity information has the authority to use the mobile storage. If it does not match, the data transmission authority with the external terminal device will not be opened, and the user cannot use the mobile storage.

[0089] Further, determining whether the encrypted identity information matches the at least one identity information comprises the following steps S221-S223:

[0090] Step S221, obtaining a second decryption quantum key corresponding to the second encryption quantum key according to the key attribute of the second encryption quantum key;

[0091] Step S222, decrypting the encrypted identity information using the second decryption quantum key to obtain the user identity information;

[0092] Step S223: matching the at least one identity information in the identity authority information database based on the user identity information.

[0093] In this embodiment, when the quantum key generation module generates the second quantum key pair, it also generates the second encryption quantum key and the second decryption quantum key. The quantum key has corresponding attributes when it is generated, such as the identifier of the quantum key, the sequence value, etc. The second decryption quantum key corresponding to the second encryption quantum key is obtained according to the key attribute of the quantum key. Specifically, when the quantum key generation module in the mobile storage generates the quantum key, each pair of quantum keys corresponds to a unique identifier, and the corresponding second decryption quantum key is obtained through the identifier of the second encryption quantum key. The quantum encryption and decryption module in the mobile storage decrypts the encrypted identity information through the second decryption quantum key to obtain the user identity information, and matches the user identity information with at least one identity information in the identity authority information library. If the match is successful, the user corresponding to the encrypted identity information has the authority to use the mobile storage.

[0094] Step S30, when the verification is passed, obtaining the data file to be transmitted, and generating a first quantum key pair in response to the instruction information, wherein the first quantum key pair includes a first encryption quantum key;

[0095] In this embodiment, after the identity authentication is passed, the data transmission permission between the mobile storage device and the external terminal device is opened, and the data file to be transmitted is obtained in response to the instruction information. At the same time, the quantum key generation module in the mobile storage device generates a first quantum key pair, and the first quantum key pair includes a first encryption quantum key and a first decryption quantum key. The first encryption quantum key is used to encrypt the file to be transmitted to ensure the security of the data in the mobile storage device.

[0096] Further, when the verification is passed, the data file to be transmitted is obtained, and a first quantum key pair is generated in response to the instruction information, including the following steps S31-S33:

[0097] Step S31, when the verification is passed, establishing a connection between the first device and an external terminal device;

[0098] Step S32, obtaining the data file sent by the external terminal device;

[0099] Step S33, when the action information of acquiring the data file is monitored, respond to the storage instruction and generate a first quantum key pair corresponding to the data file.

[0100] In this embodiment, the instruction information includes a storage instruction. Therefore, when the user's identity authentication is passed, the data transmission permission between the mobile storage device and the external terminal device is opened, the connection between the mobile storage device and the external terminal device is established, and the data file sent by the external terminal device is obtained, so that the data file is encrypted and stored in the mobile storage device. Specifically, when the action information of obtaining the data file is monitored, the quantum key generation module responds to the storage instruction and generates a first quantum key pair in real time. The first quantum key pair includes a first encryption quantum key and a first decryption quantum key. The first encryption quantum key is used to encrypt the data file to achieve a higher level of data security.

[0101] Step S40: encrypt the data file using the first encryption quantum key, and store the encrypted data file to ensure the security of the data file.

[0102] In this embodiment, after receiving the user's storage instruction, the control module in the mobile storage calls the quantum key generated by the quantum key generation module, and uses the quantum encryption and decryption module to encrypt the data file to be stored. Specifically, the quantum key encryption and decryption module in the mobile storage encrypts the data file by using the first encryption quantum key, and stores the encrypted data file through the quantum storage. In this way, even if the mobile storage is lost or stolen, the encrypted data file inside cannot be obtained, thereby improving the security of the data file.

[0103] Further, after encrypting the data file by using the first encryption quantum key and storing the encrypted data file to ensure the security of the data file, the following steps S41 are included:

[0104] Step S41, after detecting that the encryption processing operation is completed, starting the destruction program to destroy the first encryption quantum key to prevent the first encryption quantum key from being leaked.

[0105] In this embodiment, in order to ensure the security of the quantum key, after detecting that the encryption processing operation is completed, the destruction program is started to destroy the first encrypted quantum key in the first quantum key pair in the first device to prevent the first encrypted quantum key from being leaked or stolen by others, and then the security of the quantum key is ensured by limiting that the quantum key can only be obtained once. It should be noted that the destruction program destroys the first encrypted quantum key of the first quantum key pair, that is, after the quantum key generation module generates the first quantum key pair and the first encrypted quantum key encrypts the data file, the first encrypted quantum key in the quantum key generation module is destroyed, but the first encrypted quantum key is still retained in the encrypted data file, that is, after the destruction program is started, the first encrypted quantum key only exists in the encrypted data file, and then the data file can be decrypted by the first decryption quantum key corresponding to the first encrypted quantum key.

[0106] It should be noted that the destruction program can also be started by a time limit, setting the survival time of the generated quantum key pair. During the survival time, the quantum key encryption and decryption module in the mobile storage can obtain the quantum key pair to encrypt the data file. When the survival time is exceeded, the destruction program is started to achieve security protection of the quantum key.

[0107] In this embodiment, a verification request sent by a second device connected to the first device is received, wherein the verification request includes encrypted encrypted identity information and instruction information; the encrypted identity information is verified; when the verification is passed, the data file to be transmitted is obtained, and a first quantum key pair is generated in response to the instruction information, wherein the first quantum key pair includes a first encrypted quantum key; the data file is encrypted by the first encrypted quantum key, and the encrypted data file is stored to ensure the security of the data file. In the above manner, the identity information between the first device and the second device is verified to obtain the permission to transmit the data file, and the data file can be transmitted only after the permission is obtained; when the data file is obtained at the same time, a quantum key pair corresponding to the data file is generated in real time, and the data file is encrypted by the quantum key pair to ensure the security of the data file.

[0108] Further, based on the above first embodiment, a second embodiment of the encryption method based on quantum key of the present application is proposed. In this embodiment, after the step of verifying the encrypted identity information, the method includes:

[0109] Step S50, when the verification is passed, responding to the read instruction;

[0110] Step S60, obtaining a data file to be read, wherein the data file to be read includes a first encrypted quantum key;

[0111] Step S70, obtaining a first decryption quantum key corresponding to the first encryption quantum key;

[0112] Step S80, decrypting the data file to be read by using the first decryption quantum key to obtain a decrypted data file, and outputting the decrypted data file.

[0113] In this embodiment, the first quantum key pair also includes a first decryption quantum key, and the first decryption quantum key and the first encryption quantum key are used in matching. The instruction information also includes a read instruction, that is, an instruction to read a data file in a mobile memory. Therefore, after the identity authentication is passed, the read instruction is responded to, and the data file to be read is obtained. Since the data file is stored in the mobile memory after being encrypted by the first encryption quantum key, the stored data file to be read includes the first encryption quantum key. When reading the data file, the data file to be read needs to be decrypted and then transmitted. Therefore, according to the attribute of the first encryption quantum key, the corresponding first decryption quantum key is obtained, and the data file to be read is decrypted by the first decryption quantum key to obtain a decrypted file, and the decrypted file is transmitted to the external terminal device.

[0114] In this embodiment, when transmitting data, encrypted identity information and instruction information are received. When the instruction information is a read instruction, the identity of the user to be read is first authenticated. After the authentication is passed, the control module receives the user's read instruction and uses the quantum encryption and decryption module to decrypt the file to be read to ensure the transmission security when reading the data file.

[0115] The present application also provides an encryption device based on quantum key, such as Figure 3 As shown, the quantum key-based encryption device includes:

[0116] The receiving module 10 receives a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information;

[0117] A verification module 20, for verifying the encrypted identity information;

[0118] The generating module 30, when the verification is passed, obtains the data file to be transmitted, and generates a first quantum key pair in response to the instruction information, wherein the first quantum key pair includes a first encryption quantum key;

[0119] The data encryption module 40 encrypts the data file using the first encryption quantum key and stores the encrypted data file to ensure the security of the data file.

[0120] Optionally, the quantum key-based encryption device further includes:

[0121] A registration module receives a registration instruction corresponding to an identity binding operation;

[0122] A first response module, in response to the registration instruction, generates a second quantum key pair for encrypting or decrypting identity information, wherein the second quantum key pair includes a second encryption quantum key and a second decryption quantum key;

[0123] The identity encryption module obtains user identity information, encrypts the user identity information through a second encryption quantum key to obtain the encrypted identity information, completes identity registration, and sends the encrypted identity information to the second device so that the second device stores the encrypted identity information for identity verification when using the first device.

[0124] Optionally, the verification module 20 includes:

[0125] A first acquisition submodule is used to acquire an identity authority information library, wherein the identity authority information library includes at least one identity information;

[0126] A judging submodule, judging whether the encrypted identity information matches the at least one identity information;

[0127] Verify the submodule. If it matches, the verification passes.

[0128] Optionally, the judgment submodule includes:

[0129] an acquisition subunit, acquiring a second decryption quantum key corresponding to the second encryption quantum key according to a key attribute of the second encryption quantum key;

[0130] A decryption subunit decrypts the encrypted identity information using the second decryption quantum key to obtain the user identity information;

[0131] The matching subunit matches the at least one identity information in the identity authority information library based on the user identity information.

[0132] Optionally, the generating module 30 includes:

[0133] A connection submodule, when the verification is passed, establishes a connection between the first device and an external terminal device;

[0134] A second acquisition submodule, acquiring the data file sent by the external terminal device;

[0135] The response submodule, when monitoring the action information of obtaining the data file, responds to the storage instruction and generates a first quantum key pair corresponding to the data file.

[0136] Optionally, the quantum key-based encryption device further includes:

[0137] A second response module, when the verification is passed, responds to the read instruction;

[0138] A first acquisition module acquires a data file to be read, wherein the data file to be read includes a first encrypted quantum key;

[0139] A second acquisition module acquires a first decryption quantum key corresponding to the first encryption quantum key;

[0140] The decryption module decrypts the data file to be read by using the first decryption quantum key to obtain a decrypted data file, and outputs the decrypted data file.

[0141] Optionally, the quantum key-based encryption device further includes:

[0142] The detection module starts a destruction program to destroy the first encryption quantum key after detecting that the encryption processing operation is completed, so as to prevent the first encryption quantum key from being leaked.

[0143] The specific implementation of the quantum key-based encryption device of the present application is basically the same as the above-mentioned embodiments of the quantum key-based encryption method, and will not be repeated here.

[0144] Reference Figure 4 , Figure 4 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.

[0145] like Figure 4 As shown, the first device may include: a processor 1001, such as a CPU, a memory 1005, and a communication bus 1002. The communication bus 1002 is used to realize the connection and communication between the processor 1001 and the memory 1005. The memory 1005 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0146] Optionally, the first device may also include a rectangular user interface, a network interface, a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, etc. The rectangular user interface may include a display screen (Display), an input submodule such as a keyboard (Keyboard), and the optional rectangular user interface may also include a standard wired interface and a wireless interface. The network interface may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface).

[0147] Those skilled in the art will understand that Figure 4 The first device structure shown in the figure does not constitute a limitation on the first device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0148] like Figure 4 As shown, the memory 1005 as a storage medium may include an operating system, a network communication module, and an encryption program based on a quantum key. The operating system is a program that manages and controls the hardware and software resources of the first device, and supports the operation of the encryption program based on a quantum key and other software and / or programs. The network communication module is used to realize the communication between the components inside the memory 1005, and the communication with other hardware and software in the encryption system based on a quantum key.

[0149] exist Figure 4 In the first device shown, the processor 1001 is used to execute the quantum key-based encryption program stored in the memory 1005 to implement the steps of the quantum key-based encryption method described in any one of the above items.

[0150] The specific implementation of the first device of the present application is basically the same as the above-mentioned embodiments of the quantum key-based encryption method, and will not be repeated here.

[0151] An embodiment of the present application provides a computer-readable storage medium, and the computer-readable storage medium stores one or more programs, and the one or more programs can also be executed by one or more processors to implement the steps of any of the above-mentioned quantum key-based encryption methods.

[0152] The specific implementation methods of the computer-readable storage medium of the present application are basically the same as the above-mentioned embodiments of the quantum key-based encryption method, and will not be repeated here.

[0153] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned quantum key-based encryption method when executed by a processor.

[0154] The specific implementation of the computer program product of the present application is basically the same as the above-mentioned embodiments of the quantum key-based encryption method, and will not be repeated here.

[0155] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0156] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0158] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A quantum key-based encryption method, applied to a first device, characterized in that: The quantum key-based encryption method includes: receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information; verifying the encrypted identity information; When the verification is passed, a connection is established between the first device and the external terminal device, a data file to be transmitted sent by the external terminal device is obtained, and a first quantum key pair is generated in response to the instruction information, wherein the first quantum key pair includes a first encrypted quantum key; Encrypting the data file by using the first encryption quantum key, and storing the encrypted data file to ensure the security of the data file; Before the step of receiving a verification request sent by a second device connected to the first device, the method includes: When the second device is connected for the first time, receiving a registration instruction corresponding to the identity binding operation; In response to the registration instruction, generating a second quantum key pair for encrypting or decrypting identity information, the second quantum key pair comprising a second encryption quantum key and a second decryption quantum key; Obtain user identity information, encrypt the user identity information through a second encryption quantum key to obtain the encrypted identity information, complete identity registration, and send the encrypted identity information to the second device so that the second device stores the encrypted identity information for identity verification when using the first device.

2. The quantum key-based encryption method according to claim 1, characterized in that: The step of verifying the encrypted identity information comprises: Acquire an identity authority information library, wherein the identity authority information library includes at least one identity information; determining whether the encrypted identity information matches the at least one identity information; If they match, verification succeeds.

3. The quantum key-based encryption method according to claim 2, characterized in that: The step of determining whether the encrypted identity information matches the at least one identity information comprises: According to the key attribute of the second encryption quantum key, obtaining a second decryption quantum key corresponding to the second encryption quantum key; Decrypting the encrypted identity information using the second decryption quantum key to obtain the user identity information; The at least one identity information in the identity authority information library is matched based on the user identity information.

4. The quantum key-based encryption method according to claim 1, wherein: The instruction information includes a storage instruction, and when the verification is passed, a connection is established between the first device and an external terminal device, a data file to be transmitted sent by the external terminal device is obtained, and a step of generating a first quantum key pair in response to the instruction information also includes: When the action information of acquiring the data file is monitored, a first quantum key pair corresponding to the data file is generated in response to the storage instruction.

5. The quantum key-based encryption method according to claim 1, wherein: The first quantum key pair further includes a first decryption quantum key, the instruction information includes a read instruction, After the step of verifying the encrypted identity information, the method comprises: When the verification is passed, responding to the read instruction; Acquire a data file to be read, wherein the data file to be read includes a first encryption quantum key; Obtaining a first decryption quantum key corresponding to the first encryption quantum key; The data file to be read is decrypted by using the first decryption quantum key to obtain a decrypted data file, and the decrypted data file is output.

6. The quantum key-based encryption method according to claim 1, characterized in that: After the step of encrypting the data file by using the first encryption quantum key and storing the encrypted data file to ensure the security of the data file, the method includes: After detecting that the encryption processing operation is completed, a destruction procedure is started to destroy the first encryption quantum key to prevent the first encryption quantum key from being leaked.

7. An encryption device based on quantum key, characterized in that: The device comprises: A receiving module, receiving a verification request sent by a second device connected to the first device, wherein the verification request includes encrypted identity information and instruction information; A verification module, verifying the encrypted identity information; A generating module, when the verification is passed, establishes a connection between the first device and the external terminal device, obtains the data file to be transmitted sent by the external terminal device, and generates a first quantum key pair in response to the instruction information, wherein the first quantum key pair includes a first encrypted quantum key; A data encryption module, encrypting the data file by using the first encryption quantum key, and storing the encrypted data file to ensure the security of the data file; A registration module, which receives a registration instruction corresponding to an identity binding operation when the second device is connected for the first time; A first response module, in response to the registration instruction, generates a second quantum key pair for encrypting or decrypting identity information, wherein the second quantum key pair includes a second encryption quantum key and a second decryption quantum key; The identity encryption module obtains user identity information, encrypts the user identity information through a second encryption quantum key to obtain the encrypted identity information, completes identity registration, and sends the encrypted identity information to the second device so that the second device stores the encrypted identity information for identity verification when using the first device.

8. An encryption device based on quantum key, characterized in that: The quantum key-based encryption device comprises: a memory, a processor, and a quantum key-based encryption program stored in the memory and executable on the processor. When the quantum key-based encryption program is executed by the processor, the steps of the method as described in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program for implementing an encryption method based on a quantum key, and the program for implementing an encryption method based on a quantum key is executed by a processor to implement the steps of the encryption method based on a quantum key as claimed in any one of claims 1 to 6.

Citation Information

Patent Citations

  • File encryption method and device and file decryption method and device

    CN110502909A