Data processing method, device, equipment and computer readable storage medium

By establishing a mapping relationship between Edwards448 and Wei448, and using the existing Wei448 point operation accelerator for point multiplication operations, the performance disadvantages of the Edwards448 algorithm are solved, and the same performance level as ECDSA algorithms such as Wei448 are achieved, saving equipment update costs .

CN118611886BActive Publication Date: 2024-12-27OPEN SECURITY RES INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411079880.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-07
Publication Date
2024-12-27
Estimated Expiration
2044-08-07

AI Technical Summary

Technical Problem

The existing ECDSA point operation accelerator can only support simplifying the Wilstrasse curve and cannot implement point operation of the Edwards448 digital signature algorithm, resulting in the performance of the Edwards448 algorithm being inferior to the same-scale ECDSA algorithms such as Wei448.

Method used

By establishing a positive mapping and inverse mapping relationship between Edwards448 and Wei448, the points under the Edwards448 algorithm are mapped to the Wei448 algorithm, and the existing Wei448 point operation accelerator is used to perform point multiplication operations, and finally the result is inversely mapped back to the Edwards448 algorithm .

Benefits of technology

The point multiplication operation acceleration of the Edwards448 digital signature algorithm has been realized, which improves its processing speed and performance, making it close to or even better than the performance of ECDSA algorithms such as Wei448 at the same scale, makes full use of the computing power of existing devices, and saves equipment. Cost of renewal or replacement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118611886B_ABST
    Figure CN118611886B_ABST
Patent Text Reader

Abstract

The embodiment of the present application discloses a data processing method, device, equipment and computer-readable storage medium, the data processing method comprising: in the process of generating a key and a digital signature using the Edwards448 digital signature algorithm, determining a first target point and a first parameter that need to be subjected to a point multiplication operation; based on the positive mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm; using a point operation accelerator that supports the Wei448 digital signature algorithm, performing a point multiplication operation on the first reference point and the first parameter using the Wei448 digital signature algorithm to obtain a first reference operation result; based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, mapping the first reference operation result to the first target operation result under the Edwards448 digital signature algorithm. In this way, the acceleration of the point multiplication operation of the Edwards448 digital signature algorithm can be achieved with the help of an existing point operation accelerator.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to but is not limited to the field of data security technology, and in particular to a data processing method, device, equipment and computer-readable storage medium. Background Art

[0002] Elliptic Curve Digital Signature Algorithm (ECDSA) is a public key cryptographic algorithm based on elliptic curve cryptography (ECC), which is widely used in digital signatures and key exchange. Among them, the Twisted Edwards Curve (Edwards) 448 digital signature algorithm is a new type of elliptic curve digital signature algorithm, which has higher advantages in security and performance.

[0003] However, in the related art, only the point operations (point multiplication and point addition) of the ECDSA algorithm based on the simplified Weierstrass Curve (Wei) can be implemented through the hardware accelerator on the chip, and the point operations of the Edwards448 digital signature algorithm cannot be implemented. Summary of the invention

[0004] To solve the above technical problems, the embodiments of the present application at least provide a data processing method, apparatus, device and computer-readable storage medium.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] On the one hand, an embodiment of the present application provides a data processing method, which includes: in the process of generating a key and a digital signature using a distorted Edwards curve Edwards448 digital signature algorithm, determining a first target point and a first parameter that need to be subjected to a point multiplication operation; the first parameter is determined based on the information to be signed; based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm, mapping the first target point under the Edwards448 digital signature algorithm to a first reference point under the Wei448 digital signature algorithm; by supporting the point operation of the Wei448 digital signature algorithm An accelerator, using the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result; based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm; the positive mapping relationship and the inverse mapping relationship are determined based on a target digital signature algorithm that has a homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0007] In some embodiments, the data processing method also includes: determining a target digital signature algorithm that has a fourth-order homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm; based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm, determining the positive mapping relationship and the inverse mapping relationship.

[0008] In some embodiments, the positive mapping relationship and the inverse mapping relationship are determined based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm, including: determining a first mapping relationship from the Edwards448 digital signature algorithm to the target digital signature algorithm, and a second mapping relationship from the target digital signature algorithm to the Wei448 digital signature algorithm; based on the first mapping relationship and the second mapping relationship, determining the positive mapping relationship from the Edwards448 digital signature algorithm to the Wei448 digital signature algorithm; determining a third mapping relationship from the Wei448 digital signature algorithm to the target digital signature algorithm, and a fourth mapping relationship from the target digital signature algorithm to the Edwards448 digital signature algorithm; based on the third mapping relationship and the fourth mapping relationship, determining the inverse mapping relationship from the Wei448 digital signature algorithm to the Edwards448 digital signature algorithm.

[0009] In some embodiments, based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm includes: mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm based on the positive mapping relationship through a hardware accelerator;

[0010] Correspondingly, based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, the first reference operation result under the Wei448 digital signature algorithm is mapped to the first target operation result under the Edwards448 digital signature algorithm, including: through the hardware accelerator, based on the inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0011] In some embodiments, based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm includes: determining a pre-calculated modular inverse operation result regarding fixed parameters; based on the modular inverse operation result and the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm.

[0012] In some embodiments, the use of the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result includes: determining the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; determining the pre-calculated inverse element of the homology order; multiplying the inverse element of the homology order and the first parameter to obtain a first operation result; and using the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first operation result to obtain the first reference operation result.

[0013] In some embodiments, based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm includes: determining a pre-calculated modular inverse operation result regarding a fixed parameter; optimizing the inverse mapping relationship using a variable substitution method to obtain the optimized inverse mapping relationship; based on the modular inverse operation result and the optimized inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0014] In some embodiments, based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm, the first target point under the Edwards448 digital signature algorithm is mapped to the first reference point under the Wei448 digital signature algorithm, including: when the first target point is a generating point, determining the correspondence between the generating point under the Edwards448 digital signature algorithm and the generating point under the Wei448 digital signature algorithm; based on the corresponding relationship, determining the first reference point corresponding to the first target point.

[0015] In some embodiments, the data processing method also includes: in the process of generating keys and digital signatures using the Edwards448 digital signature algorithm, determining multiple second target points that need to be subjected to point multiplication operations and second parameters corresponding to each of the multiple second target points; based on the positive mapping relationship, mapping the multiple second target points under the Edwards448 digital signature algorithm to multiple second reference points under the Wei448 digital signature algorithm; using the point operation accelerator, using the Wei448 digital signature algorithm to perform point multiplication operations on each of the second reference points and the second parameters corresponding to each of the second reference points to obtain multiple point multiplication results; summing the multiple point multiplication results to obtain the second reference operation result under the Wei448 digital signature algorithm; based on the inverse mapping relationship, mapping the second reference operation result under the Wei448 digital signature algorithm to the second target operation result under the Edwards448 digital signature algorithm.

[0016] On the other hand, an embodiment of the present application provides a data processing device, the data processing device comprising:

