A data processing method, system, device and computer readable storage medium

By performing iteration verification and redundancy checkpoint judgment in each round of the scalar multiplication loop operation in the elliptic curve cryptography algorithm, the problem of scalar multiplication operation being susceptible to fault injection is solved, achieving rapid correction and data security assurance.

CN115694819BActive Publication Date: 2026-08-04HUNAN GOKE MICROELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211347079.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2026-08-04
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

Existing elliptic curve cryptography algorithms are vulnerable to fault injection attacks during scalar multiplication, leading to key leakage. Furthermore, existing fault detection methods cannot defend against symbol transformation faults and waste computation time.

Method used

During the scalar multiplication loop operation, a verification is performed at the end of each iteration. If the verification fails, the result of the previous iteration is returned and the operation is repeated until the correct result is output. Fault injection is detected by introducing redundant verification points and intermediate state points. Security is enhanced by Jacobian weighted projective coordinate system transformation and random number scrambling.

Benefits of technology

It can quickly detect and correct fault injection, prevent key leakage, ensure data security, avoid wasting computation time, and improve computational accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115694819B_ABST
    Figure CN115694819B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method, system, device and computer readable storage medium, obtains to-be-processed data; target elliptic curve password algorithm is based on to-be-processed data processing, and target result is obtained;Among them, target elliptic curve password algorithm includes scalar multiplication cycle operation process, and when each round iteration operation of scalar multiplication cycle operation process ends, the result of each round iteration operation is checked according to the first preset rule, if the check does not pass, the current round operation result is invalid, the last round iteration result is returned, the current round operation is re-performed, if the check passes, the next round iteration operation is entered, until the last round iteration operation result is output. The application can quickly and timely detect the fault injection appearing in the iteration operation process, has the error correction function and avoids the waste of calculation time, can resist the fault injection attack received in the scalar multiplication operation process, effectively prevents the leakage of password algorithm key, and guarantees the security of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cryptographic algorithm technology, and more specifically, to a data processing method, system, device, and computer-readable storage medium. Background Technology

[0002] Currently, in data processing such as data transmission and storage, elliptic curve cryptography algorithms can be used to encrypt and decrypt data to ensure data security. For example, SM2 and SM9 algorithms can be used for data encryption. However, during the encryption and decryption process using elliptic curve cryptography algorithms, if a fault injection attack occurs during the multiplication operation between elliptic curve points and scalars, the scalar multiplication operation will fail. Attackers can easily use the erroneous result to deduce the key value of the cryptographic algorithm, leading to key leakage.

[0003] To ensure the accuracy of elliptic curve cryptography (ECC) in processing data, the final result point generated by the scalar multiplication operation can be checked to see if it lies on the original elliptic curve before output. If it deviates from the original elliptic curve, it indicates a fault attack during the operation, preventing the output of the result point. However, this fault detection method cannot resist sign transformation faults, and since the check is performed before the final result is output, if an error is found, the entire operation result will be discarded, resulting in a waste of computation time. Furthermore, it lacks correction functionality and cannot obtain the correct output result.

[0004] In conclusion, how to effectively resist fault injection attacks and ensure data security during the operation of elliptic curve cryptography algorithms is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] The purpose of this application is to provide a data processing method that, to a certain extent, ensures the effectiveness of elliptic curve cryptography algorithms in resisting fault injection attacks and guaranteeing data security during operation. This application also provides a data processing system, device, and computer-readable storage medium.

[0006] To achieve the above objectives, this application provides the following technical solution:

[0007] A data processing method, applied to a data security storage device, the method comprising:

[0008] Obtain the data to be processed;

[0009] The data to be processed is processed based on the target elliptic curve cryptography algorithm to obtain the target result;

[0010] The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous round of iteration is returned for the current round of operation to be performed again. If the verification passes, the next round of iteration is entered until the result of the last round of iteration is output.

[0011] Preferably, the process of performing each iteration of the scalar multiplication loop operation and verifying the result of each iteration according to a first preset rule includes:

[0012] Obtain the target elliptic curve point P and the random elliptic curve point R.

[0013] Based on the target elliptic curve points and the random elliptic curve points, an initial first intermediate state point, an initial second intermediate state point, and an initial redundancy check point are determined, wherein the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point satisfy a preset condition.

