Complex equation-oriented trusted computing verification method in cloud computing
Through modular operations and hypothesis testing methods, combined with Fermat's little theorem, Horner's rule and Maclaurin expansion, efficient and accurate verification of complex mathematical calculation results in cloud computing is achieved, which solves the problem of calculation correctness when user resources are limited, and improves the credibility of calculation results and program detection capabilities.
Patent Information
- Application Number
- CN202510603403.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-12
- Publication Date
- 2025-10-03
AI Technical Summary
In cloud computing, it is difficult for users to efficiently verify the correctness of complex mathematical calculation results, especially when calculating large integers or complex expressions. Traditional redundant calculation methods are time-consuming and wasteful of resources, and cannot guarantee the consistency of results.
Modular operation and hypothesis testing methods are used, and multiple rounds of independent modular verification are carried out. Different modules are selected for verification in each round. Combined with optimization techniques such as Fermat's little theorem, Horner's rule and Maclaurin expansion, the correctness of the calculation results is verified, and the overall logic of the calculation program is judged through continuous verification of multiple groups of inputs.
It significantly improves the credibility of calculation results and verification efficiency, reduces computing resource consumption, is suitable for large-scale and high-precision computing scenarios, supports rapid verification of various complex operations, and has the ability to detect program correctness.
Smart Images