[0017] A determination module, used to determine a first target point and a first parameter that need to be subjected to a point multiplication operation in the process of generating a key and a digital signature using a twisted Edwards curve Edwards448 digital signature algorithm; the first parameter is determined based on the information to be signed;

[0018] A mapping module, used for mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm;

[0019] An operation module, configured to perform a point multiplication operation on the first reference point and the first parameter by using the Wei448 digital signature algorithm through a point operation accelerator supporting the Wei448 digital signature algorithm, so as to obtain a first reference operation result;

[0020] The mapping module is also used to map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; the positive mapping relationship and the inverse mapping relationship are determined based on a target digital signature algorithm that has a homologous relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0021] On the other hand, an embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be executed on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements part or all of the steps in the above method when executed by a processor.

[0023] In the embodiment of the present application, the existing point operation accelerator can be used to accelerate the point multiplication operation of the Edwards448 digital signature algorithm, thereby improving the processing rate and performance of the Edwards448 digital signature algorithm, so that the performance of the Edwards448 digital signature algorithm is close to or even better than the performance of ECDSA algorithms such as Wei448 at the same scale, thereby making full use of the computing power of existing equipment and saving a lot of equipment update or replacement costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 1 ;

[0025] Figure 2 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 2 ;

[0026] Figure 3 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 3 ;

[0027] Figure 4 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 4 ;

[0028] Figure 5 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 5 ;

[0029] Figure 6 A schematic diagram of an implementation process of a data processing method provided in an embodiment of the present application Figure 6 ;

[0030] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;

[0031] Figure 8 A hardware entity diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.

[0033] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0034] The terms "first / second / third" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It is understandable that "first / second / third" can be interchanged with a specific order or sequence where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0035] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing this application and are not intended to limit this application.

[0036] Before further describing the embodiments of the present application in detail, the twisted Edwards curve Edwards 448, the Montgomery curve (Curve) 448, and the simplified Weierstrass curve Wei 448 involved in the embodiments of the present application are described first.

[0037] 1. Edwards448 curve;

[0038] The prime field where the Edwards448 curve is located is denoted as GF(p); where p=2 448 -2 224 -1 is a prime number. The equation of the Edwards448 curve is: 2 +y 2 =1+dx 2 y 2 .

[0039] in,

[0040] d is a parameter of the Edwards448 curve and is a fixed value; d=0xffffffff ffffffffffffffffffffffffff ffffffffff ffffffff fffffffffe ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffffff ffff6756. (x, y) represents a point on the Edwards448 curve, where x is the horizontal coordinate of the point on the Edwards448 curve, and y is the vertical coordinate of the point on the Edwards448 curve.

[0041] The coordinates of the generator points of the Edwards448 curve are:

[0042] The horizontal coordinate Gx of the generator point of Edwards448 curve is: G x =0x4f1970c6 6bed0ded 221d15a622bf36da 9e146570 470f1767 ea6de324 a3d3a464 12ae1af7 2ab66511 433b80e18b00938e 2626a82b c70cc05e;

[0043] The ordinate Gy of the generator point of Edwards448 curve is: G y =0x693f4671 6eb6bc24 8876203756c9c762 4bea7373 6ca39840 87789c1e 05a0c2d7 3ad3ff1c e67c39c4 fdbd132c4ed7c8ad 9808795b f230fa14;

[0044] The order n1 of the generator point of the Edwards448 curve is: n1=0x3fffffff ffffffffffffffffffffff ffffffffffffff ffffffffff 7cca23e9 c44edb49 aed63690 216cc2728dc58f55 2378c292 ab5844f3;

[0045] The cofactor of the Edwards448 curve is 4. The cofactor refers to the value obtained by dividing the number of all points on the Edwards448 curve by the number of points obtained by generating the original points.

[0046] 2. Curve448 curve;

[0047] The prime number domain of Curve448 is the same as that of Ewards448. The equation of Curve448 is: 2 =u 3 +Au 2 +u.

[0048] in,

[0049] (u, v) represents a point on the Curve448 curve, u is the horizontal coordinate of the point on the Curve448 curve, and v is the vertical coordinate of the point on the Curve448 curve.

[0050] A is a parameter of Curve448 curve, which is a fixed value; A=0x262a6;

[0051] B is another parameter of Curve448, which is also a fixed value;

[0052] The coordinates of the generator points of Curve448 are:

[0053] The horizontal coordinate Gu of the generator point of Curve448 is: G u =0x05;

[0054] The vertical coordinate Gv of the generator point of Curve448 is: G v =0x7d235d12 95f5b1f6 6c98ab6e58326fce cbae5d34 f55545d0 60f75dc2 8df3f6ed b8027e23 46430d21 1312c4b150677af7 6fd7223d 457b5b1a;

[0055] The order of the generator points of Curve448 is equal to the order of the generator points of Edwards448.

[0056] The cofactor of Curve448 is 4.

[0057] 3. Wei448 curve;

[0058] The prime number domain of the Wei448 curve is the same as that of Edwards448. The equation of the Wei448 curve is: 2 =X 3 +aX+b;

[0059] in,

[0060] (X, Y) represents a point on the Wei448 curve, X is the horizontal coordinate of the point on the Wei448 curve, and Y is the vertical coordinate of the point on the Wei448 curve.

[0061] a is a parameter of the Wei448 curve, which is a fixed value; a=0xaaaaaaaa aaaaaaaa aaaaaaaaaaaaaaaaaaa aaaaaaaaa aaaaaaaaa9 ffffffff ffffffff ffffffff ffffffffffffffffff fffffffe 1a76d41f;

[0062] b is another parameter of the Wei448 curve, which is also a fixed value; b=0x5ed097b4 25ed097b425ed097 b425ed09 7b425ed0 97b425ed 097b425e 71c71c71 c71c71c7 1c71c71c71c71c71c71 c71c71c7 1c72c87b 7cc69f70;

[0063] The coordinates of the generator points of the Wei448 curve are:

[0064] The horizontal coordinate GX of the generator point of the Wei448 curve is: X =0xaaaaaaaa aaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaaa 00000000 00000000 00000000 0000000000000000 00000000 0000cb91;

[0065] The horizontal coordinate GY of the generator point of the Wei448 curve is: Y =07d235d12 95f5b1f6 6c98ab6e58326fce cbae5d34 f55545d0 60f75dc2 8df3f6ed b8027e23 46430d21 1312c4b150677af7 6fd7223d 457b5b1a;

[0066] The order of the generator points of the Wei448 curve is equal to the order of the generator points of Edwards448.

[0067] The cofactor of the Wei448 curve is 4.

[0068] In order to better understand the data processing method provided in the embodiment of the present application, the solution in the related technology is first described below.