[0014] Obtain the target value;

[0015] Based on the target value and the second preset rule, the initial first intermediate state point, the initial second intermediate state point and the initial redundancy check point are cyclically calculated to obtain the updated first intermediate state point, the updated second intermediate state point and the updated redundancy check point.

[0016] Determine whether the preset conditions are met among the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point;

[0017] If the preset conditions are met, the verification passes.

[0018] If the preset conditions are not met, the verification will fail.

[0019] Preferably, determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point includes:

[0020] The sum of the target elliptic curve point and the random elliptic curve point is used as the initial first intermediate state point;

[0021] The value of twice the initial first intermediate state point is taken as the initial second intermediate state point;

[0022] The sum of the initial first intermediate state point and the initial second intermediate state point is used as the initial redundancy check point.

[0023] Preferably, determining whether the preset condition is met among the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point includes:

[0024] Determine whether the sum of the updated first intermediate state point and the updated second intermediate state point is equal to the updated redundant check point. If yes, the preset condition is met; otherwise, the preset condition is not met.

[0025] Preferably, determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point includes:

[0026] Get the first random number;

[0027] Based on the first random number, the coordinates of the target elliptic curve point in the affine coordinate system are transformed into the first coordinates in the Jacobian-weighted projective coordinate system.

[0028] Based on the first random number, the coordinates of the random elliptic curve points in the affine coordinate system are transformed into the second coordinates in the Jacobian weighted projective coordinate system.

[0029] The initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point are determined based on the first coordinate and the second coordinate.

[0030] Preferably, the step of performing cyclic calculations on the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target value and the second preset rule to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point includes:

[0031] Determine the binary value of the target value;

[0032] According to the third preset rule, the bit values ​​of the binary value are obtained sequentially and iteratively calculated. For each round of iterative calculation, if the value of the obtained bit is 0, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point of the current round of iterative calculation are obtained based on the first update formula. If the value of the obtained bit is 1, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point of the current round of iterative calculation are obtained based on the second update formula.

[0033] The first update formula includes:

[0034]

[0035] The second update formula includes:

[0036] Q c =Q c '+2Q'2;

[0037] Q1” = Q1' + Q'2;

[0038] Q'2' = 2Q'2;

[0039] Where Q1' represents the first intermediate state point before the current bit is updated; Q'2 represents the second intermediate state point before the current bit is updated; Q c ' represents the redundant check point before the current bit is updated; Q1" represents the first intermediate state point after the current bit is updated; Q'2" represents the second intermediate state point after the current bit is updated; Q c "" indicates the redundant check point after the current bit is updated.

[0040] Preferably, the target elliptic curve cryptography algorithm further includes:

[0041] The result of the multiplication operation is obtained by calculating the points of the random elliptic curve and the target value;

[0042] Calculate the difference between the first intermediate state point and the multiplication result in the last round of iteration;

[0043] The difference is used as the result of the scalar multiplication loop operation.

[0044] Preferably, obtaining random elliptic curve points includes:

[0045] Generate a second random number;

[0046] The historical elliptic curve points are updated based on the second random number to obtain the random elliptic curve points, which include previously used random elliptic curve points.

[0047] Preferably, the step of updating the historical elliptic curve points based on the second random number to obtain the random elliptic curve points includes:

[0048] The historical elliptic curve points are updated based on the second random number using the third update formula to obtain the random elliptic curve points;

[0049] The third update formula includes:

[0050] R”=(-1)α2R';

[0051] Where R' represents the historical elliptic curve point; R” represents the random elliptic curve point; and α represents the second random number.

[0052] A data processing system, comprising:

[0053] The first acquisition module is used to acquire data to be processed.

[0054] The first processing module is used to process the data to be processed based on the target elliptic curve cryptography algorithm to obtain the target result;

[0055] The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous round of iteration is returned for the current round of operation to be performed again. If the verification passes, the next round of iteration is entered until the result of the last round of iteration is output.

[0056] A data processing device, comprising:

[0057] Memory, used to store computer programs;

[0058] A processor for implementing the steps of any of the above-described data processing methods when executing the computer program.

