Search

CN-121996545-A - Fuzzy test method and device for homomorphic encryption and electronic equipment

CN121996545ACN 121996545 ACN121996545 ACN 121996545ACN-121996545-A

Abstract

The application provides a fuzzy test method, a fuzzy test device and electronic equipment for full homomorphic encryption, and relates to the technical field of computer program vulnerability detection, wherein the method comprises the following steps: obtaining test seeds and basic expressions based on seed corpus seeds, and performing mutation processing on the basic expressions based on a mutation device to obtain mutation expressions; algebraic transformation is carried out on the variant expressions to obtain a plurality of equivalent expressions, test cases are generated based on the equivalent expressions and test seeds, the test cases are input into an executor to be executed, and whether vulnerabilities exist is judged based on an execution result. According to the fuzzy test method, the fuzzy test device and the electronic equipment for full homomorphic encryption, through introducing the equivalent expression transformation technology and combining the basic principle of the fuzzy test, the test case which can deeply detect the program core calculation logic can be efficiently and systematically generated, and a reliable test prophetic machine is built to automatically judge the correctness of the calculation result.

Inventors

  • SHENG ZHENSHENG
  • MA FUCHEN
  • CAO XUELIAN
  • ZHAO YANYANG
  • JIANG YU

Assignees

  • 清华大学

Dates

Publication Date
20260508
Application Date
20251229

Claims (10)

  1. 1. A fuzzy test method for isomorphic encryption, comprising: obtaining test seeds and basic expressions based on seed corpus seeds, and performing mutation processing on the basic expressions based on a mutation device to obtain mutation expressions; algebraic transformation is carried out on the variant expression to obtain a plurality of equivalent expressions, and test cases are generated based on the plurality of equivalent expressions and the test seeds, wherein the equivalent expressions are equivalent to the variant expression and have different calculation structures; And inputting the test case into an executor for execution, and judging whether a vulnerability exists or not based on an execution result.
  2. 2. The method of claim 1, wherein the mutator comprises a low noise mutator and a high noise mutator, wherein the high noise mutator generates a mutated expression with a computational complexity that is greater than a computational complexity of the low noise mutator generates a mutated expression; The mutation processing is performed on the basic expression based on a mutation device, so as to obtain a mutation expression, which comprises the following steps: Acquiring noise feedback information obtained in the previous round of testing process, and screening a target mutation device from the low noise mutation device and the high noise mutation device based on the noise feedback information; And performing mutation processing on the basic expression by using the target mutation device to obtain the mutation expression.
  3. 3. The method of claim 2, wherein the screening the target variant from the low noise variant and the high noise variant based on the noise feedback information comprises: Determining the high-noise variant as the target variant under the condition that the noise feedback information indicates that the consumption of the noise budget in the previous test process is smaller than a first preset threshold value; And determining the low-noise variant as the target variant when the noise feedback information indicates that the consumption of the noise budget in the previous test process is greater than or equal to the first preset threshold value.
  4. 4. The method of claim 1, wherein algebraically transforming the variant expression to obtain a plurality of equivalent expressions comprises: algebraic transformation is performed on the variant expression, and the variant expression is transformed into a factorized form or a Hall form to obtain the plurality of equivalent expressions.
  5. 5. The method of claim 1, wherein the actuators comprise a native actuator and an isomorphic actuator; the step of inputting the test case into an executor for execution and judging whether a vulnerability exists based on an execution result comprises the following steps: Calculating the basic expression by using the original executor to obtain a true value calculation result, encrypting plaintext data in a test case by using the homomorphic encryption executor, and respectively executing homomorphic calculation sequences in standard, factor decomposition and Hona forms on the encryption result to obtain a plurality of corresponding homomorphic encryption calculation results; Comparing the plurality of full homomorphic encryption calculation results with the true value calculation results respectively, and comparing the plurality of full homomorphic encryption calculation results, and if the comparison results indicate that the calculation results are inconsistent, determining that the loophole exists.
  6. 6. The method of claim 1, wherein after inputting the test case into an executor for execution and determining whether a vulnerability exists based on an execution result, the method further comprises: acquiring residual noise information after full homomorphic encryption is executed, and calculating the complexity of the test case based on the residual noise information and an expression in the current test process; and determining noise level information based on the complexity of the test case, and generating noise feedback information based on the noise level information.
  7. 7. The method of claim 6, wherein after determining noise level information based on the complexity of the test case, the method further comprises: Calculating the value of the test case based on the noise level information, and determining the test seed as a high-value seed under the condition that the value of the test case exceeds a second preset threshold value; Wherein the high value seed is used to update the seed corpus.
  8. 8. A fuzzy test apparatus for full homomorphic encryption, the apparatus comprising: The acquisition module is used for obtaining test seeds and basic expressions based on seed corpus seeds; the mutation module is used for executing mutation processing on the basic expression based on a mutation device to obtain a mutation expression; The generation module is used for algebraically transforming the variant expression to obtain a plurality of equivalent expressions, and generating a test case based on the plurality of equivalent expressions and the test seed, wherein the equivalent expressions are equivalent to the variant expression and have different calculation structures; And the test module is used for inputting the test case into the executor for execution and judging whether the loophole exists or not based on an execution result.
  9. 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the fuzzy test method for full homomorphic encryption according to any one of claims 1 to 7 when the program is executed.
  10. 10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, implements the steps of the fuzzy test method for full homomorphic encryption as claimed in any one of claims 1 to 7.