[0069] As a traditional elliptic curve digital signature algorithm, the ECDSA algorithm on the prime field has been widely used (the ECDSA algorithm mentioned below is on the prime field by default, so I will not repeat it here). Many chips have implemented hardware accelerators for ECDSA point operations (point multiplication and point addition, the same below). The Ed448 algorithm proposed by Mike Hamburg in 2015 is a new elliptic curve digital signature algorithm based on the Edwards curve Edwards448. It has advantages in both security and performance, and has been increasingly recognized and applied. Traditional ECDSA algorithms usually only support the classic simplified Weierstrass curve, which is different from the Edwards curve. Therefore, the existing ECDSA point operation accelerator cannot be directly used to accelerate the implementation of the Ed448 algorithm.

[0070] The embodiment of the present application proposes a data processing method, which maps the subgroup on the Edwards448 curve used by the Ed448 algorithm to the subgroup on the corresponding simplified Weierstrass curve Wei448 (Wei448 is the identifier of the converted curve, the same below). In this way, the mapped points can use the existing ECDSA point operation accelerator. After the calculation is completed, the corresponding inverse mapping is used to convert back to the corresponding points on the Edwards448 curve, thus completing the acceleration of the point operation on the Edwards448 curve. The additional overhead lies in the forward mapping and the inverse mapping. The overhead of these two actions is relatively small, so the implementation of the Ed448 algorithm is accelerated, and its performance is very close to the performance of the ECDSA algorithm of the Weierstrass curve Wei448 of the same scale, which gives full play to the computing potential of existing equipment and saves the cost of equipment and system updates.

[0071] The following is a detailed description of a data processing method proposed in an embodiment of the present application:

[0072] The present application embodiment provides a data processing method, which can be executed by a processor of a computer device. The computer device may refer to a server, a laptop, a tablet computer, a desktop computer, a smart TV, a set-top box, a mobile device (such as a mobile phone, a portable video player, a personal digital assistant, a dedicated messaging device, a portable gaming device), or other device with data processing capabilities. Figure 1 As shown, the method includes the following steps 101 to 104:

[0073] Step 101: In the process of generating a key and a digital signature using the twisted Edwards curve Edwards 448 digital signature algorithm, determine a first target point and a first parameter that require a point multiplication operation.

[0074] The first parameter is determined based on the information to be signed.

[0075] The Edwards448 digital signature algorithm refers to a digital signature algorithm based on the Edwards448 curve. The first target point may refer to a single point that currently needs to be multiplied in the process of generating a key and a digital signature using the Edwards448 digital signature algorithm; for example, the first target point may be represented as point P(P x ,P y ), Px is the horizontal coordinate of the first target point, and Py is the vertical coordinate of the first target point. In the scenario of key generation and signature verification, the first parameter is used to characterize the identity of the signature object; illustratively, the first parameter can be expressed as k.

[0076] In one implementation scenario, in the process of generating a key using the Edwards448 digital signature algorithm, the first parameter may be the result of performing a hash operation on the information to be signed and other data of the signature object using the Edwards448 digital signature algorithm; the first target point may be the generating point of the Edwards448 curve. The hash algorithm used in the hash operation may be the SHA-512 hash algorithm; the information to be signed may refer to the code, text and other information that needs to be signed; and other data may refer to a character string additionally input by the user to enhance the security of the key.

[0077] In another implementation scenario, two point multiplications are involved in the process of signature verification using the Edwards448 digital signature algorithm, where the first parameter corresponding to one point multiplication can be the result of hashing the public key of the signature object, the first half of the signature, the data to be signed and other data using the Edwards448 digital signature algorithm, and the first target point at this time can be the public key of the signature object; the first parameter corresponding to the other point multiplication can be the second half of the signature, and the first target point at this time can be the generator point of the Edwards448 curve.

[0078] Step 102: Based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm, the first target point under the Edwards448 digital signature algorithm is mapped to the first reference point under the Wei448 digital signature algorithm.

[0079] The Wei448 digital signature algorithm refers to a digital signature algorithm based on the Wei448 curve. The first reference point may refer to a corresponding point of the first target point under the Wei448 digital signature algorithm. For example, the first reference point may be represented as point P1 (P1 x ,P1 y ), P1x is the horizontal coordinate of the first reference point, and P1y is the vertical coordinate of the first reference point.

[0080] For example, if the first target point is the generator point G of the Edwards 448 curve, then the first reference point is the generator point G1 of the Wei 448 curve.

[0081] The positive mapping relationship refers to the mapping relationship from the Edwards448 digital signature algorithm to the Wei448 digital signature algorithm.

[0082] In a feasible implementation method, the positive mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm is determined in advance; for the point multiplication operation in the key generation and signature verification process using the Edwards448 digital signature algorithm, the first target point under the Edwards448 digital signature algorithm can be mapped to the first reference point under the Wei448 digital signature algorithm according to the positive mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm.

[0083] Step 103: Using a point operation accelerator that supports the Wei448 digital signature algorithm, use the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result.

[0084] The point operation accelerator is used to accelerate the point multiplication operation in the Wei448 digital signature algorithm.

[0085] For ECDSA8 algorithm and Ed448 algorithm, the core operation is point multiplication operation, which takes up most of the time, so accelerators are usually needed to accelerate performance; and hardware accelerators have great performance advantages over software implementation, which can achieve dozens of times or even more effects. However, the existing point operation accelerator only supports the traditional simplified Weierstrass curve. Therefore, for the point multiplication operation in the Edwards448 digital signature algorithm, it is necessary to map the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm, and then use the Wei448 digital signature algorithm to perform point multiplication operation on the first reference point and the first parameter through the point operation accelerator to obtain the first reference operation result. In this way, the point multiplication operation of the Edwards448 digital signature algorithm can be accelerated with the help of the existing point operation accelerator, so that the performance of the Edwards448 digital signature algorithm is close to or even better than the performance of the ECDSA algorithm of the simplified Weierstrass curve under the same scale, thereby making full use of the computing power of existing equipment and saving a lot of equipment update or replacement costs.

[0086] In a feasible implementation, the operation of performing a point multiplication operation on the first reference point and the first parameter by using the Wei448 digital signature algorithm through a point operation accelerator is similar to the operation of performing a point multiplication operation on any point and the corresponding parameter by using the Wei448 digital signature algorithm through a point operation accelerator in the related art, and the embodiment of the present application will not be repeated. Specifically, on the point operation accelerator, the operation of performing a point multiplication operation on the first reference point and the first parameter by using the reference digital signature algorithm is performed to accelerate the calculation rate and save time.

[0087] Step 104: Based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0088] The positive mapping relationship and the inverse mapping relationship are determined based on a target digital signature algorithm that has a homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0089] The inverse mapping relationship refers to the mapping relationship from the Wei448 digital signature algorithm to the Edwards448 digital signature algorithm. The first target operation result may refer to the result of performing a point multiplication operation on the first target point using the Edwards448 digital signature algorithm.

[0090] The target digital signature algorithm refers to a digital signature algorithm that has a homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm. For example, the target digital signature algorithm may be a Curve448 digital signature algorithm based on the Curve448 curve.