[0059] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the data processing methods described above.

[0060] This application provides a data processing method applied to a secure data storage device. The method acquires data to be processed and processes it using a target elliptic curve cryptography algorithm to obtain a target result. The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation. At the end of each iteration of the scalar multiplication loop operation, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this iteration is invalid, and the previous iteration result is returned for a re-run. If the verification passes, the next iteration begins, until the result of the final iteration is output. In this application, verifying the result of each iteration according to the first preset rule at the end of each iteration of the scalar multiplication loop operation, and invalidating the result of this iteration by returning to the previous iteration result, allows for rapid and timely elimination of fault injection attacks during the iteration process. This provides error correction and avoids wasted computation time. The method also resists fault injection attacks during scalar multiplication, effectively preventing the leakage of cryptographic algorithm keys and ensuring data security. The data processing system, device, and computer-readable storage medium provided in this application also solve the corresponding technical problems. Attached Figure Description

[0061] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0062] Figure 1 A first flowchart of a data processing method provided in an embodiment of this application;

[0063] Figure 2 This is a flowchart of the scalar multiplication process in the data processing step of the target elliptic curve cryptography algorithm in this application;

[0064] Figure 3 This is a schematic diagram of the scalar multiplication process in the data processing step of the target elliptic curve cryptography algorithm in this application.

[0065] Figure 4 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application;

[0066] Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application;

[0067] Figure 6 This is another structural schematic diagram of a data processing device provided in an embodiment of this application. Detailed Implementation

[0068] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0069] Please see Figure 1 , Figure 1 This is a first flowchart of a data processing method provided in an embodiment of this application.

[0070] This application provides a data processing method applied to a secure data storage device, which may include the following steps:

[0071] Step S101: Obtain the data to be processed.

[0072] In practical applications, the data processing system of a data security storage device can first acquire the data to be processed. The type of data to be processed can be determined according to actual needs. For example, the data to be processed can be audio data, video data, SMS messages, etc. This application does not make specific limitations here.

[0073] Step S102: Process the data to be processed based on the target elliptic curve cryptography algorithm to obtain the target result; wherein, the target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to the first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous iteration is returned and the current round of operation is repeated. If the verification passes, the next round of iteration is entered until the result of the last round of iteration is output.

[0074] In practical applications, after the data processing system of the data security storage device obtains the data to be processed, it can process the data to be processed according to the target elliptic curve cryptography algorithm to obtain the target result. The type of target elliptic curve cryptography algorithm in this application embodiment can be determined according to actual needs, such as the SM2 algorithm, SM9 algorithm, etc.

[0075] It should be noted that the target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration operation is verified according to the first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous round of iteration is returned, and the operation is repeated. If the verification passes, the next round of iteration operation is entered until the result of the last round of iteration operation is output. This is to ensure the accuracy of the scalar multiplication calculation result, thereby resisting fault injection attacks during the scalar multiplication operation process, improving the security of the data processing process, and ensuring data security.

[0076] This application provides a data processing method that acquires data to be processed; processes the data based on a target elliptic curve cryptography algorithm to obtain a target result; wherein the target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this iteration is invalid, and the previous iteration result is returned for re-performing the current iteration. If the verification passes, the next iteration begins, until the result of the final iteration is output. In this application, verifying the result of each iteration of the scalar multiplication loop operation process, and invalidating the result of this iteration if the verification fails, allows for rapid detection of fault attacks in the operation process, timely error correction, and output of the correct result. This avoids wasting computation time, resists fault injection attacks during scalar multiplication, effectively prevents leakage of cryptographic algorithm keys, and ensures data security.

[0077] Please see Figure 2 and Figure 3 , Figure 2 This is a flowchart of the scalar multiplication process in the data processing step of the target elliptic curve cryptography algorithm in this application; Figure 3 This is a schematic diagram of the scalar multiplication process in the data processing using the target elliptic curve cryptography algorithm in this application.

[0078] The data processing method provided in this application, which performs each iteration of the scalar multiplication loop operation and verifies the result of each iteration according to a first preset rule, may include the following steps:

[0079] Step S201: Obtain the target elliptic curve point and the random elliptic curve point.

