Ecc attack-resistant method and device suitable for automobile security chip, equipment and medium

By adjusting the point operation decomposition and preprocessing of scalar bits in the scalar average decomposition method, the problems of ECC anti-attack methods being unable to resist safe-error attacks and failing to meet the ISO 26262 fault detection rate are solved, thus achieving efficient and secure ECC operation.

CN118860727BActive Publication Date: 2026-01-02CHINA RESOURCES MICROELECTRONICS HLDG LTD

Patent Information

Application Number
CN202310474162.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-27
Publication Date
2026-01-02
Estimated Expiration
2043-04-27

AI Technical Summary

Technical Problem

Existing ECC anti-attack implementation methods cannot effectively resist Safe-error fault injection attacks, and are also difficult to meet the fault detection rate requirements of ISO 26262 functional safety circuits.

Method used

In the scalar average decomposition method, the point operation is decomposed into two parts, the current loop and the next loop, by adjusting the scalar multiplication process. This ensures that the final calculation result remains unchanged. If necessary, the scalar bits of the last loop are preprocessed to make the operation of each loop the same and eliminate branch differences.

Benefits of technology

It effectively resists SPA attacks and Safe-error injection attacks, while meeting the high fault detection rate requirements of ISO 26262 functional safety, and with minimal increase in computation and storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118860727B_ABST
    Figure CN118860727B_ABST
Patent Text Reader

Abstract

The application provides an ECC attack-resistant method, device, equipment and medium suitable for a car security chip. The application adjusts the points accumulated in the scalar average decomposition method, so that the operation operations in each cycle are the same, that is, each cycle performs point multiplication and point addition. In this way, the branch in the operation process can be eliminated, the power consumption attack cannot identify the leakage of sensitive information, and the problem that the false operation mode cannot meet the high fault detection rate required by the car chip ISO 26262 is avoided. In the case of increasing a small amount of calculation and pre-storing points, the application can achieve the beneficial effects described above.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of automobile security chip, in particular to an ECC attack-resistant method and device suitable for automobile security chip, equipment and medium. BACKGROUND

[0002] In the field of automobile security chip, the elliptic curve cryptography (ECC) has been widely implemented and applied due to its "short key" advantage under the same level of security compared to the traditional RSA public key cryptography system. In particular, in the high-concurrency security authentication scenario of intelligent and connected vehicles V2X, ECC has replaced RSA as the mainstream public key cryptography system. Automobile security chips have higher requirements for the implementation performance of ECC compared to smart cards and Internet of Things security chips. Although the internal storage resources of the chips are slightly abundant, they still belong to the category of embedded MCU chips in essence, and there are certain limitations on the consumption of on-chip resources. At the same time, the circuit implementation in the automobile chip often needs to consider the requirements of ISO 26262 functional safety, and meet the higher circuit fault detection rate.

[0003] In addition, side-channel attacks on cryptographic circuits are becoming a major threat to information leakage. In addition, side-channel attacks on cryptographic circuits are becoming a major threat to information leakage. Side-channel attacks (SCA), also known as side-channel attacks, use the side information such as power consumption and electromagnetic leakage when a cryptographic algorithm runs in a circuit to perform feature analysis and analyze the secret data such as the key in the cryptographic circuit. Power / EM analysis is currently the most common type of side-channel attack, which attacks by monitoring the current, voltage, electromagnetic and other physical information leaked by the encryption system. Simple power / EM analysis (SPA / SEMA) can attack by directly observing the power consumption characteristics of the cryptographic circuit during operation. If there are obvious identifiable features on the power curve, a large amount of sensitive information can be obtained by analyzing a curve. Fault injection attack is another threatening means of cryptographic circuit attack, which injects faults in the key steps of the cryptographic circuit operation and analyzes the injection results to obtain secret data.

[0004] Therefore, the implementation of the ECC of the automobile security chip needs to consider the goals of high efficiency, high fault detection rate, attack resistance, and economic resource consumption.

[0005] In the existing embedded chip ECC high efficiency implementation scheme, in order to improve the efficiency of the most time-consuming "scalar multiplication" (also known as "point multiplication") operation in ECC operation, the "scalar average decomposition method" is usually used. This method precomputes and prestores points, so that a part of the calculation is completed in advance by precalculation, so that the efficiency of scalar multiplication operation is greatly improved. The implementation method of scalar average decomposition method is given below, taking scalar average division 4 as an example, and the algorithm content is as follows.

[0006]

[0007]