[0091] In a feasible implementation, the Curve448 digital signature algorithm can be used as a bridge between the Wei448 digital signature algorithm and the Edwards448 digital signature algorithm. Based on the relationship between the three, the positive mapping relationship and the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm are determined.

[0092] Since the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm can be converted into each other, the result of performing a point multiplication operation on the first target point using the Edwards448 digital signature algorithm is equal to the first reference operation result after performing a point multiplication operation on the first reference point (the point under the Wei448 digital signature algorithm after mapping the first target point) using the Wei448 digital signature algorithm and then inversely mapping it to the first target operation result.

[0093] In a feasible implementation method, for the point multiplication operation in the process of key generation and signature verification using the Edwards448 digital signature algorithm, the first reference operation result under the Wei448 digital signature algorithm can be mapped to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm.

[0094] In an embodiment of the present application, in the process of generating a key and a digital signature using the Edwards448 digital signature algorithm, a first target point and a first parameter that need to be subjected to a point multiplication operation are determined; based on the positive mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, the first target point under the Edwards448 digital signature algorithm is mapped to the first reference point under the Wei448 digital signature algorithm; through a point operation accelerator that supports the Wei448 digital signature algorithm, the Wei448 digital signature algorithm is used to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result; based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, the first reference operation result under the Wei448 digital signature algorithm is mapped to the first target operation result under the Edwards448 digital signature algorithm. In this way, the existing point operation accelerator can be used to accelerate the point multiplication operation of the Edwards448 digital signature algorithm, thereby improving the processing rate and performance of the Edwards448 digital signature algorithm, making the performance of the Edwards448 digital signature algorithm close to or even better than the performance of ECDSA algorithms such as Wei448 at the same scale, thereby making full use of the computing power of existing equipment and saving a lot of equipment update or replacement costs.

[0095] The present application embodiment provides a data processing method, which can be executed by a processor of a computer device. Figure 2 As shown, the method includes the following steps 201 to 206:

[0096] Step 201: Determine a target digital signature algorithm that has a fourth-order homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0097] There is birational equivalence between the Wei448 curve and the Curve448 curve, that is, except for a few low-order points such as the point at infinity, there is a reversible mapping relationship between the points on the two curves. From the Curve448 curve or the Wei448 curve to the Edwards448 curve, it is 4-isogenous; specifically, taking the generator points of the Curve448 curve as an example, after mapping, 4 times the generator points of the Edwards448 curve will be obtained. Therefore, the Curve448 digital signature algorithm based on the Curve448 curve is used as the target digital signature algorithm.

[0098] Step 202: Determine the positive mapping relationship and the inverse mapping relationship based on the mapping relationship between the Edwards 448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei 448 digital signature algorithm.

[0099] In a feasible implementation, the mapping relationship between the Edwards448 curve and the Curve448 curve, and the mapping relationship between the Curve448 curve and the Wei448 curve may be analyzed and processed to obtain the positive mapping relationship and the inverse mapping relationship between the Edwards448 curve and the Wei448 curve.

[0100] In some embodiments, the specific implementation method of step 202 may be: determining a first mapping relationship from the Edwards448 digital signature algorithm to the target digital signature algorithm, and a second mapping relationship from the target digital signature algorithm to the Wei448 digital signature algorithm; based on the first mapping relationship and the second mapping relationship, determining a positive mapping relationship from the Edwards448 digital signature algorithm to the Wei448 digital signature algorithm; determining a third mapping relationship from the Wei448 digital signature algorithm to the target digital signature algorithm, and a fourth mapping relationship from the target digital signature algorithm to the Edwards448 digital signature algorithm; based on the third mapping relationship and the fourth mapping relationship, determining an inverse mapping relationship from the Wei448 digital signature algorithm to the Edwards448 digital signature algorithm.

[0101] The first mapping relationship is the mapping relationship from the Edwards448 digital signature algorithm to the Curve448 digital signature algorithm, that is, the mapping relationship from the Edwards448 curve to the Curve448 curve. The second mapping relationship is the mapping relationship from the Curve448 digital signature algorithm to the Wei448 digital signature algorithm, that is, the mapping relationship from the Curve448 curve to the Wei448 curve. The third mapping relationship is the mapping relationship from the Wei448 digital signature algorithm to the Curve448 digital signature algorithm, that is, the mapping relationship from the Wei448 curve to the Curve448 curve. The fourth mapping relationship is the mapping relationship from the Curve448 digital signature algorithm to the Edwards448 digital signature algorithm, that is, the mapping relationship from the Curve448 curve to the Edwards448 curve.

[0102] By analyzing the equations of Edwards448 curve and Curve448 curve, we can know that there is a first mapping relationship from Edwards448 curve to Curve448 curve: u=y 2 / x 2 ,v=(2-x 2 -y 2 )y / x 3 ; By analyzing the equations of the Wei448 curve and the Curve448 curve, we know that there is a second mapping relationship from the Curve448 curve to the Wei448 curve: X=u+A / 3, Y=v. Therefore, the positive mapping relationship (transformation f) from the Edwards448 curve to the Wei448 curve is: X=y 2 / x 2 +A / 3,Y=(2-x 2 -y 2 )y / x 3 . Among them, x is the horizontal coordinate of the point of Edwards448 curve, y is the vertical coordinate of the point of Edwards448 curve; u is the horizontal coordinate of the point of Curve448 curve, v is the vertical coordinate of the point of Curve448 curve; X is the horizontal coordinate of the point of Wei448 curve, Y is the vertical coordinate of the point of Wei448 curve; A is a parameter of Curve448 curve, which is a fixed value.

[0103] By analyzing the equations of Edwards448 and Curve448, we know that there is a third mapping relationship from Wei448 to Curve448: u=XA / 3, v=Y; there is a fourth mapping relationship from Curve448 to Edwards448: x=4(u 2 -1)v / (u 4 -2u 2 +4v2 +1), y=(u 5 -2u 3 -4uv 2 +u) / (-u 5 +2u 3 -u-2u 2 v 2 +2v 2 ). Therefore, the inverse mapping relationship from the Wei448 curve to the Edwards448 curve (inverse transformation f -1 )is: x=4(u 2 -1)v / (u 4 -2u 2 +4v 2 +1), y=(u 5 -2u 3 -4uv 2 +u) / (-u 5 +2u 3 -u-2u 2 v 2 +2v 2 ), where u=XA / 3, v=Y.

[0104] Step 203: In the process of generating a key and a digital signature using the twisted Edwards curve Edwards 448 digital signature algorithm, determine a first target point and a first parameter that require a point multiplication operation.

[0105] The first parameter is determined based on the information to be signed.

[0106] Step 204: Based on the positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm, the first target point under the Edwards448 digital signature algorithm is mapped to the first reference point under the Wei448 digital signature algorithm.

[0107] In some implementations, the specific implementation of step 204 may be: through a hardware accelerator, based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm.