[0080] Step S202: Determine the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point. The initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point meet the preset conditions.

[0081] In practical applications, during the scalar multiplication loop operation, random elliptic curve points R are introduced for loop operation. Based on the target elliptic curve point P and the random elliptic curve points, the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point can be determined. The initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point meet preset conditions so that subsequent judgments can be made on whether there is a fault injection attack during the scalar multiplication loop operation based on the initial first intermediate state point, the initial second intermediate state point, the initial redundancy check point, and the preset conditions.

[0082] In a specific embodiment, the steps of determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point include: using the sum of the target elliptic curve point and the random elliptic curve point as the initial first intermediate state point; using twice the value of the initial first intermediate state point as the initial second intermediate state point; and using the sum of the initial first intermediate state point and the initial second intermediate state point as the initial redundancy check point. At this time, the preset condition, i.e., the redundancy check point, is the sum of the first intermediate state point and the second intermediate state point. The formula is as follows:

[0083] Q1 = P + R;

[0084] Q2 = 2Q1 = 2P + 2R;

[0085] Q C =Q1+Q2=3P+3R.

[0086] In specific application scenarios, during the construction of the initial first intermediate state point based on the target elliptic curve point and random elliptic curve points, to prevent side-channel leakage during scalar multiplication, the target elliptic curve point can be double-randomized by randomizing the coordinate axes and introducing random elliptic curve points. This ensures that all intermediate state points involved in the calculation are related to random numbers and random points. Therefore, in some embodiments, the steps of determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve points may include: generating a first random number; transforming the coordinates of the target elliptic curve point in the affine coordinate system into a first coordinate in the Jacobian-weighted projective coordinate system based on the first random number; transforming the coordinates of the random elliptic curve point in the affine coordinate system into a second coordinate in the Jacobian-weighted projective coordinate system based on the first random number; and constructing the initial first intermediate state point based on the first and second coordinates.

[0087] In a specific embodiment, during the process of transforming the coordinates of the target elliptic curve point in the affine coordinate system into the first coordinates in the Jacobi-weighted projective coordinate system based on the first random number, the first transformation formula can be used to transform the coordinates of the target elliptic curve point in the affine coordinate system into the first coordinates in the Jacobi-weighted projective coordinate system based on the first random number.

[0088] The first conversion formula includes:

[0089] X P =x P Z 2 ;Y P =y P Z 3 Z P =Z;