[0008] The scalar in the ECC scalar multiplication operation is usually secret, that is, sensitive information that cannot be known by the attacker. The problem of scalar average decomposition method is that the point addition operation in step 4.2 has branches. When the multiple scalar bits corresponding to the current loop are all 0 (i.e. a i i i i i i i i According to the principle of elliptic curve, for any point P on the elliptic curve E(F q ), P+O=P. Therefore, the operation of adding the infinite point O does not need to be performed, which is different from other branches. The doubling operation in step 4.1 needs to be performed every time. The point addition and doubling operations differ in operation steps, which can be clearly distinguished in the power consumption curve. Therefore, once the attacker finds that two doublings are completed continuously, the multiple scalar bits corresponding to the current loop can be known, and the sensitive information is leaked. This method cannot resist SPA attack.

[0009] One intuitive solution is to perform a false operation if the multiple scalar bits corresponding to the current loop are all 0, that is, to complete a point addition operation again, but the result is discarded. The specific algorithm 2 is as follows:

[0010]

[0011] Algorithm 2 eliminates the execution branches of scalar bits in the implementation steps, so that it cannot be distinguished from the execution time power consumption characteristics, achieves the effect of resisting SPA attack, and the increased operation amount is also small. It is the ECC attack resistant implementation method commonly used at present.

[0012] ​​​​​​​The ECC attack-resistant implementation method commonly used at present, although eliminating the branch in the power consumption feature during execution, can resist SPA attack, but cannot resist a fault injection attack called Safe-error. During observing the power consumption of the ECC circuit, the attacker applies fault injection to the circuit when observing the execution of the point addition operation (i.e. step 4.2 of algorithm 2), and can distinguish the truth value of the point addition operation injected with the fault by observing the influence on the final execution result. If the injected fault affects the final execution result, it is known that the point addition operation at the fault injection position is a true operation, i.e. at least one of the multiple scalar bits corresponding to the current loop is not 0; otherwise, if the injected fault does not affect the final result, it is known that the point addition operation at the fault injection position is a false operation, i.e. all the multiple scalar bits corresponding to the current loop are 0. Once the attacker identifies the truth value of the point addition operation at each position in the ECC operation process through Safe-error attack, the sensitive scalar information can be obtained through the method of SPA attack.

[0013] In addition, the ECC attack-resistant implementation method commonly used at present, due to the introduction of the false operation step which does not affect the final result, will cause great obstacles to the circuit fault detection rate required by ISO 26262 functional safety when implemented in automotive security chips. The cryptographic algorithm itself has good diffusion and avalanche effect, and any slight change in data during algorithm execution will greatly affect the final result. This feature makes it only necessary to check the correctness of the final result of the cryptographic circuit in engineering, so as to judge whether the local circuit has failed with a high detection probability. For ECC algorithm execution, such as checking whether there is a circuit failure during the execution of the signature operation, it can be simply judged by verifying the signature result. However, once the false operation step which does not affect the final result is introduced in order to resist SPA attack, since the local circuit (such as a branch of the state machine) executing the false operation branch and the internal memory storing the false operation result will fail (including temporary failure or permanent failure), it cannot be judged by the correctness of the final execution result.

[0014] Therefore, the ECC attack-resistant implementation method commonly used at present cannot resist SPA attack superimposed with Safe-error fault injection attack, and it is also difficult to meet the circuit fault detection rate required by ISO 26262 functional safety. SUMMARY

[0015] In view of the above-mentioned disadvantages of the prior art, the purpose of the present application is to provide an ECC attack-resistant implementation method that can resist SPA attack under Safe-error fault injection attack and meet the circuit fault detection rate requirement of ISO26262 functional safety.

[0016] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides an ECC attack-resistant method suitable for a car safety chip, comprising: in the process of calculating scalar multiplication using scalar average decomposition method, based on the principle that the final calculation result remains unchanged, the next loop is point operation disassembled to obtain a first point operation part disassembled to the current loop and a second point operation part disassembled to the next loop; determining whether the point operation disassembly can still be performed according to the value of the plurality of scalar bits of the last loop in the scalar multiplication calculation process, and in the case that the point operation disassembly cannot be performed, the scalar bits of the last loop are preprocessed to make the point operation disassemblable.

[0017] In some embodiments of the first aspect of the present application, the way of disassembling the next loop based on the principle that the final calculation result remains unchanged comprises: the accumulated point before disassembly is T, the first point operation part after disassembly is T', and the second point operation part after disassembly is T"; wherein T, T' and T" satisfy [2] T'+T"=T to make the final calculation result remain unchanged.

[0018] In some embodiments of the first aspect of the present application, the method further comprises determining the values of the first point operation part and the second point operation part according to the values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop. m-1 In some embodiments of the first aspect of the present application, the values of the first point operation part and the second point operation part include: when all the scalar bits in the scalar bit group [l s-1 ,…,l1,l0] corresponding to the next loop are 0, the accumulated point is disassembled to the first point operation part T'=[2 s ]P of the current loop, and the accumulated point is disassembled to the second point operation part T"=-[2 m-1 ]P of the next loop.

[0019] In some embodiments of the first aspect of the present application, the values of the first point operation part and the second point operation part include: when only one of the scalar bits in the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop is 1, the accumulated point is disassembled to the first point operation part T'=[2 i*sP, the accumulated point is decomposed to the first point operation part T' = [2 i*s ] · P.

[0020] In some embodiments of the first aspect of the present application, the method further comprises determining the values of the first point operation part and the second point operation part according to the different values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, including: when there are two or more scalar bits being 1 in the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the accumulated point is decomposed to the first point operation part T' = [2 i ( x ) *s-1 ]P, and the accumulated point is decomposed to the second point operation part T" = [2 i ( 0 ) *s · P+…+2 i ( x-1 ) *s ] · P.

[0021] In some embodiments of the first aspect of the present application, the process of pre-processing the scalar bits of the last cycle to make the point operation decomposable includes: if the lowest scalar bit is 1, then at least one of the scalar bits of the last cycle is 1, and it is determined that there is no need to decompose; if the lowest scalar bit is 0, then the scalar k is processed to generate the processed scalar k' = k + 1, to ensure that there is at least one bit being 1 in the last cycle, and the final result is subtracted by the point P after completing all operations to correct the deviation of the operation result caused by the pre-processing of the scalar.

[0022] In some embodiments of the first aspect of the present application, the method further comprises performing the following steps to make the calculation process independent of the parity of the scalar: if the lowest scalar bit is 1, then the scalar k is processed to obtain k' = k - 2 s , and the final result is added by the point [2 s ]P after completing all operations to correct the deviation of the operation result caused by the pre-processing of the scalar.

[0023] To achieve the above object and other related objects, the second aspect of the present application provides an ECC attack-resistant device suitable for an automotive security chip, comprising: a point operation disassembly module, configured to disassemble a next loop for point operation based on the principle that a final calculation result remains unchanged in a process of calculating scalar multiplication using a scalar average decomposition method, so as to obtain a first point operation part disassembled to a current loop and a second point operation part disassembled to the next loop; and a scalar preprocessing module, configured to determine whether the point operation disassembly can be performed according to the values of a plurality of scalar bits of a last loop in the process of calculating the scalar multiplication, and to preprocess the scalar bits of the last loop to make the point operation disassemblable in a case where the point operation disassembly cannot be performed.

[0024] To achieve the above object and other related objects, the third aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the ECC attack-resistant method suitable for an automotive security chip.

[0025] To achieve the above object and other related objects, the fourth aspect of the present application provides an automotive security chip, comprising: a processor and a memory; the memory is configured to store a computer program, and the processor is configured to execute the computer program stored in the memory, so that the terminal executes the ECC attack-resistant method suitable for an automotive security chip.

[0026] As described above, the ECC attack-resistant method, device, equipment and medium suitable for an automotive security chip have the following beneficial effects: the present application adjusts the points accumulated in the scalar average decomposition method, so that the operation operations in each loop are the same, that is, each loop performs point doubling and point addition, which can eliminate the branches in the operation process, so that the power consumption attack cannot identify the leakage of sensitive information, and the problem of not meeting the high fault detection rate required by the automotive chip ISO 26262 caused by the use of false operation is avoided. With less calculation and pre-stored points, the present application can achieve the beneficial effects described above. BRIEF DESCRIPTION OF DRAWINGS

[0027] Figure 1 A flowchart of an ECC attack-resistant method suitable for an automotive security chip is shown.

[0028] Figure 2 A structure diagram of an ECC attack-resistant device suitable for an automotive security chip is shown.

[0029] Figure 3 A structure diagram of an automotive security chip is shown. DETAILED DESCRIPTION

[0030] Those skilled in the art will readily understand that the application is well adapted to carry out the objects and obtain the ends and advantages mentioned, as well as those inherent therein, from the embodiments described herein. The present application is further defined by the following claims, but it will be understood that various modifications and changes can be made thereto without departing from the spirit and scope of the application. It is to be understood that the following examples and features are intended to be illustrative only and are not intended to limit the scope of the application.

[0031] It should be noted that in the following description, reference is made to the accompanying drawings which forms a part of this specification. These drawings are not intended to limit the scope of the application, and are for illustrative purposes only. Embodiments of the application can be implemented in any mechanical, electrical, and / or computer-based system. The detailed description is not intended to be limiting, and the scope of the application is defined by the appended claims. The terms used herein are for the purpose of describing particular embodiments and are not intended to limit the application. Spatially relative terms, such as "upper," "lower," "left," "right," "below," "below," "bottom," "top," and the like, can be used herein for ease of description to describe one element or feature's relationship to another element(s) or feature(s) as illustrated in the figures.

[0032] In this application, terms of "mounting", "connection", "connecting", "fixing", "holding" and the like should be understood in a broad sense, for example, can be fixed connection, can also be detachable connection, or integrally connected; can be mechanical connection, can also be electrical connection; can be directly connected, can also be indirectly connected through an intermediate medium, can be internal communication of two elements. For those skilled in the art, the specific meaning of the above terms in this application can be understood according to the specific circumstances.

[0033] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises", "comprising", "includes" and / or "including", when used herein, specify the presence of stated features, operations, elements, components, items, and / or objects, but do not preclude the presence or addition of one or more other features, operations, elements, components, items, and / or objects. The terms "or" and "and / or" as used herein are to be interpreted as inclusive or meaning either or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". An exception to this definition will occur only when a combination of elements, functions, or operations are in some way inherently mutually exclusive.

[0034] To address the problems mentioned above, this invention provides an ECC anti-attack method, system, terminal, and medium suitable for automotive security chips. It aims to propose an improved scalar average decomposition method. If multiple scalar bits corresponding to the current loop are all 0, the addition points in the current and next loops are changed to avoid skipping the addition operation. At the same time, if any step of this method is injected with a fault, it will affect the final calculation result.

[0035] To make the objectives, technical solutions, and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only for explaining the present invention and are not intended to limit the invention.

[0036] Before providing a further detailed description of the present invention, the nouns and terms used in the embodiments of the present invention are explained, and the nouns and terms used in the embodiments of the present invention are subject to the following interpretations:

[0037] (1) Elliptic curve cryptography: It is a public-key cryptosystem based on the elliptic curve discrete logarithm problem. It is a type of cryptosystem that uses the finite point group of an elliptic curve over a finite field to replace the finite cyclic group in the discrete logarithm problem cryptosystem. The mathematical basis for the security of elliptic curve cryptosystem (ECC) is to calculate the difficulty of the elliptic curve discrete logarithm problem (ECDLP).

[0038] (2) Dot multiplication: The rule for performing multiple operations on the same point in ECC calculation, denoted as [k]G; the result obtained by performing "k-1" dot addition operations on point G.

[0039] This invention provides an ECC anti-attack method for automotive security chips, a system for implementing the ECC anti-attack method for automotive security chips, and a storage medium storing an executable program for implementing the ECC anti-attack method for automotive security chips. Regarding the implementation of the ECC anti-attack method for automotive security chips, this invention will describe exemplary implementation scenarios.

[0040] like Figure 1 The diagram illustrates a flowchart of an ECC anti-attack method for automotive security chips according to an embodiment of the present invention. The ECC anti-attack method for automotive security chips in this embodiment mainly includes the following steps:

[0041] Step S11: in the process of calculating the scalar multiplication using the scalar average decomposition method, the next cycle is point operation decomposition based on the principle of keeping the final calculation result unchanged, to obtain a first point operation part decomposed to the current cycle and a second point operation part decomposed to the next cycle.

[0042] In the embodiments of the present application, the way of decomposing the next cycle based on the principle of keeping the final calculation result unchanged includes: recording the accumulated point before decomposition as T, the first point operation part after decomposition as T', and the second point operation part after decomposition as T''; wherein T, T' and T'' satisfy [2] T'+T''=T to keep the final calculation result unchanged.

[0043] Specifically, when calculating the scalar multiplication kP using the scalar average decomposition method, the length of the scalar k is recorded as t, the scalar is divided into m segments, and the segment length is In the process of scanning the scalar bits:

[0044] Suppose the multiple scalar bits corresponding to the current cycle are all 0, recorded as the first scalar bit group [j m-1 ,…,j1,j0], and satisfy [j m-1 ,…,j1,j0] = [0,…,0,0]. The multiple scalar bits corresponding to the next cycle are recorded as the second scalar bit group [l m-1 ,…,l1,l0], wherein the values of l m-1 ,…,l1,l0 are 0 or 1, and the accumulated point T[l m-1 ,…,l1,l0] = [l m-1 ·2 (m-1)s ]P+…+[l1·2 s ]P+[l0]P.

[0045] By decomposing the accumulated point T[l m-1 ,…,l1,l0], part of the calculation is transferred to the current cycle, so that both the current cycle and the next cycle perform point addition operation. Recording the part of the accumulated point decomposed to the current cycle as the first point operation part T', and the part decomposed to the next cycle as the second point operation part T''. According to the overall operation of the cycle, as long as [2] T'+T''=T is satisfied, the final result remains unchanged. It should be understood that since the point multiplication is performed first in each round of calculation, T' becomes [2] T' in the next cycle.

[0046] In the embodiments of the present application, according to the values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the first point operation part and the second point operation part take values as follows:

[0047] (1) When all the scalar bits in the scalar bit group [l m-1 , …, l1, l0] corresponding to the next cycle are 0, that is, l m-1 = … = l1 = l0 = 0, the accumulated point is disassembled into the first point operation part T’ = [2 s-1 P of the current cycle, and the accumulated point is disassembled into the second point operation part T” = -[2 s P of the next cycle; s represents the segment length.

[0048] (2) When there is exactly one scalar bit in the scalar bit group [l m-1 , …, l1, l0] corresponding to the next cycle that is 1, that is, l i = 1 (0 ≤ i ≤ m - 1), the accumulated point is disassembled into the first point operation part T’ = [2 i *s P of the current cycle, and the accumulated point is disassembled into the second point operation part T” = -[2 i*s P of the next cycle; s represents the segment length.

[0049] (3) When there are two or more scalar bits in the scalar bit group [l m-1 , …, l1, l0] corresponding to the next cycle that are 1, that is, l i(0) = … = l i(x-1) = l i(x) = 1 (0 ≤ i(0) < … < i(x - 1) < i(x) ≤ m - 1), the accumulated point is disassembled into the first point operation part T’ = [2 i (x)*s - 1]P of the current cycle, and the accumulated point is disassembled into the second point operation part T” = [2 i ( 0 ) *s P + … + [2 i ( x-1 ) *s P; s represents the segment length.

[0050] Step S12: Determine whether point operation disassembly can still be performed according to the values of multiple scalar bits in the last cycle during the scalar multiplication calculation process, and preprocess the scalar bits in the last cycle to make the point operation disassemblable when the point operation disassembly cannot be performed.

[0051] Specifically, if all the multiple scalar bits in the last cycle are 0, the point operation cannot be disassembled any further, and this can be solved by preprocessing the scalar.

[0052] In the embodiments of the present application, considering that the key average decomposition method scans the scalar bits from high to low, the following judgment can be made: if the lowest bit of the scalar is 1, then at least one scalar bit of the plurality of scalar bits in the last loop is 1, and it is judged that there is no need to disassemble; if the lowest bit of the scalar is 0, then the scalar k is processed to generate the scalar k' = k + 1 after processing, to ensure that the last loop has at least one bit 1, and the final result is subtracted by the point P after completing all operations to obtain the correct result.

[0053] Further, the method further comprises performing the following steps to make the calculation process independent of the parity of the scalar: if the lowest bit of the scalar is 1, then the scalar k is processed to obtain k' = k - 2 s , and the final result is added by the point [2 s ]P after completing all operations to obtain the correct result. In this way, whether the scalar is odd or even, the operations in all loops are the same, that is, each loop is a point addition and a point multiplication, and after completing all loop operations, a point addition operation is finally performed; in other words, such processing can make k become another number when k is odd without changing the parity, and make k need to do a point addition to restore the result whether k is odd or even.

[0054] For ease of understanding, the following gives an example of the implementation method of the improved scalar average decomposition method by taking the case of dividing the scalar into four segments (for other segmentation cases, the implementation method without branching can also be given with reference to Algorithm 3).

[0055]

[0056]

[0057] Further, Table 1 below indicates the points T' and T" used by the improved scalar average decomposition method in the case of dividing the scalar into four segments.

[0058] Table 1 Points T' and T" used by the improved scalar average decomposition method in the case of dividing the scalar into four segments

[0059] n, m, l, j T’ T” 0,0,0,0 T1 -T[0,0,1,0] = -P1 0,0,0,1 T[0,0,0,1] = P -T[0,0,0,1] = -P 0,0,1,0 T[0,0,1,0] = P1 -T[0,0,1,0] = -P1 0,0,1,1 T1 T[0,0,0,1] = P 0,1,0,0 T[0,1,0,0] = P2 -T[0,1,0,0] = -P2 0,1,0,1 T2 T[0,0,0,1] = P 0,1,1,0 T2 T[0,0,1,0] = P1 0,1,1,1 T2 T[0,0,1,1] = P1+P 1,0,0,0 T[1,0,0,0] = P3 -T[1,0,0,0] = -P3 1,0,0,1 T3 T[0,0,0,1] = P 1,0,1,0 T3 T[0,0,1,0] = P1 1,0,1,1 T3 T[0,0,1,1] = P1+P 1,1,0,0 T3 T[0,1,0,0] = P2 1,1,0,1 T3 T[0,1,0,1] = P2+P 1,1,1,0 T3 T[0,1,1,0] = P2+P1 1,1,1,1 T3 T[0,1,1,1] = P2+P1+P

[0060] By using the ECC attack-resistant method suitable for automotive security chips provided by the embodiments of the present application, the high efficiency characteristics of the scalar average decomposition method for ECC implementation are maintained, and SPA attacks and Safe-error fault injection attacks can be resisted at the same time. In addition, high circuit fault detection rates can be achieved by checking the correctness of the final execution result in engineering, to meet the functional safety requirements of automotive chip ISO26262.

[0061] The following Table 2 shows the comparison between the embodiment of the present application and the conventional method. As shown in Table 2, the length of the scalar in the scalar multiplication operation is t, the number of segments is r, the multiplication point operation amount is PD, and the point addition operation amount is PA.

[0062] Table 2 Comparison between the present application and the conventional method

[0063]

[0064] Through the comparison in Table 2, the implementation method of the present application can solve the problem of being vulnerable to SPA attack in the conventional algorithm. According to the commonly used prime field 256-bit elliptic curve, in the case of 4 segments of the key, the increased operation time and the increased storage amount are shown in Table 3. It can be seen that the increased operation time is very small in the case of greatly improved security, and the increased pre-storage amount can also be applicable to the internal memory resource overhead of the automobile chip.

[0065] Table 3 Comparison between the improved algorithm of the present application and the conventional algorithm under the prime field 256-bit elliptic curve

[0066] Increased computation time Increased pre-stored amount Compared to Algorithm 1 5.43% 28.89% Compared to Algorithm 2 1.03% 28.89%

[0067] As shown in Figure 2 , a structure diagram of an ECC attack-resistant device suitable for an automobile security chip in an embodiment of the present application is shown. The ECC attack-resistant device 200 in the embodiment of the present application specifically comprises a point operation disassembling module 201 and a scalar preprocessing module 202.

[0068] The point operation disassembling module 201 is configured to disassemble the next loop for point operation based on the principle that the final calculation result remains unchanged, so as to obtain a first point operation part disassembled to the current loop and a second point operation part disassembled to the next loop in the process of calculating the scalar multiplication by using the scalar average decomposition method.

[0069] In some examples, the manner in which the point operation disassembling module 201 disassembles the next loop for point operation based on the principle that the final calculation result remains unchanged comprises: the accumulated point before disassembly is T, the first point operation part after disassembly is T', and the second point operation part after disassembly is T"; wherein the accumulated point before disassembly T, the first point operation part T', and the second point operation part T" make the final calculation result remain unchanged under the condition of [2] T' + T" = T.

[0070] In some examples, according to the value of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop, the values of the first point operation part and the second point operation part comprise: when the scalar bit group [l m-1, the accumulated point is decomposed to the first point operation part T' = [2 s-1 ]P of the current loop, and the accumulated point is decomposed to the second point operation part T'' = -[2 s ]P of the next loop.

[0071] In some examples, according to different values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop, the values of the first point operation part and the second point operation part include: when there is only one scalar bit of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop is 1, the accumulated point is decomposed to the first point operation part T' = [2 i*s ]P of the current loop, and the accumulated point is decomposed to the second point operation part T'' = -[2 i*s ]P of the next loop.

[0072] In some examples, according to different values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop, the values of the first point operation part and the second point operation part include: when there are two or more scalar bits of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next loop are 1, the accumulated point is decomposed to the first point operation part T' = [2 i ( x ) *s-1 ]P of the current loop, and the accumulated point is decomposed to the second point operation part T'' = [2 i ( 0 ) *s · P+…+2 i ( x-1 ) *s ]P of the next loop.

[0073] The scalar preprocessing module 202 is configured to determine whether the point operation decomposition can be performed according to the values of the scalar bits of the last loop in the scalar multiplication calculation process, and to preprocess the scalar bits of the last loop to make the point operation decomposable when the point operation decomposition cannot be performed.

[0074] In some examples, the scalar preprocessing module 202 includes the following steps in the process of preprocessing the scalar bits of the last loop to make the point operation decomposable: if the lowest bit of the scalar is 1, then at least one bit of the scalar bits of the last loop is 1, and it is determined that there is no need to decompose; if the lowest bit of the scalar is 0, then the scalar k is incremented by 1 to generate the processed scalar k' = k + 1, to ensure that the last loop has at least one bit of 1, and the final result is subtracted by the point P after completing all operations to correct the deviation of the operation result caused by the scalar preprocessing.

[0075] Further, the scalar preprocessing module 202 performs the following steps to make the calculation process independent of the parity of the scalar: if the lowest bit of the scalar is 1, then the scalar k is processed to obtain k' = k - 2 s , and the final result is added by the point [2 s ]P after completing all operations to correct the deviation of the operation result caused by the scalar preprocessing.

[0076] It should be noted that the ECC attack-resistant device for the automotive security chip provided in the above embodiments is only used as an example to illustrate the division of the above program modules in the process of ECC attack-resistant for the automotive security chip. In actual applications, the above processing can be completed by different program modules according to needs, that is, the internal structure of the device is divided into different program modules to complete all or part of the processing described above. In addition, the ECC attack-resistant device for the automotive security chip and the ECC attack-resistant method for the automotive security chip provided in the above embodiments belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.

[0077] As Figure 3 shown, a structure schematic diagram of an automotive security chip in an embodiment of the present application is shown. An optional hardware structure schematic diagram of the automotive security chip 300 in the embodiment of the present application is shown in Figure 3 , which includes at least one processor 301, a memory 302, at least one network interface 304, and a user interface 306. Each component in the device is coupled together through a bus system 305. It can be understood that the bus system 305 is used to realize the connection and communication between the components. The bus system 305 includes a data bus, a power bus, a control bus, and a state signal bus. However, for the purpose of clear illustration, all kinds of buses are marked as the bus system in Figure 3 .

[0078] The user interface 306 can include a display, a keyboard, a mouse, a trackball, a click gun, a key, a button, a touchpad, or a touch screen, etc.

[0079] It can be appreciated that the memory 302 can be a volatile memory or a nonvolatile memory, and can also include both volatile and nonvolatile memory. Among them, the nonvolatile memory can be a read-only memory (ROM, Read Only Memory), a programmable read-only memory (PROM, Programmable Read-Only Memory), which is used as an external cache. By way of example but not limitation, many forms of RAM can be used, such as static random access memory (SRAM, Static Random Access Memory), synchronous static random access memory (SSRAM, Synchronous Static Random Access Memory). The memory described in the embodiments of the present application is intended to include but not limited to these and any other suitable category of memory.

[0080] The memory 302 in the embodiments of the present application is used to store various categories of data to support the operation of the ECC attack-resistant terminal suitable for the automotive security chip 300. Examples of these data include: any executable program for operating on the ECC attack-resistant terminal suitable for the automotive security chip 300, such as an operating system 3021 and an application program 3022; the operating system 3021 contains various system programs, such as a framework layer, a core library layer, a driver layer, etc., for implementing various basic services and processing hardware-based tasks. The application program 3022 can contain various application programs, such as a media player (MediaPlayer), a browser (Browser), etc., for implementing various application services. The implementation of the ECC attack-resistant method suitable for the automotive security chip provided by the embodiments of the present application can be included in the application program 3022.

[0081] The method disclosed by the embodiments of the present application can be applied to the processor 301 or implemented by the processor 301. The processor 301 can be an integrated circuit chip having a signal processing capability. In the implementation process, each step of the above method can be completed by an integrated logic circuit or an instruction in the form of software in the processor 301. The processor 301 can be a general processor, a digital signal processor (DSP), or other programmable logic device, discrete gate or transistor logic device, discrete hardware component, etc. The processor 301 can implement or execute the disclosed methods, steps and logic block diagrams in the embodiments of the present application. The general processor 301 can be a microprocessor or any conventional processor, etc. The steps of the accessory optimization method provided in the embodiments of the present application can be directly embodied as a hardware decoding processor for execution, or a combination of hardware and software modules in the decoding processor for execution. The software module can be located in a storage medium in the memory, and the processor reads the information in the memory and combines the hardware to complete the steps of the foregoing method.

[0082] In the exemplary embodiments, the ECC attack-resistant terminal suitable for the automotive security chip 300 can be implemented by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), etc. for executing the foregoing method.

[0083] Those skilled in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by computer program related hardware. The foregoing computer program can be stored in a computer readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the foregoing storage medium includes ROM, RAM, magnetic or optical disc, and various storage media that can store program codes.

[0084] In the embodiments provided in the present application, the computer readable and writable storage medium can include a read-only memory, a random access memory, an EEPROM, a CD-ROM or other optical disk storage device, a magnetic disk storage device or other magnetic storage device, a flash memory, a U disk, a mobile hard disk, or any other medium capable of storing desired program code in the form of instructions or data structures and capable of being accessed by a computer. In addition, any connection can be appropriately referred to as a computer readable medium. For example, if instructions are sent from a website, server or other remote source using a coaxial cable, fiber optic cable, twisted pair, digital subscriber line (DSL) or wireless technology such as infrared, radio and microwave, the coaxial cable, fiber optic cable, twisted pair, DSL or wireless technology such as infrared, radio and microwave is included in the definition of the medium. However, it should be understood that the computer readable and writable storage medium and the data storage medium do not include connections, carriers, signals or other transitory media, but are intended for non-transitory, tangible storage media. As used in the application, magnetic disks and optical disks include compact disks (CD), laser disks, optical disks, digital versatile disks (DVD), floppy disks and Blu-ray disks, in which magnetic disks typically magnetically copy data, and optical disks optically copy data with a laser.

[0085] In summary, the present application provides an ECC attack-resistant method and device suitable for automotive security chips, a terminal and a medium. The present application adjusts the points accumulated in the scalar average decomposition method, so that the operation in each cycle is the same, i.e., each cycle performs point doubling and point addition, which eliminates the branches in the operation process, so that the power consumption attack cannot identify the leakage of sensitive information, and also avoids the problem of not meeting the high fault detection rate required by the automotive chip ISO 26262 by using the false operation method. With little increase in calculation and pre-stored points, the present application can achieve the beneficial effects described above. Therefore, the present application effectively overcomes the various shortcomings in the prior art and has high industrial utilization value.

[0086] The above embodiments only exemplarily illustrate the principles and effects of the present application, and are not intended to limit the present application. Any person skilled in the art can modify or change the above embodiments without departing from the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by those skilled in the art without departing from the spirit and technical idea disclosed in the present application should be covered by the claims of the present application.

Claims

1. An ECC attack resistant method suitable for automotive security chips, characterized in that, The method comprises the following steps: In the process of calculating the scalar multiplication by using the scalar average decomposition method, the next loop is decomposed based on the principle that the final calculation result remains unchanged, to obtain a first point operation part decomposed to the current loop and a second point operation part decomposed to the next loop; Whether the point operation decomposition can be further performed is determined according to the value of the plurality of scalar bits of the last loop in the process of calculating the scalar multiplication, and the scalar bits of the last loop are preprocessed to make the point operation decomposable in the case that the point operation decomposition cannot be performed.

2. The ECC attack resistant method suitable for automotive security chip according to claim 1, wherein, The manner of decomposing the next loop based on the principle that the final calculation result remains unchanged comprises: the points accumulated before decomposition are T, the first point operation part after decomposition is T', and the second point operation part after decomposition is T"; wherein the points accumulated before decomposition are T, the first point operation part is T', and the second point operation part is T" under the condition that [2] T' + T" = T, so that the final calculation result remains unchanged.

3. The ECC attack resistant method suitable for automotive security chip according to claim 1, wherein, The method further includes, based on the scalar bit group [l] corresponding to the next cycle. m-1 The values ​​of the first and second point operation parts differ depending on the values ​​of [l, ..., l1, l0]. The values ​​of the first and second point operation parts include: the scalar bit group [l...l1, l0] corresponding to the next loop... m-1 When all scalar bits in [l1, l2, ..., l0] are 0, the accumulated points are decomposed into the first point operation part T' = [2...]. s-1 ]P, the accumulated points are decomposed into the second point operation part T” = -[2 s ]P; where s represents the segment length.

4. The ECC attack resistant method suitable for automotive security chip according to claim 1, wherein, The method further comprises that according to different values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the values of the first point operation part and the second point operation part include: when there is only one scalar bit being 1 in the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the accumulated point is decomposed to the first point operation part T’ of the current cycle T’ = [2 i *s ]P, and the accumulated point is decomposed to the second point operation part T” of the next cycle T” = -[2 i*s ]P; wherein s represents a segment length.

5. The ECC attack resistant method suitable for automotive security chip according to claim 1, wherein, The method further comprises that according to different values of the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the values of the first point operation part and the second point operation part include: when there are two or more scalar bits being 1 in the scalar bit group [l m-1 ,…,l1,l0] corresponding to the next cycle, the accumulated point is split into the first point operation part T’ = [2 i(x)*s-1 ]P of the current cycle, and the accumulated point is split into the second point operation part T” = [2 i(0)*s · ]P of the next cycle. i(x-1)*s ]P of the next cycle. Wherein, s represents the length of the segment.

6. The ECC attack resistant method suitable for automotive security chip according to claim 1, wherein, The process of preprocessing the scalar bits of the last loop to make the point operation decomposable comprises: if the lowest scalar bit is 1, at least one of the plurality of scalar bits of the last loop is 1, and it is judged that there is no need to decompose; if the lowest scalar bit is 0, the scalar k is added by 1 to generate the processed scalar k' = k + 1, to ensure that the last loop has at least one bit 1, and the final result is subtracted by the point P after completing all operations to correct the deviation of the operation result caused by the scalar preprocessing.

7. The ECC attack resistant method suitable for automotive security chip according to claim 1 or 6, characterized in that, The method further comprises performing the following steps to make the computation flow independent of the parity of the scalar: if the lowest bit of the scalar is 1, then the scalar k is processed to obtain k' = k - 2 s , and the final result is added with the point [2 s ]P after all operations are completed to correct the deviation of the operation result caused by the scalar preprocessing.

8. An ECC attack resistant device suitable for use in automotive security chips, characterized in that, The method comprises the following steps: A point operation decomposition module is configured to decompose the next loop based on the principle that the final calculation result remains unchanged in the process of calculating the scalar multiplication by using the scalar average decomposition method, to obtain a first point operation part decomposed to the current loop and a second point operation part decomposed to the next loop; A scalar preprocessing module is configured to determine whether the point operation decomposition can be further performed according to the value of the plurality of scalar bits of the last loop in the process of calculating the scalar multiplication, and to preprocess the scalar bits of the last loop to make the point operation decomposable in the case that the point operation decomposition cannot be performed.

9. A computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to implement the ECC attack-resistant method suitable for the automotive security chip according to any one of claims 1 to 7.

10. An automotive security chip, characterized by, The method comprises the following steps: A processor and a memory; The memory is configured to store a computer program; The processor is configured to execute the computer program stored in the memory, so that the terminal executes the ECC attack-resistant method suitable for the automotive security chip according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • ECC elliptic curve anti-attack hardware architecture

    CN113691375A

  • Elliptic curve cipher system and implementing method

    CN1831754A

Cited By

  • ECC Anti-attack method and apparatus suitable for automobile security chip, device, and medium

    EP4708052A1