Modular exponentiation using randomized addition chains
10 claims: 7 independent, 3 dependent
- 1A device for generating code which implements modular exponentiation, the device comprising:a first part configured to generate a randomized addition chain of addition chain elements a i , a second part comprising: a memory used to store a lookup table;and a processor in communication with the memory, the processor configured to: receive information for the generated randomized addition chain;output code for implementing the modular exponentiation based upon the generated randomized chain, which loads elements from the lookup table including intermediate results which utilize the information for a generated randomized addition chain;and output code for implementing the modular exponentiation which uses the loaded elements to compute the next element, wherein the randomized addition chain is generated by: initializing the first addition chain element a 0 = 1 and the counter i = 1, setting a boolean value m to zero to mark that there is no overflow, picking a uniform random positive integer r 1 from the range [0, b 1 - 1];where exponent d and the integer parameters (p 1 , b 1 , b 2 ) are input, such that p 1 ≤ b 1 and b 2 is larger than an expected length of the addition chain, and may be used to construct the random addition chain, assigning m = 1, if r 1 ≤ p 1 and 2 · a i-1 > d, assigning a i = a i-1 + a i-1 if r 1 ≤ p 1 and 2 · a i-1 ≤ d, and assigning a i = a i-1 + a j , where j is randomly chosen with 0 ≦ j p 1 or m = 1.
- 3The device of any preceding claim, wherein the processor is further configured to:output code which loads the elements c i-1 = c a i -1 mod N and c j = c a j mod N from the lookup table, wherein the output code computes the modular exponentiation according to c d mod N where elements a n of the randomized addition chain are input into the modular exponentiation, the value c is received as input, the value d is fixed and secret, the modulus N is fixed and public.
- 4The device of any preceding claim, wherein the processor is further configured to:output code to compute the next element such that: c i ≡ c i − 1 ⋅ c j ≡ c ai − 1 ⋅ c aj ≡ c ai-1+aj mod N , wherein the output source code computes the modular exponentiation according to c d mod N where elements a n of the randomized addition chain are input into the modular exponentiation, the value c is received as input, the value d is fixed and secret, the modulus N is fixed and public.
- 5The device of any preceding claim, wherein the processor is further configured to:output code which stores c i in the look-up table if this result c i is needed in subsequent steps besides the next step (iteration i + 1).
- 6A method for generating code which implements modular exponentiation, the method comprising:receiving information for a generated randomized addition chain of addition chain elements a i , outputting code for implementing the modular exponentiation based upon the generated randomized chain, which loads elements from the lookup table including intermediate results which utilize the information for a generated randomized addition chain;and outputting code for implementing the modular exponentiation which uses the loaded elements to compute the next element, wherein the randomized addition chain is generated by: initializing the first addition chain element a 0 = 1 and the counter i = 1, setting a boolean value m to zero to mark that there is no overflow, picking a uniform random positive integer r 1 from the range [0, b 1 - 1];where exponent d and the integer parameters (p 1 , b 1 , b 2 ) are input, such that p 1 ≤ b 1 and b 2 is larger than an expected length of the addition chain, and may be used to construct the random addition chain, assigning m = 1, if r 1 ≤ p 1 and 2 · a i-1 > d, assigning a i - a i-1 + a i-1 if r 1 ≤ p 1 and 2 · a i-1 ≤ d, and assigning a i = a i-1 + a j where j is randomly chosen with 0 ≤ j p 1 or m = 1.
- 9The method of any one of claims 6 to 8, wherein the method further comprises:outputting code to compute the next element such that: c i ≡ c i − 1 ⋅ c j ≡ c ai − 1 ⋅ c aj ≡ c ai-1+aj mod N , wherein the output source code computes the modular exponentiation according to c d mod N where elements a n of the randomized addition chain are input into the modular exponentiation, the value c is received as input, the value d is fixed and secret, the modulus N is fixed and public.
Independent claims7
62 paragraphs in 5 sections, as filed
TECHNICAL FIELD
0001Various embodiments disclosed herein relate generally to cryptographic functions.
BACKGROUND
0002White-box cryptography is concerned with the design and analysis of software implementations of cryptographic algorithms engineered to execute on untrusted platforms. Particularly, this is the scenario where the user of a particular device can decrypt messages (with a secret key) which are encrypted with his public key but is unable to extract or derive sufficient information to recover this secret key. Furthermore, it is assumed that the user can be the attacker: for example, an attacker may have full access to the software implementation, can pause, alter and resume the execution of the software implementation at any time. The white-box model was first studied in the context of symmetric cryptographic algorithms such as Advanced Encryption Standard (AES) or Data Encryption Standard (DES).
0003Various asymmetric cryptographic schemes include modular exponentiation as the main computational operation. Modular exponentiation computes, for example, <maths id="math0001" num=""><math display="block"><mi mathvariant="normal">c</mi><mo>=</mo><msup><mi mathvariant="normal">b</mi><mi mathvariant="normal">d</mi></msup><mspace width="1ex" /><mi>mod N</mi></math><img file="EP3166013B1_D0001.tif" /></maths> where the base b, the exponent d, and the modulus N are positive integers such that 0 < b < N and 0 < d < φ(N). The function φ is the Euler totient function which can be computed as <maths id="math0002" num=""><math display="block"><mi>ϕ</mi><mfenced><mi>N</mi></mfenced><mo>=</mo><mi>N</mi><mstyle displaystyle="true"><munder><mo>∏</mo><mrow><mi>p</mi><mrow><mo>|</mo><mi>N</mi></mrow></mrow></munder><mfenced separators=""><mn>1</mn><mo>−</mo><mfrac><mn>1</mn><mi>p</mi></mfrac></mfenced></mstyle></math><img file="EP3166013B1_D0002.tif" /></maths>
0004The product is over the distinct prime numbers p > 1 dividing N. There are two special cases used in cryptography including: <ol id="ol0001" compact="compact" ol-style=""><li>1. When N is prime then φ (N) = N - 1.</li><li>2. When N = p·q, for two primes p and q such that 1 < p ≠ q > 1, then φ (N) = (p - 1)(q - 1).</li></ol>
SUMMARY
0005A brief summary of various embodiments is presented below. Some simplifications and omissions may be made in the following summary, which is intended to highlight and introduce some aspects of the various embodiments, but not to limit the scope of the invention. Detailed descriptions of a preferred embodiment adequate to allow those of ordinary skill in the art to make and use the inventive concepts will follow in later sections.
0006Various embodiments described herein relate to a device for generating code which implements modular exponentiation, the device including: a memory used to store a lookup table; and a processor in communication with the memory, the processor configured to: receive information for a generated randomized addition chain; output code for implementing the modular exponentiation based upon the generated randomized chain, which loads elements from the lookup table including intermediate results which utilize the information for a generated randomized addition chain; and output code for implementing the modular exponentiation which uses the loaded elements to compute the next element.
0007Various embodiments described herein relate to a method for generating code which implements modular exponentiation, the method including: receiving information for a generated randomized addition chain; outputting code for implementing the modular exponentiation based upon the generated randomized chain, which loads elements from the lookup table including intermediate results which utilize the information for a generated randomized addition chain; and outputting code for implementing the modular exponentiation which uses the loaded elements to compute the next element.
0008Further embodiments are defined in the dependent claims. It is noted that the embodiments have been described with reference to different subject-matters. In particular, some embodiments may have been described with reference to method-type claims whereas other embodiments may have been described with reference to apparatus-type claims. However, a person skilled in the art will gather from the above that, unless otherwise indicated, in addition to any combination of features belonging to one type of subject-matter also any combination of features relating to different subject-matters, in particular a combination of features of the method-type claims and features of the apparatus-type claims, is considered to be disclosed with this document.
BRIEF DESCRIPTION OF THE DRAWINGS
0009In order to better understand various embodiments, reference is made to the accompanying drawings, wherein: <ul id="ul0001" list-style="none" compact="compact"><li><figref idref="f0001">FIG. 1</figref> illustrates an example of a hardware system 100 for implementing the asymmetric cryptographic schemes or the lookup table generation schemes;</li><li><figref idref="f0002">FIG. 2</figref> illustrates an example of a system for providing a user device secure content and a software application that processes the secure content;</li><li><figref idref="f0003">FIG. 3</figref> illustrates an example of a method for generating a random addition chain; and</li><li><figref idref="f0004">FIG. 4</figref> illustrates an example of a method for generating source code.</li></ul>
0010To facilitate understanding, identical reference numerals have been used to designate elements having substantially the same or similar structure or substantially the same or similar function.
DETAILED DESCRIPTION
0011The description and drawings presented herein illustrate various principles. It will be appreciated that those skilled in the art will be able to devise various arrangements that, although not explicitly described or shown herein, embody these principles and are included within the scope of this disclosure. As used herein, the term, "or" refers to a non-exclusive or (<i>i.e.,</i> and/or), unless otherwise indicated (<i>e.g.</i>, "or else" or "or in the alternative"). Additionally, the various embodiments described herein are not necessarily mutually exclusive and may be combined to produce additional embodiments that incorporate the principles described herein.
0012One method of computing modular exponentiation is based on addition chains. A finite sequence of positive integers a<sub>0</sub> = 1, a<sub>1</sub>,..., a<sub>r</sub> = s, is called an addition chain of length r which computes s if every element a<sub>i</sub> can be written as a sum a<sub>j</sub> + a<sub>k</sub> of preceding elements.
0013One method to compute modular exponentiation using addition chains includes the square- and-multiply algorithm. This approach is also known as the double-and-add algorithm (when the group is written additively). The idea is based on the fact that <maths id="math0003" num=""><math display="block"><msup><mi mathvariant="normal">x</mi><mi mathvariant="normal">n</mi></msup><mo>=</mo><mrow><mo>{</mo><mtable columnalign="left"><mtr><mtd><mrow><mi>x</mi><msup><mfenced><msup><mi>x</mi><mn>2</mn></msup></mfenced><mrow><mfrac><mrow><mi>n</mi><mo>−</mo><mn>1</mn></mrow><mn>2</mn></mfrac><mspace width="1ex" /></mrow></msup><mi mathvariant="italic">if</mi><mspace width="1ex" /><mi>n</mi><mspace width="1ex" /><mi mathvariant="italic">is</mi><mspace width="1ex" /><mi mathvariant="italic">odd</mi></mrow></mtd></mtr><mtr><mtd><mrow><msup><mfenced><msup><mi>x</mi><mn>2</mn></msup></mfenced><mfrac><mi>n</mi><mn>2</mn></mfrac></msup><mspace width="1ex" /><mi mathvariant="italic">if</mi><mspace width="1ex" /><mi>n</mi><mspace width="1ex" /><mi mathvariant="italic">is</mi><mspace width="1ex" /><mi mathvariant="italic">even</mi></mrow></mtd></mtr></mtable></mrow></math><img file="EP3166013B1_D0003.tif" /></maths>
0014Consider an example exponent d = 9997. In binary this number is 9997<sub>10</sub> = 10011100001101<sub>2</sub>. The following addition chain based on this binary representation <maths id="math0004" num=""><math display="block"><msup><mi mathvariant="normal">D</mi><mn>3</mn></msup><mo>→</mo><mi mathvariant="normal">A</mi><mo>→</mo><mi mathvariant="normal">D</mi><mo>→</mo><mi mathvariant="normal">A</mi><mo>→</mo><mi mathvariant="normal">D</mi><mo>→</mo><mi mathvariant="normal">A</mi><mo>→</mo><msup><mi mathvariant="normal">D</mi><mn>5</mn></msup><mo>→</mo><mi mathvariant="normal">A</mi><mo>→</mo><mi mathvariant="normal">D</mi><mo>→</mo><mi mathvariant="normal">A</mi><mo>→</mo><msup><mi mathvariant="normal">D</mi><mn>2</mn></msup><mo>→</mo><mi mathvariant="normal">A</mi></math><img file="EP3166013B1_D0004.tif" /></maths><maths id="math0005" num=""><math display="block"><mfenced separators=""><mfenced separators=""><mfenced separators=""><mfenced separators=""><mfenced separators=""><msup><mn>2</mn><mn>3</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup></mfenced><mo>⋅</mo><msup><mn>2</mn><mn>1</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup></mfenced><mo>⋅</mo><msup><mn>2</mn><mn>1</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup></mfenced><mo>⋅</mo><msup><mn>2</mn><mn>5</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup></mfenced><mo>⋅</mo><msup><mn>2</mn><mn>1</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup></mfenced><mo>⋅</mo><msup><mn>2</mn><mn>2</mn></msup><mo>+</mo><msup><mn>2</mn><mn>0</mn></msup><mo>=</mo><mn>9997</mn></math><img file="EP3166013B1_D0005.tif" /></maths>
0015computes d (where D stands for double and A for addition). When one translates this example to the modular exponentiation setting this is just what the multiply-and-add algorithm would compute. Given an input base b, the modular exponentiation c = b<sup>d</sup> mod N can be computed by replacing the doublings by squarings and the additions by multiplication <maths id="math0006" num=""><math display="block"><msup><mi mathvariant="normal">S</mi><mn>3</mn></msup><mo>→</mo><mi mathvariant="normal">M</mi><mo>→</mo><mi mathvariant="normal">S</mi><mo>→</mo><mi mathvariant="normal">M</mi><mo>→</mo><mi mathvariant="normal">S</mi><mo>→</mo><mi mathvariant="normal">M</mi><mo>→</mo><msup><mi mathvariant="normal">S</mi><mn>5</mn></msup><mo>→</mo><mi mathvariant="normal">M</mi><mo>→</mo><mi mathvariant="normal">S</mi><mo>→</mo><mi mathvariant="normal">M</mi><mo>→</mo><msup><mi mathvariant="normal">S</mi><mn>2</mn></msup><mo>→</mo><mi mathvariant="normal">M</mi></math><img file="EP3166013B1_D0006.tif" /></maths><maths id="math0007" num=""><math display="block"><mfenced separators=""><msup><mfenced separators=""><msup><mfenced separators=""><msup><mfenced separators=""><msup><mfenced separators=""><msup><mfenced separators=""><msup><mi mathvariant="normal">b</mi><mo>∧</mo></msup><msup><mn>2</mn><mn>3</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mn>2</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mn>2</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mo>∧</mo></msup><msup><mn>2</mn><mn>5</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mn>2</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mo>∧</mo></msup><msup><mn>2</mn><mn>2</mn></msup><mo>⋅</mo><mi mathvariant="normal">b</mi></mfenced><mo>≡</mo><msup><mi mathvariant="normal">b</mi><mn>9997</mn></msup><mspace width="1ex" /><mi>mod N</mi></math><img file="EP3166013B1_D0007.tif" /></maths>
0016Embodiments described allow one to compute a modular exponentiation where the exponent is not directly revealed. This may be an important property when computing asymmetric cryptographic primitives in the white-box attack model.
0017Embodiments include a tool which on input of the secret exponent d, generates source code which implements a randomized addition chain to compute the modular exponentiation c<sup>d</sup> mod N. Techniques on how to construct such random chains efficiently and how to automatically generate them are included. The exponent d itself is not embedded directly in this source code. Even when using the same exponent multiple times, new implementations will be generated (with possibly different countermeasures to protect the code itself). These implementations provide a first step in making software implementations secure in the white-box attack model which need to compute modular exponentiations.
0018<figref idref="f0001">FIG. 1</figref> illustrates an example of a hardware system 100 for implementing the asymmetric cryptographic schemes or the lookup table generation schemes described herein. The hardware system 100 may correspond to virtually any device that may participate in a digital signature scheme such as, for example, a personal computer, laptop, tablet, mobile communications device, server, blade, smart card, near field communication (NFC) device, or other device. For example, the hardware system may correspond to a set-top box for receiving and rendering digital content or a server for providing digital content. Various applications of the method described herein will be apparent such as, for example, digital rights management (DRM), banking applications, and generally protecting cryptographic keys in devices such as mobile phones and television set-top boxes.
0019As shown, the device 100 includes a processor 120, memory 130, user interface 140, network interface 150, and storage 160 interconnected via one or more system buses 110. It will be understood that <figref idref="f0001">FIG. 1</figref> constitutes, in some respects, an abstraction and that the actual organization of the components of the device 100 may be more complex than illustrated.
0020The processor 120 may be any hardware device capable of executing instructions stored in the memory 130 or the storage 150. As such, the processor may include a microprocessor, field programmable gate array (FPGA), application-specific integrated circuit (ASIC), or other similar devices.
0021The memory 130 may include various memories such as, for example L1, L2, or L3 cache or system memory. As such, the memory 130 may include static random access memory (SRAM), dynamic RAM (DRAM), flash memory, read only memory (ROM), or other similar memory devices.
0022The user interface 140 may include one or more devices for enabling communication with a user such as an administrator. For example, the user interface 140 may include a display, a mouse, and a keyboard for receiving user commands. In some embodiments, the user interface 140 may include a command line interface or graphical user interface that may be presented to a remote terminal via the network interface 150.
0023The network interface 150 may include one or more devices for enabling communication with other hardware devices. For example, the network interface 150 may include a network interface card (NIC) configured to communicate according to the Ethernet protocol. Additionally, the network interface 150 may implement a TCP/IP stack for communication according to the TCP/IP protocols. Various alternative or additional hardware or configurations for the network interface 150 will be apparent.
0024The storage 160 may include one or more machine-readable storage media such as read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash-memory devices, or similar storage media. In various embodiments, the storage 160 may store instructions for execution by the processor 120 or data upon with the processor 120 may operate.
0025For example, where the hardware device 100 implements a device using white-box asymmetric cryptography based on modular exponentiation, the storage 160 may include random addition chain instructions 161. Similarly hardware device 100 may implement source code generation instructions 162.
0026It will be apparent that various information described as stored in the storage 160 may be additionally or alternatively stored in the memory 130. In this respect, the memory 130 may also be considered to constitute a "storage device" and the storage 160 may be considered a "memory." Various other arrangements will be apparent. Further, the memory 130 and storage 160 may both be considered to be "non-transitory machine-readable media." As used herein, the term "non-transitory" will be understood to exclude transitory signals but to include all forms of storage, including both volatile and non-volatile memories.
0027While the hardware device 100 is shown as including one of each described component, the various components may be duplicated in various embodiments. For example, the processor 120 may include multiple microprocessors that are configured to independently execute the methods described herein or are configured to perform steps or subroutines of the methods described herein such that the multiple processors cooperate to achieve the functionality described herein. In other embodiments, such as those embodiments wherein the device 100 is implemented in a cloud computing environment, the various components may be physically located in diverse machines. For example, the processor 120 may include a first microprocessor in a first data center server and a second microprocessor in a second data center server. Various additional arrangements will be apparent.
0028<figref idref="f0002">FIG. 2</figref> illustrates an example of a system for providing a user device secure content and a software application that processes the secure content. The system includes a content server 200, application server 220, user devices 250, 252, and a data network 240. The user devices 250, 252 may request access to secure content provided by the content server 200 via data network 240. The data network can be any data network providing connectivity between the user devices 250, 252 and the content server 200 and application server 220. The user devices 250, 252 may be one of a plurality of devices, for example, set top boxes, media streamers, digital video recorders, tablets, mobile phones, laptop computers, portable media devices, smart watches, desktop computers, media servers, <i>etc.</i>
0029The user request for access may first require the downloading of a software application that may be used to process the secure content provided by the content server 200. The software application may be downloaded from the application server 220. The software application may be obscured using the techniques described above as well as operate as described above. Once the user devices 250, 252 install the software application, the user device may then download secure content from the content server 200 and access the secure content using the downloaded software application. For example, the downloaded software application may perform decryption of encrypted content received from the content server. In other embodiments, the software application may perform other secure operations, such as for example, encryption, digital signature generation and verification, <i>etc.</i>
0030The content server 200 may control the access to the secure content provided to the user devices 250, 252. As a result when the content server 200 receives a request for secure content, the content server 200 may transmit the secure content to the requesting user device. Likewise, the application server 220 may control access to the software application provided to the user devices 250, 252. As a result when the content server 220 receives a request for the software application, the application server 220 may transmit the software application to the requesting user device. A user device requesting the software application or secure content may also be authenticated by the respective servers, before providing the software application or secure content to the user device.
0031The content server 200 may include a processor 202, memory 204, user interface 206, network interface 210, and content storage 212 interconnected via one or more system buses 208. It will be understood that <figref idref="f0002">FIG. 2</figref> constitutes, in some respects, an abstraction and that the actual organization of the components of the device 200 may be more complex than illustrated.
0032The processor 202 may be any hardware device capable of executing instructions stored in memory 204 or storage 212. As such, the processor may include a microprocessor, field programmable gate array (FPGA), application-specific integrated circuit (ASIC), or other similar devices.
0033The memory 204 may include various memories such as, for example L1, L2, or L3 cache or system memory. As such, the memory 204 may include static random access memory (SRAM), dynamic RAM (DRAM), flash memory, read only memory (ROM), or other similar memory devices.
0034The user interface 206 may include one or more devices for enabling communication with a user such as an administrator. For example, the user interface 206 may include a display, a mouse, and a keyboard for receiving user commands.
0035The network interface 210 may include one or more devices for enabling communication with other hardware devices. For example, the network interface 210 may include a network interface card (NIC) configured to communicate according to the Ethernet protocol. Additionally, the network interface 210 may implement a TCP/IP stack for communication according to the TCP/IP protocols. Various alternative or additional hardware or configurations for the network interface 210 will be apparent.
0036The content storage 212 may include one or more machine-readable content storage media such as read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash-memory devices, or similar storage media. In various embodiments, the content storage 212 may store content to be provided to users.
0037The application server 220 includes elements like those in the content server 200 and the description of the like elements in the content server 200 apply to the application server 220. Also, the content storage 212 is replaced by application storage 232. Further, it is noted that the content server and applications server may be implemented on a single server. Also, such servers may be implemented on distributed computer systems as well as on cloud computer systems.
0038As will be understood, the modular exponentiation, encryption, or digital signature methods described herein may be deployed and utilized within the system of <figref idref="f0002">FIG. 2</figref> or similar systems in various manners. For example, the user devices 250, 252 may be provided by a manufacturer or other seller preconfigured to transmit signed messages to the content server 200 to request the provision of content. Alternatively, the user devices 250, 252 may not be fully preconfigured for such operation; instead, the application server 220 may communicate with the user devices 250, 252 to effect such configuration. For example, the application server may transmit code instructions for implementing the methods described herein or data defining one or more lookup tables.
0039<figref idref="f0003">FIG. 3</figref> illustrates an example of a method for generating a random addition chain 300.
0040One embodiment may include a subset of all addition chains, the so-called star addition chain, but the presented techniques may apply in more generality to all addition chains. A Brauer chain or star addition chain is an addition chain in which one of the summands is always the previous element of the chain: <maths id="math0008" num=""><math display="block"><mo>∀</mo><mi mathvariant="normal">k</mi><mo>></mo><mn>0</mn><mo>:</mo><msub><mi mathvariant="normal">a</mi><mi mathvariant="normal">k</mi></msub><mo>=</mo><msub><mi mathvariant="normal">a</mi><mrow><mi mathvariant="normal">k</mi><mo>−</mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi mathvariant="normal">a</mi><mi mathvariant="normal">j</mi></msub><mspace width="1ex" /></math><img file="EP3166013B1_D0008.tif" /></maths> for some j < k.
0041The exponent d and the integer parameters (p<sub>1</sub>, b<sub>1</sub>, b<sub>2</sub>), such that p<sub>1</sub> ≤ b<sub>1</sub> and b<sub>2</sub> is larger than the expected length of the addition chain, may be used to construct the random addition chain using the following steps. The method for generating a random addition chain 300 may begin in step 305.
0042Method for generating a random addition chain 300 may proceed to step 310. The method may initially set the first addition chain element a<sub>0</sub> = 1 and the counter i = 1 in step 310.
0043Method for generating a random addition chain 300 may proceed to step 315. The method may set the boolean value m to zero to mark that there is no overflow in step 315.
0044Method for generating a random addition chain 300 may proceed to step 320 where the method may pick a uniform random positive integer r<sub>1</sub> from the range [0, b<sub>1</sub> - 1].
0045Method for generating a random addition chain 300 may proceed to step 325 where the method may assign m = 1, If r<sub>1</sub> ≤ p<sub>1</sub> and 2 · a<sub>i-1</sub> > d.
0046Method for generating a random addition chain 300 may proceed to step 330 where the method may assign a<sub>i</sub> = a<sub>i-1</sub> + a<sub>i-1</sub> if r<sub>1</sub> ≤ p<sub>1</sub> and 2 · a<sub>i-1</sub> ≤ d.
0047The method for generating a random addition chain 300 may proceed to step 335. If r<sub>1</sub> > p<sub>1</sub> or m = 1, then a random previous element from the addition chain is added such that the result is smaller than d. This may be done as follows, first one may pick a uniform random positive integer r<sub>2</sub> from the range [0, b<sub>2</sub>-1]. Check if a<sub>i-1</sub> +a<sub>j</sub> ≤ d where the index j = r<sub>2</sub> mod i. If so, one may set a<sub>i</sub> = a<sub>i-1</sub> + a<sub>j</sub> and continue. If not, and hence a<sub>i-1</sub> + a<sub>j</sub> > d, one may pick another previous element from the addition chain. This may be done by picking another random element or decreasing the index j by one until one may have found an addition chain element a<sub>j</sub> such that a<sub>i</sub> = a<sub>i-1</sub> + a<sub>j</sub> ≤ d.
0048The method for generating a random addition chain 300 may proceed to step 340. The method may increase the length of the addition chain by one (i = i + 1) and the method may proceed back to step 310 when a<sub>i-1</sub> ≠ d. Otherwise, the method may proceed to step 345 where it may stop.
0049A star addition chain has been obtained, as a<sub>0</sub> = 1, a<sub>1</sub>,..., a<sub>i-2</sub>, a<sub>i-1</sub> = d of length r = i-1 which computes the exponent d. This chain may be computed using i-1 additions, and the required storage depends on the selection of the parameters (p<sub>1</sub>, b<sub>1</sub>, b<sub>2</sub>) and the uniform random values used in the steps described above. For instance, computing doubling steps a<sub>i</sub> = a<sub>i-1</sub> + a<sub>i-1</sub> do not require additional storage while when a previous element a<sub>j</sub> with j < i - 1 is to be used in the addition this value needs to be stored for re-usage later.
0050<figref idref="f0004">FIG. 4</figref> illustrates an example of a method for generating source code 400.
0051When the random star addition chain has been generated one can output the source code which computes the desired modular multiplication c<sup>d</sup> mod N. The implementation to be generated may assume it receives some value c as input (whereas the value d is fixed and secret and the modulus N is fixed and public). This means that the code generator outputs code which sets the first value in the modular exponentiation c<sub>0</sub> to the input value raised to the first element in the addition chain (a<sub>0</sub> = 1): c<sub>0</sub> = c = c<sup>a0</sup> mod N . The implementation uses temporary memory, which may be a look-up table, to store the intermediate results which are re-used when computing the modular exponentiation. The size of the look-up table depends on the properties of the generated random star addition chain. For each step in the addition chain one may do the following (starting at i = 1 until we reach the final element r)
0052The method for generating source code 400 may begin in step 405 and proceed to step 410. In step 420 the method may retrieve the information from the method for generating a random addition chain 300, which allows one to deduce that a<sub>i</sub> = a<sub>i-1</sub> + a<sub>j</sub>, where 0 ≤ j < i.
0053The method for generating source code 400 may then proceed to step 415. In step 420 the method may output code which loads the elements C<sub>i-1</sub> = <i>C</i><sup><i>a</i><sub2><i>i</i>-1</sub2></sup>mod N and C<sub>i</sub> = <i>C<sup>a<sub2>j</sub2></sup></i> mod N from the look-up table kept by the implementation.
0054The method for generating source code 400 may then proceed to step 420. In step 420 the method may output code which uses these elements to compute the next element: <maths id="math0009" num=""><math display="block"><msub><mi mathvariant="normal">C</mi><mi mathvariant="normal">i</mi></msub><mo>≡</mo><msub><mi mathvariant="normal">C</mi><mrow><mi mathvariant="normal">i</mi><mo>−</mo><mn>1</mn></mrow></msub><mo>⋅</mo><msub><mi mathvariant="normal">C</mi><mi mathvariant="normal">j</mi></msub><mo>≡</mo><msup><mi>C</mi><msub><mi>a</mi><mrow><mi>i</mi><mo>−</mo><mn>1</mn></mrow></msub></msup><mo>⋅</mo><msup><mi>C</mi><msub><mi>a</mi><mi>j</mi></msub></msup><mo>≡</mo><msup><mi>C</mi><mrow><msub><mi>a</mi><mrow><mi>i</mi><mo>−</mo><mn>1</mn></mrow></msub><mo>+</mo><msub><mi>a</mi><mi>j</mi></msub></mrow></msup><mspace width="1ex" /><mi>mod N</mi><mo>.</mo></math><img file="EP3166013B1_D0009.tif" /></maths>
0055Method for generating source code 400 may then proceed to step 425. In step 425, when this result c<sub>i</sub> is needed in subsequent steps besides the next step (iteration i + 1) then the method may output code which stores c<sub>i</sub> in the look-up table.
0056In practice, step 420 does not need to be explicitly load the element c<sub>i-1</sub> = c<sup>ai-1</sup> mod N since it was computed in the previous step and therefore is most likely still in local registers / variables.
0057Various countermeasures to attackers may be added. For instance, in order to make it more difficult for a white-box attacker to follow exactly what the implementation is doing, the loading of the elements from the look-up table in step 420 may be computed differently. Instead of hard-coding the two indices i - 1 and j one may use two functions f<sub>i</sub><sup>1</sup> and f<sub>i</sub><sup>2</sup> specific to iteration i, which use two hard-coded values α<sub>i</sub> and β<sub>i</sub>. The functionality of function f<sub>i</sub><sup>1</sup> and f<sub>i</sub><sup>2</sup> should be such that it is harder to distinguish what it is exactly computing and what is other (functional) code. These functions may be chosen such that f<sub>i</sub><sup>1</sup>(α<sub>i</sub>) = i - 1 and f<sub>i</sub><sup>2</sup>(β<sub>i</sub>) = j (and return pseudo-random values for all other inputs), in the case that the second operand is not needed (i.e. when computing the modular squaring) this could, for instance, be indicated by a negative outcome of f<sub>i</sub><sup>2</sup>. Similarly, the location where to store the result (if needed) in step 425 can be the result from (another) function f<sub>i</sub><sup>3</sup>(γ<sub>i</sub>).
0058Embodiments may allow one to instantiate white-box asymmetric cryptography based on modular exponentiation. There includes widespread application ranging from digital right management (DRM), through banking applications, as well as protecting cryptographic keys in mobile phones, television set top boxes etcetera.
0059The tool which generates this source code consists of two parts. The first part, which constructs a random addition chain for the exponent d and the second part which, given this addition chain, generates the source code (with potentially countermeasures against attackers) built-in. The third party, who is allowed to know the secret exponent d, generates source code which implements exponentiation modulo N using a random addition chain. The parameters of this generator may be adjusted and present a trade-off between speed, code size and the number of random implementations which can be generated.
0060It should be apparent from the foregoing description that various embodiments of the invention may be implemented in hardware. Furthermore, various embodiments may be implemented as instructions stored on a non-transitory machine-readable storage medium, such as a volatile or non-volatile memory, which may be read and executed by at least one processor to perform the operations described in detail herein. A machine-readable storage medium may include any mechanism for storing information in a form readable by a machine, such as a personal or laptop computer, a server, or other computing device. Thus, a non-transitory machine-readable storage medium excludes transitory signals but may include both volatile and non-volatile memories, including but not limited to read-only memory (ROM), random-access memory (RAM), magnetic disk storage media, optical storage media, flash-memory devices, and similar storage media.
0061It should be appreciated by those skilled in the art that any block diagrams herein represent conceptual views of illustrative circuitry embodying the principles of the invention. Similarly, it will be appreciated that any flow charts, flow diagrams, state transition diagrams, pseudo code, and the like represent various processes which may be substantially represented in machine readable media and so executed by a computer or processor, whether or not such computer or processor is explicitly shown.
0062Although the various embodiments have been described in detail with particular reference to certain aspects thereof, it should be understood that the invention is capable of other embodiments and its details are capable of modifications in various obvious respects. As is readily apparent to those skilled in the art, variations and modifications can be effected while remaining within the scope of the invention. Accordingly, the foregoing disclosure, description, and figures are for illustrative purposes only and do not in any way limit the invention, which is defined only by the claims.
Contents5
22 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8 Sheet 9 Sheet 10 Sheet 11 Sheet 12 Sheet 13 Sheet 14 Sheet 15 Sheet 16 Sheet 17 Sheet 18 Sheet 19 Sheet 20 Sheet 21 Sheet 22
Every citation, both ways
| Document | Relation | Office |
|---|---|---|
| WO03038598A1 | Cites | World Intellectual Property Organization (WIPO) |
| US2014244703A1 | Cites | United States of America |
| US7657029B2 | Cites | United States of America |
| RIVAIN MATTHIEU ED - WALTER DIDIMO ET AL: "Securing RSA against Fault Analysis by Double Addition Chain Exponentiation", 20 April 2009 (2009-04-20), NETWORK AND PARALLEL COMPUTING; [LECTURE NOTES IN COMPUTER SCIENCE; LECT.NOTES COMPUTER], SPRINGER INTERNATIONAL PUBLISHING, CHAM, PAGE(S) 459 - 480, XP047397736, ISSN: 0302-9743 ISBN: 978-3-642-37050-2 * sections 3.2, 3.3, 5.2 * | Non-patent | – |
| JÃ RG SAUERBREY ET AL: "Resource Requirements for the Application of Addition Chains in Modulo Exponentiation", 24 May 1992 (1992-05-24), ADVANCES IN CRYPTOLOGY EUROCRYPT 92, SPRINGER BERLIN HEIDELBERG, BERLIN, HEIDELBERG, PAGE(S) 174 - 182, XP047006160, ISBN: 978-3-540-56413-3 * sections 1, 2 * | Non-patent | – |
| Donald E Knuth: "The Arto of Computer Programming, Volume 2, section 4.6.3, Evaluation of Powers" In: "The Arto of Computer Programming, Volume 2, section 4.6.3, Evaluation of Powers", 1 January 1998 (1998-01-01), Addison Wesley, XP055350632, pages 441-466, * page 444 - page 447 * | Non-patent | – |
6 members in 3 offices; this record represents the family
Members6
| Document | Office | Kind | |
|---|---|---|---|
| US2017126407A1 | United States of America | A1 | |
| EP3166013A1 | European Patent Office (EPO) | A1 | |
| CN107040370A | China | A | |
| US9942038B2 | United States of America | B2 | |
| EP3166013B1This record | European Patent Office (EPO) | B1 | |
| CN107040370B | China | B |
71 legal events, as 9 offices reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | Office | |
|---|---|---|---|
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Application deemed withdrawn, or ip right lapsed, due to non-payment of renewal feeWithdrawnR119 | R119 | DE | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Annual fee paid to national office [announced via postgrant information from national office to epo]GrantedPGFP | PGFP | EP | |
| Opt-out of the competence of the unified patent court (upc) registeredP01 | P01 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Gb: european patent ceased through non-payment of renewal feeCeasedGBPC | GBPC | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed because of non-payment of the annual feeLapsedMM | MM | BE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Patent ceasedCeasedPL | PL | CH | |
| No opposition filedOpposition26N | 26N | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filed within time limitOppositionORIGINAL CODE: 0009261PLBE | PLBE | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: NO OPPOSITION FILED WITHIN TIME LIMITSTAA | STAA | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| No opposition filed against granted patent, or epo opposition proceedings concluded without decisionGrantedR097 | R097 | DE | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Deletion acc. to par. 5 (withdrawal of the translation of the ep patent)MK05 | MK05 | AT | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Lapsed in a contracting state [announced via postgrant information from national office to epo]LapsedPG25 | PG25 | EP | |
| Invalidated european patentMG4D | MG4D | LT | |
| Patent invalid in the netherlands as no translation has been filedMP | MP | NL | |
| Dpma publication of mentioned ep patent grantGrantedR096 | R096 | DE | |
| European patents granted designating irelandGrantedFG4D | FG4D | IE | |
| Reference to at number (ep patent validated in austria)REF | REF | AT | |
| European patent takes effect as a national patent in ch/liEP | EP | CH | |
| Designated contracting statesAK | AK | EP | |
| European patent grantedGrantedFG4D | FG4D | GB | |
| (expected) grantORIGINAL CODE: 0009210GRAA | GRAA | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: THE PATENT HAS BEEN GRANTEDSTAA | STAA | EP | |
| Grant fee paidORIGINAL CODE: EPIDOSNIGR3GRAS | GRAS | EP | |
| Intention to grant announcedINTG | INTG | EP | |
| Despatch of communication of intention to grant a patentORIGINAL CODE: EPIDOSNIGR1GRAP | GRAP | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: GRANT OF PATENT IS INTENDEDSTAA | STAA | EP | |
| Request for examination filed17P | 17P | EP | |
| Designated contracting states (corrected)RBV | RBV | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: REQUEST FOR EXAMINATION WAS MADESTAA | STAA | EP | |
| Designated contracting statesAK | AK | EP | |
| Request for extension of the european patentAX | AX | EP | |
| Public reference made under article 153(3) epc to a published international application that has entered the european phaseORIGINAL CODE: 0009012PUAI | PUAI | EP | |
| Information on the status of an ep patent application or granted ep patentGrantedSTATUS: THE APPLICATION HAS BEEN PUBLISHEDSTAA | STAA | EP |
Numbers
- Publication
- 3166013
- Publication, DOCDB
- 3166013
- Publication, EPODOC
- EP3166013
- Application
- 161954854
- Application, DOCDB
- 16195485
- Application, EPODOC
- EP20160195485
Titles3
- German
- MODULARE EXPONENTIATION MIT RANDOMISIERTEN ADDITIONSKETTEN
- English
- MODULAR EXPONENTIATION USING RANDOMIZED ADDITION CHAINS
- French
- EXPONENTIATION MODULAIRE À L'AIDE DE CHAÎNES D'ADDITION ALÉATOIRE
Classification
- CPC, 5
- H04L9/0869
- G06F7/723
- H04L9/3066
- G06F2207/7295
- H04L2209/34
- IPC, 1
- G06F7 72
Designated states38
- Contracting states, 38
- Albania
- Austria
- Belgium
- Bulgaria
- Switzerland
- Cyprus
- Czechia
- Germany
- Denmark
- Estonia
- Spain
- Finland
- France
- United Kingdom
- Greece
- Croatia
- Hungary
- Ireland
- Iceland
- Italy
- Liechtenstein
- Lithuania
- Luxembourg
- Latvia
and 14 moreShow fewer
- Monaco
- North Macedonia
- Malta
- Netherlands (Kingdom of the)
- Norway
- Poland
- Portugal
- Romania
- Serbia
- Sweden
- Slovenia
- Slovakia
- San Marino
- Türkiye