[0090] Among them, (x P ,y P (X) represents the coordinates of the target elliptic curve point in the affine coordinate system; P ,Y P Z P () represents the first coordinate; Z represents the first random number;

[0091] In the process of transforming the coordinates of random elliptic curve points in the affine coordinate system into the second coordinates in the Jacobi-weighted projective coordinate system based on the first random number, the second transformation formula can be used to transform the coordinates of random elliptic curve points in the affine coordinate system into the second coordinates in the Jacobi-weighted projective coordinate system based on the first random number.

[0092] X R =x R Z 2 ;Y R =y R Z 3 Z R =Z;

[0093] Among them, (x R ,y R (X) represents the coordinates of the target elliptic curve point in the affine coordinate system; R ,Y R Z R ) represents the first coordinate.

[0094] Step S203: Obtain the target value.

[0095] In practical applications, the types of target elliptic curve points and target values ​​can be determined based on the specific processing of target data by the target elliptic curve cryptography algorithm. For example, the target elliptic curve point can be the elliptic curve point that generates the public key, and the target value can be the private key. In this case, the scalar multiplication result can be the public key, etc. Of course, the target elliptic curve point and target value can be two quantitative values ​​that need to be calculated during the processing, etc. This application does not make any specific limitations here.

[0096] Step S204: Based on the target value and the second preset rule, perform iterative calculations on the initial first intermediate state point, the initial second intermediate state point, and the initial redundant check point to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point.

[0097] Step S205: Determine whether the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point meet the preset conditions; if the preset conditions are met, proceed to step S206: verification passed; if the preset conditions are not met, proceed to step S207: verification failed.

[0098] In practical applications, when determining whether a fault injection attack exists during a scalar multiplication loop operation based on the initial second intermediate state point, the initial redundant checkpoint, and preset conditions, the initial first intermediate state point, the initial second intermediate state point, and the initial redundant checkpoint are first iteratively operated on based on the target value and the second preset rule to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundant checkpoint. Then, it is determined whether the updated first intermediate state point, the updated second intermediate point, and the updated redundant checkpoint meet the preset conditions. If the preset conditions are met, the verification passes, indicating that no fault injection exists during this round of iteration. If the preset conditions are not met, the verification fails, indicating that fault injection exists during this round of iteration. In other words, if there is no fault injection, the relationship between the first intermediate state point, the second intermediate state point, and the redundant check point constructed in this application always satisfies the preset conditions. However, when there is fault injection, the relationship between the first intermediate state point, the second intermediate state point, and the redundant check point no longer satisfies the preset conditions. Therefore, the first intermediate state point, the second intermediate state point, the redundant check point, and the preset conditions can be used to determine whether a fault injection has occurred during the scalar multiplication calculation, thereby ensuring the accuracy of the scalar multiplication calculation result and thus ensuring the accuracy of the elliptic curve cryptography algorithm in processing data.

[0099] In a specific embodiment, since the initial redundancy check point is obtained based on the sum of the initial first intermediate state point and the initial second intermediate state point, in the process of determining whether the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point meet the preset conditions, it can be determined whether the sum of the updated first intermediate state point and the updated second intermediate state point is equal to the updated redundancy check point. If so, the preset conditions are met; otherwise, the preset conditions are not met.

[0100] In specific application scenarios, during the process of iteratively calculating the initial first intermediate state point, the initial second intermediate state point, and the initial redundant check point based on the target value and the second preset rule to obtain the updated first intermediate state point, the updated second intermediate point, and the updated redundant check point, the iterative calculation between the target elliptic curve point and the target value can be performed based on the binary method, that is:

[0101] Determine the binary value of the target value;

[0102] According to the third preset rule, the bit values ​​of the binary value are obtained sequentially and scalar multiplication is performed in a loop. For example, the scalar multiplication is performed from the second bit of the binary value to the last bit. For each loop iteration, if the value of the obtained bit is 0, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point are obtained based on the first update formula. If the value of the obtained bit is 1, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point are obtained based on the second update formula.

[0103] The first update formula includes:

[0104] Q c =Q c '+2Q1';

[0105] Q'2' = Q1' + Q'2;

[0106] Q1” = 2Q1';

[0107] The second updated formula includes:

[0108] Q c =Q c '+2Q'2;

[0109] Q1” = Q1' + Q'2;

[0110] Q'2' = 2Q'2;

[0111] Where Q1' represents the first intermediate state point before the current bit is updated; Q'2 represents the second intermediate state point before the current bit is updated; Q c ' represents the redundant check point before the current bit is updated; Q1" represents the first intermediate state point after the current bit is updated; Q'2" represents the second intermediate state point after the current bit is updated; Q c "" indicates the redundant check point after the current bit is updated.

[0112] Specifically, for ease of understanding, such as Figure 3 As shown, assuming the length of the target value k in binary form is n, it is represented as k = (1k n-2 k n-3 ...k1k0)2, k[i] represents the binary value of the i-th bit in the binary form of k. Then, based on the target value, the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point are updated, and it is determined whether the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point meet the preset conditions. If so, the process of determining the scalar multiplication result between the target elliptic curve point and the target value based on the multiplication result and the updated first intermediate state point can be as follows:

[0113] Let i=n-2;

[0114] Read the value of k[i]. If the value of k[i] is 0, then update the first intermediate state point, the second intermediate state point, and the redundant check point based on the first update formula to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point; if the value of k[i] is 1, then update the first intermediate state point, the second intermediate state point, and the redundant check point based on the second update formula to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point.

[0115] Determine whether the sum of the updated first intermediate state point and the updated second intermediate state point is equal to the updated redundant check point. If yes, set i = i-1; otherwise, issue an alarm and keep i unchanged.

[0116] Return to the step of reading the value of k[i], and continue the loop until i = 0.

[0117] In a specific embodiment, in order to eliminate the related parts of the random elliptic curve points, the target elliptic curve cryptography algorithm further includes: calculating the multiplication result of the random elliptic curve points and the target value; calculating the difference between the first intermediate state point in the last round of iteration and the multiplication result; using the difference as the calculation result of the scalar multiplication loop operation. Specifically, the difference can also be transformed from the Jacobian weighted projective coordinate system to the affine coordinate system to obtain the calculation result of the scalar multiplication loop operation.

[0118] In practical applications, to ensure that the random elliptic curve points used in each scalar multiplication calculation are different and to enhance the security of each scalar multiplication process, the random elliptic curve points used in each scalar multiplication calculation can be updated. Specifically, a second random number can be generated; based on the second random number, historical elliptic curve points are updated to obtain random elliptic curve points, including previously used random elliptic curve points. In other words, the random elliptic curve points used in the previous target elliptic curve cryptography algorithm can be updated to obtain the random elliptic curve points used in the current round of the target elliptic curve cryptography algorithm.

[0119] In specific application scenarios, in the process of updating historical elliptic curve points based on the second random number to obtain random elliptic curve points, the third update formula can be used to update historical elliptic curve points based on the second random number to obtain random elliptic curve points.

[0120] The third update formula includes:

[0121] R”=(-1)α2R';

[0122] Where R' represents a historical elliptic curve point; R” represents a random elliptic curve point; and α represents a second random number.

[0123] Please see Figure 4 , Figure 4 This is a schematic diagram of the structure of a data processing system provided in an embodiment of this application.

[0124] This application provides a data processing system that may include:

[0125] The first acquisition module 101 is used to acquire data to be processed;

[0126] The first processing module 103 is used to process the data to be processed based on the target elliptic curve cryptography algorithm to obtain the target result;

[0127] The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to the first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous round of iteration is returned and the current round of operation is performed again. If the verification passes, the next round of iteration is entered until the result of the last round of iteration is output.

[0128] The description of the corresponding module in the data processing system provided in this application can be found in the above embodiments, and will not be repeated here.

[0129] This application also provides a data processing device and a computer-readable storage medium, both of which have the corresponding effects of a data processing method provided in the embodiments of this application.

[0130] Please see Figure 5 , Figure 5 This is a schematic diagram of the structure of a data processing device provided in an embodiment of this application.

[0131] This application provides a data processing device, including a memory 201 and a processor 202. The memory 201 stores a computer program, and the processor 202 executes the computer program to implement the steps of the data processing method described in any of the above embodiments.

[0132] Please see Figure 6Another data processing device provided in this application embodiment may further include: an input port 203 connected to the processor 202 for transmitting commands input from the outside to the processor 202; a display unit 204 connected to the processor 202 for displaying the processing results of the processor 202 to the outside; and a communication module 205 connected to the processor 202 for enabling communication between the data processing device and the outside. The display unit 204 may be a display panel, a laser scanner, or the like; the communication method used by the communication module 205 includes, but is not limited to, Mobile High Definition Link (HML), Universal Serial Bus (USB), High Definition Multimedia Interface (HDMI), wireless connection: Wireless Fidelity (WiFi), Bluetooth communication technology, Bluetooth Low Energy communication technology, and IEEE 802.11s-based communication technology.

[0133] This application provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it implements the steps of the data processing method described in any of the above embodiments.

[0134] The computer-readable storage media involved in this application include random access memory (RAM), memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disks, removable disks, CD-ROMs, or any other form of storage media known in the art.

[0135] For descriptions of relevant parts of the data processing system, device, and computer-readable storage medium provided in the embodiments of this application, please refer to the detailed descriptions of the corresponding parts in the data processing method provided in the embodiments of this application, which will not be repeated here. Furthermore, parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.

[0136] It should also be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0137] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data processing method, characterized in that, Applied to a data security storage device, the method includes: Obtain the data to be processed; The data to be processed is processed based on the target elliptic curve cryptography algorithm to obtain the target result; The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this iteration is invalid, and the result of the previous iteration is returned for the current iteration to be performed again. If the verification passes, the next iteration is entered until the result of the last iteration is output. The process of performing each iteration of the scalar multiplication loop operation and verifying the result of each iteration according to a first preset rule includes: Obtain the target elliptic curve point P and the random elliptic curve point R; Based on the target elliptic curve points and the random elliptic curve points, an initial first intermediate state point, an initial second intermediate state point, and an initial redundancy check point are determined, wherein the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point satisfy a preset condition. Obtain the target value; Based on the target value and the second preset rule, the initial first intermediate state point, the initial second intermediate state point and the initial redundancy check point are cyclically calculated to obtain the updated first intermediate state point, the updated second intermediate state point and the updated redundancy check point. Determine whether the preset conditions are met among the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point. If the preset conditions are met, the verification passes. If the preset conditions are not met, the verification will fail. The step of determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point includes: The sum of the target elliptic curve point and the random elliptic curve point is used as the initial first intermediate state point; The value of twice the initial first intermediate state point is taken as the initial second intermediate state point; The sum of the initial first intermediate state point and the initial second intermediate state point is used as the initial redundancy check point; The step of determining whether the preset conditions are met among the updated first intermediate state point, the updated second intermediate state point, and the updated redundant check point includes: Determine whether the sum of the updated first intermediate state point and the updated second intermediate state point is equal to the updated redundant check point. If yes, the preset condition is met; otherwise, the preset condition is not met. The step of performing cyclic calculations on the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target value and the second preset rule to obtain the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point includes: Determine the binary value of the target value; According to the third preset rule, the bit values ​​of the binary value are obtained sequentially and iteratively calculated. For each round of iterative calculation, if the value of the obtained bit is 0, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point of the current round of iterative calculation are obtained based on the first update formula. If the value of the obtained bit is 1, the updated first intermediate state point, the updated second intermediate state point, and the updated redundancy check point of the current round of iterative calculation are obtained based on the second update formula. The first update formula includes: The second update formula includes: in, This represents the first intermediate state point before the current bit is updated; This represents the second intermediate state point before the current bit is updated; This refers to the redundant checkpoints before the current bit is updated; This represents the first intermediate state point after the current bit is updated; This represents the second intermediate state point after the current bit is updated; This indicates the redundant check point after the current bit update.

