Method for fault detection and corresponding electronic equipment and electronic system
By generating and accumulating multiple image sets in electronic circuits, and verifying the cumulative results using XOR operation and transformation, the security problems of encryption algorithms in the face of side channel and fault attacks are solved, and data protection capabilities are enhanced.
Patent Information
- Application Number
- CN202110277765.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-03-11
- Filing Date
- 2021-03-15
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2041-03-15
AI Technical Summary
Existing encryption algorithms are difficult to effectively protect secret data when facing side channel attacks and fault attacks, especially through the interpretation of electromagnetic radiation and power consumption information, information related to secret data may be leaked.
By generating a non-zero even number of different sets of parts in an electronic circuit, each set includes P parts, one or more functions are used to generate multiple sets of images, and the images are accumulated through the exclusive OR operator, using linear or Nonlinear transformation verifies that the cumulative result is zero to detect and prevent failure attacks.
Effectively detect and prevent fault attacks, enhance protection of encryption algorithms, reduce the success probability of side channel attacks, and ensure the security of secret data.
Smart Images

Figure CN113408012B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates generally to electronic circuits, and more particularly to circuits that execute encryption algorithms. Background Art
[0002] In many applications, electronic circuits implement encryption, authentication, signature calculation algorithms and, more generally, algorithms that manipulate data, called secret data, i.e., it is desirable to reserve access to these data to certain users or circuits. There are in particular symmetric encryption algorithms or secret key algorithms, such as algorithms of the AES or SM4 type, which make it possible to encrypt and decrypt messages with the aid of a secret key.
[0003] There are many methods (called attacks) that try to discover or crack the secret data manipulated by these algorithms. Among these attacks, the so-called side channel attacks (SCA) use information such as the power consumption of the circuit (SPA, DPA attacks), its electromagnetic radiation, etc. The interpretation of this information can provide the hacker with information related to the secret data. So-called fault attacks are also known, which consist in deliberately causing abnormal operation of the circuit in order to infer information related to the secret data from it. Summary of the invention
[0004] Embodiments help overcome all or part of the disadvantages of known methods and circuits for protecting cryptographic algorithms from attacks.
[0005] An embodiment provides a method for performing fault detection on a first function of a message in an application by an electronic circuit, comprising the following steps:
[0006] Generating a non-zero even number N of different first sets from the message, each first set comprising P shares;
[0007] applying one or more second functions to the P parts of each first set, providing a second set of Q images for each first set; and
[0008] Starting with at most Q-1 images selected from among the Q images of the same second set, all images are accumulated.
[0009] According to an embodiment, the first set of each portion is generated by a mask (eg, a random mask) of the message (M).
[0010] According to an embodiment, the masking of the message is performed by an exclusive-OR operator.
[0011] According to an embodiment, the accumulation of the images is performed by an XOR operator.
[0012] According to an embodiment, the first function is a linear transformation.
[0013] According to an embodiment, each image of the same second set is obtained by applying the same second function to each portion of the corresponding first set.
[0014] According to an embodiment, the first function is a non-linear transformation.
[0015] According to an embodiment, each image of the same second set is obtained by applying a second function from among a plurality of different second functions to at most P-1 portions of the corresponding first set.
[0016] According to an embodiment, the method comprises a step of verifying whether the result of the accumulation of the second set of N images is zero.
[0017] According to an embodiment, the second function(s) are applied to each first set of portions in a random order.
[0018] An embodiment provides an electronic circuit configured to implement the method described above.
[0019] According to an embodiment, the memory area is intended to store accumulated intermediate values originating from the image.
[0020] According to an embodiment, a method includes: applying an encryption function to a message using an encryption circuit; and protecting the encryption circuit during the application of the encryption function to the message, the applying the encryption function and the protecting including: generating a non-zero even number of different sets of parts using the message, each set of parts including P number of parts, where P is an integer greater than or equal to 2; applying one or more functions to each part of each set of parts to generate a plurality of sets of images, each set of images including Q number of images, where Q is an integer greater than or equal to 2; and accumulating images of the set of images starting from at most Q-1 images selected from images of a set of the sets of images. In an embodiment, the generation of the set of parts includes applying a mask to the message. In an embodiment, the method includes randomly selecting a mask to apply the mask to the message. In an embodiment, applying the mask includes performing an XOR operation. In an embodiment, accumulating includes applying an XOR operation. In an embodiment, the encryption function is a linear transformation. In an embodiment, each image of a set of the set of images is obtained by applying the same function to each part of the corresponding set of parts. In an embodiment, the encryption function is a nonlinear transformation. In an embodiment, each image of a set of images is obtained by applying a function from among a plurality of different functions to at most P minus one portion of a corresponding set of portions. In an embodiment, the method comprises verifying whether a cumulative result of the images of the set of images is zero. In an embodiment, the function(s) are applied to the portions of the set of portions in a random order.
[0021] According to an embodiment, a device includes: a memory; and an encryption circuit device, the encryption circuit device is coupled to the memory, wherein the encryption circuit device applies an encryption function to a message in operation, and applying the encryption function to the message includes: using the message to generate a non-zero even number of different partial sets, each partial set includes P number of parts, where P is an integer greater than or equal to 2; applying one or more functions to each part in each partial set to generate multiple image sets, each image set includes Q number of images, where Q is an integer greater than or equal to 2; and accumulating images in the image set starting from at most Q-1 images selected from images in one of the image sets. In an embodiment, the encryption circuit device generates the partial set by applying a mask to the message in operation. In an embodiment, the encryption circuit device applies an exclusive-or operation to accumulate images in operation. In an embodiment, the encryption function is a linear transformation. In an embodiment, the encryption circuit device generates images in one of the image sets by applying the same function to each part in the corresponding partial set in operation. In operation, the encryption function is a nonlinear transformation. In an embodiment, the encryption circuit device generates an image of a set of images by applying a function from among a plurality of different functions to at most P-1 parts in a corresponding set of parts in operation. In an embodiment, the encryption circuit device verifies whether a cumulative result of images in the set of images is zero in operation. In an embodiment, the encryption circuit device randomly applies a function from a function set to a part in a set of parts in operation to generate an image in a corresponding set of images in operation. In an embodiment, the encryption circuit device stores the accumulated intermediate results in a memory in operation.
[0022] In an embodiment, a system includes: one or more interfaces; and one or more processing cores coupled to the one or more interfaces, wherein the one or more processing cores include cryptographic circuitry that, in operation, generates a non-zero number of different sets of portions using a message, each set of portions including P number of portions, where P is an integer greater than or equal to 2; applies one or more functions to each portion in each set of portions to generate a plurality of sets of images, each set of images including Q number of images, where Q is an integer greater than or equal to 2; and, starting with at most Q-1 images selected from among images in one of the sets of images, accumulates images in the set of images. In an embodiment, a system includes an integrated circuit that includes cryptographic circuitry. In an embodiment, the cryptographic circuitry, in operation, applies a linear transformation to the message.
[0023] In an embodiment, the content of a non-transitory computer readable medium configures an encryption circuit device to perform a method, the method comprising: applying an encryption function to a message; and protecting the encryption circuit device during the application of the encryption function to the message, the application of the encryption function and the protection comprising: using the message to generate a non-zero even number of different sets of parts, each set of parts including P number of parts, where P is an integer greater than or equal to 2; applying one or more functions to each part in each set of parts to generate a plurality of sets of images, each set of images including Q number of images, where Q is an integer greater than or equal to 2; and accumulating images in the set of images starting with at most Q-1 images selected from images in one of the sets of images. In an embodiment, the encryption function is a linear transformation. In an embodiment, each image in one of the sets of images is obtained by applying the same function to each part in the corresponding set of parts. In an embodiment, the content comprises instructions executed by the encryption circuit device.
[0024] In an embodiment, a method for fault detection of a first function of a message in an application by an electronic circuit includes: generating a non-zero number of different first sets from the message, each including P data elements; one or more second functions are applied to the P data elements of each first set in a random order, providing a second set including Q images for each first set; and accumulating all images starting from at most Q-1 images selected from the Q images in the same second set. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] The foregoing and other features and advantages of the present disclosure will be discussed in detail in the following non-limiting description of specific embodiments and modes of implementation in conjunction with the accompanying drawings, in which:
[0026] Figure 1 An example of an electronic circuit of the type to which the described mode of implementation is applicable is shown schematically and partially as an example;
[0027] Figure 2 An embodiment of a fault detection method is schematically shown in the form of a block diagram;
[0028] Figure 3 The block diagram schematically shows Figure 2 An example of the method applied to linear transformations;
[0029] Figure 4 The block diagram schematically shows Figure 2 Another example of applying the method of to a nonlinear transformation; and
[0030] Figure 5 The block diagram schematically shows Figure 2 The steps associated with a method's implementation pattern. DETAILED DESCRIPTION
[0031] Unless the context indicates otherwise, similar features are designated by similar reference numerals in the various figures. Specifically, structural and / or functional elements common to different embodiments and implementation modes can be designated by the same reference numerals and can have the same structure, size, and material properties.
[0032] For the sake of clarity, only those steps and elements that are helpful for understanding the described embodiments and implementation modes are shown, and these steps and elements will be described in detail. In particular, the encryption algorithm is not described in detail, and the described embodiments and implementation modes are compatible with common encryption algorithms.
[0033] Unless otherwise specified, when referring to two elements being connected together, this means a direct connection without any intermediate elements except conductors, and when referring to two elements being coupled together, this means the two elements may be connected or coupled via one or more other elements.
[0034] In the following description, when reference is made to terms defining absolute positions (such as terms “front”, “back”, “top”, “bottom”, “left”, “right”, etc.), or terms defining relative positions (such as terms “above”, “below”, “high”, “low”, etc.), or reference is made to terms defining directions (such as terms “horizontal”, “vertical”, etc.), unless otherwise specified, the direction of the drawing is referred to.
[0035] Unless otherwise specified, "about," "approximately," "substantially," and "approximately" mean within 10%, preferably within 5%, etc.
[0036] Figure 1 An example of an electronic circuit 100 of the type to which the described implementation mode is applicable is shown schematically and partially.
[0037] In the example shown, the circuit 100 comprises:
[0038] Computing circuit device 101 (UC), such as a state machine, a microprocessor, a programmable logic circuit, etc.;
[0039] at least one volatile or non-volatile storage area 103 (MEM) or memory area, for example capable of storing all or part of the data and / or keys;
[0040] One or more data, address and / or control buses 105 between various components within circuit 100; and
[0041] One or more input-output interfaces 107 (I / O) for communicating with the outside of the circuit 100 .
[0042] For example, circuit 100 includes various other circuits specific to the application. These circuits are Figure 1 This is indicated by box 109 (FCT).
[0043] In the remainder of this disclosure, it is arbitrarily considered that the circuit 100 is configured to implement all or part of an encryption algorithm, such as a symmetric encryption algorithm of the AES or SM4 type. For simplicity, consider, for example, that the circuit 100 is specifically configured to apply a first encryption function (not shown) to a message called M. For example, the message M corresponds to all or part of the secret data manipulated by the circuit 100 during the execution of the encryption algorithm.
[0044] Figure 2 The implementation mode of the fault detection method 200 is schematically shown in the form of a block diagram. Figure 2 The described method 200 facilitates detecting possible fault attacks during application of a first cryptographic function to a message M.
[0045] For example, Figure 2 The method 200 is implemented in the context of a so-called "threshold implementation" of an encryption algorithm.
[0046] In the example shown, a message M (block 201, message M) is masked (block 203, data masking). The mask 203 more specifically enables the generation of a first set S of N parts from the same message M. i (Block 205, N sets S i P parts x of i j ). For example, N sets S i Each includes the same number P of parts x i j , where P is an integer greater than or equal to 2.
[0047] In this manual, S i (1≤i≤N) indicates part x i j The i-th set of (1≤j≤P), part x i j Indicates the i-th set S i In this specification, the index i is not used to indicate a raising to the power i.
[0048] Select or generate part x according to the implementation mode i j , so that for example every set S through the XOR operator i P parts x of i jThe combination of corresponds to the message M. In other words, it is determined that for each set S i P parts x of i 1 to x i P Verify the following relationships:
[0049] [Mathematical formula 1]
[0050]
[0051] In practice, in the present disclosure, an XOR operator may correspond to an application of a hardware operator or an XOR software function.
[0052] According to the implementation mode, the mask 203 of the message M is a random mask. For example, each set S i Part x i j Generated based on at least one combination of the message M and one or more random numbers by an XOR operator.
[0053] N parts x i j The collection S i For example, they are different from each other. In other words, it is determined that N sets S are generated from the message M 1 To S N Will not cause the set S to be obtained i , the set S i All P parts x i j (whether in order or not) with other sets S i A set S i P parts x of i j same.
[0054] Then one or more second functions are applied to each set S i Part x i j (Block 207, application of (one or more) functions). This is provided by the second function (Block 209, N sets T i Q images y i k ) part x i j The N second sets T i Q images y i k For example, N sets T i Each includes the same number of images y i k , where Q is an integer greater than or equal to 2. In the remaining description, it is arbitrarily assumed that in each set Ti The image y in i k The number Q is equal to the number of i Part x i j However, different numbers P and Q may be provided as a variant.
[0055] In the present disclosure, the second function is derived from the part x i j The i-th set S i Application, T i (1≤i≤N) indicates the i-th set of images, and y i k (1≤k≤Q) indicates the i-th set T i The kth image of .
[0056] For example, the second function is actually a sub-function of the first function. For example, the second functions are selected so that they are i P parts x of i j The application of provides a result R which is equivalent to the result obtained by applying the first function directly to the message M. However, for the portion x originating from the message M i j The application of the second function of the mask 203 has advantages, in particular, compared to an implementation in which the first function is applied directly to the message M, the encryption algorithm provided by the second function has better protection against side channel attacks (SCA).
[0057] For example, applying the first function to a message M provides a result R that is equal to the result obtained by applying the XOR operator to the same set T. i Q images y i k The result of the combination is R. In other words, each second set T i Q images y i k Verify the following relationships:
[0058] [Mathematical formula 2]
[0059]
[0060] In the example shown, all N sets T i All Q images y i k All N·Q images y are accumulated (block 211, accumulation). i k The accumulation 211 of is performed, for example, by an XOR operator. For example, for all images y i kThe accumulation 211 enables verification (block 213 , fault detection) whether the application 207 of the second function(s) has experienced a fault attack.
[0061] According to the implementation mode, from the set T i A set of Q images y i 1 to y i Q At most Q-1 images y are selected from i k Initially, accumulation 211 is performed. For example, accumulation 211 is performed in the following manner: 1 1 to y 1 Q-1 The collection T 1 Start, then execute image y 2 1 to y 2 Q ,y 3 1 to y 3 Q , …, y N 1 to y N Q The collection T 2 to T N , and with the set T 1 The Qth image y 1 Q Finish.
[0062] In practice, accumulation 211 is performed on two images y by, for example, an XOR operator i k The combination of to provide a first intermediate result. For example, the first intermediate result is stored in an accumulator or a register, for example, stored in circuit 100 ( Figure 1 ) in the memory area 103. Then, the first intermediate result is XORed with another image y i k Combined to provide a second intermediate result. For example, in sequence with another image y i k Before combining, the second intermediate result is stored in the accumulator instead of the first intermediate result, and so on, to obtain all images y through the XOR operator i k The final result of the cumulative 211.
[0063] It can be designed that from the same set T i Q images y i k Start by accumulating all images y i k For example, it can be achieved by accumulating the set T 1Q images y 1 1 to y 1 Q Start with set T 2 Q images y 2 1 to y 2 Q , and so on, until the set T N Q images y N 1 to y N Q However, this would have the disadvantage of storing in the accumulator, especially in the case of a set T 1 Q images y 1 1 to y 1 Q At the end of the accumulation, the intermediate result is equal to the result R of applying the first function to the message M. This may provide information to the attacker that allows him / her to discover the message M that needs to be kept secret.
[0064] According to an embodiment, the set S of masks 203 derived from the message M i The number N is a non-zero even integer. In this case, verification 213 comprises, for example, ensuring that the N images y i k The second set T i The cumulative result of 211 is zero.
[0065] Figure 3 The block diagram schematically shows Figure 2 The method 200 is applied to an example of a linear transformation, labeled FL.
[0066] In the example shown, it is arbitrarily considered that part x is generated from a message M (block 201, message M) i j Two sets S 1 (Block 301, partial set S 1 ) and S 2 (Block 303, the set of parts and S 2 ). For example, it is considered as a simplification that every set S 1 , S 2 It consists of three parts x i 1 to x i 3. More specifically, in the example shown, the set S 1 It consists of three parts x 1 1. x 1 2 and x 1 3. Set S 2 It consists of three parts x 2 1. x 2 2 and x 23 (in this case N=2 and P=3).
[0067] Each set S 1 , S 2 The portion x is obtained, for example, by random masking of the message M. For example, the message M is first combined with a first random number (denoted as R1) by an XOR operator to obtain the portion x 1 1:
[0068] [Mathematical formula 3]
[0069]
[0070] For example, the first random number R1 can be combined with the second random number (labeled as R2) using an exclusive OR operator to obtain the partial x 1 2:
[0071] [Mathematical formula 4]
[0072]
[0073] According to the relations [Math 3] and [Math 4], message M verifies the following relations:
[0074] [Formula 5]
[0075]
[0076] Considering that the second random number R2 corresponds to the part x 1 3, that is, in the above relationship [Formula 5], use x 1 3 Replace R2, part x 1 1. x 1 2 and x 1 3 Example of forming a random mask for message M.
[0077] Typically, the mask of a message M is performed such that knowing the same set S i P-1 part x i j No information about the message M is provided. In other words, it is determined that only those who know the same set S i P parts x of i j Only then can message M be restored.
[0078] For example, the set S 2 Part x 2 1. x 2 2 and x 2 3 is similar to the above for the set S 1 Part x 1 1. x 1 2 and x 13 obtained by the steps described in Part x 2 1. x 2 2 and x 2 3 is generated by a combination of message M and two random numbers other than the first random number R1 and the second random number R2. Therefore, it can be guaranteed that the set S 1 and S 2 are different, in other words, the set S 1 Part x 1 1. x 1 2 and x 1 3 cannot all be in set S 2 Part x 2 1. x 2 2 and x 2 Found in 3.
[0079] In the example shown, the same second function (labeled f) is applied to each portion S1, S2 to form the image y i k The collection T 1 (Block 305, image set T1) and T 2 (Block 307, image set T2). In other words, the function f is used to calculate each part x i j The image y i k . More specifically, in the example shown, the following is calculated:
[0080] Image y 1 1.y 1 2 and y 1 3. By respectively 1 Part x 1 1. x 1 2 and x 1 3 is obtained by applying function f to each part; and
[0081] Image y 2 1.y 2 2 and y 2 3. By respectively 2 Part x 2 1. x 2 2 and x 2 Each part in 3 is obtained by applying function f.
[0082] In the example shown, the function f is applied to the part x i j The collection S i So that from the image y i k The collection T iA result R is obtained (block 309, result R). The result R is identical to the result obtained by applying the linear transformation FL directly (block 311, linear transformation FL) to the message M. Assuming that the transformation FL is linear, it verifies the following relationship:
[0083] [Mathematics 6]
[0084]
[0085] Considering that the function f is equivalent to the linear transformation FL, the relationship [Equation 6] can be rewritten as follows:
[0086] [Formula 7]
[0087]
[0088] The above relations [Formula 6] and [Formula 7] can be transformed into a set S 2 Part x 2 1. x 2 2 and x 2 3 and set T 2 The image y 2 1.y 2 2 and y 2 3. In particular:
[0089] [Mathematical formula 8]
[0090]
[0091] According to an embodiment, the second function f is applied to each set S in a random order 1 , S 2 Part x i j This can in particular strengthen the protection of the computation of the result R against possible side-channel attacks. In particular, it is unlikely that an attacker will be able to successfully isolate the same set T i All images of y i k , thus recovering the result R. The larger the numbers N and Q, the lower this possibility is.
[0092] Figure 4 The block diagram schematically shows Figure 2 The method 200 is applied to another example of a nonlinear transformation called FN.
[0093] Figure 4 An example of an application has Figure 3 The same elements are used in the examples of the application. The common elements will not be described below. In particular, Figure 4 In an example of an application of , part x may be generated from a message M (block 201, message M)i j The collection S 1 (Block 301, partial set S 1 ) and S 2 (Block 303, partial set S 2 ), similar to the previous combination Figure 3 Examples of applications of the content discussed.
[0094] In the example shown, by applying a second function from among a plurality of different second functions f1, f2 and f3 to the corresponding set S i At most P-1 parts x i j To obtain the unified set T i Each image y i k . Thus forming the image y i k The collection T 1 (Block 305, image set T 1 ) and T 2 (Block 307, image set T 2 ). More specifically, in the example shown:
[0095] Image y 1 1 is obtained by applying the function f1 to the set S 1 Part x 1 2 and x 1 3 obtained;
[0096] Image y 1 2 is obtained by applying the function f2 to the set S 1 Part x 1 1 and x 1 3 obtained;
[0097] Image y 1 3 is obtained by applying the function f3 to the set S 1 Part x 1 1 and x 1 2 obtained;
[0098] Image y 2 1 is obtained by applying the function f1 to the set S 2 Part x 2 2 and x 2 3 obtained;
[0099] Image y 2 2 is obtained by applying the function f2 to the set S 2 Part x 2 1 and x 2 3 obtained;
[0100] Image y 2 2 is achieved by applying function f3 to the set S 2 Part x 2 1 and x 2 2 obtained.
[0101] In the example shown, functions f1, f2 and f3 are applied to the set S i Part x i j So that from the image y i k The collection T i A result R is obtained (block 309 , result R) which is identical to the result obtained by directly applying (block 401 , non-linear transformation FN) to the message M.
[0102] In the example shown, the transformation FN and the functions f1, f2 and f3 verify in particular the following relationship:
[0103] [Mathematical formula 9]
[0104]
[0105] Transformation FN and functions f1, f2, and f3 further verify the following relationship:
[0106] [Formula 10]
[0107]
[0108] According to an embodiment, the second function f 1 、f 2 and f 3 Applied to the parts x of each set S1, S2 in random order i j This can in particular strengthen the protection of the computation of the result R against possible side-channel attacks and obtain the same Figure 3 Similar advantages to the application examples discussed in .
[0109] Figure 5 The block diagram schematically shows Figure 2 The steps associated with an embodiment of method 200 are as follows.
[0110] In the example shown, the set T 1 (Block 305, image set T 1 ) and T 2 (Block 307, image set T 2 ) i k is accumulated (block 211, accumulation). Figure 5In, you can Figure 3 Application examples or Figure 4 In the application example of 1 and T 2 .
[0111] In the example shown, the set T is combined by using the XOR operator 1 The image y 1 1 and y 1 2 to obtain the intermediate result (labeled as z1). Then, the intermediate result z1 is XORed with the set T 2 The image y 2 1 to obtain another intermediate result z2. Then, the intermediate result z2 is combined with the set T through the XOR operator 2 The image y 2 2 to obtain another intermediate result z3. Then, the intermediate result z3 is combined with the set T through the XOR operator. 2 The image y 2 3 to obtain another intermediate result z4. Then, the intermediate result z4 is combined with the set T through the XOR operator. 1 The image y 1 3 to obtain another intermediate result z5. In the example shown, the intermediate result z5 corresponds to the set T 1 The image y 1 1.y 1 2 and y 1 3 and set T 2 The image y 2 1.y 2 2 and y 2 The final result of 3 cumulative 211.
[0112] In the example shown, the results z1 to z5 verify the following relationship:
[0113] [Mathematical formula 11]
[0114]
[0115] In practice, the intermediate results z1 to z5 are stored, for example, consecutively in the memory area 103 of the circuit 100 ( Figure 1 ). For example, the memory area 103 is configured to store a single intermediate result at a time, and the content of the memory 103 is updated, for example, at the end of the calculation of each new intermediate result.
[0116] According to the implementation mode, it is verified (block 213, fault detection) that two second sets T 1 and T 2 The image y i kIs the accumulated result z5 zero? In the example shown, if the transformation FL or FN is applied to the message M, that is, the set S 1 and S 2 Part x i j Applying the function f or the functions f1, f2 and f3, without being attacked by errors, the result z5 is equal to zero according to the following relationship:
[0117] [Mathematical formula 12]
[0118]
[0119] Combination of the above Figures 2 to 5 The advantage of the implementation pattern discussed is that the set T 1 The image y 1 1.y 1 2 and y 1 3 and set T 2 The image y 2 1.y 2 2 and y 2 The accumulation 211 of 3 enables the value of the result R to be stored in the memory 103 of the circuit 100 ( Figure 1 ). Thus, for example, the possibility for a possible attacker to obtain the result R by observing the content of the memory 103 is avoided.
[0120] Various embodiments, implementation modes and variations have been described. Those skilled in the art will appreciate that certain features of these various embodiments, implementation modes and variations may be combined, and those skilled in the art will recognize other variations.
[0121] Finally, based on the functional indications given above, the actual implementation of the described embodiments, implementation modes and variants is within the capabilities of those skilled in the art. Figure 3 and Figure 4 Describes the process of generating two sets S from a message M 1 and S 2 (each set consists of three parts), but in practice it can be provided to generate sets S where the number N is greater than two. i (For example, ten sets S i ), each set includes a number P greater than three parts x i j (For example, five parts x i j ). Generally, it will be within the capabilities of a person skilled in the art to adjust the numbers N and P depending on the level of protection to be achieved.
[0122] Those skilled in the art can also select the second function f and the second functions f1, f2 and f3 so that when the part x i j When following a uniform distribution, the image y i k Also follows uniform distribution.
[0123] Such changes, modifications, and improvements are intended to be part of this disclosure and are intended to be within the spirit and scope of this disclosure. Therefore, the above description is intended to be exemplary only and is not intended to be limiting. This disclosure is limited only to what is defined in the following claims and their equivalents.
[0124] Some embodiments may take the form of a computer program product. For example, according to one embodiment, a computer readable medium is provided, including a computer program suitable for performing one or more of the above methods or functions. The medium may be a physical storage medium, such as, for example, a read-only memory (ROM) chip, or a disc (such as a digital versatile disc DVD ROM), a compact disc (CD-ROM) hard disk, a memory, a network, or a portable multimedia item read by an appropriate drive or via an appropriate connection, including one or more such computer readable media encoded in one or more bar codes or other related coding storage, and readable by an appropriate reading device.
[0125] In addition, in some embodiments, some or all of the methods and / or functions may be implemented or provided in other ways, such as at least partially implemented or provided in firmware and / or hardware, including but not limited to one or more application-specific integrated circuits (ASICs), digital signal processors, discrete circuits, logic gates, standard circuit integrated circuits, controllers (e.g., by executing appropriate instructions, including microcontrollers and / or embedded controllers), field programmable gate arrays (FPGAs), complex programmable logic devices (CPLDs), etc., as well as devices using RFID technology and various combinations thereof.
[0126] The various embodiments described above can be combined to provide further embodiments. Aspects of the embodiments can be modified, if necessary, to utilize concepts of the various patents, applications, and publications to provide further embodiments.
[0127] These and other changes can be made to the embodiments in light of the above detailed description. In general, in the following claims, the terms used should not be interpreted to limit the claims to the specific embodiments disclosed in the specification and claims, but should be interpreted to include all possible embodiments and the full range of equivalents to which these claims are entitled. Therefore, the claims are not limited by this disclosure.
Claims
1. A method for fault detection, comprising: applying a first encryption function to the message using an encryption circuit; as well as protecting the cryptographic circuit during application of the first cryptographic function to the message, applying the first cryptographic function and the protecting comprising: Using the message, generate a non-zero even number of different part sets, each part set including P number of parts, where P is an integer greater than or equal to 2, and each part set represents the message; Applying one or more second encryption functions to each portion in each set of portions to generate a plurality of sets of images, each set of images comprising Q number of images, where Q is an integer greater than or equal to 2, and each set of images represents a result of applying the second encryption function to the set of portions; accumulating images in all of the image sets starting with at most Q-1 images selected from among images in one of the image sets, and continuing to accumulate images from other image sets in the plurality of image sets before accumulating remaining images in one of the image sets, wherein the accumulating includes combining the images using an XOR operation; and An attack on the encryption circuit is detected based on whether a result of the accumulation of the set of images is zero.
2. The method of claim 1, wherein generating the set of portions comprises applying a mask to the message.
3. A method according to claim 2, comprising randomly selecting a mask to apply to the message. The method of claim 2 , wherein applying the mask comprises performing an exclusive-OR operation. The method of claim 1 , wherein the first encryption function is a linear transformation.
6. A method according to claim 5, wherein each image of one of the sets of images is obtained by applying the same second encryption function to each part of the corresponding set of parts. The method of claim 1 , wherein the first encryption function is a non-linear transformation.
8. A method according to claim 7, wherein each image of one of the sets of images is obtained by applying a second encryption function from among a plurality of different second encryption functions to at most P minus one part of the corresponding set of parts.
9. The method of claim 1, responsive to the accumulated result of the images in the image set not being equal to zero, an attack being detected.
10. The method of claim 1, wherein one or more of the second cryptographic functions are applied to portions of the set of portions in a random order.
11. An electronic device, comprising: Memory; as well as an encryption circuit device coupled to the memory, wherein the encryption circuit device is operable to apply a first encryption function to a message and to protect the encryption circuit device during application of the first encryption function to the message, the applying of the first encryption function to the message and the protecting comprising: Using the message, generate a non-zero even number of different part sets, each part set including P number of parts, where P is an integer greater than or equal to 2, and each part set represents the message; Applying one or more second encryption functions to each portion in each set of portions to generate a plurality of sets of images, each set of images comprising Q number of images, where Q is an integer greater than or equal to 2, and each set of images represents a result of applying the second encryption function to the set of portions; and accumulating images in all of the image sets starting with at most Q-1 images selected from among images in one of the image sets, and continuing to accumulate images from other image sets in the plurality of image sets before accumulating remaining images in one of the image sets, wherein the accumulating includes combining the images using an XOR operation; and An attack on the encryption circuit device is detected based on whether a result of the accumulation of the image set is zero.
12. An apparatus according to claim 11, wherein the encryption circuit means is operative to generate the partial set by applying a mask to the message.
13. The apparatus of claim 11, wherein the first cryptographic function is a linear transformation.
14. An apparatus according to claim 13, wherein the encryption circuit means is operative to generate an image of one of the sets of images by applying the same second encryption function to each portion in the corresponding set of portions.
15. The apparatus of claim 11, wherein the first encryption function is a non-linear transformation.
16. An apparatus according to claim 15, wherein the encryption circuit system generates an image in one of the image sets by applying a second encryption function from among a plurality of different second encryption functions to at most P-1 parts in a corresponding set of parts.
17. The apparatus of claim 11, wherein the cryptographic circuitry is operable to detect an attack in response to a result of the accumulation of the images in the set of images not being equal to zero.
18. The apparatus of claim 11, wherein the encryption circuitry is operative to randomly apply a second encryption function from a set of second encryption functions to portions from a set of portions to generate an image from a corresponding set of images.
19. The apparatus of claim 11, wherein the cryptographic circuitry is operative to store the accumulated intermediate results in the memory.
20. An electronic system comprising: one or more interfaces; as well as One or more processing cores coupled to the one or more interfaces, wherein the one or more processing cores include cryptographic circuitry that, in operation, applying a first encryption function to the message; as well as protecting the cryptographic circuit arrangement during application of the first cryptographic function to the message, the applying of the first cryptographic function and the protecting comprising: Using the message, generate a non-zero even number of different part sets, each part set including P number of parts, where P is an integer greater than or equal to 2, and each part set represents the message; Applying one or more second encryption functions to each portion in each set of portions to generate a plurality of sets of images, each set of images comprising Q number of images, where Q is an integer greater than or equal to 2, and each set of images represents a result of applying the second encryption function to the set of portions; accumulating images in all of the image sets starting with at most Q-1 images selected from among images in one of the image sets, and continuing to accumulate images from other image sets in the plurality of image sets before accumulating remaining images in one of the image sets, wherein the accumulating includes combining the images using an XOR operation; and An attack on the encryption circuit device is detected based on whether a result of the accumulation of the image set is zero.
21. The system of claim 20, comprising an integrated circuit including cryptographic circuitry.
22. The system of claim 20, wherein the encryption circuitry is operative to apply a linear transformation to the message.
23. A non-transitory computer readable medium having content for configuring an encryption circuit device to perform a method, the method comprising: applying a first encryption function to the message; as well as protecting the cryptographic circuit arrangement during application of the first cryptographic function to the message, the applying of the first cryptographic function and the protecting comprising: Using the message, generate a non-zero even number of different part sets, each part set including P number of parts, where P is an integer greater than or equal to 2, and each part set represents the message; Applying one or more second encryption functions to each portion in each set of portions to generate a plurality of sets of images, each set of images comprising Q number of images, where Q is an integer greater than or equal to 2, and each set of images represents a result of applying the second encryption function to the set of portions; and accumulating the images in all of the image sets starting with at most Q-1 images selected from among the images in one of the image sets, and continuing to accumulate images from other image sets in the plurality of image sets before accumulating remaining images in one of the image sets, wherein the accumulating includes combining the images using an XOR operation; and An attack on the encryption circuit device is detected based on whether a result of the accumulation of the image set is zero.
24. The non-transitory computer-readable medium of claim 23, wherein the first cryptographic function is a linear transform.
25. The non-transitory computer-readable medium of claim 24, wherein each image of one of the sets of images is obtained by applying the same second encryption function to each portion of the corresponding set of portions.
26. The non-transitory computer-readable medium of claim 23, wherein the content comprises instructions executed by the cryptographic circuitry.