[0108] The hardware accelerator is used to accelerate the mapping operation (including forward mapping and inverse mapping) to further reduce software actions and improve algorithm performance.

[0109] In a feasible implementation method, a special hardware accelerator can be set up to handle the mapping operation; in this way, the positive mapping operation of "based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm" can be performed on the hardware accelerator to improve the rate of the positive mapping operation.

[0110] In some embodiments, the specific implementation method of "based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm" can be: determining a pre-calculated modular inverse operation result regarding fixed parameters; based on the modular inverse operation result and the positive mapping relationship, mapping the first target point under the target digital signature algorithm to the first reference point under the reference digital signature algorithm.

[0111] The fixed parameter may refer to A in the above Curve448. The simulation operation result refers to the result obtained by performing a modular inverse operation on the fixed parameter A in advance.

[0112] For the point multiplication operation [k]P on the Edwards448 curve, since point P is the generator point (G x ,G y ) is a point in the cyclic subgroup generated by the Edwards448 curve, whose order is n. Then, according to the fact that the Edwards448 curve and the Wei448 curve are 4-isogenous, we can put the point P(P x ,P y ) is mapped to point P1(P1) on the Wei448 curve x ,P1 y ). Specifically, , Since division involves a relatively time-consuming modular inverse operation, the above operation can be optimized as follows to save one modular inverse operation: , , ; Among them, A / 3 can be pre-calculated to further save calculation time.

[0113] The following is an example of a modular inverse operation result of A / 3 in an actual application process. The modular inverse operation result may be a hexadecimal value recognizable by a computer: A / 3modp=0xaaaaaaaa aaaaaaaa aaaaaaaa aaaaaaaaaaaaaaaa aaaaaaaaaaa aaaaaaaaa 00000000 00000000 00000000 00000000 000000000 0000cb8c.

[0114] Step 205: Using a point operation accelerator that supports the Wei448 digital signature algorithm, use the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result.

[0115] In some embodiments, the specific implementation method of step 205 may be: determining the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; determining the pre-calculated inverse element of the homology order; multiplying the inverse element of the homology order and the first parameter to obtain a first operation result; using the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first operation result to obtain the first reference operation result.

[0116] Since the Curve448 curve or the Wei448 curve is 4-times homologous to the Edwards448 curve, the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm is 4. The inverse element of the homology order is: 1 / 4.

[0117] If the first parameter is k and the first reference point is P1, then the first operation result is k / 4. The first reference operation result is Q1(Q1 x ,Q1 y )=[k / 4]P1, Q1x is the horizontal coordinate of the first reference operation result, and Q1y is the vertical coordinate of the first reference operation result. Among them, the inverse element of 4 can be pre-calculated to save one inversion operation. For example, the pre-calculated result of the inverse element of 4 is: 1 / 4mod n=0x0fffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffffdf3288fa 7113b6d2 6bb58da4 085b309c a37163d5 48de30a4 aad6113d.

[0118] Step 206: Based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0119] The positive mapping relationship and the inverse mapping relationship are determined based on a target digital signature algorithm that has a homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0120] In some implementations, the specific implementation method of step 206 may be: through the hardware accelerator, based on the inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0121] In a feasible implementation method, the inverse mapping operation of "mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship" can be performed on a specially configured hardware accelerator to improve the rate of the inverse mapping operation.

[0122] It should be noted that implementing the forward mapping operation and the inverse mapping operation on a dedicated hardware accelerator can further improve the performance of the target digital signature algorithm. In addition, a dedicated hardware accelerator can be directly set up based on the existing hardware. In this case, little work needs to be done, the operation is simple, and it does not cause too many additional operations.

[0123] In some embodiments, the specific implementation method of "based on the inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm" can be: determining a pre-calculated modular inverse operation result regarding fixed parameters; optimizing the inverse mapping relationship using a variable replacement method to obtain the optimized inverse mapping relationship; based on the modular inverse operation result and the optimized inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0124] After obtaining the first reference operation result Q1, Convert back to the first target operation result on the Edwards448 curve , and satisfies . Specifically,

[0125] make , ;in, The above-mentioned module inverse operation results can be reused, so we get , ;

[0126] In order to save computational overhead, note that , ;

[0127] The variable replacement method is used for optimization. , , , , , , so we get , ;

[0128] Considering that the division (inversion) operation is time-consuming, we can continue to optimize it, that is, , ; In this way, the denominator is the same, and there is only one inversion operation. Figure 3 As shown, for the point multiplication operation in the Edwards 448 digital signature algorithm, the entire process of accelerating the point operation accelerator may include the following steps 301 to 306:

[0129] Step 301: Input a scalar k and a first target point P, and then obtain the point multiplication formula: Q=[k]P;

[0130] Step 302: Map P to P1 according to the positive mapping relationship; wherein P1 is the first reference point;

[0131] Step 303: input the scalar k and the first reference point P1, and calculate Q1=[k / 4]P1 through the point operation accelerator;

[0132] Step 304, output Q1; wherein Q1 is the first reference operation result;

[0133] Step 305: Map Q1 to Q according to the inverse mapping relationship; wherein Q is the first target operation result;

[0134] Step 306: Output Q.

[0135] Among them, Edwards448 curve operation 31 may include step 301 and step 306, Wei448 curve operation 32 may include steps 303 and 304, and steps 302 and 305 may be executed on a point operation accelerator.

[0136] In other embodiments, when the first target point is a generating source point, the specific implementation method of "based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm" in step 204 can be: when the first target point is a generating source point, determining the correspondence between the generating source point under the Edwards448 digital signature algorithm and the generating source point under the Wei448 digital signature algorithm; based on the corresponding relationship, determining the first reference point corresponding to the first target point.

[0137] For the key generation in the Ed448 digital signature algorithm and the point multiplication [k]G in the signature process, k in the key generation and signature process can refer to the result of the hash operation of the signature data and other information using Edwards448, that is, k at this time is determined by the user's input; G can be regarded as a fixed parameter. Since the generator point G of the Edwards448 curve and the generator point G1 of the Wei448 curve have been converted, the mapping operation from G to G1 can be omitted. In this case, Figure 4 As shown, for the point multiplication operation of the Edwards 448 curve, the entire process of accelerating the point operation accelerator may include the following steps 401 to 405:

[0138] Step 401, input scalar k and generator point G, and then obtain the point multiplication formula: Q=[k]G;

[0139] Step 402: Input the scalar k and the generator point G1, and calculate Q1=[k / 4]G1 through the point operation accelerator;

[0140] Step 403, output Q1;

[0141] Step 404: Map Q1 to Q according to the inverse mapping relationship;

[0142] Step 405: Output Q.

[0143] In this way, the key generation in the Ed448 digital signature algorithm and the point multiplication in the signature process can be accelerated with the help of the existing ECC accelerator. Among them, the Edwards448 curve operation 41 can include steps 401 and 405, the Wei448 curve operation 42 can include steps 402 and 403, and step 404 can be performed on the point operation accelerator.