2. The method according to claim 1, characterized in that, The step of determining the initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point based on the target elliptic curve point and the random elliptic curve point includes: Get the first random number; Based on the first random number, the coordinates of the target elliptic curve point in the affine coordinate system are transformed into the first coordinates in the Jacobian-weighted projective coordinate system. Based on the first random number, the coordinates of the random elliptic curve points in the affine coordinate system are transformed into the second coordinates in the Jacobian weighted projective coordinate system. The initial first intermediate state point, the initial second intermediate state point, and the initial redundancy check point are determined based on the first coordinate and the second coordinate.

3. The method according to claim 1, characterized in that, The target elliptic curve cryptography algorithm also includes: The result of the multiplication operation is obtained by calculating the points of the random elliptic curve and the target value; Calculate the difference between the first intermediate state point and the multiplication result in the last round of iteration; The difference is used as the result of the scalar multiplication loop operation.

4. The method according to any one of claims 1 to 3, characterized in that, Obtain random elliptic curve points, including: Generate a second random number; The historical elliptic curve points are updated based on the second random number to obtain the random elliptic curve points, which include previously used random elliptic curve points.

5. The method according to claim 4, characterized in that, The step of updating historical elliptic curve points based on the second random number to obtain the random elliptic curve points includes: The historical elliptic curve points are updated based on the second random number using the third update formula to obtain the random elliptic curve points; The third update formula includes: ; in, Represents the historical elliptic curve points; Represents the points of the random elliptic curve; This represents the second random number.

6. A data processing system, characterized in that, Implementing the data processing method as described in claim 1 includes: The first acquisition module is used to acquire data to be processed. The first processing module is used to process the data to be processed based on the target elliptic curve cryptography algorithm to obtain the target result; The target elliptic curve cryptography algorithm includes a scalar multiplication loop operation process. At the end of each iteration of the scalar multiplication loop operation process, the result of each iteration is verified according to a first preset rule. If the verification fails, the result of this round of operation is invalid, and the result of the previous round of iteration is returned for the current round of operation to be performed again. If the verification passes, the next round of iteration is entered until the result of the last round of iteration is output.

7. A data processing device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the steps of the data processing method as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the data processing method as described in any one of claims 1 to 5.