Methods for converting Boolean shares to arithmetic shares

By using first-order and second-order secure Boolean-to-arithmetic mask conversion algorithms to generate random variables and integers, the problem of low efficiency in converting Boolean masks to arithmetic masks is solved, thereby improving the computational efficiency and security of the hardware system.

CN123125830APending Publication Date: 2026-11-17PQSHIELD LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202580028436.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2024-06-10
Filing Date
2025-04-11
Publication Date
2026-11-17

AI Technical Summary

Technical Problem

Existing technologies struggle to efficiently convert Boolean mask shares into arithmetic mask shares, resulting in inefficiencies when performing addition, subtraction, and multiplication operations in hardware systems and vulnerability to side-channel attacks.

Method used

A series of methods are provided, including first-order and second-order secure Boolean-to-arithmetic mask conversion algorithms. These methods determine the initial and intermediate mask shares by generating random variables and random integers, and finally generate the arithmetic mask shares. They are applicable to binary and arbitrary modulo fields and achieve efficient conversion.

Benefits of technology

This technology enables efficient conversion of Boolean masks to arithmetic masks in hardware systems, improving computational efficiency, enhancing resistance to side-channel attacks, and reducing the risk of probing attacks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123125830A_ABST
    Figure CN123125830A_ABST
Patent Text Reader

Abstract

This invention relates to a method performed by an information processing device for converting a Boolean share of a data value into an arithmetic mask share. An information processing device and a program are also provided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method performed by an information processing device for converting a Boolean share of a data value into an arithmetic mask share. An information processing device and a program are also provided. Background Technology

[0002] Side-channel attacks attempt to extract secret information from hardware systems, such as processors. During such attacks, attackers measure or analyze physical parameters of the system, such as supply current, execution time, and electromagnetic radiation, in an attempt to gain information from the system. For example, an attacker might try to measure power consumption by attaching probes to the system.

[0003] One countermeasure against side-channel attacks is masking. In a masking scheme, the sensitive variable is divided into several shares, and recombination of these shares produces the same original (unshared) value. These shares need to be specific to the function to be applied. f It is 'correct' in this respect, that is, if the function f The combination of output shares equals f If applied to the values ​​of the input share combinations, then this is correct. The shares should also be independent (uniform), therefore all shares must be known before information about the sensitive variable can be obtained.

[0004] The application of masks in cryptographic operations varies depending on the type of operation being performed. Logical operations (such as XOR and shift) are protected using Boolean masks, while addition, subtraction, and multiplication can be implemented more efficiently using arithmetic and multiplication masks, respectively. However, cryptographic algorithms often involve combinations of these operations, thus requiring the conversion of masks between Boolean and arithmetic forms to obtain the correct result, or the use of modified operations. Typical examples are symmetric primitives such as SHA-2, Blake hash functions, Skein hash functions, the XTEA block cipher, or the ChaCha20 stream cipher, all of which use powers of 2 as the modulus. Other examples are lattice-based cryptographic schemes, where polynomial multiplication and addition are preferably performed on arithmetic shares, while binomial sampling, for example, requires both arithmetic and Boolean masks. These schemes typically use moduloes different from powers of 2 and require additional modulo reduction. Therefore, efficient techniques are needed to facilitate the conversion between arithmetic-shared and Boolean-shared types in fields and prime fields with a modulus of 2. Summary of the Invention

[0005] According to a first aspect of the present invention, a method performed by an information processing device is provided for processing data of length _____. k The data value of the unit digit x Boolean share Convert to arithmetic mask share z 1z 2 The Boolean share Already passed with value r Obtained by performing an XOR operation, such that... And thus the data value x This can be achieved by adjusting the arithmetic mask shares. z 1 z 2 The method of performing arithmetic operations to recover the data includes: Sample the random variable γ; Initial share a 1 , a 2 , a 3 and a 4 Determined as:

[0006] The intermediate arithmetic mask share is determined as follows. The bits, where ¬ is the bitwise inverse:

[0007] For in 2 and k bit values ​​between -1 i :