[0144] Based on the above embodiment, the data processing method provided in the embodiment of the present application may further include the following steps 207 to 2011:

[0145] Step 207: In the process of generating a key and a digital signature using the Edwards 448 digital signature algorithm, determine a plurality of second target points that need to be subjected to a point multiplication operation and second parameters corresponding to each of the plurality of second target points.

[0146] The multiple second target points may refer to multiple points that currently need to be subjected to point multiplication operations in the process of generating keys and digital signatures using the Edwards 448 digital signature algorithm; illustratively, the multiple second target points may be point P and point R.

[0147] Step 208: Map the multiple second target points under the Edwards 448 digital signature algorithm to multiple second reference points under the Wei 448 digital signature algorithm based on the positive mapping relationship.

[0148] The multiple second reference points may refer to corresponding points of the multiple second target points under the Wei448 digital signature algorithm. Exemplarily, the multiple second reference points may be represented as point P1 and point R1.

[0149] Step 209: Use the point operation accelerator and the Wei448 digital signature algorithm to perform point multiplication operations on each of the second reference points and the second parameters corresponding to each of the second reference points to obtain multiple point multiplication results.

[0150] In a feasible implementation, for the multi-point multiplication operation [k1]P+[k2]R on the Edwards448 curve, the two points P and R can be first converted to the corresponding points P1 and R1 on the Wei448 curve, and then [k1 / 4]P1 and [k2 / 4]R1 are calculated respectively.

[0151] Step 210: performing a sum operation on the multiple point product results to obtain a second reference operation result under the Wei448 digital signature algorithm.

[0152] In one possible implementation, for the multi-point multiplication operation [k1]P+[k2]R on the Edwards448 curve, P1 is calculated by the ECC accelerator on the Wei448 curve. ’ =[k1 / 4]P1 and R1 ’ =[k2 / 4]R1, we can calculate the point addition to get the second reference operation result Q1=P1 ’ +R1 ’ .

[0153] Step 211: Based on the inverse mapping relationship, map the second reference operation result under the Wei448 digital signature algorithm to the second target operation result under the Edwards448 digital signature algorithm.

[0154] In a feasible implementation, for the multi-point multiplication operation [k1]P+[k2]R on the Edwards448 curve, after Q1 is calculated, Q1 can be converted back to point Q on the Edwards448 curve, and Q=[k1]P+[k2]R.

[0155] like Figure 5 As shown, for the multi-point multiplication operation of the Edwards448 curve, the entire process of accelerating the multi-point multiplication operation by the point operation accelerator may include the following steps 501 to 506:

[0156] Step 501: Input scalars k1 and k2, second target points P and R, and then get the point multiplication formula: P ’ =[k1]P、R ’ =[k2]R、Q=P ’ +R ’ ;

[0157] Step 502: According to the positive mapping relationship, map P to P1 and map R to R1;

[0158] Step 503: Input scalars k1 and k2, second reference points P1 and R1, and calculate P1 through the point operation accelerator. ’ =[k1 / 4]P1、R1 ’ =[k2 / 4]R1, and then do point addition to get Q1=P1 ’ +R1 ’ ;

[0159] Step 504, output Q1;

[0160] Step 505: Map Q1 to Q according to the inverse mapping relationship;

[0161] Step 506: Output Q.

[0162] Among them, Edwards448 curve operation 51 may include step 501 and step 506, Wei448 curve operation 52 may include steps 503 and 504, and step 502 and step 505 may be executed on a hardware accelerator.

[0163] In some embodiments, the process of using Edwards 448 curve to perform signature verification involves two point multiplications and one point addition operation [S]G=R+[k]A ’ ; where G refers to the generator point on Edwards448, A ’ Refers to the public key of the object being signed. The signature is accepted if and only if the above equation holds, otherwise it is rejected. [S]G can be calculated by the above point multiplication operation, and R+[k]A can be calculated by multiple point multiplication operations. ’ , and then compare the results on both sides to determine whether the signature verification is successful.

[0164] Furthermore, a simpler method can be: point G already has a corresponding generator point G' on the Wei448 curve, so we only need to convert R and A' to the Wei448 curve, and record them as R' and A''; verify the following equation on the Wei448 curve: [S]G ’ =R ’ +[k]A ’’ , so that only two point conversion processes from Edwards448 curve to Wei448 curve are required, and no inverse conversion is required.

[0165] Specifically, Figure 6 As shown, for two point multiplications and one point addition operation in the process of verifying a signature using the Edwards 448 digital signature algorithm, the entire process of accelerating the operation by the point operation accelerator may include the following steps 601 to 605:

[0166] Step 601: Input scalars S and k, points R and A ’ , and then we get the dot product formula: P1=[S]G, A1=[k]A ’ , T=R+A1;

[0167] Step 602: According to the positive mapping relationship, map R to R ’ , A ’ Mapping to A ’’ ;

[0168] Step 603: Input scalar S and k, click R ’ and A ’’ , calculate P1 through the point operation accelerator ’ =[S]G ’ 、A1 ’ =[k]A ’’ , and perform point addition operation T ’ =R ’ +A1 ’ , judge P1 ’ =T ’ ?;

[0169] Step 604: Output P1 ’ =T ’ ?;

[0170] Since P1 ’ =T ’ ? is equivalent to P1=T?, ​​that is, step 605 is obtained and output P1=T?.

[0171] The Edwards 448 curve operation 61 may include steps 601 and 605 , the Wei 448 curve operation 62 may include steps 603 and 604 , and step 602 may be executed on a hardware accelerator.

[0172] It should be noted that, for the description of the same steps and the same contents in this embodiment as those in other embodiments, reference can be made to the description in other embodiments and will not be repeated here.

[0173] On a device that implements the ECDSA algorithm with a point computing accelerator, the data processing method of the embodiment of the present application makes the point multiplication performance of the Ed448 algorithm close to the point multiplication performance of the simplified Weierstrass curve (wei448 algorithm) of the same scale. Ultimately, the signing or verification performance of the Ed448 algorithm is close to the performance of the ECDSA algorithm (such as the wei448 algorithm) of the same scale, thus giving full play to the computing potential of the existing equipment.

[0174] The following table compares the performance of the point multiplication of the Ed448 algorithm implemented in an FPGA environment that implements a simplified Weierstrass curve point multiplication accelerator and directly calls the point operation accelerator. It can be seen that the performance of the latter is very close to the former.

[0175]

[0176] In fact, since the point multiplication of key generation and signature generation in the Ed448 algorithm only requires one conversion from a point on the Wei448 curve to a point on the Edwards448 curve, the actual performance will be closer. Similarly, the two point multiplications in signature verification only require one conversion from a point on the Edwards448 curve to a point on the Wei448 curve, without the need for inverse conversion, which will also improve performance.

