Data processing method and system, electronic device, and computer medium
By obtaining the horizontal coordinate and vertical coordinate identification information of the elliptic dot and selecting the appropriate vertical coordinate as the elliptic curve encryption method parameters, the problem of excessive coordinate data occupancy in the elliptic curve encryption method is solved, and memory utilization and processing efficiency are improved.
Patent Information
- Application Number
- PCT/CN2023/104181
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-06-29
- Publication Date
- 2025-01-02
AI Technical Summary
When the elliptic curve encryption method processes the coordinate data of elliptical dots in the processor, it occupies a large memory space, resulting in a low memory space utilization rate.
By obtaining the identification information corresponding to the horizontal coordinates and vertical coordinates of the elliptic dot, determining the alternative vertical coordinates, and selecting the appropriate vertical coordinates as parameters of the elliptic curve encryption method based on the identification information, reducing the need to directly store the vertical coordinates, thereby reducing memory usage .
It improves the utilization rate of memory space, improves the processing efficiency of elliptic curve encryption, and avoids data loss and repeated transmission problems.
Smart Images

Figure CN2023104181_02012025_PF_FP_ABST
Abstract
Description
Data processing method, system, electronic device and computer medium Technical Field
[0001] The present application relates to the field of data encryption, and in particular to a data processing method, system, electronic device and computer medium. Background Art
[0002] Zero-Knowledge Proof (ZKP) is a proof that a prover can convince a verifier that a certain assertion is correct without providing any useful information to the verifier. It is commonly used in cryptography. In this field, elliptic curve cryptography is used to encrypt and decrypt data during data transmission and storage to ensure data security. However, when a processor processes elliptic curve cryptography, the coordinates of the elliptic points on the elliptic curve occupy a large amount of memory space, which is limited by the processor's memory space, resulting in low memory utilization. Technical Solutions
[0003] The embodiment of the present application provides an implementation solution that is different from the related art to solve the technical problem that the coordinate data occupies a large amount of memory space and the utilization rate of the memory space is low during the processing of elliptic curve cryptography.
[0004] In a first aspect, the present application provides a data processing method, comprising:
[0005] Obtaining a first horizontal coordinate of a first ellipse point and first identification information corresponding to a first vertical coordinate to be determined of the first ellipse point;
[0006] determining two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point;
[0007] Determining the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information;
[0008] The first horizontal coordinate and the first vertical coordinate are used as partial parameters of an elliptic curve cryptography method, and the elliptic curve cryptography method is used to encrypt data to be encrypted.
[0009] In a second aspect, the present application provides a data processing system, comprising:
[0010] The target memory space is used to store the first horizontal coordinate of the first ellipse point and the first identification information corresponding to the first vertical coordinate to be determined of the first ellipse point;
[0011] a calculation unit, configured to determine two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point;
[0012] a symbol determination unit, which determines the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information;
[0013] an output control unit, configured to send the first horizontal coordinate and the first vertical coordinate to an ellipse calculation unit;
[0014] The elliptic calculation unit is used to perform elliptic curve cryptography processing, wherein the first horizontal coordinate and the first vertical coordinate are partial parameters of the elliptic curve cryptography, and the elliptic curve cryptography is used to encrypt data to be encrypted.
[0015] In a third aspect, the present application provides an electronic device, comprising:
[0016] processor; and
[0017] a memory for storing executable instructions of the processor;
[0018] The processor is configured to execute any method in the first aspect or any possible implementation of the first aspect by executing the executable instructions.
[0019] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any method in the first aspect or any possible implementation manner of the first aspect.
[0020] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the method described in the first aspect or any possible implementation manner of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for the embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0022] FIG1 is a flow chart of a data processing method according to an embodiment of the present application;
[0023] FIG2 is a schematic diagram of a specific implementation of S41-S42 of the present application;
[0024] FIG3 is a schematic structural diagram of a data processing system provided by an exemplary embodiment of the present application;
[0025] FIG4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings. The embodiments described below with reference to the accompanying drawings are exemplary and intended to be used to explain the present application, but should not be understood as limiting the present application.
[0027] The terms "first" and "second" in the specification, claims and drawings of the embodiments of the present application are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the embodiments of the present application described herein can, for example, be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0028] First, some of the terms used in the embodiments of the present application are explained below to facilitate understanding by those skilled in the art.
[0029] Elliptic Curve Cryptography (ECC) is a public key encryption technology based on elliptic curve theory. It uses the intractability of discrete logarithms of the commutative group formed by the points of the elliptic curve over a finite field to implement encryption, decryption, and digital signatures. By mapping the addition operation in the elliptic curve to the modular multiplication operation in the discrete logarithm, a corresponding cryptographic system based on the elliptic curve can be established.
[0030] The BLS12-377 elliptic curve is an elliptic curve used in cryptography for digital signatures, encryption, and key exchange.
[0031] A bit (Binary digit, BIT), a computer term, is a unit of information volume. It is a transliteration of the English word BIT. It is also the position in a binary digit, a unit of measurement for information volume, and the smallest unit of information volume.
[0032] Elliptic addition refers to the process of adding two points on an elliptic curve to obtain another point.
[0033] Elliptic multiplication refers to the process of repeatedly adding a point on an elliptic curve to obtain another point.
[0034] Zero-Knowledge Proof (ZKP) refers to the ability of a prover to convince a verifier that a certain assertion is correct without providing any useful information to the verifier, and is commonly used in cryptography. In this field, in the process of data processing such as transmitting data and storing data, in order to ensure the security of data, elliptic curve cryptography is used to encrypt and decrypt data. However, when the processor processes the elliptic curve cryptography, the coordinate data of the elliptic points on the elliptic curve occupies a large amount of memory space, and the processor memory space is limited, resulting in low memory space utilization. To this end, the present application provides a data processing method for solving the technical problem that the coordinate data occupies a large amount of memory space and the memory space utilization is low during the processing of the elliptic curve cryptography.
[0035] The following specific embodiments describe in detail the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0036] FIG1 is a flow chart of a data processing method provided by an exemplary embodiment of the present application. The execution subject of the method may be a terminal device. The method includes at least the following steps S11-S13:
[0037] S11, obtaining a first horizontal coordinate of a first ellipse point and first identification information corresponding to a first vertical coordinate to be determined of the first ellipse point;
[0038] In some embodiments, the terminal device may include a server, a smart phone, a tablet computer, a laptop computer, a smart watch, a smart wearable device, etc.
[0039] In some embodiments, the first elliptic point may be any coordinate point located on the first elliptic curve.
[0040] In some embodiments, the first elliptic curve function can be obtained by an elliptic curve equation. The elliptic curve equation can be expressed as: 2 =x 3 +ax+b, where x is the horizontal coordinate, y is the vertical coordinate, a and b are constants, where a can be the tilt parameter of the elliptic curve equation and b is the constant term. According to the elliptic curve equation, the vertical coordinate can be obtained
[0041] In some embodiments, by setting the constant term to take multiple different values, multiple elliptic curve functions can be obtained, and each of the multiple elliptic curve functions can correspond to a horizontal coordinate set, which includes the horizontal coordinate of the elliptic curve represented by the elliptic curve function.
[0042] In some embodiments, the first elliptic curve function may be any one of a plurality of elliptic curve functions. For example, let a=0, b=1, then the first elliptic curve function may be
[0043] In some embodiments, in the BLS12-377 elliptic curve, the abscissa x and ordinate y of the elliptic point are both integers in a finite field, the field value is P, and the above calculations are all performed in the finite field. A negative number in a finite field is defined as -y=py.
[0044] In some embodiments, the horizontal coordinate of the elliptic point of the BLS12-377 elliptic curve can be represented by a 377-bit binary number, that is, it needs to occupy 377 bits of space. However, in actual data representation, an integer multiple of 8 bits, that is, a 384-bit data representation method, is usually adopted, so that the extra bits can represent the identification information of the vertical coordinate. For example, the highest bit occupied by the first horizontal coordinate can be used to represent the identification information of the corresponding first vertical coordinate. In addition, other extra bits can be used to store some other information, such as the type of coordinate (that is, a point in the G1 group or the G2 group), the byte order of the coordinate byte array, etc. In the BLS12-377 elliptic curve, the G1 group and the G2 group are both additive groups on the elliptic curve, which can be used for some advanced cryptographic applications.
[0045] In some embodiments, the elliptic curve cryptography may include elliptic addition operations and / or elliptic double multiplication operations.
[0046] S12. Determine two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point;
[0047] In some embodiments, the first elliptic curve function corresponding to the first elliptic point is used to represent the first elliptic curve.
[0048] In some embodiments, in S12, determining two first candidate vertical coordinates corresponding to the first horizontal coordinate according to the first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point includes S121-S125:
[0049] S121. Obtain a tilt parameter and a constant term in the elliptic curve function;
[0050] S122. Determine the product of the tilt parameter and the first horizontal coordinate;
[0051] S123. Determine the cube value of the first horizontal coordinate;
[0052] S124. Determine the sum of the constant term, the product, and the cubic value;
[0053] S125 . Perform a square root calculation on the added sum to obtain two first candidate vertical coordinates corresponding to the first horizontal coordinate.
[0054] In some embodiments, the first elliptic curve function For example, the tilt parameter a is 0, the constant term b is 1, and the first horizontal coordinate can be expressed as x1. Then the two first alternative vertical coordinates corresponding to the first horizontal coordinate are y 11 and y 12 ,in,
[0055] S13. Determine the first vertical coordinate from the two first candidate vertical coordinates based on the first identification information; wherein the first horizontal coordinate and the first vertical coordinate are used as partial parameters of an elliptic curve cryptography method, and the elliptic curve cryptography method is used to encrypt the data to be encrypted.
[0056] In some embodiments, the first identification information is a first preset identification or a second preset identification. The first preset identification may be 1, and the second preset identification may be 0.
[0057] In some embodiments, in S13, determining the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information includes:
[0058] When the first identification information is the first preset identification, determining the largest first candidate vertical coordinate of the two first candidate vertical coordinates as the first vertical coordinate;
[0059] When the first identification information is the second preset identification, the smallest first candidate vertical coordinate among the two first candidate vertical coordinates is determined as the first vertical coordinate.
[0060] In some embodiments, in the above two first alternative vertical coordinates y 11 and y 12 The largest first candidate ordinate is y 11 , the smallest first candidate ordinate is y 12 That is, when the highest bit occupied by the first horizontal coordinate is 1, the first candidate vertical coordinate is y 11 Determine as the first vertical coordinate, when the highest bit occupied by the first horizontal coordinate is 0, the first candidate vertical coordinate is y 12 Determine as the first vertical coordinate.
[0061] In some embodiments, the first vertical coordinate may be expressed as y1, that is, the coordinates of the first ellipse point are (x1, y1).
[0062] In some embodiments, when the elliptic curve cryptography includes an elliptic multiplication operation, the elliptic multiplication operation can be performed based on the first horizontal coordinate and the first vertical coordinate. For specific solutions, please refer to related technologies and will not be repeated here.
[0063] In some optional embodiments provided herein, when the elliptic curve cryptography includes elliptic addition operations, the method further includes S21-S24:
[0064] S21. Obtain a second horizontal coordinate of a second elliptic point, and second identification information corresponding to a second vertical coordinate to be determined of the second elliptic point;
[0065] S22. Determine two second candidate vertical coordinates corresponding to the second horizontal coordinate according to the second horizontal coordinate and the first elliptic curve function;
[0066] S23. Determine the second vertical coordinate from the two second candidate vertical coordinates according to the first identification information;
[0067] S24. Perform an ellipse addition operation based on the first horizontal coordinate and the first vertical coordinate, and the second horizontal coordinate and the second vertical coordinate.
[0068] In some embodiments, the second elliptic point may be any coordinate point on the first elliptic curve. The second elliptic point may be the same as the first elliptic point or may be different from the first elliptic point.
[0069] In some embodiments, the coordinates of the second ellipse point may be expressed as (x2, y2), where x2 represents the second abscissa and y2 represents the second ordinate.
[0070] In some embodiments, the specific implementation of the above S21-S23 is similar to the above S11-S13, and reference may be made to the above content, which will not be repeated here.
[0071] The above ellipse addition operation can be referred to in related technologies and will not be described in detail here.
[0072] In some embodiments, the method further includes S41-S42:
[0073] S41. When performing the elliptic curve cryptography processing based on the first abscissa and the first ordinate, and the second abscissa and the second ordinate, obtaining a third abscissa of a third elliptic point and third identification information corresponding to a to-be-determined third ordinate of the third elliptic point;
[0074] In some embodiments, third identification information corresponding to the third horizontal coordinate and the third vertical coordinate of the third ellipse point, and fourth identification information corresponding to the fourth horizontal coordinate and the fourth vertical coordinate of the fourth ellipse point can be obtained from the target memory space.
[0075] S42. Use the third horizontal coordinate of the third ellipse point and the third identification information corresponding to the third vertical coordinate to be determined of the third ellipse point as the new first horizontal coordinate of the new first ellipse point and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first ellipse point, return to execute the first elliptic curve function corresponding to the first horizontal coordinate and the first ellipse point to determine the two first alternative vertical coordinates corresponding to the first horizontal coordinate, and determine the first vertical coordinate from the two first alternative vertical coordinates according to the first identification information.
[0076] That is, first read the first horizontal coordinate of the first elliptic point, and obtain the first vertical coordinate of the first elliptic point through the above calculation process, then read the second horizontal coordinate of the second elliptic point, and obtain the second vertical coordinate of the second elliptic point through the above calculation process. After obtaining the coordinates of the two complete elliptic points, the current round of elliptic curve cryptography processing is performed. While performing the current round of elliptic curve cryptography processing, read the third horizontal coordinate of the third elliptic point and use it as the new first horizontal coordinate of the new first elliptic point, and return to perform the above steps to obtain the new first vertical coordinate of the new first elliptic point. When the current round of elliptic curve cryptography processing is completed, the next round of elliptic curve cryptography processing can be immediately performed based on the new first horizontal coordinate and the new first vertical coordinate of the new first elliptic point. This solution can effectively improve the processing efficiency of elliptic curve cryptography processing.
[0077] FIG2 is a specific implementation of S41-S42 of the present application. As shown in FIG2 , the ordinate generation module can be used to determine the corresponding ordinate y according to the input horizontal coordinate x. Specifically, the ordinate generation module can include a calculation unit and a symbol judgment unit, wherein the calculation unit is used to obtain the first identification information corresponding to the first horizontal coordinate and the first vertical coordinate from the target memory space, and determine the two first candidate vertical coordinates corresponding to the first horizontal coordinate according to the first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point; the symbol judgment unit can be used to determine the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information. Coordinates; The judge, first storage unit, second storage unit, and selector in Figure 2 can together form an output control unit, wherein the judge is used to determine whether the first storage unit or the second storage unit is empty. When the first storage unit or the second storage unit is empty, the horizontal coordinate and the vertical coordinate can be cached in the corresponding first storage unit or the second storage unit, wherein the first storage unit and the second storage unit can be included in the target memory space as a temporary storage area; the selector is used to read the horizontal coordinate and the vertical coordinate in the first storage unit and the second storage unit in turn, and send the result to the elliptic calculation unit, which is used to perform elliptic curve cryptography operations. This method of alternating the use of two buffers can effectively avoid problems such as data loss and repeated transmission, improve the reliability and efficiency of data transmission, and improve data processing efficiency.
[0078] In some embodiments, the method further includes S51-S52:
[0079] S51, determining a fifth abscissa and a fifth ordinate of a fifth ellipse point according to the first abscissa and the first ordinate, and the second abscissa and the second ordinate;
[0080] In some embodiments, in S51, determining a fifth abscissa and a fifth ordinate of a fifth ellipse point according to the first abscissa and the first ordinate, and the second abscissa and the second ordinate includes:
[0081] An ellipse addition operation is performed on the first abscissa and the first ordinate, and the second abscissa and the second ordinate to obtain a fifth abscissa and a fifth ordinate of a fifth ellipse point.
[0082] In some embodiments, performing an ellipse addition operation on the first abscissa and the first ordinate, and the second abscissa and the second ordinate to obtain a fifth abscissa and a fifth ordinate of a fifth ellipse point includes:
[0083] determining a straight line connecting the first ellipse point and the second ellipse point according to the first abscissa and the first ordinate, and the second abscissa and the second ordinate;
[0084] determining an intersection point between the straight line and the first elliptic curve;
[0085] Determine a symmetric point of the intersection about the x-axis;
[0086] The symmetrical point is used as the fifth ellipse point, and the fifth abscissa and the fifth ordinate of the fifth ellipse point are obtained.
[0087] S52. Update a target memory space based on the first elliptic curve function, the fifth horizontal coordinate, and the fifth vertical coordinate, where the target memory space is used to store multiple horizontal coordinates of multiple elliptic points, and the multiple horizontal coordinates are used to determine parameters of the elliptic curve cryptography method.
[0088] In some embodiments, in S52, updating the target memory space based on the first elliptic curve function, the fifth abscissa, and the fifth ordinate includes S521-S522:
[0089] S521: Determine fifth identification information corresponding to the fifth ordinate according to the first elliptic curve function, the fifth abscissa, and the fifth ordinate.
[0090] In some embodiments, in S521, determining fifth identification information corresponding to the fifth ordinate according to the fifth abscissa and the fifth ordinate includes:
[0091] According to the first elliptic curve function and the fifth horizontal coordinate, a reference vertical coordinate corresponding to the fifth horizontal coordinate is determined; the reference vertical coordinate and the fifth vertical coordinate are two vertical coordinates corresponding to the fifth horizontal coordinate in the first elliptic curve function, wherein the reference vertical coordinate can be obtained by the above Calculation shows that the reference ordinate and the fifth ordinate are different;
[0092] When the reference ordinate is smaller than the fifth ordinate, determining the fifth identification information corresponding to the fifth ordinate as the first preset identification of the fifth abscissa;
[0093] When the reference ordinate is greater than the fifth ordinate, the fifth identification information corresponding to the fifth ordinate is determined as the second preset identification of the fifth abscissa.
[0094] S522: Store the fifth horizontal coordinate and the fifth identification information in the target memory space.
[0095] In some embodiments, the fifth identification information can be stored in the highest bit of the fifth coordinate. For example, when the fifth identification information is the second preset identification 0, the highest bit of the 384-bit space occupied by the fifth horizontal coordinate is determined to be 0; when the fifth identification information is the first preset identification 1, the highest bit of the 384-bit space occupied by the fifth horizontal coordinate is determined to be 1.
[0096] In some embodiments, the fifth horizontal coordinate and the fifth identification information may be stored in a storage location corresponding to the first elliptic curve in the target memory space to facilitate subsequent query.
[0097] In some embodiments, when the elliptic curve cryptography includes an elliptic double multiplication operation, the method further comprises:
[0098] When performing the elliptic curve cryptography processing based on the first abscissa and the first ordinate, obtaining a sixth abscissa of a sixth elliptic point and sixth identification information corresponding to a to-be-determined sixth ordinate of the sixth elliptic point;
[0099] Use the sixth horizontal coordinate of the sixth elliptic point and the sixth identification information corresponding to the sixth vertical coordinate to be determined of the sixth elliptic point as the new first horizontal coordinate of the new first elliptic point, and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first elliptic point, return to execute the first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point to determine the two first alternative vertical coordinates corresponding to the first horizontal coordinate, and determine the first vertical coordinate from the two first alternative vertical coordinates according to the first identification information.
[0100] That is, when elliptic curve cryptography includes an elliptic double multiplication operation, once an elliptic point is obtained, the current round of elliptic curve cryptography processing can be performed. Simultaneously, the sixth abscissa of the sixth elliptic point can be read and used as the new first abscissa of the new first elliptic point. The above steps are then repeated to obtain the new first ordinate of the new first elliptic point. Upon completion of the current round of elliptic curve cryptography processing, the next round of elliptic curve cryptography processing can be immediately performed based on the new first abscissa and first ordinate of the new first elliptic point. This solution can effectively improve the processing efficiency of elliptic curve cryptography processing.
[0101] The present application provides a method for obtaining a first horizontal coordinate of a first elliptic point and a first elliptic curve function corresponding to the first elliptic point, as well as first identification information corresponding to a first vertical coordinate to be determined of the first elliptic point; determining two first alternative vertical coordinates corresponding to the first horizontal coordinate according to the first horizontal coordinate and the first elliptic curve function; determining the first vertical coordinate from the two first alternative vertical coordinates according to the first identification information; wherein the first horizontal coordinate and the first vertical coordinate are used as partial parameters of an elliptic curve cryptography method, and the elliptic curve cryptography method is used for encrypting data to be encrypted. The corresponding vertical coordinate can be determined only based on the identification information corresponding to the horizontal and vertical coordinates of the elliptic point on the elliptic curve, so as to use the elliptic curve cryptography method to encrypt data, without directly storing the vertical coordinate of the elliptic point, which can reduce the amount of memory space required for coordinate data and improve the utilization rate of memory space.
[0102] FIG3 is a schematic diagram of the structure of a data processing system provided by an exemplary embodiment of the present application. As shown in FIG3 , the data processing system includes:
[0103] The target memory space is used to store the first horizontal coordinate of the first ellipse point and the first identification information corresponding to the first vertical coordinate to be determined of the first ellipse point;
[0104] a computing unit, configured to obtain, from the target memory space, first identification information corresponding to the first abscissa and the first ordinate, and determine, based on a first elliptic curve function corresponding to the first abscissa and the first elliptic point, two first candidate ordinates corresponding to the first abscissa;
[0105] A symbol determination unit, configured to determine the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information
[0106] an output control unit, configured to send the obtained first horizontal coordinate and first vertical coordinate to an ellipse calculation unit;
[0107] The elliptic calculation unit is used to perform elliptic curve cryptography processing, wherein the first horizontal coordinate and the first vertical coordinate are partial parameters of the elliptic curve cryptography, and the elliptic curve cryptography is used to encrypt data to be encrypted.
[0108] In some optional embodiments provided herein, when the elliptic curve cryptography includes an elliptic addition operation, the data processing system is further configured to:
[0109] Obtaining a second horizontal coordinate of a second elliptic point and second identification information corresponding to a second vertical coordinate to be determined of the second elliptic point;
[0110] Determine two second candidate vertical coordinates corresponding to the second horizontal coordinate according to the second horizontal coordinate and the first elliptic curve function;
[0111] Determining the second vertical coordinate from the two second candidate vertical coordinates according to the first identification information;
[0112] An ellipse addition operation is performed based on the first abscissa and the first ordinate, and the second abscissa and the second ordinate.
[0113] In some optional embodiments provided herein, the calculation unit, when used to determine two first candidate ordinates corresponding to the first abscissa according to the first elliptic curve function corresponding to the first abscissa and the first elliptic point, is specifically configured to:
[0114] Obtaining a tilt parameter and a constant term in the elliptic curve function;
[0115] determining a product of the tilt parameter and the first abscissa;
[0116] determining the cube value of the first horizontal coordinate;
[0117] determining a sum of the constant term, the product, and the cubed value;
[0118] Performing a square root calculation on the added sum to obtain two first candidate vertical coordinates corresponding to the first horizontal coordinate.
[0119] In some optional embodiments provided herein, the first identification information is a first preset identification or a second preset identification, and the symbol determination unit, when used to determine the first vertical coordinate from the two first candidate vertical coordinates based on the first identification information, is specifically configured to:
[0120] When the first identification information is the first preset identification, determining the largest first candidate vertical coordinate of the two first candidate vertical coordinates as the first vertical coordinate;
[0121] When the first identification information is the second preset identification, the smallest first candidate vertical coordinate among the two first candidate vertical coordinates is determined as the first vertical coordinate.
[0122] In some optional embodiments provided in this application, the data processing system is further configured to:
[0123] When performing the elliptic curve cryptography processing based on the first abscissa and the first ordinate, and the second abscissa and the second ordinate, obtaining a third abscissa of a third elliptic point and third identification information corresponding to a to-be-determined third ordinate of the third elliptic point;
[0124] Use the third horizontal coordinate of the third elliptic point and the third identification information corresponding to the third vertical coordinate to be determined of the third elliptic point as the new first horizontal coordinate of the new first elliptic point and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first elliptic point, return to execute the first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point to determine the two first alternative vertical coordinates corresponding to the first horizontal coordinate, and determine the first vertical coordinate from the two first alternative vertical coordinates according to the first identification information.
[0125] In some optional embodiments provided in this application, the data processing system is further configured to:
[0126] Determine a fifth abscissa and a fifth ordinate of a fifth ellipse point according to the first abscissa and the first ordinate, and the second abscissa and the second ordinate;
[0127] A target memory space is updated based on the first elliptic curve function, the fifth horizontal coordinate, and the fifth vertical coordinate, the target memory space being used to store multiple horizontal coordinates of multiple elliptic points, and the multiple horizontal coordinates being used to determine parameters of the elliptic curve cryptography method.
[0128] In some optional embodiments provided herein, when the data processing system is used to update the target memory space based on the first elliptic curve function, the fifth abscissa, and the fifth ordinate, it is specifically used to:
[0129] Determine fifth identification information corresponding to the fifth ordinate according to the first elliptic curve function, the fifth abscissa, and the fifth ordinate;
[0130] The fifth horizontal coordinate and the fifth identification information are stored in the target memory space.
[0131] In some optional embodiments provided herein, when the elliptic curve cryptography includes an elliptic double multiplication operation, the data processing system is further configured to:
[0132] When performing the elliptic curve cryptography processing based on the first abscissa and the first ordinate, obtaining a sixth abscissa of a sixth elliptic point and sixth identification information corresponding to a to-be-determined sixth ordinate of the sixth elliptic point;
[0133] Use the sixth horizontal coordinate of the sixth elliptic point and the sixth identification information corresponding to the sixth vertical coordinate to be determined of the sixth elliptic point as the new first horizontal coordinate of the new first elliptic point, and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first elliptic point, return to execute the first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point to determine the two first alternative vertical coordinates corresponding to the first horizontal coordinate, and determine the first vertical coordinate from the two first alternative vertical coordinates according to the first identification information.
[0134] It should be understood that the system embodiments and the method embodiments may correspond to each other, and similar descriptions may refer to the method embodiments. To avoid repetition, they will not be described in detail here. Specifically, the system can execute the above-mentioned method embodiments, and the aforementioned and other operations and / or functions of the various units in the system are the corresponding processes in the various methods in the above-mentioned method embodiments, which will not be described in detail here for the sake of brevity.
[0135] The system of the embodiment of the present application is described above from the perspective of functional modules in conjunction with the accompanying drawings. It should be understood that the functional module can be implemented in hardware form, can be implemented by instructions in software form, and can also be implemented by a combination of hardware and software modules. Specifically, the steps of the method embodiment in the embodiment of the present application can be completed by the hardware integrated logic circuit and / or software form instructions in the processor, and the steps of the method disclosed in the embodiment of the present application can be directly embodied as a hardware decoding processor for execution, or can be completed by a combination of hardware and software modules in the decoding processor. Optionally, the software module can be located in a mature storage medium in the art such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps in the above method embodiment in conjunction with its hardware.
[0136] FIG4 is a schematic block diagram of an electronic device provided in an embodiment of the present application. The electronic device may include:
[0137] The memory 301 and the processor 302 are configured to store computer programs and transmit the program code to the processor 302. In other words, the processor 302 can call and run the computer program from the memory 301 to implement the method in the embodiment of the present application.
[0138] For example, the processor 302 may be configured to execute the above method embodiments according to instructions in the computer program.
[0139] In some embodiments of the present application, the processor 302 may include but is not limited to:
[0140] General-purpose processor, Digital Signal Processor (DSP), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, etc.
[0141] In some embodiments of the present application, the memory 301 includes but is not limited to:
[0142] Volatile memory and / or non-volatile memory. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus random access memory (DR RAM).
[0143] In some embodiments of the present application, the computer program may be divided into one or more modules, which are stored in the memory 301 and executed by the processor 302 to implement the method provided by the present application. The one or more modules may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program in the electronic device.
[0144] As shown in FIG4 , the electronic device may further include:
[0145] The transceiver 303 may be connected to the processor 302 or the memory 301 .
[0146] The processor 302 may control the transceiver 303 to communicate with other devices. Specifically, the processor 302 may send information or data to other devices or receive information or data sent by other devices. The transceiver 303 may include a transmitter and a receiver. The transceiver 303 may further include one or more antennas.
[0147] It should be understood that the various components in the electronic device are connected via a bus system, wherein the bus system includes not only a data bus but also a power bus, a control bus and a status signal bus.
[0148] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment. In other words, the present application also provides a computer program product containing instructions, which, when executed by a computer, enables the computer to perform the method of the above-mentioned method embodiment.
[0149] When software is used for implementation, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function according to the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a digital video disc (DVD)), or a semiconductor medium (e.g., a solid state drive (SSD)).
[0150] Those skilled in the art will appreciate that the modules and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0151] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.
[0152] Modules described as separate components may or may not be physically separate, and components displayed as modules may or may not be physical modules, i.e., they may be located in one place or distributed across multiple network elements. Some or all of the modules may be selected based on actual needs to achieve the purpose of the present embodiment. For example, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module.
[0153] The above are only specific embodiments of the present application, but the scope of protection of this application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of this application. Therefore, the scope of protection of this application should be based on the scope of protection of the claims.
Claims
1. A data processing method, comprising: Acquire a first horizontal coordinate of a first ellipse point, and first identification information corresponding to a first vertical coordinate to be determined of the first ellipse point; Determine two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point; Determine the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information; The first horizontal coordinate and the first vertical coordinate are used as partial parameters of an elliptic curve cryptography method, and the elliptic curve cryptography method is used to encrypt data to be encrypted.
2. The method according to claim 1, wherein: When the elliptic curve cryptography includes elliptic addition operations, the method further comprises: Acquire a second horizontal coordinate of a second ellipse point, and second identification information corresponding to a second vertical coordinate to be determined of the second ellipse point; Determine two second candidate vertical coordinates corresponding to the second horizontal coordinate according to the second horizontal coordinate and the first elliptic curve function; Determine the second vertical coordinate from the two second candidate vertical coordinates according to the first identification information; An ellipse addition operation is performed based on the first abscissa and the first ordinate, and the second abscissa and the second ordinate.
3. The method according to claim 1, wherein: Determining two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point includes: Obtaining a tilt parameter and a constant term in the elliptic curve function; determining a product of the tilt parameter and the first abscissa; determining a cubic value of the first horizontal coordinate; Determining a sum of the constant term, the product, and the cubic value; A square root calculation is performed on the added sum to obtain two first candidate vertical coordinates corresponding to the first horizontal coordinate.
4. The method according to claim 1, wherein: The first identification information is a first preset identification or a second preset identification, and determining the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information includes: When the first identification information is the first preset identification, determining the largest first candidate vertical coordinate of the two first candidate vertical coordinates as the first vertical coordinate; When the first identification information is the second preset identification, the smallest first candidate vertical coordinate of the two first candidate vertical coordinates is determined as the first vertical coordinate.
5. The method according to claim 2, wherein: The method further comprises: When the elliptic curve cryptography is performed based on the first horizontal coordinate and the first vertical coordinate, and the second horizontal coordinate and the second vertical coordinate, a third horizontal coordinate of a third ellipse point and third identification information corresponding to a third vertical coordinate to be determined of the third ellipse point are obtained; Use the third horizontal coordinate of the third ellipse point and the third identification information corresponding to the third vertical coordinate to be determined of the third ellipse point as the new first horizontal coordinate of the new first ellipse point and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first ellipse point, return to execute the step of determining the two first candidate vertical coordinates corresponding to the first horizontal coordinate according to the first ellipse curve function corresponding to the first horizontal coordinate and the first ellipse point, and determine the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information.
6. The method according to claim 2, wherein: The method further comprises: Determine a fifth abscissa and a fifth ordinate of a fifth ellipse point according to the first abscissa and the first ordinate, and the second abscissa and the second ordinate; A target memory space is updated based on the first elliptic curve function, the fifth horizontal coordinate and the fifth vertical coordinate, the target memory space is used to store multiple horizontal coordinates of multiple elliptic points, and the multiple horizontal coordinates are used to determine parameters of the elliptic curve cryptography.
7. The method according to claim 6, wherein: Updating a target memory space based on the first elliptic curve function, the fifth abscissa, and the fifth ordinate includes: Determine fifth identification information corresponding to the fifth ordinate according to the first elliptic curve function, the fifth abscissa and the fifth ordinate; The fifth horizontal coordinate and the fifth identification information are stored in the target memory space.
8. The method according to claim 1, wherein: When the elliptic curve cryptography includes an elliptic double multiplication operation, the method further includes: When the elliptic curve cryptography is performed based on the first horizontal coordinate and the first vertical coordinate, a sixth horizontal coordinate of a sixth ellipse point and sixth identification information corresponding to a sixth vertical coordinate to be determined of the sixth ellipse point are obtained; Use the sixth horizontal coordinate of the sixth ellipse point and the sixth identification information corresponding to the sixth vertical coordinate to be determined of the sixth ellipse point as the new first horizontal coordinate of the new first ellipse point, and the new first identification information corresponding to the new first vertical coordinate to be determined of the new first ellipse point, return to execute the step of determining the two first candidate vertical coordinates corresponding to the first horizontal coordinate according to the first ellipse curve function corresponding to the first horizontal coordinate and the first ellipse point, and determine the first vertical coordinate from the two first candidate vertical coordinates according to the first identification information.
9. A data processing system comprising: The target memory space is used to store a first horizontal coordinate of the first ellipse point and first identification information corresponding to a first vertical coordinate to be determined of the first ellipse point; a calculation unit, configured to determine two first candidate vertical coordinates corresponding to the first horizontal coordinate according to a first elliptic curve function corresponding to the first horizontal coordinate and the first elliptic point; A symbol determination unit, which determines the first ordinate from the two first candidate ordinates according to the first identification information; an output control unit, configured to send the first horizontal coordinate and the first vertical coordinate to an ellipse calculation unit; An elliptic calculation unit is used to perform elliptic curve cryptography processing, wherein the first horizontal coordinate and the first vertical coordinate are partial parameters of the elliptic curve cryptography, and the elliptic curve cryptography Used to encrypt data to be encrypted.
10. An electronic device comprising: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to perform the method of any one of claims 1 to 8 by executing the executable instructions.
11. A computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Vehicle-mounted sensor authentication method, device and system
CN113193959A
System, method and apparatus for electronic authentication
US20050193198A1
Key update method and system of sensor node
WO2013060158A1