[0008] In variables d In 3 and i Each value between +1 i Then for in d – Each value between 2 and 1 m The value t is determined as follows:

[0009] The arithmetic mask share is determined as follows:

[0010] According to a second aspect of the present invention, a method performed by an information processing device is provided for processing data of length _____. k The data value of the unit digit x Boolean share to arithmetic mask share z 1 , z 2 and z 3 The Boolean share is , r1 and r 2, wherein the Boolean share Already passed with two random values r 1 Obtained by XORing r2, such that And thus the data value x This can be achieved by adjusting the arithmetic mask shares. z 1 , z 2 and z 3 The method of performing arithmetic operations to recover the data includes: Sample seven random integers s1, s2, γ1, γ2, α, β, δ; The first intermediate value is generated as follows:

[0011] The second intermediate value is generated as follows:

[0012] The third intermediate value is generated as follows:

[0013] The fourth intermediate value is generated as follows:

[0014] arithmetic mask share z 1 , z 2 and z 3 Generate as:

[0015] Further features and advantages of the invention will become apparent from the following description of preferred embodiments of the invention, given by way of example only with reference to the accompanying drawings. Attached Figure Description

[0016] Figure 1 A method for performing a first-order secure Boolean to arithmetic mask conversion on integers in binary form is shown; Figure 2 It shows the method for using any number q A method for performing a first-order safe Boolean to arithmetic mask conversion on modulo integers; Figure 3 The functions 10-DomAnd, 10-DomAndRefresh, and 10-DomAndXorRefresh are shown. Figure 4The function 10-KSABorrowBitGen, which generates the borrow (underflow) during subtraction, is shown. Figure 5 This illustrates a method for performing a second-order secure Boolean to arithmetic mask conversion on integers in binary form; Figure 6a and Figure 6b The functions 20-DomAnd, 20-DomAndRefresh, and 20-DomAndXorRefresh are shown. Figure 7 The function 20-KSABorrowBitGen, which generates the borrow (underflow) during subtraction, is shown. Figure 8 It shows the method for using any number q A method for performing a second-order safe Boolean to arithmetic mask conversion on modulo integers; and Figure 9 This is a schematic diagram showing the components of an information processing device. Detailed Implementation

[0017] As discussed in the background, one countermeasure against side-channel attacks on hardware systems is masking. To mask sensitive variables, they are divided into multiple masked shares. Once the sensitive variable has been divided into masked shares, a function can be applied to each share separately, and the combination of the function's output shares is the same as the result of applying the function directly to the sensitive variable. In this way, probing attacks on the hardware can be prevented because probing only obtains information about the masked shares, while an attacker cannot obtain information about the sensitive variable unless they can obtain information about all the masked shares, which is much more difficult to achieve.

[0018] However, once sensitive variables have been segmented into masked shares (e.g., Boolean masked shares), not all functions can be applied without modification. Modified operations can be applied to Boolean masked shares, but these operations may be inefficient. Logical operations can be applied to Boolean masked shares, but arithmetic operations such as addition may require efficient implementation of arithmetic masks. Therefore, it is desirable to convert Boolean masked shares to arithmetic masked shares to allow the application of a series of operations without combining masked shares and re-masking the sensitive variables, which could expose the sensitive variables to probing attacks.

[0019] In the following description, a method for converting Boolean mask shares to arithmetic mask shares is described. The first and second embodiments are 1-PINI secure methods, and the third and fourth embodiments are 2-PINI secure methods, where PINI stands for probe isolation non-interference. Intuitively (i.e., informally defined), 1-PINI security indicates that the method is secure if any probe used to monitor the hardware system is not allowed to observe different shared domains processed by the hardware. If the probe is located at an output share, the measurement must be limited to data propagating within the same share domain as the output share where the probe is placed. The method is 2-PINI secure if it remains secure when using two probes (two inputs) to monitor at most two shared domains processed by the hardware system.

