Security detection device for quantum encryption system and detection method thereof
By designing a security detection device for data acquisition, verification, randomness detection and counting modules in the quantum encryption system, the problem of complexity and low detection efficiency of quantum encryption system in the prior art is solved, and efficient and reliable security is achieved Detection ensures 1:1 use and randomness of the key, simplifying the detection process.
Patent Information
- Application Number
- CN202411178437.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-08-27
AI Technical Summary
In the prior art, the security detection methods of quantum encryption systems are complex and inefficient, and cannot effectively ensure the true security of quantum encryption devices.
A security detection device including a data acquisition module, a data verification module, a random detection module and a counting module is designed. By conducting legality verification and random detection of the input and output data of the quantum encryption system, a security detection report is generated. , use the counting module to set the number of times thresholds to reduce the number of feedback times and improve detection reliability.
It realizes efficient detection of quantum encryption processes, ensures 1:1 use and randomness of keys, simplifies the detection process, saves detection time, and improves the reliability and resource utilization of the system.
Smart Images

Figure CN119155023A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication security technology, and in particular to a security detection device and a detection method for a quantum encryption system. Background Art
[0002] At present, in order to ensure the privacy and security of data during circulation, people use encryption to transmit data. Based on the encrypted transmission method, users will assume that data circulation is safe, but the security of the encryption algorithm is actually related to whether the data circulation is truly safe. The patent number CN117131517B proposes "security detection method, terminal device and storage medium of encryption algorithm", which aims to solve the technical problem of inaccurate security detection results of encryption algorithm. This patent is a detection method for the security of traditional encryption algorithms. In view of the fact that traditional encryption algorithms are no longer sufficient to ensure the unbreakability of encryption in today's rapid development of quantum technology, quantum encryption has come into being. When quantum encryption is applied, the system assumes the security of quantum encryption by default, but whether it is really safe requires further testing. Only quantum encryption devices that have passed security inspections are truly safe quantum encryption devices. In addition, the existing detection methods are complicated and cumbersome, inefficient, and not conducive to the security detection of quantum encryption. In view of this, the present application aims to propose a detection method and device for the security of quantum encryption methods. Summary of the invention
[0003] Purpose of the invention: The present application provides a security detection device and a detection method for a quantum encryption system to solve the problems existing in the prior art.
[0004] Technical solution: The present invention provides a security detection device for a quantum encryption system, comprising a data acquisition module, a data verification module, a randomness detection module, a counting module and a result output module, wherein the data acquisition module, the data verification module, the randomness detection module and the result output module are sequentially connected in communication, the data verification module, the randomness detection module and the result output module are also respectively connected in communication with the counting module, and the data acquisition module is also connected in communication with the data execution module;
[0005] The data acquisition module is used to locate the quantum encryption module in the quantum encryption system, record the positioning result in the quantum encryption module, and obtain the input data and output data of the quantum encryption module according to the positioning result; wherein the input data is the plaintext input to the quantum encryption system, and the output data is the ciphertext output from the quantum encryption system;
[0006] The data verification module is used to verify the legitimacy of the received input data and output data; wherein the legitimacy verification includes format verification and content verification;
[0007] The randomness detection module is used to perform randomness detection on the received input data after the legality verification is passed, and send the randomness detection result to the result output module;
[0008] The counting module is used to perform counting operations according to instructions of the data verification module and / or the randomness detection module, and send the counting results to the result output module;
[0009] The result output module is used to store the received counting results and randomness detection results, and generate a detection result report according to the counting results and randomness detection results for output.
[0010] As an improvement of the present invention, the data acquisition module includes a data positioning unit, an input acquisition unit and an output acquisition unit. The data positioning unit is respectively communicated with the input acquisition unit and the output acquisition unit, and is also communicated with an external quantum encryption system; wherein the positioning unit is used to locate the quantum encryption module in the quantum encryption system and record the positioning result in the quantum encryption module; the input acquisition unit is used to obtain the input data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module; the output acquisition unit is used to obtain the output data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module.
[0011] As an improvement of the present invention, the data verification module includes a format verification unit and a content verification unit that communicate with each other, the format verification unit is respectively communicated with the input acquisition unit and the output acquisition unit, and the content verification unit is respectively communicated with the input acquisition unit and the output acquisition module; wherein the format verification unit is used to perform format verification according to the received input data and output data, and send the format verification result as an instruction to the counting module, and at the same time to the randomness detection module; the content verification unit is used to perform content verification according to the received output data, and send the content verification result as an instruction to the counting module, and at the same time to the randomness detection module.
[0012] As an improvement of the present invention, the randomness detection module includes a data processing unit and a data calling unit that communicate with each other, the data processing unit is communicatively connected to an external quantum encryption system, an output acquisition unit, a content verification unit and a counting module, and the data calling unit is also communicatively connected to an external random number detection tool and a result output module; the data processing unit is used to process the received input data after obtaining information that both format verification and content verification have passed from the content verification unit, obtain the marked output data and store it, and at the same time notify the counting module to count, and when the counting result is greater than the number threshold preset in the counting module, notify the data calling unit to call the external random number detection tool to perform randomness detection; the data calling unit is used to call the external random number detection tool to perform randomness detection on the marked output data according to the notification of the data processing unit, and send the verification result to the result output module.
[0013] As an improvement of the present invention, the counting module includes a first counting subunit, a second counting subunit and a third counting subunit; wherein the first counting subunit is connected and communicated with the format verification unit and the result output module, and is used to perform a counting operation according to the instructions of the format verification unit, and send the corresponding first counting result to the result output module; the second counting subunit is connected and communicated with the content verification unit and the result output module, and is used to perform a counting operation according to the instructions of the content verification unit, and send the corresponding second counting result to the result output module; the third counting subunit is connected and communicated with the data processing unit, and is used to perform a counting operation according to the notification of the data processing unit and feed back the corresponding third counting result.
[0014] As an improvement of the present invention, a security detection method for a quantum encryption system is also provided, which is applied to the security detection device for a quantum encryption system described above, and comprises the following steps:
[0015] Step 1: The security detection device is started, and the data acquisition module obtains input data and output data from the quantum encryption system and sends them to the data verification module;
[0016] Step 2: The data verification module verifies the legitimacy of the input data and output data obtained. If the verification passes, and the number of passes is greater than or equal to the number threshold preset in the counting module, the counting module notifies the result output module to generate a test result of passing the legitimacy verification for storage. At the same time, the data verification module sends the input data that passes the verification to the randomness detection module; otherwise, the counting module notifies the result output module to generate and output a verification result of failing the legitimacy verification;
[0017] Step 3: The randomness detection module processes the input data that has passed the legality verification in step 2 to generate marked output data, and notifies the counting module to perform a counting operation on the marked output data. After reaching a preset number threshold in the counting module, it is fed back to the randomness detection module. The randomness detection module performs a randomness test on the marked output data. If the randomness test passes, the test result of passing the randomness test is sent to the result output module; otherwise, the result output module is notified to generate and output a verification result of failing the randomness test;
[0018] Step 4: The result output module generates and outputs a test result report of passing the security test based on the test results of passing the legality verification and the randomness test.
[0019] As an improvement of the present invention, the specific process of step 1 is: the positioning unit in the data acquisition module locates the quantum encryption module in the quantum encryption system and records the positioning result in the quantum encryption module; the input acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the input data of the quantum encryption module according to the positioning result and sends it to the data verification module; the output acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the output data of the quantum encryption module according to the positioning result and sends it to the data verification module.
[0020] As an improvement of the present invention, in step 2, the legality verification includes format verification and content verification, and the format verification passing includes both the format verification passing and the content verification passing;
[0021] The specific process of format verification is as follows:
[0022] The format verification unit in the data verification module reads the length of the received input data to obtain a first length, reads the length of the output data corresponding to the input data to obtain a second length, compares the first length and the second length, and if they are equal, sends the equal format verification results as instructions to the first counting subunit in the counting module, and the first counting subunit starts counting according to the instructions, monitors the counting results, and notifies the security detection device to continue to obtain input data and output data from the quantum encryption system when the corresponding first counting result is less than the first number threshold preset therein; when the corresponding first counting result is greater than or equal to the first number threshold preset therein, the first counting subunit notifies the result output module to generate a first detection result of format verification passing for storage; otherwise, the format verification result of format verification failing is sent as an instruction to the first counting subunit in the counting module, and the first counting subunit notifies the result output module to generate and output a detection result of legality failure based on the format verification result of format verification failing;
[0023] The specific process of content verification is as follows:
[0024] The content verification unit in the data verification module extracts an input data and a corresponding output data from the multiple input data and output data that have passed the format verification in the format verification unit, feeds the input data back to the quantum encryption system for quantum encryption multiple times, obtains multiple quantum encrypted output data, calls the sort() function to arrange the multiple quantum encrypted output data according to the specified rules and stores them, and retains the order relationship between the multiple quantum encrypted output data to form an output database; compares the output data obtained each time with other output data stored in the output database, and if the same output data is not compared, sends the unmatched content verification result as an instruction to the second counting subunit in the counting module, and the second counting subunit The subunit starts counting according to the instruction, monitors the counting result, and notifies the security detection device to continue to obtain the output data after quantum encryption from the quantum encryption system when the corresponding second counting result is less than the second number threshold preset therein; when the corresponding second counting result is greater than or equal to the second number threshold preset therein, notifies the result output module to generate a second detection result of passing the content verification for storage, and at the same time, sends the input data of passing the content verification to the randomness detection module; otherwise, the content verification result of failing the content verification is sent as an instruction to the second counting subunit in the counting module, and the second counting subunit notifies the result output module to generate and output a detection result of failing the legality detection based on the format verification result of failing the format verification.
[0025] As an improvement of the present invention, the specific process of step 3 is as follows:
[0026] Step 3-1: The data processing module in the randomness detection module performs an XOR operation on the received verified input data and itself to obtain a second input data in which each bit is 0, and adds a processing mark to the second input data and feeds it back to the quantum encryption system. The quantum encryption system performs a quantum encryption operation on the second input data to obtain the marked output data with the processing mark;
[0027] Step 3-2: When the data acquisition module performs the data acquisition operation according to step 1, when the marked output data with the processing identifier is detected, the output acquisition unit directly sends the marked output data to the data processing unit, and the data processing unit stores the marked output data while receiving the marked output data and notifies the third counting subunit in the counting module to start counting;
[0028] Step 3-3: The third counting subunit monitors the counting result and the preset third number threshold in real time. When the corresponding third counting result is less than the third number threshold, the security detection device is notified to continue to obtain input data and output data from the quantum encryption system; when the corresponding third counting result is greater than or equal to the third number threshold, the data processing unit is notified to call the data calling unit to execute the next step;
[0029] Step 3-4: the data calling unit obtains the multiple labeled output data stored in the data processing unit, and calls the random number detection tool outside the security detection device to detect the multiple labeled output data;
[0030] Step 3-5: In response to the detection passing, the data calling unit sends the information that the randomness detection passed to the result output module, and the result output module generates and stores the third detection result based on the information that the randomness detection passed; in response to the detection failing, the data calling unit sends the information that the randomness detection failed to the result output module, and the result output module generates and outputs the detection result of randomness detection failure based on the information that the randomness detection failed.
[0031] As an improvement of the present invention, in step 4, when the result output module detects that the first test result, the second test result and the third test result are stored at the same time, a test result report indicating that the safety test has passed is generated and outputted.
[0032] Beneficial effects:
[0033] 1. The detection device of the present invention has high integration, and the detection method can detect whether a 1:1 quantum key is used in the quantum encryption process, whether the use of the quantum key is one-time, and the randomness of the quantum key. The detection method is simple and efficient, and effectively saves detection time;
[0034] 2. The present invention sets a counting module, which is pre-configured with a number threshold, to reduce the number of feedbacks during the detection process, effectively reduce the system operation burden, save system resources, and greatly improve the reliability of the detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0036] Figure 1 A schematic diagram of the connection between the quantum encryption system and the security detection device of this application;
[0037] Figure 2This is a schematic diagram of the structure of the safety detection device of this application;
[0038] Figure 3 This is a flow chart of the safety testing method for this application. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.
[0040] like Figure 1 As shown, the present application proposes a detection device for detecting the security of quantum encryption in a quantum encryption system and a corresponding detection method thereof, wherein the quantum encryption system includes a quantum encryption unit for performing a quantum encryption process. The user inputs the plaintext content to be encrypted into the quantum encryption unit, and after being processed by the quantum encryption unit, the encrypted ciphertext content is output. The security detection device proposed in the present application is connected to the quantum encryption system and is used to detect the security of the quantum encryption process in the quantum encryption system.
[0041] like Figure 2 As shown, the security detection device of the present invention includes a data acquisition module, a data verification module, a randomness detection module, a counting module and a result output module. The data acquisition module, the data verification module, the randomness detection module and the result output module are communicatively connected in sequence, the data verification module, the randomness detection module and the result output module are also communicatively connected to the counting module respectively, and the data acquisition module is also communicatively connected to the data execution module.
[0042] In an embodiment of the present invention, the data acquisition module is used to locate the quantum encryption module in the quantum encryption system, record the positioning result in the quantum encryption module, and obtain the input data and output data of the quantum encryption module according to the positioning result; the input data is the plaintext input to the quantum encryption system, and the output data is the ciphertext output from the quantum encryption system. Specifically, the data acquisition module includes a data positioning unit, an input acquisition unit, and an output acquisition unit. The data positioning unit is respectively connected to the input acquisition unit and the output acquisition unit, and is also connected to the external quantum encryption system; the positioning unit is used to locate the quantum encryption module in the quantum encryption system and record the positioning result in the quantum encryption module; the input acquisition unit is used to obtain the input data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module; the output acquisition unit is used to obtain the output data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module.
[0043] In an embodiment of the present invention, the data verification module is used to perform legality verification on the received input data and output data; the legality verification includes format verification and content verification. The data verification module includes a format verification unit and a content verification unit that communicate with each other, the format verification unit is respectively connected to the input acquisition unit and the output acquisition unit, and the content verification unit is respectively connected to the input acquisition unit and the output acquisition module; the format verification unit is used to perform format verification according to the received input data and output data, and send the format verification result as an instruction to the counting module, and at the same time to the randomness detection module; the content verification unit is used to perform content verification according to the received output data, and send the content verification result as an instruction to the counting module, and at the same time to the randomness detection module.
[0044] In an embodiment of the present invention, the randomness detection module is used to perform randomness detection on the received input data after the legitimacy verification is passed, and send the randomness detection result to the result output module. Specifically, the randomness detection module includes a data processing unit and a data calling unit that communicate with each other, the data processing unit is connected to the external quantum encryption system, the output acquisition unit, the content verification unit and the counting module, and the data calling unit is also connected to the external random number detection tool and the result output module. In an embodiment of the present invention, the random number detection tool adopts a tool that can be used to detect random numbers, which complies with the national standard GMT 0005-2012 "Randomness Detection Specification", GMT 0062-2018 "Random Number Detection Requirements for Cryptographic Products", GMT 0078-2020 "Design Guide for Cryptographic Random Number Generation Modules", GMT0103-2021 "Overall Framework of Random Number Generators" and GMT 0105-2021 "Design Guide for Software Random Number Generators", etc. The core content of the national secret random number detection standard includes that the quality of random numbers directly affects the actual security of key generation, digital signatures and other cryptographic algorithms and protocols.
[0045] The data processing unit is used to process the received input data after obtaining information from the content verification unit that both format verification and content verification have passed, obtain the marked output data and store it, and at the same time notify the counting module to count, and when the counting result is greater than the number threshold preset in the counting module, notify the data calling unit to call an external random number detection tool to perform randomness detection; the data calling unit is used to call an external random number detection tool to perform randomness detection on the marked output data according to the notification of the data processing unit, and send the verification result to the result output module.
[0046] In an embodiment of the present invention, the counting module is used to perform a counting operation according to the instructions of the data verification module and / or the randomness detection module, and send the counting result to the result output module. The execution of the counting operation includes starting counting, comparing the counting result with a preset number of times threshold, and stopping counting. Specifically, the counting module includes a first counting subunit, a second counting subunit and a third counting subunit, and the corresponding counting results generated by the first counting subunit, the second counting subunit and the third counting subunit are respectively called the first counting result, the second counting result and the third counting result; the first counting subunit is connected and communicated with the format verification unit and the result output module, and is used to perform a counting operation according to the instructions of the format verification unit, and send the corresponding first counting result to the result output module; the second counting subunit is connected and communicated with the content verification unit and the result output module, and is used to perform a counting operation according to the instructions of the content verification unit, and send the corresponding second counting result to the result output module; the third counting subunit is connected and communicated with the data processing unit, and is used to perform a counting operation according to the notification of the data processing unit and feedback the corresponding third counting result.
[0047] In an embodiment of the present invention, the result output module is used to store the received counting results and randomness detection results, and generate a detection result report according to the counting results and randomness detection results for output.
[0048] like Figure 3 As shown, the present invention also provides a security detection method for a quantum encryption system, which is applied to the security detection device for a quantum encryption system described above, and the security detection method includes the following steps:
[0049] Step 1: The security detection device is started, and the data acquisition module obtains input data and output data from the quantum encryption system and sends them to the data verification module.
[0050] Specifically, the positioning unit in the data acquisition module locates the quantum encryption module in the quantum encryption system and records the positioning result in the quantum encryption module; the input acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the input data of the quantum encryption module according to the positioning result and sends it to the data verification module; the output acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the output data of the quantum encryption module according to the positioning result and sends it to the data verification module. The input data and the output data are acquired and stored separately, which helps to clarify the direction of the method flow.
[0051] Step 2: The data verification module verifies the legitimacy of the input data and output data obtained. If the verification passes and the number of passes is greater than or equal to the number threshold preset in the counting module, the counting module notifies the result output module to generate a test result that passes the legitimacy verification for storage. At the same time, the data verification module sends the input data that passes the verification to the randomness detection module; otherwise, the counting module notifies the result output module to generate and output a verification result that fails the legitimacy verification.
[0052] Specifically, the legality verification includes format verification and content verification, and the format verification passing is composed of both the format verification passing and the content verification passing;
[0053] More specifically, the specific process of the format verification is as follows:
[0054] The format verification unit in the data verification module reads the length of the received input data to obtain a first length, reads the length of the output data corresponding to the input data to obtain a second length, and compares the first length and the second length. If they are equal, it means that the length of the plaintext input and the output ciphertext in the quantum security system are equal, and further means that the length of the encryption key of the quantum security system and the length of the input plaintext are in a 1:1 ratio. Then, the equal format verification results are sent as instructions to the first counting subunit in the counting module. The first counting subunit starts counting according to the instructions and monitors the counting results. When the corresponding first counting result is less than the first number threshold preset therein, the security detection device is notified to continue to obtain input data and output data from the quantum encryption system; when the corresponding first counting result is greater than or equal to the first number threshold preset therein, the first counting subunit notifies the result output module to generate a first detection result of format verification passing for storage; otherwise, the format verification result of format verification failing is sent as an instruction to the first counting subunit in the counting module. The first counting subunit notifies the result output module to generate and output a detection result of legality failure based on the format verification result of format verification failing. It should be noted that the purpose of setting the number of thresholds here is to reduce the frequency of feedback information from the security detection device of the present invention and reduce the burden on system operation. At the same time, the persuasiveness of individual data verification for system detection is not high enough. Setting a threshold can effectively demonstrate the reliability of detection when the pass rate reaches a certain value. The quantum encryption key used by the quantum encryption system detected by the format verification indicating the security detection device is encrypted at a ratio of 1:1. The length of the key is the same as the plaintext and is theoretically undecipherable, ensuring the security of the communication process.
[0055] Specifically, the specific process of the content verification is as follows:
[0056] The content verification unit in the data verification module extracts an input data and a corresponding output data from the multiple input data and output data that have passed the format verification in the format verification unit, feeds the input data back to the quantum encryption system for quantum encryption multiple times, obtains multiple quantum encrypted output data, calls the sort() function to arrange the multiple quantum encrypted output data according to the specified rules and stores them, while retaining the order relationship between the multiple quantum encrypted output data to form an output database. More specifically, the algorithm stable sort is used to rearrange the elements in the specified range according to the specified rules, and retain the order relationship between equal elements. The output data obtained each time is compared with other output data stored in the output database. If the same output data is not compared, the content verification result that is not compared is sent as an instruction to the second counting subunit in the counting module. The second counting subunit starts counting according to the instruction and monitors the counting result. When the corresponding second counting result is less than the second number threshold preset therein, the security detection device is notified to continue to obtain the output data after quantum encryption from the quantum encryption system; when the corresponding second counting result is greater than or equal to the second number threshold preset therein, the result output module is notified to generate a second detection result of content verification passing for storage, and at the same time, the input data of content verification passing is sent to the randomness detection module. It should be noted that the purpose of setting the number threshold here is the same as above and will not be repeated here. Otherwise, the content verification result that fails the content verification is sent as an instruction to the second counting subunit in the counting module, and the second counting subunit notifies the result output module to generate and output a detection result of legality failure based on the format verification result that fails the format verification. The quantum encryption key used by the quantum encryption system detected by the content verification indication security detection device is one-time-one-pad, and the non-cloning of quantum states and the uncertainty principle are utilized to ensure the security of the encryption process by the non-reproducibility of the key.
[0057] Step 3: The randomness detection module processes the input data that has passed the legality verification in step 2 to generate marked output data, and notifies the counting module to perform a counting operation on the marked output data. After reaching a preset number threshold in the counting module, it feeds back to the randomness detection module. The randomness detection module performs a randomness test on the marked output data. If the randomness test passes, the test result of passing the randomness test is sent to the result output module; otherwise, the result output module is notified to generate and output a verification result that fails the randomness test.
[0058] Specifically, step 3 includes the following:
[0059] Step 3-1: The data processing module in the randomness detection module performs an XOR operation on the received verified input data and itself to obtain a second input data in which each bit is 0, and adds a processing mark to the second input data and feeds it back to the quantum encryption system. The quantum encryption system performs a quantum encryption operation on the second input data to obtain a marked output data with a processing mark. It should be noted that the XOR operation on the input data and itself is performed in order to ensure that the input data to be detected is still transmitted in ciphertext during the communication process, thereby improving data security.
[0060] Step 3-2: When the data acquisition module performs the data acquisition operation according to step 1, when the marked output data with the processing identifier is detected, the output acquisition unit directly sends the marked output data to the data processing unit, and the data processing unit stores the marked output data while receiving the marked output data and notifies the third counting subunit in the counting module to start counting;
[0061] Step 3-3: The third counting subunit monitors the counting result and the preset third number threshold in real time. When the corresponding third counting result is less than the third number threshold, the security detection device is notified to continue to obtain input data and output data from the quantum encryption system; when the corresponding third counting result is greater than or equal to the third number threshold, the data processing unit is notified to call the data calling unit to execute the next step; it should be noted that the purpose of setting the number threshold here is the same as above, and it will not be repeated here. The first number threshold, the second number threshold, and the third number threshold mentioned above are pre-configured in the first counting subunit, the second counting subunit, and the third counting subunit, respectively, and the values of the first number threshold, the second number threshold, and the third number threshold can be equal or unequal.
[0062] Step 3-4: the data calling unit obtains the multiple labeled output data stored in the data processing unit, and calls the random number detection tool outside the security detection device to detect the multiple labeled output data;
[0063] Step 3-5: In response to the detection passing, the data calling unit sends the information that the randomness detection passed to the result output module, and the result output module generates and stores the third detection result based on the information that the randomness detection passed; in response to the detection failing, the data calling unit sends the information that the randomness detection failed to the result output module, and the result output module generates and outputs the detection result that the randomness detection failed based on the information that the randomness detection failed. The random number detection tool used in the present invention is a national secret random number detection tool that complies with the national standard and is suitable for high-frequency testing.
[0064] Step 4: The result output module generates and outputs a test result report of passing the security test based on the test results of passing the legality verification and the randomness test.
[0065] Specifically, when the result output module detects that the first test result, the second test result and the third test result are stored at the same time, a test result report of passing the security test is generated and outputted, for example, to a client outside the detection device of the present invention.
Claims
1. A security detection device for quantum encryption system, It is characterized in that It comprises a data acquisition module, a data verification module, a randomness detection module, a counting module and a result output module, wherein the data acquisition module, the data verification module, the randomness detection module and the result output module are sequentially connected in communication, the data verification module, the randomness detection module and the result output module are also respectively connected in communication with the counting module, and the data acquisition module is also connected in communication with the data execution module; The data acquisition module is used to locate the quantum encryption module in the quantum encryption system, record the positioning result in the quantum encryption module, and obtain the input data and output data of the quantum encryption module according to the positioning result; wherein the input data is the plaintext input to the quantum encryption system, and the output data is the ciphertext output from the quantum encryption system; The data verification module is used to verify the legitimacy of the received input data and output data; wherein the legitimacy verification includes format verification and content verification; The randomness detection module is used to perform randomness detection on the received input data after the legality verification is passed, and send the randomness detection result to the result output module; The counting module is used to perform counting operations according to instructions of the data verification module and / or the randomness detection module, and send the counting results to the result output module; The result output module is used to store the received counting results and randomness detection results, and generate a detection result report according to the counting results and randomness detection results for output.
2. The security detection device for a quantum encryption system according to claim 1, It is characterized in that The data acquisition module includes a data positioning unit, an input acquisition unit and an output acquisition unit. The data positioning unit is respectively connected to the input acquisition unit and the output acquisition unit in communication, and is also connected to an external quantum encryption system in communication. The positioning unit is used to locate the quantum encryption module in the quantum encryption system and record the positioning result in the quantum encryption module. The input acquisition unit is used to obtain the input data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module. The output acquisition unit is used to obtain the output data of the quantum encryption module according to the positioning result and send it to the data verification module and the randomness detection module.
3. The security detection device for a quantum encryption system according to claim 2, It is characterized in that The data verification module includes a format verification unit and a content verification unit that communicate with each other, the format verification unit is respectively connected to the input acquisition unit and the output acquisition unit, and the content verification unit is respectively connected to the input acquisition unit and the output acquisition module; wherein the format verification unit is used to perform format verification according to the received input data and output data, and send the format verification result as an instruction to the counting module, and send it to the randomness detection module at the same time; the content verification unit is used to perform content verification according to the received output data, and send the content verification result as an instruction to the counting module, and send it to the randomness detection module at the same time.
4. The security detection device for a quantum encryption system according to claim 3, It is characterized in that The randomness detection module includes a data processing unit and a data calling unit that communicate with each other. The data processing unit is connected to the external quantum encryption system, output acquisition unit, content verification unit and counting module, and the data calling unit is also connected to the external random number detection tool and result output module; the data processing unit is used to process the received input data after obtaining information that both format verification and content verification have passed from the content verification unit, obtain the marked output data and store it, and notify the counting module to count at the same time, and notify the data calling unit to call the external random number detection tool to perform randomness detection when the counting result is greater than the number threshold preset in the counting module; the data calling unit is used to call the external random number detection tool to perform randomness detection on the marked output data according to the notification of the data processing unit, and send the verification result to the result output module.
5. The security detection device for a quantum encryption system according to claim 4, It is characterized in that The counting module includes a first counting subunit, a second counting subunit and a third counting subunit; wherein the first counting subunit is connected and communicated with the format verification unit and the result output module, and is used to perform a counting operation according to the instruction of the format verification unit, and send the corresponding first counting result to the result output module; the second counting subunit is connected and communicated with the content verification unit and the result output module, and is used to perform a counting operation according to the instruction of the content verification unit, and send the corresponding second counting result to the result output module; the third counting subunit is connected and communicated with the data processing unit, and is used to perform a counting operation according to the notification of the data processing unit and feed back the corresponding third counting result.
6. A method for detecting the security of a quantum encryption system, applied to a device for detecting the security of a quantum encryption system according to any one of claims 1 to 5, It is characterized in that The following steps are involved: Step 1: The security detection device is started, and the data acquisition module obtains input data and output data from the quantum encryption system and sends them to the data verification module; Step 2: The data verification module verifies the legitimacy of the input data and output data obtained. If the verification passes, and the number of passes is greater than or equal to the number threshold preset in the counting module, the counting module notifies the result output module to generate a test result of passing the legitimacy verification for storage. At the same time, the data verification module sends the input data that passes the verification to the randomness detection module; otherwise, the counting module notifies the result output module to generate and output a verification result of failing the legitimacy verification; Step 3: The randomness detection module processes the input data that has passed the legality verification in step 2 to generate labeled output data, and notifies the counting module to perform a counting operation on the labeled output data. After reaching a preset number threshold in the counting module, it is fed back to the randomness detection module. The randomness detection module performs a randomness detection on the labeled output data. If the randomness detection passes, the detection result of passing the randomness detection is sent to the result output module; Otherwise, the result output module is notified to generate and output a verification result that fails the randomness test; Step 4: The result output module generates and outputs a test result report of passing the security test based on the test results of passing the legality verification and the randomness test.
7. The security detection method for a quantum encryption system according to claim 6, It is characterized in that The specific process of step 1 is as follows: the positioning unit in the data acquisition module locates the quantum encryption module in the quantum encryption system and records the positioning result in the quantum encryption module; the input acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the input data of the quantum encryption module according to the positioning result and sends it to the data verification module; The output acquisition unit in the data acquisition module accesses the positioning unit to obtain the positioning result, obtains the output data of the quantum encryption module according to the positioning result, and sends it to the data verification module.
8. The security detection method for a quantum encryption system according to claim 7, It is characterized in that In the step 2, the legality verification includes format verification and content verification, and the format verification passing is composed of both the format verification passing and the content verification passing; The specific process of format verification is as follows: The format verification unit in the data verification module reads the length of the received input data to obtain a first length, reads the length of the output data corresponding to the input data to obtain a second length, compares the first length and the second length, and if they are equal, sends the equal format verification results as instructions to the first counting subunit in the counting module, and the first counting subunit starts counting according to the instructions, monitors the counting results, and notifies the security detection device to continue to obtain input data and output data from the quantum encryption system when the corresponding first counting result is less than the first number threshold preset therein; when the corresponding first counting result is greater than or equal to the first number threshold preset therein, the first counting subunit notifies the result output module to generate a first detection result of format verification passing for storage; otherwise, the format verification result of format verification failing is sent as an instruction to the first counting subunit in the counting module, and the first counting subunit notifies the result output module to generate and output a detection result of legality failure based on the format verification result of format verification failing; The specific process of content verification is as follows: The content verification unit in the data verification module extracts one input data and corresponding output data from the multiple input data and output data that have passed the format verification in the format verification unit, feeds back the input data to the quantum encryption system for quantum encryption multiple times, obtains multiple quantum encrypted output data, calls the sort() function to arrange the multiple quantum encrypted output data according to the specified rule and stores them, and retains the order relationship between the multiple quantum encrypted output data to form an output database; compares the output data obtained each time with other output data stored in the output database, and if the same output data is not compared, sends the unmatched content verification result as an instruction to the second counting subunit in the counting module, and the second counting subunit starts counting according to the instruction, monitors the counting result, and notifies the security detection device to continue to obtain the quantum encrypted output data from the quantum encryption system when the corresponding second counting result is less than the second number threshold preset therein; when the corresponding second counting result is greater than or equal to the second number threshold preset therein, notifies the result output module to generate a second detection result that passes the content verification for storage, and at the same time, sends the input data that passes the content verification to the randomness detection module; Otherwise, the content verification result that fails the content verification is sent as an instruction to the second counting subunit in the counting module, and the second counting subunit notifies the result output module to generate and output a detection result that fails the legality detection based on the format verification result that fails the format verification.
9. The security detection method for a quantum encryption system according to claim 8, It is characterized in that The specific process of step 3 is as follows: Step 3-1: The data processing module in the randomness detection module performs an XOR operation on the received verified input data and itself to obtain a second input data in which each bit is 0, and adds a processing mark to the second input data and feeds it back to the quantum encryption system. The quantum encryption system performs a quantum encryption operation on the second input data to obtain the marked output data with the processing mark; Step 3-2: When the data acquisition module performs the data acquisition operation according to step 1, when the marked output data with the processing identifier is detected, the output acquisition unit directly sends the marked output data to the data processing unit, and the data processing unit stores the marked output data while receiving the marked output data and notifies the third counting subunit in the counting module to start counting; Step 3-3: The third counting subunit monitors the counting result and the preset third number threshold in real time. When the corresponding third counting result is less than the third number threshold, the security detection device is notified to continue to obtain input data and output data from the quantum encryption system; when the corresponding third counting result is greater than or equal to the third number threshold, the data processing unit is notified to call the data calling unit to execute the next step; Step 3-4: the data calling unit obtains the multiple labeled output data stored in the data processing unit, and calls the random number detection tool outside the security detection device to detect the multiple labeled output data; Step 3-5: In response to the detection passing, the data calling unit sends the information that the randomness detection passed to the result output module, and the result output module generates and stores the third detection result based on the information that the randomness detection passed; In response to the detection failure, the data calling unit sends the information that the randomness detection failed to the result output module, and the result output module generates and outputs the detection result of the randomness detection failure based on the information that the randomness detection failed.
10. The security detection method for a quantum encryption system according to claim 9, It is characterized in that In step 4, when the result output module detects that the first test result, the second test result and the third test result are stored at the same time, a test result report indicating that the safety test has passed is generated and outputted.
Citation Information
Patent Citations
Input / output data encryption
CN108449172A
Data encryption compliance detection method and device
CN115017519A
Universal password detection method
CN116305080A
Access authentication method in quantum security module key distribution process
CN117014141A
Encryption system security test system, method and device
CN117014212A