Figure CN120744923A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer mathematical calculation and outsourced service verification, and specifically to a trusted computing verification method for complex formulas in cloud computing. Background Art
[0002] With the rapid development of technologies such as cloud computing, more and more enterprises and individuals are outsourcing large-scale data computing tasks to computing service providers with powerful computing capabilities, such as cloud servers. This outsourced computing model provides a feasible solution for users with limited computing resources, especially when facing complex or large-scale data computing.
[0003] In traditional outsourced computing solutions, users typically provide input data to a computing service provider, requesting a computation. The provider then performs the corresponding computation and ultimately returns the results to the user. However, since computing service providers often serve multiple users simultaneously, when multiple users request computations simultaneously, to conserve computing resources and meet the needs of all users, the provider may return arbitrary results, rather than performing the computations as requested. Therefore, verifying the correctness of the service provider's computations is crucial, especially when large integer calculations are involved. Even basic addition operations are difficult to verify, not to mention subtraction, division, exponential operations, modular exponential operations, and polynomial and polynomial approximation calculations based on the four arithmetic operations.
[0004] Currently, traditional verification methods typically use redundant calculations, which detect errors by performing calculations multiple times and comparing the results. However, this repeated calculation verification method has the following problems:
[0005] (1) Users often lack sufficient computing resources to perform recalculations. If users have the ability to recalculate, there is no need to outsource the computing tasks to service providers. In addition, repeated calculations are not only time-consuming but also waste a lot of computing resources.
[0006] (2) Result consistency cannot guarantee correctness: Even if the calculation results of the user and the computing service provider are consistent, there is no guarantee that the result is correct because both may calculate the same wrong result.
[0007] Therefore, designing an efficient and low-computation computational correctness verification method is crucial to improving the credibility of computing services and has become an important challenge in the field of computational science.
[0008] Furthermore, in real-world computing scenarios, especially those involving large integers or complex expressions, these calculations are often performed automatically by pre-deployed programs rather than manually. Therefore, when outsourcing computations, users need to verify not only the correctness of individual calculation results but also the correct implementation of the computational logic within the program itself. This is especially true when service providers may use the same program for multiple tasks. Any implementation errors in the program can pose systemic risks to all computational requests. Summary of the Invention
[0009] In light of this, the present invention provides a trusted computing verification method for complex formulas in cloud computing, aiming to address the difficulty faced by users with limited computing resources in efficiently verifying the correctness of complex mathematical calculation results in outsourcing scenarios such as cloud computing. With a single input, the correctness of the returned result can be effectively verified. When the user initiates multiple rounds of verification based on multiple sets of inputs, the system can further determine the continued reliability of the program execution logic from a statistical perspective, thereby indirectly verifying the correctness of the calculation program. This mechanism not only significantly reduces the user verification burden, but also significantly enhances the ability to trustworthyly guarantee calculation results in cloud computing or outsourcing environments.
[0010] In the first aspect, an embodiment of the present invention provides a trusted computing verification method for complex formulas in cloud computing, including the following steps: a user submits a computing request to a computing service provider through a client, including input parameters and an operation type; the computing service provider performs an operation corresponding to the operation type according to the computing request, and returns the calculation result; the client performs multiple rounds of independent module verification according to preset security parameters, and selects a different module for verification in each round; if all verification rounds are passed, the calculation result is considered to be credible, otherwise the calculation result is rejected.
[0011] Optionally, the operation type includes at least one of large integer addition operation, large integer subtraction operation, large integer division operation, exponential operation, modular exponential calculation, polynomial calculation based on four arithmetic operations, and polynomial approximation calculation.
[0012] Optionally, the module verification includes the following steps: selecting preset modules of different sizes multiple times; calculating the module of the original input parameter to obtain the result after the module is taken; performing a corresponding operation on the result after the module is taken according to the operation type to obtain the operation result; judging whether the result of each operation is equal to the module of the calculation result returned by the calculation service provider; if k verifications are performed, the probability of mistaking the wrong result of the calculation for the correct calculation is The correct probability is calculated as when When p′ approaches 1, the calculation result is considered correct.
[0013] Optionally, for large integer division operation verification, the verification of the division calculation is converted into determining whether the multiplication formula is valid.
[0014] Optionally, for polynomial calculation verification based on four arithmetic operations, Horner's rule is used to transform the polynomial into a nested form to reduce repeated power calculations.
[0015] Optionally, when performing exponential operation verification, Fermat's Little Theorem is used to simplify operations on large exponents.
[0016] Optionally, when performing modular exponentiation calculation verification: if the modulus is a composite number and its factor decomposition is known, modular calculation verification is performed using each factor; if the modulus is a large prime number, the fast modular exponentiation method is used for calculation, and the correctness of the calculation is verified at each step.
[0017] Optionally, when performing polynomial approximate calculation verification: expand the function into a Maclaurin series, take the first several terms for approximate calculation; and ensure that the accuracy of the calculation result meets the set requirements through the Taylor remainder formula.
[0018] In a second aspect, an embodiment of the present invention provides a trusted computing verification system for complex formulas in cloud computing, comprising: at least one computing service provider; multiple clients, communicating with the computing service provider through a trusted network; wherein the computing service provider executes computing requests sent by the user through the client, and the system includes corresponding modules for verifying addition operations, subtraction operations, division operations, exponential operations, modular exponential calculations, polynomial calculations based on four arithmetic operations, and polynomial approximate calculations, and each module is communicatively connected.
[0019] Compared with the prior art, the present invention has the following beneficial effects:
[0020] (1) First, the present invention significantly improves the efficiency of computational correctness verification by combining modular operations and hypothesis testing methods, thus avoiding the high computational overhead caused by redundant and repeated calculations in traditional methods.
[0021] (2) Secondly, the present invention can efficiently process large integer calculations and high-precision calculations, while ensuring the accuracy of calculation verification, reducing the consumption of computing resources, and is particularly suitable for scenarios with large-scale data and high-precision requirements.
[0022] (3) The present invention solves the verification problem of large integers and complex operations by utilizing optimization techniques such as Fermat's Little Theorem, Horner's Rule and Maclaurin expansion, thereby improving the credibility of the calculation results.
[0023] (4) In addition, the present invention can be widely applied to multiple fields such as addition, subtraction, division, exponential operation, modular exponential operation, and polynomial calculation, providing a more reliable and efficient solution for computational correctness verification for applications such as cryptography, financial computing, and scientific computing.
[0024] (5) This invention not only supports rapid verification of single computation results but also enables probabilistic judgment of the correctness of the overall logic of a computational program by continuously verifying multiple sets of inputs, thereby providing a certain degree of program correctness detection capability. This capability further expands the scope of application of this invention in program behavior verification and computational trust services.
[0025] In summary, the present invention not only improves the efficiency and accuracy of computational verification, but also significantly reduces the waste of computing resources, and has strong practical application value and wide applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 It is the overall flow chart of the present invention.
[0027] Figure 2 This is a system structure diagram of the present invention. DETAILED DESCRIPTION
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0029] See also Figure 1 、 Figure 2 The embodiment of the present invention provides a trusted computing verification method for complex formulas in cloud computing, which mainly includes the following steps:
[0030] S1. The user submits a computing request to the computing service provider through the client, including input parameters and operation type;
[0031] S2. The computing service provider performs the computing operation corresponding to the computing type according to the computing request and returns the computing result;
[0032] S3. The client performs multiple rounds of independent module verification based on preset security parameters, selecting a different module for verification in each round.
[0033] Among them, for nearly similar calculations, the client makes judgments through the Maclaurin expansion.
[0034] S4. If all verification rounds are passed, the calculation result is considered credible, otherwise the calculation result is rejected.
[0035] Optionally, the operation type includes at least one of large integer addition operation, large integer subtraction operation, large integer division operation, exponential operation, modular exponential calculation, polynomial calculation based on four arithmetic operations, and polynomial approximation calculation.
[0036] Optionally, the module verification includes the following steps: selecting preset modules of different sizes multiple times; calculating the module of the original input parameter to obtain the result after the module is taken; performing a corresponding operation on the result after the module is taken according to the operation type to obtain the operation result; judging whether the result of each operation is equal to the module of the calculation result returned by the calculation service provider; if k verifications are performed, the probability of mistaking the wrong result of the calculation for the correct calculation is The correct probability is calculated as when When p′ approaches 1, the calculation result is considered correct.
[0037] Optionally, for large integer division operation verification, the verification of the division calculation is converted into determining whether the multiplication formula is valid.
[0038] Optionally, for polynomial calculation verification based on four arithmetic operations, Horner's rule is used to transform the polynomial into a nested form to reduce repeated power calculations.
[0039] Optionally, when performing exponential operation verification, Fermat's Little Theorem is used to simplify operations on large exponents.
[0040] Optionally, when performing modular exponentiation calculation verification: if the modulus is a composite number and its factor decomposition is known, modular calculation verification is performed using each factor; if the modulus is a large prime number, the fast modular exponentiation method is used for calculation, and the correctness of the calculation is verified at each step.
[0041] Optionally, when performing polynomial approximate calculation verification: expand the function into a Maclaurin series, take the first several terms for approximate calculation; and ensure that the accuracy of the calculation result meets the set requirements through the Taylor remainder formula.
[0042] It should be understood that the solution of the present invention relates to a technology for verifying the correctness of complex mathematical operations, including addition, subtraction, division, exponential operations, modular exponential operations, polynomials and polynomial approximation calculations of large integers, and is particularly suitable for verification and credibility testing of calculation results in cloud computing, outsourced computing or distributed computing environments. The present invention combines modular operations and hypothesis testing techniques, and uses statistical methods to perform probabilistic analysis of calculation results, thereby improving the verification efficiency and reliability of complex expression calculation results in remote computing services. In addition, this solution has good versatility and scalability. On the basis of verifying the correctness of a single calculation result, if multiple sets of independent sample data are input, it can be used to perform probabilistic evaluation of the correctness of the overall logic of the program. This makes the present invention not only suitable for result verification, but also has a certain program behavior verification capability, further expanding its application value in complex computing services.
[0043] Compared with existing verification methods, the present invention can significantly improve the credibility of calculation results at a lower computational cost. It is particularly suitable for large-scale calculations, calculations with high precision requirements, and fields requiring high security, such as cryptography, financial computing, and scientific computing.
[0044] The present invention also provides a trusted computing verification system for complex formulas in cloud computing, comprising:
[0045] At least one computing service provider;
[0046] A plurality of clients communicate with the computing service provider via a trusted network;
[0047] Among them, the computing service provider executes the computing request sent by the user through the client, and the system includes corresponding modules for verifying addition operations, subtraction operations, division operations, exponential operations, modular exponential calculations, polynomial calculations based on four arithmetic operations, and polynomial approximate calculations, and the modules are communicatively connected.
[0048] Specifically, the solution of the present invention is further described according to the following examples:
[0049] First, it should be noted that this invention aims to address the difficulty faced by users with limited computing resources in outsourcing scenarios such as cloud computing, who face the challenge of efficiently verifying the correctness of complex mathematical calculations. This invention proposes a trusted computing verification method for complex formulas in cloud computing. This method is applicable to a variety of high-complexity calculation scenarios, such as large integer addition and subtraction, division, exponential operations, modular exponential operations, polynomial calculations, and their approximate value solutions. This invention not only provides a universal complex mathematical operation verification mechanism but also possesses excellent system adaptability and real-world engineering usability, meeting the practical needs of cloud computing, edge computing, and trusted computing services.
[0050] For example, the overall system structure of the present invention is as follows:
[0051] The system of the present invention comprises: one or more computing service providers (Servers) and multiple client users (Users), communicating via a trusted network;
[0052] Each client has lightweight verification capabilities but limited computing power;
[0053] The server performs complex mathematical calculations requested by the user.
[0054] The verification process is as follows:
[0055] 1. Task initiation: The user submits a computation request to the server through the client, including a set of inputs (a, b, ...) and the operation type op, for example
[0056] Large integer addition module: verify a+b=r
[0057] Large integer subtraction module: Verify ab = r
[0058] Large integer division module: verify a / b=r
[0059] Modular exponential module: verifying r = a b modp
[0060] Polynomial module: Verify that r = f(x), where
[0061] Polynomial approximation module: verify r≈f(x);
[0062] 2. The server performs the computation: it performs the op operation according to the request and returns the result r and (optionally) accompanying verification auxiliary information (such as proof, commitment value, etc.);
[0063] 3. Client verification result:
[0064] (a) The client performs k rounds of independent modular verification based on a preset security parameter k;
[0065] (b) Select a different modulus n in each round i ,verify:
[0066]
[0067] If all k rounds pass, the result is considered credible; otherwise, the calculation result is rejected.
[0068] The solution has the following features:
[0069] (1) Modular design: Each type of operation corresponds to a different verification strategy, which facilitates expansion to more mathematical models;
[0070] (2) Lightweight client-side verification: no need to recalculate the entire expression, suitable for resource-constrained terminals;
[0071] (3) Distributed deployability: Algorithm logic can be embedded in edge devices, cloud service verification layers, or browser plug-ins;
[0072] To cover the mathematical calculation tasks widely used in cloud computing and other scenarios, this invention provides specialized verification submodules for different types of complex operations. Each type of module uses a small amount of local operations and modular operations on the user side to assist in verification. Due to the different structural characteristics of each type of operation, the verification logic is also slightly different, as shown below:
[0073] 1. Addition, subtraction, and division operation verification module
[0074] 1. Proof of the correctness of large integer addition: Given large integers a and b, calculate c = a + b and verify whether the calculation result c is correct.
[0075] Verification method: The user determines the number of times k to perform the verification operation based on the verification accuracy they need, and performs the following calculations, using a different modulus n for each calculation. i ;
[0076] (1) Select a smaller modulus n i , calculate c i ′=cmodn i ;
[0077] (2) Calculate d = (a mod n i +bmodn i )modn i ;
[0078] (3) Determine the equation d = c i 'Whether it is established;
[0079] (4) When the addition calculation is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0080] If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The correct probability is calculated as when When , we believe that p′ approaches 1, and the calculation result is considered correct.
[0081] 2. Proof of the correctness of large integer subtraction: Given large integers a and b, calculate c = ab and verify whether the calculation result c is correct.
[0082] Verification method: Convert subtraction to addition to determine whether a=b+c is true. The user determines the number of times k to perform the verification operation based on the verification accuracy they need, and performs the following calculations, using a different modulus n for each calculation. i ;
[0083] (1) Select a smaller modulus n i ; Calculate a i ′=amodn i ;
[0084] (2) Calculate d = (b mod n i +cmodn i )modn i ;
[0085] (3) Determine the equation d = a i 'Whether it is established;
[0086] (4) When the subtraction is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0087] If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The correct probability is calculated as when When , we believe that p′ approaches 1, and the calculation result is considered correct.
[0088] Optionally, for large integer division verification, the division calculation verification is converted into determining whether the multiplication formula is valid, as shown in the following example:
[0089] 3. Proof of the correctness of the calculation of large integer division: Given large integers a and b, calculate Verify the calculation results Is it correct?
[0090] Verification method: Verification of division calculation Transformed into a judgment formula ad = cb is established. The user determines the number of times k to perform the verification operation based on the verification accuracy they need, and performs the following calculations, using a different modulus n for each calculation. i ;
[0091] (1) Select a smaller modulus n i , calculate a′=amodn i , b′=bmodn i , c′=cmodn i , d′=dmodn i ;
[0092] (2) At this time, a′, b′, c′, and d′ are relatively small, so calculate e = (a′×d′) mod n i and f = (c′×b′) mod n i ;
[0093] (3) Determine whether the equation e=f is valid;
[0094] (4) When the division is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0095] If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The correct probability is calculated as when When , we believe that p′ approaches 1, and the calculation result is considered correct.
[0096] Optionally, when performing exponential operation verification, Fermat's Little Theorem is used to simplify operations on large exponents, as shown in the following example:
[0097] 2. Exponential operation verification module: given large integers a and b, calculate c = a b , verify whether the calculation result c is correct.
[0098] Verification method: The user determines the number of times k to perform the verification operation based on the verification accuracy they need, and performs the following calculations, using a different modulus n for each calculation. i ;
[0099] (1) Select a smaller modulus n i ,calculate:
[0100] c′=cmodn i
[0101] (2) Calculation:
[0102] a′=amodn i , d=a b modn i =(a′) b modn i ;
[0103] Since b is very large, the operation needs to be further simplified.
[0104] According to Fermat's little theorem:
[0105]
[0106] Among them, φ(n i ) is n i Euler function.
[0107] calculate:
[0108] r=bmodφ(n i )
[0109] Then b can be expressed as:
[0110] b=q·φ(n i )+r
[0111] therefore:
[0112]
[0113] (3) Determine the formula d=(c i ′) is established;
[0114] (4) When the exponent is calculated incorrectly, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0115] If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The correct probability is calculated as when When , we believe that p′ approaches 1, that is, the calculation result is correct.
[0116] Optionally, when performing modular exponentiation verification: if the modulus is a composite number and its factorization is known, use each factor to perform modular calculation verification; if the modulus is a large prime number, use the fast modular exponentiation method to perform the calculation, and verify the correctness of the calculation at each step. See the following example:
[0117] 3. Modular Exponentiation Calculation and Verification Module
[0118] Given that a, x, and p are all large integers, calculate b=a. x modp, judge the calculation correctness of b.
[0119] 1. If p is a composite number, and p=p1·p2·...·p k (Or when the factor of p is small, Pollard rho or ECM algorithm can be used to factorize p), then: a x =kp+b. Both sides of the equation are modulo each p i , kpmodp i =0;
[0120] (1) Calculation
[0121] (2) Calculate b′=bmodp i ;
[0122] (3) Determine whether a′=b′ holds;
[0123] (4) When the calculation is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0124] If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The probability of correct calculation is p′=1-p. Since p is a large integer, we believe that p′ approaches 1, that is, the calculation result is correct.
[0125] 2. If p is known to be a large prime number, calculate b = a x MODP requires the use of the fast modular exponentiation method to calculate, the calculation method is as follows:
[0126] (1) Represent x in binary and use the binary representation to decompose x into the sum of multiple powers of two.
[0127] (2) Calculate modular power:
[0128] a. Calculate the initial value a modp;
[0129] b. Calculate each Calculate each a by recursively squaring i , and record the quotient k calculated each time i Specifically, calculate a i When the quotient value k i satisfy:
[0130]
[0131] This continues until all required powers have been calculated.
[0132] c. Combination based on binary digits: According to the binary representation of x, the a corresponding to the power of 1 is i Multiply the products to get the final result. That is, if a bit of x is 1, then the corresponding a i Multiply by the result.
[0133] (3) Verify the correctness of the calculation results: For each step of the calculation, use the recorded quotient value k i and remainder a i , verify whether the following formula is true:
[0134]
[0135] If the verification formula at each step is true, it proves that the modular exponentiation calculation is correct.
[0136] Optionally, for polynomial calculation verification based on four arithmetic operations, Horner's rule is used to transform the polynomial into a nested form to reduce repeated power calculations, as shown in the following example:
[0137] 4. Polynomial calculation verification module based on four arithmetic operations
[0138] Given large integers a0,...,a n ,x, calculate f(x)=a0+a1x+...+a n x n , verify the calculation correctness of f(x).
[0139] Verification method: The user determines the number of times k to perform verification operations based on the required verification accuracy, and performs the following calculations, using a different prime modulus n for each calculation. j ;
[0140] (1) Choose a smaller modulus n j , calculate: f′(x)=f(x)modn j
[0141] (2) To avoid repeated power calculations, the polynomial is transformed into a nested form according to Horner's rule:
[0142] f″(x)=(((a n x+a n-1 )x+a n-2 )x+...+a1)x+a0
[0143] (3) From the highest term a n Initially, iterative calculations are performed according to the following rules:
[0144] r n =(((a n modn j )×(xmodn j ))modn j +(a n-1 modn j ))modn j
[0145] r n-1 =((r n ×(xmodn j ))modn j +(a n-2 modn j ))modn j
[0146]
[0147] r1=((r2×(xmodn j ))modn j +(a0 modn j ))modn j
[0148] Finally, we get:
[0149] f″(x)modn j =r1
[0150] (4) Determine whether the equation f″(x)=f′(x) holds.
[0151] (5) When the calculation is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0152] If k verifications are performed, the probability of mistaking an incorrect result for a correct result is The correct probability is calculated as when When , we believe that p′ approaches 1, that is, the calculation result is correct.
[0153] Optionally, when performing polynomial approximate calculation verification: expand the function into a Maclaurin series, take the first several terms for approximate calculation; and use the Taylor remainder formula to ensure that the accuracy of the calculation result meets the set requirements. See the following example:
[0154] 5. Polynomial Approximate Calculation Verification Module
[0155] It is known that the function f(x) is a combination of common analytical functions, such as
[0156] f(x)=sinx+ln(1+x)+e x +(1+x) α
[0157] Considering that the value of x is an integer, verify the correctness of the calculation of f(x).
[0158] Verification method: We use the approximate value P of the Maclaurin expansion n (x) to verify the correctness of its numerical calculation. To ensure that the calculation result has sufficient accuracy (for example, five decimal places of accuracy), perform the following operations:
[0159] (1) Expand each part of f(x) into a Maclaurin series;
[0160] (2) For sinx, e x , (1+x) α, ln(1+x) takes the first n terms respectively, where n is selected based on the error estimate. The purpose of selecting an appropriate number of n terms is to ensure that the impact of each term on the total result does not exceed the set error range, for example, the error is less than 10 -5 Specifically, we can estimate the error of each term using the Taylor remainder formula and determine the minimum required n by solving the inequality.
[0161] The estimation formula for the remainder is:
[0162]
[0163] where ξ is a point between 0 and x, and f (n+1) (ξ) is the (n+1)th order derivative. According to the set error tolerance, we can choose a suitable n so that the error satisfies |R n (x)|<10 -5 .
[0164] (3) Combine to get R n (x) namely:
[0165]
[0166] (4) Since the polynomial contains a denominator, all the terms in the Maclaurin expansion are common denominator. Assuming that the denominator can be eliminated by multiplying both sides of the equation by t, the entire polynomial becomes a common polynomial expression based on the four arithmetic operations tP n (x)=a0+a1x+...+a n x n .
[0167] (5) Choose a smaller modulus n j , calculate: f′(x)=tf(x)modn j
[0168] (6) Using the polynomial calculation correctness proof method based on four arithmetic operations, calculate f″(x)=tP n (x)modn j
[0169] (7) Determine whether the equation f″(x)=f′(x) holds.
[0170] (8) When the calculation is wrong, the two sides of the equation may still be equal after the modular operation. The probability that the above equation is true is
[0171] If k verifications are performed, the probability of mistaking an incorrect result for a correct result is The correct probability is calculated as when When , we believe that p′ approaches 1, that is, the calculation result is correct.
[0172] Compared with the prior art, the present invention has the following beneficial effects:
[0173] (1) First, the present invention significantly improves the efficiency of computational correctness verification by combining modular operations and hypothesis testing methods, thus avoiding the high computational overhead caused by redundant and repeated calculations in traditional methods.
[0174] (2) Secondly, the present invention can efficiently process large integer calculations and high-precision calculations, while ensuring the accuracy of calculation verification, reducing the consumption of computing resources, and is particularly suitable for scenarios with large-scale data and high-precision requirements.
[0175] (3) The present invention solves the verification problem of large integers and complex operations by utilizing optimization techniques such as Fermat's Little Theorem, Horner's Rule and Maclaurin expansion, thereby improving the credibility of the calculation results.
[0176] (4) In addition, the present invention can be widely applied to multiple fields such as addition, subtraction, division, exponential operation, modular exponential operation, and polynomial calculation, providing a more reliable and efficient solution for computational correctness verification for applications such as cryptography, financial computing, and scientific computing.
[0177] (5) This invention not only supports rapid verification of single computation results but also enables probabilistic judgment of the correctness of the overall logic of a computational program by continuously verifying multiple sets of inputs, thereby providing a certain degree of program correctness detection capability. This capability further expands the scope of application of this invention in program behavior verification and computational trust services.
[0178] In summary, the present invention not only improves the efficiency and accuracy of computational verification, but also significantly reduces the waste of computing resources, and has strong practical application value and wide applicability.
[0179] Furthermore, it should be noted that the present invention may be a method, system, apparatus and / or computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0180] Computer-readable storage medium can be a tangible device that can keep and store the instructions used by the instruction execution device.Computer-readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device or any suitable combination thereof.More specific examples (non-exhaustive list) of computer-readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove having instructions stored thereon, and any suitable combination thereof.Computer-readable storage medium used herein is not interpreted as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagated by waveguides or other transmission media (for example, light pulses by fiber optic cables), or electrical signals transmitted by wires.
[0181] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in the computer-readable storage medium in each computing / processing device.
[0182] The computer program instructions for performing the operation of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages such as Smalltalk, C++, Python, and conventional procedural programming languages such as "C" language or similar programming languages. The computer readable program instructions can be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), is personalized by utilizing the state information of the computer readable program instructions, and the electronic circuit can execute the computer readable program instructions, thereby realizing various aspects of the present invention.
[0183] Various aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present invention. It should be understood that each block of the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer-readable program instructions.
[0184] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device is generated that implements the functions / actions specified in one or more blocks in the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, where these instructions cause the computer, programmable data processing device, and / or other device to operate in a specific manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing various aspects of the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0185] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operational steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more blocks in the flowchart and / or block diagram.
[0186] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of an instruction, and the module, program segment or part of the instruction contains one or more executable instructions for implementing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of boxes in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that implementation by hardware, implementation by software, and implementation by a combination of software and hardware are all equivalent.
[0187] While various embodiments of the present invention have been described above, the foregoing description is intended to be illustrative, non-exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is selected to best explain the principles of the embodiments, their practical applications, or technological improvements in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A trusted computing verification method for complex formulas in cloud computing, characterized by: The following steps are involved: The user submits a computing request to the computing service provider through the client, including input parameters and operation type; The computing service provider performs the computing operation corresponding to the computing type according to the computing request and returns the computing result; The client performs multiple rounds of independent module verification based on preset security parameters, selecting a different module for verification in each round; If all verification rounds are passed, the calculation result is considered credible, otherwise the calculation result is rejected.
2. The method according to claim 1, characterized in that The operation type includes at least one of large integer addition operation, large integer subtraction operation, large integer division operation, exponential operation, modular exponential calculation, polynomial calculation based on four arithmetic operations, and polynomial approximation calculation.
3. The method according to claim 1, characterized in that The module verification comprises the following steps: Multiple selections to preset modules of different sizes; Calculate the modulus of the original input parameter to obtain the modulo result; Perform a corresponding operation on the result after taking the modulo according to the operation type to obtain an operation result; Determine whether the result of each operation is equal to the modulus of the calculation result returned by the calculation service provider; If k verifications are performed, the probability of mistaking the calculated error result for the correct one is The correct probability is calculated as when When p′ approaches 1, the calculation result is considered correct.
4. The method according to claim 2, characterized in that For the verification of large integer division operations, the verification of the division calculation is converted into judging whether the multiplication formula is valid.
5. The method according to claim 2, characterized in that For polynomial calculation verification based on four arithmetic operations, Horner's rule is used to transform the polynomial into a nested form to reduce repeated power calculations.
6. The method according to claim 2, characterized in that When performing exponential operation verification, Fermat's Little Theorem is used to simplify operations on large exponents.
7. The method according to claim 2, characterized in that When performing modular exponential calculation verification: If the modulus is a composite number and its factorization is known, then use each factor to perform modular calculation verification; If the modulus is a large prime number, the fast modular exponentiation method is used for calculation, and the correctness of the calculation is verified at each step.
8. The method according to claim 2, characterized in that When performing polynomial approximation verification: Expand the function into a Maclaurin series and take the first few terms for approximate calculations; The Taylor remainder formula is used to ensure that the accuracy of the calculation results meets the set requirements.
9. A trusted computing verification system for complex formulas in cloud computing, characterized by: include: At least one computing service provider; A plurality of clients communicate with the computing service provider via a trusted network; Among them, the computing service provider executes the computing request sent by the user through the client, and the system includes corresponding modules for verifying addition operations, subtraction operations, division operations, exponential operations, modular exponential calculations, polynomial calculations based on four arithmetic operations, and polynomial approximate calculations, and the modules are communicatively connected.