[0020] In this patent specification, we represent the Boolean operations AND, OR, and XOR as ∧, ∨, and ⊕. We use... x i Representing variables x The binary representation of is shifted to the left, where i Indicates bit position. Similarly, we use x i Indicates right shift i Each position. Addition and subtraction operations are represented by the "+" and "-" symbols, respectively. Operations can be performed in the field. Execute in (integers represented as binary strings), where k ∈ Z≥0 indicates the bit length of the field.

[0021] Safety level is d Boolean masking schemes will mask sensitive variables x ∈ Divided into d + 1 Boolean share ( x 1 , ..., x d+1 ), making Considered to satisfy Boolean operations Correctness Attributes. Furthermore, if the shares are randomly selected from a uniform distribution, then the shares satisfy... Uniformity Attributes. If shared functions f ( x, y Shared component functions f i The sum equals f ( x, y ),Right now Then the shared function is considered to be Correct .

[0022] Throughout the description, we use subscripts to refer to different mask shares. Superscripts are used to refer to individual bits of a mask share. For example, Refers to the fourth bit of the third mask share.

[0023] First Implementation Plan (First-Order B2A)

[0024] The first implementation provides a first-order (1-PINI) secure Boolean-to-arithmetic (B2A) masking algorithm. The first implementation is applicable to integers represented in binary form. .

[0025] Figure 1 A method called 10-SecB2A2k is shown. The input to this method is a sensitive variable. x A pair of Boolean shares and r The relationship between Boolean shares is as follows:

[0026] Sensitivity value x The following steps can be taken to restore it:

[0027] The method also uses a random integer (of length ). k (binary string) γ. The method generates an arithmetic mask. z 1 and z 2, of which:

[0028] Calculated arithmetic share z 1 and z 2 can be represented as follows:

[0029] The following describes a secure and hardware-efficient method for determining arithmetic shares. The method begins with step 1: determining the initial shares as follows. a 1 , a 2 , a 3 and a 4 :

[0030] In steps 2 to 4, the intermediate arithmetic masked share The bits are determined as follows:

[0031] Here, the bit values ​​are inverted; that is, bit 0 is converted to 1 and bit 1 is converted to 0. For bits 2 and... k Other bit values ​​between -1 i :

[0032] exist Figure 1 The values ​​are determined in parallel in steps 5 through 10. t In variables d Each value between 3 and i+1 i (that is, when determined) z 1 in 2 and k When the bit value is between -1), then for d – Each value between 2 and 1 m ,value t The following is determined:

[0033] Arithmetic shares z 1. Then through with t XOR operation is performed to determine if:

[0034] Therefore, arithmetic mask share z 1 and z 2. Boolean mask share and r generate.

[0035] The above method can be used to calculate the initial share. a 1. a 2. a 3 and a 4. And store the result in a register. First arithmetic share z 1 can be calculated using a modified ripple carry adder. This is because the first arithmetic share is calculated within the same share domain (i.e., based on the value). a 1 to a4) Therefore, the first arithmetic share can be calculated in a single clock cycle. The second share is also calculated in the same share domain. As discussed further below, when implemented in a circuit, the delay of the method may vary with the word length. k Irrelevant.

[0036] Second Implementation Plan (First-Order B2AQ)

[0037] Many encryption algorithms require a Boolean-to-arithmetic mask conversion in the field of integers modulo any number (i.e., not limited to 2). The arbitrary number will be... q ,in q <2 k ,in k For parameters. In this type of implementation, the masked sensitivity value is reduced to the modulo before arithmetic sharing. q .

[0038] Figure 3 The three functions used in the following method are shown. 10-DomAnd takes four shares a 0、 a 1. b 0 and b 1 and random bits r 0 And generate two intermediate values. y 0 and y 1. The function uses the AND function to generate shares. 10-DomAnd is:

[0039] Compared to 10-DomAnd, 10-DomAndRefresh uses an additional bit of random number, which allows all component functions to be refreshed (become more uniform again). 10-DomAndRefresh is:

[0040] 10-DomAndXorRefresh takes the third value c The share, to use the function Generate shares. 10-DomAndXorRefresh is:

