Data processing method and device, equipment, storage medium and program product
By allocating multiple computing nodes for bilinear pairing and affine computation in elliptic curve data processing and utilizing blockchain to store intermediate results, the problems of large computational load and low efficiency in existing technologies are solved, achieving more efficient data processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHINA MOBILE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2023-02-20
- Publication Date
- 2026-05-19
AI Technical Summary
In existing technologies, bilinear pairing computation is computationally intensive in elliptic curve data processing algorithms, resulting in low efficiency and high hardware requirements, making it difficult to meet the computational needs of node devices.
By distributing the data processing to multiple computing nodes, performing bilinear pairing, affine computation, and Miller algorithm computation respectively, and using blockchain to store intermediate results, computational efficiency is improved.
By using distributed computing and blockchain storage, redundant calculations are reduced, data processing efficiency is improved, and computing resources are saved.
Smart Images

Figure CN116561774B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data security technology, and in particular relates to a data processing method, apparatus, device, storage medium and program product. Background Technology
[0002] With the continuous development of science, technology, and society, the application of pairing in elliptic curve cryptography is becoming increasingly widespread, and bilinear pairing plays a vital role in the research of elliptic curve cryptosystems. The advantages of bilinear pairing cryptographic algorithms lie in their shorter key length and higher security.
[0003] However, the computational workload of bilinear pairing in existing technologies is very large, consuming a lot of computing resources. This places high demands on the hardware of node devices that support elliptic curve cryptosystems (ECC) algorithms, resulting in low efficiency of bilinear pairing computation. Summary of the Invention
[0004] This application provides a data processing method, apparatus, device, storage medium, and program product that can improve data processing efficiency.
[0005] In a first aspect, embodiments of this application provide a data processing method, the method comprising:
[0006] Obtain a first data point and a second data point, wherein the first data point is a point on the first elliptic curve and the second data point is a point on the second elliptic curve;
[0007] The first computing node determines a first pairing result based on the first data point and the second data point. The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve.
[0008] The second computing node determines the first affine result based on the first data point, and the third computing node determines the corresponding second affine result based on the second data point. The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve.
[0009] The fourth computing node obtains the target computing result based on the first pairing result, the first affine result, and the second affine result. The target computing result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The Miller algorithm is used to calculate the first Miller cycle result corresponding to the first pairing result, the first affine result, and the second affine result.
[0010] Secondly, embodiments of this application provide a data processing apparatus, the apparatus comprising:
[0011] The first acquisition module is used to acquire a first data point and a second data point, wherein the first data point is a point on the first elliptic curve and the second data point is a point on the second elliptic curve.
[0012] The pairing calculation module is used to control the first calculation node to determine the first pairing result based on the first data point and the second data point. The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve.
[0013] The affine calculation module is used to control the second calculation node to determine the first affine result based on the first data point and to control the third calculation node to determine the corresponding second affine result based on the second data point. The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve.
[0014] The third calculation module is used to control the fourth calculation node to obtain the target calculation result based on the first pairing result, the first affine result, and the second affine result. The target calculation result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The first Miller cycle result corresponding to the first pairing result, the first affine result, and the second affine result is calculated using the Miller algorithm.
[0015] Thirdly, embodiments of this application provide a data processing device, the device including: a processor and a memory storing computer program instructions;
[0016] The processor implements the above data processing method when executing computer program instructions.
[0017] Fourthly, embodiments of this application provide a computer storage medium storing computer program instructions, which, when executed by a processor, implement the data processing method described above.
[0018] Fifthly, embodiments of this application provide a computer program product, the computer program product including computer program instructions, which, when executed by a processor, implement the data processing method described above.
[0019] The data processing method provided in this application involves obtaining a first data point on a first elliptic curve and a second data point on a second elliptic curve; a first computing node determining a first pairing result based on the first and second data points; a second computing node determining a first affine result based on the first data points; and a third computing node determining a second affine result based on the second data points; and a fourth computing node obtaining the target calculation result based on the first pairing result, the first affine result, and the second affine result. This allows the data processing calculations to be performed by different computing nodes, improving the efficiency of data processing. Attached Figure Description
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic flowchart of a data processing method provided in an embodiment of this application;
[0022] Figure 2 This is a schematic diagram of the structure of a data processing apparatus provided in an embodiment of this application;
[0023] Figure 3 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application. Detailed Implementation
[0024] The features and exemplary embodiments of various aspects of this application will be described in detail below. To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain this application and not to limit it. For those skilled in the art, this application can be implemented without some of these specific details. The following description of the embodiments is merely to provide a better understanding of this application by illustrating examples of this application.
[0025] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus that includes the element.
[0026] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other.
[0027] The real number field is the rational set of real numbers, possessing properties such as continuity, completeness, and order.
[0028] The complex field is the algebraic closure of the real field, meaning that any polynomial with complex coefficients always has a root in the complex field. Complex numbers are an extension of the concept of number.
[0029] The scalar field, also known as a "vectorless" domain, refers to the domain of physical quantities. Some physical quantities only have numerical magnitude and no direction, while others have positive or negative values. Scalars are quantities that only have magnitude and no direction.
[0030] Elliptic curves: The function definition of an elliptic curve is: y 2 =x 3 +Ax+B; where 4A 3 +27B 2 ≠0, A and B are characteristic parameters of the curve, determining its shape. Based on the type of coordinates, elliptic curves can be divided into real-field elliptic curves and finite-field elliptic curves. A finite-field elliptic curve is one where the coordinates (x, y) of the equation y² = x³ + Ax + B are elements in a finite field F. The finite field F is generally called the base field of the elliptic curve. The base field F generally has two cases: one is of order 2... m A finite field is called a binary extended field, denoted by F2. m Representation. One type is a finite field of order p, called a prime field, denoted by F. p The prime field contains a total of p elements in the range [0, p-1]. Algebraic operations are performed modulo p in addition to standard algebraic operations.
[0031] BLS curves are curves defined on parameterized feature p that satisfy the equation y² = x³ + B′. The order of a BLS curve is divisible by a large parameterized prime number r, thus allowing pairing to be defined on an r-order twisted group. They can use different embedding orders, where the BLS12 curve has an embedding order k of 12 relative to r. Specific parameters are given by the following equation:
[0032] For example, BLS12-381 represents an embedding number of 12 defined in a finite field F. q (q≈2 381 BLS curves on the Fq domain. For example, taking the BLS12-381 curve family as an example, the equation of the first elliptic curve E(Fq) on the Fq domain is: y2=x3+4; the equation of the BLS12 elliptic encrypted curve E(Fq) on the Fq2 domain is: E'(Fq2): y2=x3+4(u+1), where the Fq2 domain is a complex domain and u represents the complex number label.
[0033] BLS12-384 indicates that the embedding number is 12, defined in the finite field Fq (q≈2). 384 BLS curve on ).
[0034] A group represents a special set on which binary operations can be performed.
[0035] A generator is a fundamental element that generates a cyclic subgroup. Elements in a group can be generated by the product of a minimum number of group elements; this set of group elements is called the generator of the group, and the number of generators is the rank of the finite group. Generation is the output process of a single element under a single operation, and the output result is always a closed loop within a finite set. The order of a group refers to the number of elements in the group.
[0036] The cofactor, denoted by h, is the cofactor of an elliptic curve, which is the number of points on the elliptic curve divided by the order of the base point.
[0037] Affine transformation, also known as affine mapping, refers to the geometric transformation of a vector space into another vector space by performing a linear transformation followed by a translation. Affine transformations can be achieved through a combination of atomic transformations, including translation, scaling, flipping, rotation, and shearing. They can also be achieved through matrix multiplication.
[0038] Elliptic curve cryptosystems (ECC) are one of the three public-key cryptosystems that have been proven to be secure and effective in practice. They are known for their high efficiency, which can improve encryption and decryption speed while saving computing resources.
[0039] In existing technologies, zkcrypto's bellperson library can use multi-domain affine transformations to map numbers in field Fq to field Fq2, then to field Fq6, and finally to field Fq12. For example, bellperson, based on an elliptic curve multi-domain affine transformation algorithm, uses a Rust program to perform the same calculations.
[0040] When performing zero-knowledge proofs, the BLS12-381 encryption curve is a well-known curve, resulting in lower security and slower computation speed.
[0041] To address the problems of the prior art, embodiments of this application provide a data processing method, apparatus, device, storage medium, and program product.
[0042] The data processing method provided in the embodiments of this application will be described below.
[0043] Figure 1 A flowchart illustrating a data processing method according to an embodiment of this application is shown, including the following steps S101 to S104:
[0044] S101, acquire the first data point and the second data point.
[0045] The first data point is a point on the first elliptic curve, and the second data point is a point on the second elliptic curve.
[0046] S102, the first computing node determines the first pairing result based on the first data point and the second data point.
[0047] The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve.
[0048] S103, the second computing node determines the first affine result based on the first data point, and the third computing node determines the corresponding second affine result based on the second data point.
[0049] The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve.
[0050] S104, the fourth computing node obtains the target computing result based on the first pairing result, the first affine result, and the second affine result.
[0051] The target calculation result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The Miller algorithm is used to calculate the first Miller cycle result corresponding to the first pairing result, the first affine result, and the second affine result.
[0052] The data processing method provided in this embodiment can acquire a first data point on a first elliptic curve and a second data point on a second elliptic curve; a first computing node determines a first pairing result based on the first and second data points; a second computing node determines a first affine result based on the first data points; and a third computing node determines a second affine result based on the second data points; a fourth computing node obtains the target calculation result based on the first pairing result, the first affine result, and the second affine result. This allows the data processing calculations to be performed by different computing nodes, improving the efficiency of data processing.
[0053] In S101, the first data point and the second data point can be obtained based on the user's input operation.
[0054] For example, the data input by the first user can be converted into a point (x1, y1) on the first elliptic curve, i.e., the first data point, and the data input by the second user can be converted into a point (x2, y2) on the second elliptic curve, i.e., the second data point.
[0055] Here, the first and second elliptic curves are BLS12-384 curves. For example, if the first and second elliptic curves are BLS12-384 encryption curves cm_G1 and cm_G2, then cm_G1 and cm_G2 operate on curves with an eigenvalue of 384 bits. The working domain of points on the elliptic encryption curve cm_G1 is the cmFq domain, which is a finite field. The working domain of points on the elliptic encryption curve cm_G2 is the cmFq2 domain, which is a complex number domain.
[0056] In S102, the first computing node determines the first pairing result based on the first data point and the second data point.
[0057] Specifically, after determining the first data point and the second data point, the pairing calculation result between the first data point and the second data point, i.e., the first pairing result, can be determined by the first computing node. The first computing node can determine the first pairing result using several methods. For example, method one: since the first data point and the second data point are points on the first elliptic curve and the second elliptic curve respectively, the pairing result between the first data point and the second data point can be calculated using the bilinear pairing method of the elliptic curve. Method two: the first pairing result can be directly determined by obtaining the historical pairing results between the first data point and the second data point.
[0058] In some embodiments, the first computing node determining the first pairing result based on the first data point and the second data point may include the following steps:
[0059] First historical data is obtained in the first partition of the blockchain. The first partition is used to store the historical pairing results obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve. The historical pairing results include the second pairing results. The second pairing results are the pairing results corresponding to the third data point and the fourth data point. The third data point is a point on the first elliptic curve and the fourth data point is a point on the second elliptic curve.
[0060] If the first data point matches the third data point and the second data point matches the fourth data point, the second pairing result is determined as the first pairing result.
[0061] Specifically, when the pairing results corresponding to the first and second data points are stored in the blockchain, the pairing results can be obtained directly, saving computing resources and speeding up the computing process.
[0062] In some embodiments, the first computing node determining the first pairing result based on the first data point and the second data point may further include the following steps:
[0063] In the case where the first data point does not match the third data point or the second data point does not match the fourth data point, a first pairing result is obtained by performing bilinear pairing calculation on the first data point and the second data point based on the first elliptic curve and the second elliptic curve.
[0064] The first pairing result is stored in the first partition on the blockchain.
[0065] Specifically, if the corresponding partition of the blockchain pairing calculation node does not store the pairing result corresponding to the first data point and the second data point, the pairing calculation is performed on the first data point and the second data point to obtain the pairing result. Then, the pairing result is stored in the corresponding partition of the blockchain so that the pairing result can be directly obtained when the pairing calculation of the first data point and the second data point is needed in the future.
[0066] In one example, the first compute node is paired compute nodes.
[0067] Input: The value of the cmFq field (first data point), the value of the cmFq2 field (second data point).
[0068] Output: The value of the cmFqk field (first pairing result)
[0069] Specific steps:
[0070] Based on the pre-set parameters u, k, q, r of the elliptic curve (elliptic curve embedding degree k = 12, elliptic curve safety boundary q = 2) 384 , group sequence r=2 256 , flag parameter u=-0xd201000000010000), construct elliptic encrypted curve cm_G1 and its affine curve cm_G1Affine, construct elliptic encrypted curve cm_G2 and its affine curve cm_G2Affine.
[0071] The following are examples of values in the cmFq field:
[0072] cmFq(0x17f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb).
[0073] The affine calculation process of mapping numbers in the cmFq field to the cmFq2 field involves defining the B coefficient B_COEFF:cmFq on the elliptic encryption curve, and then calculating two values C0 and C1 on cmFq using the Fibonacci sequence. C0 and C1 are then combined to generate cmFq2{C0:cmFq,C1:cmFq}, and this combined result (cmFq2{C0:cmFq,C1:cmFq}) is written into the blockchain as an intermediate encryption result.
[0074] The following are examples of values in the cmFq2 field:
[0075] cmFq2{C0:cmFq(0x1451d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb),
[0076] C1:cmFq(0x67f1d3a73197d7942695638c4fa9ac0fc3688c4f9774b905a14e3a3f171bac586c55e83ff97a1aeffb3af00adb22c6bb)}
[0077] a belongs to the cmFq domain and b belongs to cmFq2, so the pairing calculation e = pairing(a,b) is implemented;
[0078] h belongs to the cmFq domain and i belongs to cmFq2, so the pairing calculation f = pairing(h,i) is performed.
[0079] r3 = abhi = e*f; r3 belongs to the cmFqk domain.
[0080] The pairing result is e, which belongs to the cmFqk domain. e is written to the blockchain (first partition). When the user has a pairing calculation requirement for a and b, the calculation result is read directly from the blockchain, saving calculation time.
[0081] In S103, the second computing node determines the first affine result based on the first data point, and the third computing node determines the corresponding second affine result based on the second data point.
[0082] Specifically, in the second calculation node, determining the first affine result of the first data point can be achieved by performing affine calculations on the first data point using the first elliptic curve, or by directly obtaining the affine result corresponding to the first data point from historical affine results. Similarly, in the third calculation node, determining the second affine result of the second data point can be achieved by performing affine calculations on the second data point using the second elliptic curve, or by directly obtaining the affine result corresponding to the second data point from historical affine results.
[0083] In some embodiments, the second computing node determines the first affine result based on the first data point, including:
[0084] Second historical data is obtained in the second partition of the blockchain. The second partition is used to store the first historical affine result obtained by affine calculation based on the first elliptic curve. The first historical affine result includes the third affine result. The third affine result is the affine result corresponding to the fifth data point. The fifth data point is a point on the first elliptic curve.
[0085] If the first data point matches the fifth data point, the third affine result is determined as the first affine result.
[0086] With the pairing results corresponding to the first data point stored in the blockchain, the pairing results can be obtained directly, saving computing resources and speeding up the computing process.
[0087] In some embodiments, after obtaining the second historical data in the second partition of the blockchain, the method further includes:
[0088] In the case where the first data point and the fifth data point do not match, the first affine result is obtained by performing an affine calculation on the first data point based on the first elliptic curve.
[0089] The first affine result is stored in the second partition on the blockchain.
[0090] If the blockchain does not store the pairing result corresponding to the first data point, the first data point is paired and calculated to obtain the first affine result. Then, the first affine result is stored in the blockchain so that the pairing result can be directly obtained when the first data point and the second data point need to be paired and calculated in the future.
[0091] In one example, the second computation node is the cmFq domain affine computation node (affine1).
[0092] Input: The value of the cmFq field (first data point)
[0093] Output: Values of the scalar field (first affine result)
[0094] Specific steps: Define a Scala class as a scalar class.
[0095] The value 'a' in the cmFq field is read, and its value in the Scala field is calculated using the affine relationship constructed by the affine curves cm_G1Affine and cm_G2Affine. The specific affine calculation method is as follows: an affine matrix (w, b) is defined, the forward function is responsible for forward propagation of the affine matrix (w, b), and the backward function is responsible for backward bias propagation of the affine matrix (w, b). The constant SWENC_SQRT_NEG_THREE is set to find logical points in the cmFq field; the sqrt(-3) value in the cmFq field corresponds to the value in the ordinary space. The SWENC_SQRT_NEG_THREE_MINUS_ONE_DIV_TWO is set for fast calculation of affine space points. The value in the cmFq field is affinely mapped to the scalar field, and the value in the scalar field is written to the blockchain. When a user has another affine calculation requirement for 'a', the calculation result is directly read from the blockchain, saving computation time.
[0096] In this embodiment of the application, the affine calculation of the numbers (a, h) in the cmFq field to the scala field can be realized, and the affine result (as, hs) (encrypted intermediate calculation result) is written into the blockchain (second partition).
[0097] In some embodiments, the third computing node determines the second affine result based on the second data point, including:
[0098] The third historical data is obtained in the third partition of the blockchain. The third partition is used to store the second historical affine result obtained by affine calculation based on the second elliptic curve. The second historical affine result includes the fourth affine result, which is the affine result corresponding to the sixth data point. The sixth data point is a point on the second elliptic curve.
[0099] If the second data point matches the sixth data point, the fourth affine result is determined as the second affine result.
[0100] In some embodiments, after obtaining the third historical data in the third partition of the blockchain, the method further includes:
[0101] In the case where the second data point does not match the sixth data point, the second affine result is obtained by performing an affine calculation on the second data point based on the second elliptic curve.
[0102] The second affine result is stored in the third partition on the blockchain.
[0103] In one example, the third compute node is the cmFq2 domain affine compute node (affine2).
[0104] Input: The value of the cmFq2 field (second data point)
[0105] Output: Values of the Scala field (second affine result)
[0106] Specific steps: Read the value 'b' from the cmFq2 field. Calculate the value in the Scala field using the affine relationship constructed by the affine curves cm_G1Affine and cm_G2Affine. The specific affine calculation method is as follows: Define an affine matrix (w, b). The forward function is responsible for deriving the affine matrix (w, b) forward, and the backward function is responsible for propagating the affine matrix (w, b) with a backward bias. Set the constant SWENC_SQRT_NEG_THREE (cubic root of -3) to find the logical point in the cmFq2 field. The sqrt(-3) in the cmFq2 field corresponds to the value in the ordinary space. Set SWENC_SQRT_NEG_THREE_MINUS_ONE_DIV_TWO for fast calculation of the affine space point. Affine the value of the cmFq2 field to the Scala field and write the value of the Scala field to the blockchain. When a user has another affine calculation requirement for b, the calculation result is read directly from the blockchain, saving calculation time.
[0107] In this embodiment, the affine calculation of the number (b,i) in the cmFq2 field to the Scala field is implemented, and the affine result (bs,is) (encrypted intermediate calculation result) is written into the blockchain (third partition).
[0108] In S104, the fourth computing node obtains the target computing result based on the first pairing result, the first affine result, and the second affine result.
[0109] In some embodiments, S104 above further includes the following step:
[0110] The fourth computation node obtains the target computation result based on the first pairing result, the first affine result, and the second affine result. The target computation result includes:
[0111] The fourth historical data is obtained in the fourth partition of the blockchain. The fourth partition is used to store the historical Miller cycle results calculated by the exponential algorithm and the Miller algorithm based on the first elliptic curve, the second elliptic curve, the historical pairing results, the first historical affine results, and the second historical affine results. The historical Miller cycle results include the first Miller cycle results, which are the Miller cycle results corresponding to the second pairing results, the third affine results, and the fourth affine results.
[0112] If the first pairing result matches the second pairing result, the first affine result matches the third affine result, and the second affine result matches the fourth affine result, the first Miller cycle result is determined as the target calculation result.
[0113] When the target computation result is stored in the fourth partition corresponding to the fourth computing node in the blockchain, the target computation result can be obtained directly, saving computing resources and speeding up the computation.
[0114] In some embodiments, after obtaining the second historical data in the second partition of the blockchain, the method further includes:
[0115] If the first pairing result does not match the second pairing result, or the first affine result does not match the third affine result, or the second affine result does not match the fourth affine result, the target calculation result is obtained by using the Miller algorithm based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result.
[0116] The target calculation result is stored in the fourth partition on the blockchain.
[0117] If the corresponding target calculation result is not stored in the fourth partition of the blockchain, the first pairing result, the first affine result, and the second affine result are paired and calculated to obtain the pairing result. Then, the pairing result is stored in the corresponding partition of the blockchain (the fourth partition) so that when the target calculation result needs to be calculated for the first data point and the second data point in the future, the target calculation result can be directly obtained, thereby improving the calculation efficiency.
[0118] In one example, the fourth compute node: cmFqk compute node
[0119] Input: Values of the cmFqk field (first pairing result), values of the Scala field (first affine result, second affine result)
[0120] Output: The value of the cmFqk field (target calculation result) (The mFqk field is obtained by pairing the points (cmFq field) on the elliptic encryption curve cm_G1 with the points (cmFq2 field) on the elliptic encryption curve cm_G2. The k in the cmFqk field is a marker and has no practical meaning.)
[0121] Specific steps: Exponentiation and Miller loop calculations within the cmFqk field to achieve massive encrypted computations within the cmFqk field. Define fn final_exponentiation(_:&Self::cmFqk)->Option <self::cmfqk>The obtained encryption result is the value of the cmFqk field, which is used as the final encryption verification result and stored in the blockchain (fourth partition).
[0122] c and d are values of the Fr field, which is a Scala field. a belongs to the cmFq field, and b belongs to cmFq2.
[0123] r1 = (ab)pow(cd) = abcd
[0124] r2=pairing(ac,bd)=abcd=r1
[0125] a and h belong to the cmFq domain, and b and i belong to cmFq2.
[0126] r3=pairing(a,b)*pairing(h,i)=abhi
[0127] r4=millorlloop(as,bs,hs,is)=abhi=r3
[0128] In the data processing method provided in this application embodiment, the data processing process is undertaken by multiple computing nodes. Therefore, each computing node undertakes part of the computing task, obtains intermediate computing results and stores them in the corresponding partition of the blockchain. When performing the same computing task, historical computing results can be directly obtained, which speeds up the computing process and saves computing resources.
[0129] It should be noted that the data processing method provided in this application embodiment can be applied to data encryption processing. Distributed computing nodes are divided into four types: first computing nodes (pairing), second computing nodes (cmFq domain affine computing node, affine1), third computing nodes (cmFq2 domain affine computing node, affine2), and fourth computing nodes (cmFqk computing nodes, pow, millor_loop), which jointly maintain a shared blockchain ledger. Encrypted intermediate results are stored in the shared ledger of distributed computing based on blockchain technology. The shared ledger stores encrypted computing blocks (each partition, such as the first partition, second partition, etc.). An encrypted computing block is a series of data blocks linked using cryptographic methods. Each data block contains information about the encrypted intermediate data of the distributed computing nodes, used to verify the validity of the information and generate the next block. The encrypted intermediate data in each block can be delegated to other computing nodes for computation (such as the first computing node, second computing node, etc.). After computation, the result is uploaded to the blockchain for verification and use by other computing nodes.
[0130] Based on the data processing method provided in the above embodiments, this application also provides specific implementations of a data processing apparatus. Please refer to the following embodiments.
[0131] First see Figure 2 The data processing 200 provided in this application embodiment includes the following modules:
[0132] The first acquisition module 201 is used to acquire a first data point and a second data point, wherein the first data point is a point on the first elliptic curve and the second data point is a point on the second elliptic curve.
[0133] The pairing calculation module 202 is used to control the first calculation node to determine the first pairing result based on the first data point and the second data point. The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve.
[0134] The affine calculation module 203 is used to control the second calculation node to determine the first affine result based on the first data point and to control the third calculation node to determine the corresponding second affine result based on the second data point. The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve.
[0135] The third calculation module 204 is used to control the fourth calculation node to obtain the target calculation result based on the first pairing result, the first affine result and the second affine result. The target calculation result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result and the second affine result. The Miller algorithm is used to calculate the first Miller cycle result corresponding to the first pairing result, the first affine result and the second affine result.
[0136] The data processing apparatus provided in this application embodiment acquires a first data point on a first elliptic curve and a second data point on a second elliptic curve; a first computing node determines a first pairing result based on the first and second data points; a second computing node determines a first affine result based on the first data points; and a third computing node determines a corresponding second affine result based on the second data points; a fourth computing node obtains a target calculation result based on the first pairing result, the first affine result, and the second affine result. This allows the data processing calculation process to be performed by different computing nodes, improving the efficiency of data processing.
[0137] In some embodiments, the pairing calculation module 202 described above includes:
[0138] The first acquisition unit is used to acquire the first historical data in the first partition of the blockchain. The first partition is used to store the historical pairing results obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve. The historical pairing results include the second pairing results. The second pairing results are the pairing results corresponding to the third data point and the fourth data point. The third data point is a point on the first elliptic curve and the fourth data point is a point on the second elliptic curve.
[0139] The first determining unit is used to determine the second pairing result as the first pairing result when the first data point matches the third data point and the second data point matches the fourth data point.
[0140] In some embodiments, the pairing calculation module 202 described above further includes:
[0141] The first calculation unit is used to perform bilinear pairing calculation on the first data point and the second data point based on the first elliptic curve and the second elliptic curve to obtain the first pairing result when the first data point and the third data point do not match or the second data point and the fourth data point do not match.
[0142] The first storage unit is used to store the first pairing result in the first partition on the blockchain.
[0143] In some embodiments, the affine calculation module 203 described above may include:
[0144] The second acquisition unit is used to acquire second historical data in the second partition of the blockchain. The second partition is used to store the first historical affine result obtained by affine calculation based on the first elliptic curve. The first historical affine result includes the third affine result, which is the affine result corresponding to the fifth data point. The fifth data point is a point on the first elliptic curve.
[0145] The second determining unit is used to determine the third affine result as the first affine result when the first data point matches the fifth data point.
[0146] In some embodiments, the affine calculation module 203 described above may include:
[0147] The second calculation unit is used to obtain the first affine result by performing affine calculation on the first data point based on the first elliptic curve when the first data point and the fifth data point do not match.
[0148] The second storage unit is used to store the first affine result in the second partition on the blockchain.
[0149] In some embodiments, the affine calculation module 203 described above may further include:
[0150] The third acquisition unit is used to acquire third historical data in the third partition of the blockchain. The third partition is used to store the second historical affine result obtained by affine calculation based on the second elliptic curve. The second historical affine result includes a fourth affine result, which is the affine result corresponding to the sixth data point. The sixth data point is a point on the second elliptic curve.
[0151] The third determining unit is used to determine the fourth affine result as the second affine result when the second data point matches the sixth data point.
[0152] In some embodiments, the affine calculation module 203 described above may further include:
[0153] The third calculation unit is used to obtain the second affine result by performing affine calculation on the second data point based on the second elliptic curve when the second data point does not match the sixth data point.
[0154] The third storage unit is used to store the second affine result in the third partition on the blockchain.
[0155] In some embodiments, the third computing module 204 described above includes:
[0156] The fourth acquisition unit is used to acquire fourth historical data in the fourth partition of the blockchain. The fourth partition is used to store historical Miller cycle results calculated using the exponential algorithm and the Miller algorithm based on the first elliptic curve, the second elliptic curve, historical pairing results, the first historical affine result, and the second historical affine result. The historical Miller cycle results include the first Miller cycle result, which is the Miller cycle result corresponding to the second pairing result, the third affine result, and the fourth affine result.
[0157] The fourth determining unit is used to determine the first Miller cycle result as the target calculation result when the first pairing result matches the second pairing result, the first affine result matches the third affine result, and the second affine result matches the fourth affine result.
[0158] In some embodiments, the third computing module 204 described above further includes:
[0159] The fourth calculation unit is used to calculate the target calculation result based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result using the Miller algorithm when the first pairing result does not match the second pairing result, or the first affine result does not match the third affine result, or the second affine result does not match the fourth affine result.
[0160] The fourth storage unit is used to store the target calculation result in the fourth partition of the blockchain.
[0161] Figure 3 A schematic diagram of the hardware structure of the data processing device provided in an embodiment of this application is shown.
[0162] The data processing device may include a processor 301 and a memory 302 storing computer program instructions.
[0163] Specifically, the processor 301 may include a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits that can be configured to implement the embodiments of this application.
[0164] Memory 302 may include mass storage for data or instructions. For example, and not limitingly, memory 302 may include a hard disk drive (HDD), floppy disk drive, flash memory, optical disk, magneto-optical disk, magnetic tape, or Universal Serial Bus (USB) drive, or a combination of two or more of these. Where appropriate, memory 302 may include removable or non-removable (or fixed) media. Where appropriate, memory 302 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, memory 802 is non-volatile solid-state memory.
[0165] Memory may include read-only memory (ROM), random access memory (RAM), disk storage media devices, optical storage media devices, flash memory devices, and electrical, optical, or other physical / tangible memory storage devices. Therefore, typically, memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the methods according to one aspect of this disclosure.
[0166] The processor 301 implements any of the data processing methods described in the above embodiments by reading and executing computer program instructions stored in the memory 302.
[0167] In one example, the data processing device may further include a communication interface 303 and a bus 310. Wherein, as... Figure 3 As shown, the processor 301, memory 302, and communication interface 303 are connected through bus 310 and complete communication with each other.
[0168] The communication interface 303 is mainly used to realize communication between various modules, devices, units and / or equipment in the embodiments of this application.
[0169] Bus 310 includes hardware, software, or both, that couples components of a data processing device together. For example, and not limitingly, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an Infinite Bandwidth Interconnect, a Low Pin Count (LPC) bus, a memory bus, a Microchannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or combinations of two or more of these. Where appropriate, bus 310 may include one or more buses. Although specific buses are described and illustrated in embodiments of this application, any suitable bus or interconnect is contemplated herein.
[0170] The data processing device can be based on the above embodiments to achieve the combination Figure 1 The data processing methods and apparatus described.
[0171] Furthermore, in conjunction with the data processing methods in the above embodiments, this application embodiment can provide a computer storage medium for implementation. This computer storage medium stores computer program instructions; when these computer program instructions are executed by a processor, they implement any of the data processing methods in the above embodiments and achieve the same technical effect. To avoid repetition, further details are omitted here. The aforementioned computer-readable storage medium may include non-transitory computer-readable storage media, such as read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks, etc., and is not limited thereto.
[0172] In addition, this application also provides a computer program product, including computer program instructions, which, when executed by a processor, can implement the steps and corresponding content of the aforementioned method embodiments.
[0173] It should be clarified that this application is not limited to the specific configurations and processes described above and shown in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of this application is not limited to the specific steps described and shown. Those skilled in the art can make various changes, modifications, and additions, or change the order of steps, after understanding the spirit of this application.
[0174] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, they can be, for example, electronic circuits, application-specific integrated circuits (ASICs), appropriate firmware, plug-ins, function cards, etc. When implemented in software, the elements of this application are programs or code segments used to perform the required tasks. Programs or code segments can be stored on a machine-readable medium or transmitted over a transmission medium or communication link via data signals carried on a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, etc. Code segments can be downloaded via computer networks such as the Internet, intranets, etc.
[0175] It should also be noted that the exemplary embodiments mentioned in this application describe methods or systems based on a series of steps or apparatus. However, this application is not limited to the order of the above steps; that is, the steps can be performed in the order mentioned in the embodiments, or in a different order, or several steps can be performed simultaneously.
[0176] The foregoing flowcharts and / or block diagrams of methods, apparatuses, and computer program products according to embodiments of the present disclosure have described various aspects of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and combinations of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing or decryption apparatus to create a machine such that these instructions, executable via the processor of the computer or other programmable data processing or decryption apparatus, enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It is also understood that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can also be implemented by special-purpose hardware performing the specified functions or actions, or can be implemented by a combination of special-purpose hardware and computer instructions.
[0177] The above are merely specific embodiments of this application. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, modules, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. It should be understood that the protection scope of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the protection scope of this application.< / self::cmfqk>
Claims
1. A data processing method, characterized in that, The method includes: Obtain a first data point and a second data point, wherein the first data point is a point on the first elliptic curve and the second data point is a point on the second elliptic curve; The first computing node determines a first pairing result based on the first data point and the second data point. The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve. The second computing node determines the first affine result based on the first data point, and the third computing node determines the corresponding second affine result based on the second data point. The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve. The fourth computing node obtains the target computing result based on the first pairing result, the first affine result, and the second affine result. The target computing result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The first Miller cycle result corresponding to the first pairing result, the first affine result, and the second affine result is calculated using the exponential algorithm and the Miller algorithm.
2. The method according to claim 1, characterized in that, The first computing node determines a first pairing result based on the first data point and the second data point, including: First historical data is obtained in the first partition of the blockchain. The first partition is used to store historical pairing results obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve. The historical pairing results include second pairing results. The second pairing results are the pairing results corresponding to the third data point and the fourth data point. The third data point is a point on the first elliptic curve and the fourth data point is a point on the second elliptic curve. If the first data point matches the third data point and the second data point matches the fourth data point, the second pairing result is determined as the first pairing result.
3. The method according to claim 2, characterized in that, After the first computing node acquires the first historical data, it also includes: If the first data point does not match the third data point or the second data point does not match the fourth data point, the first pairing result is obtained by performing bilinear pairing calculation on the first data point and the second data point based on the first elliptic curve and the second elliptic curve. The first pairing result is stored in the first partition on the blockchain.
4. The method according to claim 1, characterized in that, The second computing node determines the first affine result based on the first data point, including: Second historical data is obtained in the second partition of the blockchain. The second partition is used to store the first historical affine result obtained by affine calculation based on the first elliptic curve. The first historical affine result includes a third affine result. The third affine result is the affine result corresponding to the fifth data point. The fifth data point is a point on the first elliptic curve. If the first data point matches the fifth data point, the third affine result is determined to be the first affine result.
5. The method according to claim 4, characterized in that, After obtaining the second historical data from the second partition of the blockchain, the process also includes: In the case where the first data point and the fifth data point do not match, the first affine result is obtained by performing an affine calculation on the first data point based on the first elliptic curve. The first affine result is stored in the second partition on the blockchain.
6. The method according to claim 1, characterized in that, The third computing node determines the second affine result based on the second data point, including: The third historical data is obtained in the third partition of the blockchain. The third partition is used to store the second historical affine result obtained by affine calculation based on the second elliptic curve. The second historical affine result includes the fourth affine result, which is the affine result corresponding to the sixth data point. The sixth data point is a point on the second elliptic curve. If the second data point matches the sixth data point, the fourth affine result is determined to be the second affine result.
7. The method according to claim 6, characterized in that, After obtaining the third historical data from the third partition of the blockchain, the process also includes: In the case where the second data point does not match the sixth data point, the second affine result is obtained by performing an affine calculation on the second data point based on the second elliptic curve. The second affine result is stored in the third partition on the blockchain.
8. The method according to claim 1, characterized in that, The fourth computing node obtains the target computing result based on the first pairing result, the first affine result, and the second affine result. The target computing result includes: Fourth historical data is obtained in the fourth partition of the blockchain. The fourth partition is used to store historical Miller cycle results calculated using the exponential algorithm and Miller algorithm based on the first elliptic curve, the second elliptic curve, historical pairing results, the first historical affine result, and the second historical affine result. The historical Miller cycle results include the first Miller cycle result, which is the Miller cycle result corresponding to the second pairing result, the third affine result, and the fourth affine result. If the first pairing result matches the second pairing result, the first affine result matches the third affine result, and the second affine result matches the fourth affine result, the first Miller cycle result is determined as the target calculation result.
9. The method according to claim 8, characterized in that, After obtaining the second historical data from the second partition of the blockchain, the process also includes: If the first pairing result does not match the second pairing result, or the first affine result does not match the third affine result, or the second affine result does not match the fourth affine result, the target calculation result is calculated using the Miller algorithm based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The target calculation result is stored in the fourth partition on the blockchain.
10. A data processing apparatus, characterized in that, The device includes: The first acquisition module is used to acquire a first data point and a second data point, wherein the first data point is a point on the first elliptic curve and the second data point is a point on the second elliptic curve. The pairing calculation module is used to control the first calculation node to determine the first pairing result based on the first data point and the second data point. The first pairing result is the pairing result corresponding to the first data point and the second data point obtained by bilinear pairing calculation based on the first elliptic curve and the second elliptic curve. The affine calculation module is used to control the second calculation node to determine the first affine result based on the first data point and to control the third calculation node to determine the corresponding second affine result based on the second data point. The first affine result is the affine result corresponding to the first data point obtained by affine calculation based on the first elliptic curve, and the second affine result is the affine result corresponding to the second data point obtained by affine calculation based on the second elliptic curve. The third calculation module is used to control the fourth calculation node to obtain the target calculation result based on the first pairing result, the first affine result, and the second affine result. The target calculation result is based on the first elliptic curve, the second elliptic curve, the first pairing result, the first affine result, and the second affine result. The first Miller cycle result corresponding to the first pairing result, the first affine result, and the second affine result is calculated using the exponential algorithm and the Miller algorithm.
11. A data processing device, characterized in that, The device includes: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, it implements the method as described in any one of claims 1-9.
12. A computer storage medium, characterized in that, The computer storage medium stores computer program instructions, which, when executed by a processor, implement the method as described in any one of claims 1-9.
13. A computer program product, characterized in that, The computer program product includes computer program instructions that, when executed by a processor, implement the method of any one of claims 1-9.