Description

Fuzzy test method and device for homomorphic encryption and electronic equipment Technical Field The present application relates to the field of computer program vulnerability detection technology, and in particular, to a fuzzy test method and apparatus for homomorphic encryption, and an electronic device. Background With the rapid development of cloud computing, big data and artificial intelligence technology, data privacy and security problems are increasingly prominent. Full homomorphic encryption, a leading-edge cryptographic technique, allows any complex computation of encrypted data without decrypting the data, thereby enabling processing of sensitive information in an untrusted environment (e.g., cloud servers). Fuzzy testing is a widely used and effective vulnerability discovery technique. It discovers potential security vulnerabilities by providing a target program with a large number of automatically or semi-automatically generated unexpected inputs and monitoring the program for anomalies (e.g., crashes, assertion failures, etc.) during its operation. However, since the implementation of the homomorphic encryption scheme is extremely complex, the security of the homomorphic encryption scheme not only depends on the difficulty of the underlying mathematical problem, but also depends on the correctness and robustness of the software library engineering implementation, and the fuzzy test tool in the related art cannot be directly applied to the homomorphic encryption. Based on this, there is a need for an automated test method that can understand and adapt to the fully homomorphic encryption core mechanism, and systematically and efficiently mine deep vulnerabilities in its computational logic. Disclosure of Invention The application aims to provide a fuzzy test method, a fuzzy test device and electronic equipment for isomorphic encryption, which can efficiently and systematically generate test cases capable of deeply detecting program core calculation logic by introducing an equivalent expression conversion technology and combining the basic principle of fuzzy test, and establish a reliable test predictor to automatically judge the correctness of a calculation result. The application provides a fuzzy test method for full homomorphic encryption, which comprises the following steps: obtaining a test seed and a basic expression based on a seed corpus, executing mutation processing on the basic expression based on a mutation device to obtain a mutation expression, algebraically transforming the mutation expression to obtain a plurality of equivalent expressions, and generating a test case based on the equivalent expressions and the test seed, wherein the equivalent expressions are expressions which are equivalent to the mutation expression and have different calculation structures, inputting the test case into an executor for execution, and judging whether a vulnerability exists based on an execution result. The method comprises the steps of obtaining a mutation expression, obtaining noise feedback information obtained in a previous round of testing process, screening out a target mutation device from the low-noise mutation device and the high-noise mutation device based on the noise feedback information, and obtaining the mutation expression by using the target mutation device to perform mutation processing on the basic expression. Optionally, the screening of the target mutabiliser from the low noise mutabiliser and the high noise mutabiliser based on the noise feedback information includes determining the high noise mutabiliser as the target mutabiliser when the noise feedback information indicates that the consumption of the noise budget in the previous round of testing is less than a first preset threshold, and determining the low noise mutabiliser as the target mutabiliser when the noise feedback information indicates that the consumption of the noise budget in the previous round of testing is greater than or equal to the first preset threshold. Optionally, algebraic transforming the variant expression to obtain a plurality of equivalent expressions, including algebraic transforming the variant expression, transforming the variant expression into factorized form, or holner form, to obtain the plurality of equivalent expressions. The executor comprises a native executor and an isomorphic executor, wherein the test case is input into the executor for execution, and whether a loophole exists or not is judged based on an execution result, the method comprises the steps of calculating the basic expression by the native executor to obtain a true value calculation result, encrypting plaintext data in the test case by the isomorphic encryption executor, and respectively executing homomorphic calculation sequences of standard, factor decomposition and House forms on the encryption result to obtain a plurality of corresponding isomorphic encryption calculation results, wherein one homomorphic calculation s