[0041] Figure 2 The steps of the method referred to in this paper as 10-SecB2Aq are illustrated. The input to the method is a sensitivity variable. x A pair of Boolean shares and r The Boolean share relationship is the same as in the first implementation scheme:

[0042] The method generates an arithmetic mask. z 1 and z 2, of which:

[0043] The method is applicable to modular systems. q ,in q <2 k and output value x In [0, q Between -1].

[0044] In step 1 of the 10-SecB2Aq method, the method of the first implementation, namely 10-SecB2A2K, is applied to the input shares. and r Arithmetic shares z 1 and z 2 is called t 1 = z 1 and t 2 = z 2 .

[0045] In step 2, determine the value u :

[0046] In step 3, the share and r Use the function 10-KSABorrowBitGen. Figure 4 The image shows 10-KSABorrowBitGen. The 10-KSABorrowBitGen function uses a Boolean-masked carry chain to safely compute subtraction operations. x - q A single underflow bit (borrow). 10-KSABorrowBitGen takes two input values. x 0 and x 1. Therefore, in reference Figure 4 hour, = x 0 and r = x 1.

[0047] In steps 1 through 5, a refresh is performed, where the share is entered. x 0 and x The even-numbered digits of 1 are randomized to generate random shares. a 0 and a 1. Refresh is defined as Each of them r i It is a unit random number.

[0048] In step 7, constant y It was identified as:

[0049] exist Figure 4 Lieutenant General Constant y Shown as u The value referred to in this document is called... y In order to avoid being in Figure 2 The value calculated in step 2 u Confusing.

[0050] In steps 8 through 10, the functions 10-DomAnd and 10-DomAndRefresh mentioned above are used to generate random shares. a 0 and a The method involves applying 10-DomAnd and 10-DomAndRefresh to the random share. a 0 and a The 1st bit. For example... Figure 3 As shown, the newly generated share is designated as y 0 and y 1. These new shares are designated as and .value , , and It is determined using the following expression applied to each share (i.e., for simplicity, shares are not shown below, but the same expression is used for each share):

[0051] The constants calculated in step 7 y Obviously, the share will not change.

[0052] exist Figure 4 In steps 12 to 14, the following determinations are made.

[0053] for j = 2 to log 2 ( k ) – 1:

[0054] And for 1 and Between i :

[0055] Then, the method determines the borrow bit b 0 and b 1 as:

[0056] returning to Figure 2 , at steps 4 to 8, the method determines the calculated values w 1 and w 2 as:

[0057] Here, in the figure, indicates the repetition of the bit value b 1 to generate a k bit word. Similarly, in the figure, indicates the repetition of the bit value b 2 to generate a k bit word. The 10-SecB2Aq method determines the modulo-reduced arithmetic shares z 1 and z 2 as: .

[0058] The implementation of the method of the second embodiment may require log2( k )+2 cycles. For example, for a 32-bit implementation, they may require 7 clock cycles. This method can be applied to low-latency and / or low-resource applications. The method is pipelinable, and 48 bits of random numbers are required per cycle.

[0059] Third Embodiment (Second-Order B2A)

[0060] The third embodiment provides a second-order (2-PINI) secure Boolean-to-arithmetic (B2A) mask conversion algorithm. The third embodiment is applicable to integers represented in binary form .

[0061] Figure 5 illustrates a method called 20-SecB2A2k. Since the method is a second-order method, there are three shares instead of two shares. Therefore, the inputs of the method are the three Boolean shares of the sensitive variable x , r 1 and r 2 . The relationship between the Boolean shares is as follows:​

[0062] The method will generate arithmetic mask shares. z 1 , z 2 and z 3 Sensitive value x It is possible recover.

[0063] The method begins by sampling seven random integers s1, s2, γ1, γ2, α, β, δ; exist Figure 5 In steps 2 to 12, the first loop generates the first intermediate value as follows:

[0064] In the second loop shown in steps 14 to 23, the method generates the second intermediate value as:

[0065] In the third loop shown in steps 25 to 34, the method generates a third intermediate value as follows:

[0066] In the fourth loop shown in steps 36 to 42, the method generates a fourth intermediate value as:

[0067] In steps 44 to 46, the method divides the arithmetic mask shares. z 1 z 2 z 3 Generate as:

[0068] This method can be implemented within four clock cycles. The performance of this implementation will be discussed further below.

[0069] Fourth Implementation Plan (Second-Order B2AQ)

[0070] As explained in conjunction with the second implementation scheme, some encryption algorithms require a Boolean-to-arithmetic mask conversion in the field of integers modulo any number (i.e., not limited to 2). The arbitrary number will be... q ,in q <2 k ,in kFor parameters. In this type of implementation, the masked sensitivity value is reduced to the modulo before arithmetic sharing. q .

[0071] Figure 6a and Figure 6b The three functions used in the following method are shown. 20-DomAnd takes six shares a 0、 a 1. b 0、 b 1. c 0 and c 1 and three random bits r 0 , r 1 and r 2 And generate three intermediate values. y 0、 y 1 and y 2. The function uses the AND function to generate shares. 20-DomAnd is:

[0072] Compared to 20-DomAnd, 20-DomAndRefresh uses an additional 6 bits of random numbers, which allows all component functions to be refreshed (become more uniform again). 20-DomAndRefresh is:

[0073] Figure 6b As shown, 20-DomAndXorRefresh takes the third value. c The share, to use the function Generate shares. 20-DomAndXorRefresh is:

[0074] Figure 8 The steps of the method referred to in this paper as 20-SecB2Aq are illustrated. The input to the method is a sensitivity variable. x The three Boolean shares , r 1 and r 2 The Boolean share relationship is the same as in the third implementation scheme:

[0075] The method will generate arithmetic mask shares. z 1 , z 2 andz 3 Sensitive value x It is possible recover.

[0076] The method is applicable to modular systems. q ,in q <2 k and output value x In [0, q Between -1].

[0077] In step 1 of the 20-SecB2Aq method, the method of the first implementation, namely 20-SecB2A2K, is applied to the input shares. , r 1 and r 2 Arithmetic shares z 1. z 2 and z 3 is called t 1 = z 1 , t 2 = z 2 and t 3 = z 3 .

[0078] In step 2, determine the value u :

[0079] In step 3, the share , r 1 and r 2 Use the function 20-KSABorrowBitGen. Figure 7 The image shows 20-KSABorrowBitGen. The 20-KSABorrowBitGen function uses a Boolean-masked carry chain to safely compute subtraction operations. x - q A single underflow bit (borrow). 20-KSABorrowBitGen takes three input values. x 0、 x 1 and x 2. Therefore, in reference Figure 7 hour, = x 0、 r 1= x 1 and r 2 = x 2.

[0080] In steps 1 through 5, a refresh is performed, where the share is entered. x 0、 x 1 and x The even-numbered digits of 2 are randomized to generate random shares. a 0、 a 1 and a 2. Refresh is defined as:

[0081] in , and Each is a unit random number.

[0082] In step 7, constant y It was identified as:

[0083] exist Figure 7 Lieutenant General Constant y Shown as u The value referred to in this document is called... y In order to avoid being in Figure 8 The value calculated in step 2 u Confusing.

[0084] In steps 8 through 10, the functions 20-DomAnd and 20-DomAndRefresh mentioned above are used to generate random shares. a 0、 a 1 and a The method involves applying 20-DomAnd and 20-DomAndRefresh to the random share. a 0、 a 1 and a The 2nd bit. For example... Figure 6a and Figure 6b As shown, the share is designated as y 0、 y 1 and y 2. These new shares are designated as , , .value , , , , and It is determined using the following expression applied to each share (i.e., for simplicity, shares are not shown below, but the same expression is used for each share):

[0085] The constants calculated in step 7 y Obviously, the share will not change.

[0086] exist Figure 4 In steps 12 to 14, the following determinations are made.