[0177] If there is already an ECDSA point operation accelerator on the chip, due to various reasons (such as chip area, cost, development time and other limitations), the chip can only accept small changes at most, and it is inconvenient to directly design a point operation accelerator for the Ed448 algorithm. In this case, the forward and inverse conversions from points on the Edwards448 curve to points on the corresponding Wei448 curve can be implemented by designing a dedicated point operation accelerator (at this time, there is little work to do and the implementation is simple), which can further reduce software actions and continue to improve the performance of the Ed448 algorithm.

[0178] Based on the foregoing embodiments, an embodiment of the present application provides a data processing device, which includes the units included and the modules included in the units, and can be implemented by a processor in a computer device; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.

[0179] Figure 7 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application is shown in FIG. Figure 7 As shown, the data processing device 700 includes: a determination module 710, a mapping module 720 and a calculation module 730, wherein:

[0180] The determination module 710 is used to determine a first target point and a first parameter that need to be subjected to a point multiplication operation in the process of generating a key and a digital signature using the twisted Edwards curve Edwards 448 digital signature algorithm; the first parameter is determined based on the information to be signed;

[0181] A mapping module 720, configured to map the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm based on a positive mapping relationship between the Edwards448 digital signature algorithm and the simplified Weierstrass curve Wei448 digital signature algorithm;

[0182] The operation module 730 is used to perform a point multiplication operation on the first reference point and the first parameter by using the Wei448 digital signature algorithm through a point operation accelerator that supports the Wei448 digital signature algorithm to obtain a first reference operation result;

[0183] The mapping module 720 is also used to map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; the positive mapping relationship and the inverse mapping relationship are determined based on a target digital signature algorithm that has a homologous relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm.

[0184] In some embodiments, the determination module 710 is specifically used to: determine a target digital signature algorithm that has a fourth-order homology relationship with the Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the Wei448 digital signature algorithm; based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm, determine the positive mapping relationship and the inverse mapping relationship.

[0185] In some embodiments, the determination module 710 is specifically used to: determine a first mapping relationship from the Edwards448 digital signature algorithm to the target digital signature algorithm, and a second mapping relationship from the target digital signature algorithm to the Wei448 digital signature algorithm; based on the first mapping relationship and the second mapping relationship, determine a positive mapping relationship from the Edwards448 digital signature algorithm to the Wei448 digital signature algorithm; determine a third mapping relationship from the Wei448 digital signature algorithm to the target digital signature algorithm, and a fourth mapping relationship from the target digital signature algorithm to the Edwards448 digital signature algorithm; based on the third mapping relationship and the fourth mapping relationship, determine an inverse mapping relationship from the Wei448 digital signature algorithm to the Edwards448 digital signature algorithm.

[0186] In some implementations, the mapping module 720 is specifically used to: map the first target point under the Edwards 448 digital signature algorithm to the first reference point under the Wei 448 digital signature algorithm based on the positive mapping relationship through a hardware accelerator;

[0187] Correspondingly, the mapping module 720 is specifically used to: map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship through the hardware accelerator.

[0188] In some embodiments, the mapping module 720 is specifically used to: determine a pre-calculated modular inverse operation result regarding a fixed parameter; based on the modular inverse operation result and the positive mapping relationship, map the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm.

[0189] In some embodiments, the operation module 730 is specifically used to: determine the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; determine the pre-calculated inverse element of the homology order; multiply the inverse element of the homology order and the first parameter to obtain a first operation result; use the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first operation result to obtain the first reference operation result.

[0190] In some embodiments, the mapping module 720 is specifically used to: determine a pre-calculated modular inverse operation result regarding fixed parameters; optimize the inverse mapping relationship using a variable replacement method to obtain the optimized inverse mapping relationship; based on the modular inverse operation result and the optimized inverse mapping relationship, map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm.

[0191] In some embodiments, the mapping module 720 is specifically used to: when the first target point is a generation point, determine the correspondence between the generation point under the Edwards448 digital signature algorithm and the generation point under the Wei448 digital signature algorithm; based on the correspondence, determine the first reference point corresponding to the first target point.

[0192] In some embodiments, the mapping module 720 is specifically used to: determine multiple second target points that need to be subjected to point multiplication operations and the second parameters corresponding to each of the multiple second target points in the process of generating keys and digital signatures using the Edwards448 digital signature algorithm; map the multiple second target points under the Edwards448 digital signature algorithm to multiple second reference points under the Wei448 digital signature algorithm based on the positive mapping relationship; use the Wei448 digital signature algorithm to perform point multiplication operations on each of the second reference points and the second parameters corresponding to each of the second reference points through the point operation accelerator to obtain multiple point multiplication results; sum the multiple point multiplication results to obtain the second reference operation result under the Wei448 digital signature algorithm; and map the second reference operation result under the Wei448 digital signature algorithm to the second target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship.

[0193] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. In some embodiments, the functions or modules included in the device provided in the embodiment of the present application can be used to execute the method described in the above method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.

[0194] It should be noted that in the embodiments of the present application, if the above-mentioned data processing method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can be essentially or partly reflected in the form of a software product that contributes to the relevant technology. The software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a disk or an optical disk. In this way, the embodiments of the present application are not limited to any specific hardware, software or firmware, or any combination of hardware, software, and firmware.

[0195] An embodiment of the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the processor executes the program, some or all of the steps in the above method are implemented.

[0196] The embodiment of the present application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, some or all of the steps in the above method are implemented. The computer-readable storage medium can be transient or non-transient.

[0197] An embodiment of the present application provides a computer program, including a computer-readable code. When the computer-readable code is run in a computer device, a processor in the computer device executes some or all of the steps for implementing the above method.

[0198] The embodiment of the present application provides a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and when the computer program is read and executed by a computer, some or all of the steps in the above method are implemented. The computer program product can be implemented in hardware, software, or a combination thereof. In some embodiments, the computer program product is specifically embodied as a computer storage medium, and in other embodiments, the computer program product is specifically embodied as a software product, such as a software development kit (SDK), etc.

[0199] It should be noted here that the description of the various embodiments above tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. The description of the above device, storage medium, computer program and computer program product embodiments is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the embodiments of the device, storage medium, computer program and computer program product of this application, please refer to the description of the method embodiment of this application for understanding.

[0200] It should be noted that Figure 8 A schematic diagram of a hardware entity of a computer device in an embodiment of the present application is shown in FIG. Figure 8 As shown, the hardware entity of the computer device 800 includes: a processor 801, a communication interface 802 and a memory 803, wherein:

[0201] Processor 801 generally controls the overall operation of computer device 800 .

[0202] The communication interface 802 enables the computer device to communicate with other terminals or servers through a network.

[0203] The memory 803 is configured to store instructions and applications executable by the processor 801, and can also cache data to be processed or processed by the processor 801 and each module in the computer device 800 (for example, image data, audio data, voice communication data, and video communication data), which can be implemented by flash memory (FLASH) or random access memory (Random Access Memory, RAM). Data can be transmitted between the processor 801, the communication interface 802, and the memory 803 through the bus 804.