[0087] for j = 2 to log 2 ( k ) – 1:

[0088] And for 1 and Between i :

[0089] The method then borrows b 0、 b 1 and b 2 is determined to be:

[0090] Return to Figure 8 In steps 4 to 7, the method calculates the value. w 1 and w 2 Determined as:

[0091] here Indicates the same bit b 1 of k Repeat this process to obtain... k Bit value. Similarly, and Indicate the same bit respectively b 2 and b 3 k Repeat this process to obtain... k Bit value. The 20-SecB2Aq method will reduce the arithmetic share by modulo reduction. z 1 、 z 2 and z 2 Determined as: .

[0092] The fourth implementation scheme takes at most 5 loops and log2( k It requires 1+2 loops to execute. The fourth implementation scheme may be suitable for low-latency and / or low-resource applications. The method is fully pipelining, so it can accept new values ​​in each loop.

[0093] Implementation and performance

[0094] The above methods can be implemented in software or hardware. In a hardware implementation, the processing unit includes a circuit system configured to perform each of the above operations. An example using a Kintex-7 processing unit will be discussed in more detail below. The methods can also be implemented in a Field-Programmable Gate Array (FPGA) or an Application-Specific Integrated Circuit (ASIC).

[0095] The above method can also be implemented using software. Figure 9 This is a schematic diagram of components of an example information processing device suitable for performing the methods described above. The diagram is illustrative, and as is well known in the art, different hardware configurations of the information processing device are possible. The information processing device includes I / O interfaces 90 such as USB ports, Thunderbolt ports, etc., and additional devices such as storage devices can be connected to said I / O interfaces. The information processing device includes a processing unit (such as a CPU, GPU, or TPU) in the form of a processor 91, a storage device in the form of memory 92, a network module 93, a display 94, and a user interface 95. The network module allows the information processing device to communicate via networks such as Wi-Fi networks, mobile telecommunications networks, local area networks, etc. The user interface may include components such as a keyboard, mouse, and camera. Components of the information processing device can communicate with each other via bus 86. Additional components may be provided but are not shown or described. Any step of the methods described above can be performed by computer-readable instructions of one or more programs stored in the storage device and executed by the processing unit on one or more information processing devices.

[0096] The following table shows the data related to the implementation method of the first implementation scheme.

[0097]

[0098] The above shows the characteristics of the implementation of the first scheme compared to the hardware implementation reported in previous work. Under the Design column, 1 refers to T. Schneider, A. Moradi, and T. Güneysu, 'Arithmetic Addition over Boolean Masks—Towards First and Second Order Resistors in Hardware'. In ACNS 2015, LNCS, Vol. 9092, pp. 559–578. Heidelberg Springer Verlag, 2015.

[0099] The number 2 refers to Florian Bache and Tim Güneysu, 'Boolean mask for arithmetic addition of arbitrary order in hardware'. Applied Science ,12(5),2022.

[0100] The number 3 refers to Tim Fritzmann, Michiel Van Beirendonck, Debapriya Basu Roy, Patrick Karl, Thomas Schamberger, Ingrid Verbauwhede, and Georg Sigl, 'masked accelerators and instruction set extensions for post-quantum cryptography'. International Association for Cryptologic Research (IACR) Cryptographic Hardware and Embedded Systems Bulletin System Journal , 2022(1):414–460, 2022.

[0101] The number 4 refers to Quinten Norga, Jan-Pieter D'Anvers, Suparna Kundu, and IngridVerbauwhede, 'mask transformation of d+1 shares in hardware and its application to lattice-based PQC'. IACR Cryptography Electronic Preprint file , 2024.

[0102] The first implementation scheme uses two different target configurations to achieve two configurations: one without using DSP. fast (F) Configuration, and forcing the compiler to use available DSP48 slices. Small (S) configuration.

[0103] In the second column, “Arch.” refers to the architecture within the relevant paper.

[0104] The third column, "Delay," is in cycles. The fourth column, "Rand.", indicates the number of bits required for the random number. The fifth column, "Freq.", is in MHz and indicates the clock speed. The sixth column shows the throughput (TP) in Mbits / s. The LUT column shows the number of lookup tables, the FF column shows the number of flip-flops, and the DSP column shows the number of digital signal processing units. Finally, "Device" indicates the type of device used.

[0105] The rapid configuration of Implementation 1 achieves a maximum frequency of 502 MHz and a throughput of 16 Gbits / s, thus being 3 times faster than the second fastest solution studied. The small configuration of the first implementation requires only 76 LUTs, 94 FFs, and 1 DSP, making it 2.5 times smaller than the smallest solution studied.

[0106] The following table shows the data related to the implementation method of the third implementation scheme. The meanings of each column are the same as before.

[0107]

[0108] Compared with related implementations, the third implementation scheme is applicable to any... k All values ​​have a fixed delay of 4. The third implementation scheme is implemented in four ways. (The following appears to be a separate, unrelated statement.) assembly line (Pipe) and Iteration (Iter) Version. The pipelined version can accept new input every clock cycle. The iterative version can accept new input every 4 clock cycles and reuses registers and adders to reduce resource requirements. In the iterative version, a total of 10 registers are required, which are reused and may be overwritten in each cycle.

[0109] As can be seen from the table, the third implementation scheme generally exhibits high throughput and low latency.

[0110] The following table illustrates the implementation performance of the second and fourth implementation schemes:

[0111] The numbers in parentheses related to the number of LUTs represent the LUT requirements when the device clock frequency is 200 MHz. The table above relates to the pipelined implementation of each of the second and fourth embodiments. The above comparisons do not include comparisons with relevant prior art implementations because suitable hardware performance data is unavailable.

[0112] The above implementation scheme can be used during the implementation of the following encryption methods: Generate hash value; Generate stream ciphers; Perform a masked lookup; Execute the cryptographic function; Generate a signature; Generate ciphertext; and Generate block ciphers.

[0113] In each case, during the execution of the method, a Boolean operation is performed on the masked share, and the masked share can be converted to an arithmetic share to allow the completion of the cryptographic method. One of the methods described above is used to convert a Boolean masked share to an arithmetic masked share. Therefore, the above implementations can be implemented using hashing methods, methods for generating stream ciphers, methods for applying a lookup to the mask, methods for executing cryptographic functions, signature methods, methods for generating ciphertext, and methods for generating block ciphers. Specific examples given by way of example only are SHA-2, Blake hash function, Skein hash function, XTEA block cipher, or ChaCha20 stream cipher. The method can be used for lattice-based cryptographic schemes. Devices for implementing these methods and computer programs for executing these methods are also considered.

[0114] It should be understood that any feature described with respect to any embodiment may be used alone or in combination with other described features, and may also be used in combination with one or more features of any other embodiment or any combination of any other embodiment. Furthermore, equivalents and modifications not described above may be employed without departing from the scope of the invention as defined by the appended claims.

Claims

1. A method performed by an information processing device for converting a Boolean share of a data value of length k x bits into an arithmetic mask share z 1 and z 2 wherein the Boolean share has been obtained by XORing with a value r such that and whereby the data value x can be recovered by performing an arithmetic operation on the arithmetic mask share z 1 and z 2 the method comprising:​​ Sample the random variable γ; The initial share a 1 , a 2 , a 3 and a 4 is determined to be: The intermediate arithmetic masked share is determined as follows where the bits are inverted: For bit values between 2 and k - 1 i : At variable d In 3 and i + 1 each value i At then for each value d - 2 and 1 m The value t is determined as follows: The arithmetic mask share is determined as follows: 。 2. The method of claim 1, wherein the data value x can be recovered by taking z 1 the difference between z 2 and 3. The method of any preceding claim, wherein the data value x reducing to modulo q , the method further comprising in the case that t 1 = z 1 and t 2 = z 2 ​ Sure: for = x 0 and r = x 1. Execution Refresh, where input share x 0 and x The even-numbered digits of 1 are randomized to generate random shares. a 0 and a 1; Determine constants y : Application function: By random shares a 0 and a The 1 bit is masked using 10-DomAnd and 10-DomAndRefresh, such that: Subsequently: for j = 2 to log 2 ( k ) – 1: For in 1 and Between i : borrowing b 0 and b 1 is determined to be: Calculated value w 1 and w 2 Determined as: Subtract arithmetic shares by modulo z 1 and z 2 Determined as: 。 4. The method of claim 3, wherein the refresh is performed as follows: Each of them r i It is a unit random number.

5. The method according to claim 3 or claim 4, wherein 10-DomAnd is: ; ; ; ; ;as well as 。 6. The method according to any one of claims 3 to 5, wherein 10-DomAndRefresh is: ; ; ; ; ;as well as 。 7. The method according to any one of claims 3 to 6, wherein 10-DomAndXorRefresh is: ; ; ; ; ;as well as 。 8. A method performed by an information processing device for processing data of length _____. k The data value of the unit digit x Boolean share to arithmetic mask share z 1 , z 2 and z 3 The Boolean share is , r 1 and r 2, wherein the Boolean share Already passed with two random values r 1 and r 2. Obtained by performing an XOR operation, such that And thus the data value x Able to obtain the arithmetic mask share z 1 , z 2 and z 3 The method of performing arithmetic operations to recover the data includes: Sample seven random integers s1, s2, γ1, γ2, α, β, δ; The first intermediate value is generated as follows: The second intermediate value is generated as follows: The third intermediate value is generated as follows: The fourth intermediate value is generated as follows: arithmetic mask share z 1 , z 2 , z 3 Generate as: 。 9. The method of claim 8, wherein it is possible to obtain from z 1 Subtract the arithmetic mask share from the middle z 2 and z 3 To restore the data value x .

10. The method according to claim 8 or claim 9, wherein the data value x Reduce to modulus q The method further includes t 1 = z 1 , t 2 = z 2 and t 3 = z 3 In the following circumstances: Sure: for = x 0、 r 1 = x 1. r 2 = x 2. Execution Refresh, where input share x 0、 x 1 and x The even-numbered digits of 2 are randomized to generate random shares. a 0、 a 1 and a 2; Determine constants y : Application function: By applying the functions 20-DomAnd and 20-DomAndRefresh to random shares a 0、 a 1 and a Masking the 2 bits so that: Subsequently: for j = 2 to log 2 ( k ) – 1: And for 1 and Between i : borrowing b 0、 b 1 and b 2 is determined to be: Sample a random value α; Calculated value w 1 , w 2 and w 3 Determined as: Subtract arithmetic shares by modulo z 1 , z 2 and z 3 Determined as: 。 11. The method of claim 10, wherein the refresh is performed as follows: ,in , and Each is a unit random number.

12. The method according to claim 10 or claim 11, wherein 20-DomAnd is: ; ; ; ; ; ; ; ; ; ; ;as well as 。 13. The method according to any one of claims 10 to 12, wherein 20-DomAndRefresh is: ; ; ; ; ; ; ; ; ; ; ;as well as 。 14. The method according to any one of claims 10 to 13, wherein 20-DomAndXorRefresh is: ; ; ; ; ; ; ; ; ; ; ;as well as 。 15. A method for at least one of the following operations: Generate hash value; Generate stream ciphers; Perform a masked lookup; Execute the cryptographic function; Generate a signature; Generate ciphertext; as well as Generate block ciphers; Includes the method according to any one of claims 1 to 11.

16. An information processing apparatus, the information processing apparatus comprising a processing unit and a storage device, wherein the storage device stores instructions configured to cause the information processing apparatus to perform the method according to any one of claims 1 to 15.

17. A program, when executed on an information processing device, causes the information processing device to perform the method according to any one of claims 1 to 15.

18. A non-transitory computer-readable storage medium storing instructions, which, when executed by an information processing apparatus, cause the information processing apparatus to perform the method according to any one of claims 1 to 15.