[0204] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the serial number of each step / process mentioned above does not mean the order of execution, and the execution order of each step / process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The serial numbers of the embodiments of the present application mentioned above are for description only and do not represent the advantages and disadvantages of the embodiments.

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

[0206] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or components can be combined, or can be integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.

[0207] The units described above as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units; they may be located in one place or distributed on multiple network units; some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0208] In addition, all functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may be a separate unit, or two or more units may be integrated into one unit; the above-mentioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0209] A person skilled in the art can understand that: all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, read-only memories (ROM), magnetic disks or optical disks.

[0210] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.

[0211] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application.

Claims

1. A data processing method, characterized in that: The data processing method comprises: Determine the target digital signature algorithm that has a fourth-order homology relationship with the twisted Edwards curve Edwards448 digital signature algorithm and a bidirectional rational equivalence relationship with the simplified Weierstrass curve Wei448 digital signature algorithm; Based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm, determine the positive mapping relationship and the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; In the process of generating a key and a digital signature using the Edwards 448 digital signature algorithm, determining a first target point and a first parameter that need to be subjected to a point multiplication operation; the first parameter is determined based on the information to be signed; Based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm; By using a point operation accelerator that supports the Wei448 digital signature algorithm, the Wei448 digital signature algorithm is used to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result; Based on the inverse mapping relationship, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm; The step of using the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first parameter to obtain a first reference operation result includes: Determining the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; determining a precomputed inverse element of said homology order; Performing a multiplication operation on the inverse element of the homology order and the first parameter to obtain a first operation result; The Wei448 digital signature algorithm is used to perform a point multiplication operation on the first reference point and the first operation result to obtain the first reference operation result.

2. The data processing method according to claim 1, characterized in that: The determining of the positive mapping relationship and the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm, comprises: Determine a first mapping relationship from the Edwards448 digital signature algorithm to the target digital signature algorithm and a second mapping relationship from the target digital signature algorithm to the Wei448 digital signature algorithm; Based on the first mapping relationship and the second mapping relationship, determining a positive mapping relationship from the Edwards448 digital signature algorithm to the Wei448 digital signature algorithm; Determine a third mapping relationship from the Wei448 digital signature algorithm to the target digital signature algorithm and a fourth mapping relationship from the target digital signature algorithm to the Edwards448 digital signature algorithm; Based on the third mapping relationship and the fourth mapping relationship, an inverse mapping relationship from the Wei448 digital signature algorithm to the Edwards448 digital signature algorithm is determined.

3. The data processing method according to claim 1 or 2, characterized in that: The mapping, based on the positive mapping relationship, of the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm comprises: By means of a hardware accelerator, based on the positive mapping relationship, mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm; Correspondingly, based on the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm, mapping the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm includes: Through the hardware accelerator, based on the inverse mapping relationship, the first reference operation result under the Wei448 digital signature algorithm is mapped to the first target operation result under the Edwards448 digital signature algorithm.

4. The data processing method according to claim 3, characterized in that: The mapping, based on the positive mapping relationship, of the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm comprises: Determining a precomputed modular inverse operation result with respect to a fixed parameter; Based on the modular inverse operation result and the positive mapping relationship, the first target point under the Edwards448 digital signature algorithm is mapped to the first reference point under the Wei448 digital signature algorithm.

5. The data processing method according to claim 1 or 2, characterized in that: The mapping, based on the inverse mapping relationship, of the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm comprises: Determining a precomputed modular inverse operation result with respect to a fixed parameter; Optimizing the inverse mapping relationship by using a variable replacement method to obtain an optimized inverse mapping relationship; Based on the modular inverse operation result and the optimized inverse mapping relationship, the first reference operation result under the Wei448 digital signature algorithm is mapped to the first target operation result under the Edwards448 digital signature algorithm.

6. The data processing method according to claim 1 or 2, characterized in that: The mapping, based on the positive mapping relationship, of the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm comprises: In the case where the first target point is a generator point, determining a correspondence between a generator point under the Edwards448 digital signature algorithm and a generator point under the Wei448 digital signature algorithm; Based on the corresponding relationship, a first reference point corresponding to the first target point is determined.

7. The data processing method according to claim 1 or 2, characterized in that: The data processing method further includes: In the process of generating a key and a digital signature using the Edwards 448 digital signature algorithm, determining a plurality of second target points that need to be subjected to a point multiplication operation and second parameters corresponding to each of the plurality of second target points; Based on the positive mapping relationship, mapping the plurality of second target points under the Edwards448 digital signature algorithm to the plurality of second reference points under the Wei448 digital signature algorithm; By using the point operation accelerator, the Wei448 digital signature algorithm is used to perform a point multiplication operation on each of the second reference points and the second parameter corresponding to each of the second reference points to obtain a plurality of point multiplication results; Performing a sum operation on the multiple point product results to obtain a second reference operation result under the Wei448 digital signature algorithm; Based on the inverse mapping relationship, the second reference operation result under the Wei448 digital signature algorithm is mapped to the second target operation result under the Edwards448 digital signature algorithm.

8. A data processing device, characterized in that: The data processing device comprises: A determination module, used for determining a target digital signature algorithm having a fourth-order homology relationship with a twisted Edwards curve Edwards448 digital signature algorithm and having a bidirectional rational equivalence relationship with a simplified Weierstrass curve Wei448 digital signature algorithm; The determination module is further used to determine the positive mapping relationship and the inverse mapping relationship between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm based on the mapping relationship between the Edwards448 digital signature algorithm and the target digital signature algorithm, and the mapping relationship between the target digital signature algorithm and the Wei448 digital signature algorithm; The determination module is further used to determine a first target point and a first parameter that need to be subjected to a point multiplication operation in the process of generating a key and a digital signature using the Edwards 448 digital signature algorithm; the first parameter is determined based on the information to be signed; A mapping module, used for mapping the first target point under the Edwards448 digital signature algorithm to the first reference point under the Wei448 digital signature algorithm based on the positive mapping relationship; An operation module, configured to perform a point multiplication operation on the first reference point and the first parameter by using the Wei448 digital signature algorithm through a point operation accelerator supporting the Wei448 digital signature algorithm, so as to obtain a first reference operation result; The mapping module is further used to map the first reference operation result under the Wei448 digital signature algorithm to the first target operation result under the Edwards448 digital signature algorithm based on the inverse mapping relationship; Among them, the operation module is specifically used to determine the homology order between the Edwards448 digital signature algorithm and the Wei448 digital signature algorithm; determine the pre-calculated inverse element of the homology order; multiply the inverse element of the homology order and the first parameter to obtain a first operation result; use the Wei448 digital signature algorithm to perform a point multiplication operation on the first reference point and the first operation result to obtain the first reference operation result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the data processing method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Data processing method, device and equipment and computer readable storage medium

    CN117118637A