Techniques for robust computation of elliptic curve digital signatures
By integrating the elliptic curve encryption engine in the computing device and utilizing hardware acceleration and protected mode, the performance and power consumption issues of ECC in low-power devices are solved, enabling fast and secure encryption operations, which is suitable for the Internet of Things and long-term deployment. cycle equipment.
Patent Information
- Application Number
- CN201810531790.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2017-06-29
- Filing Date
- 2018-05-29
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2038-05-29
AI Technical Summary
Existing public key encryption technologies, especially elliptic curve cryptography (ECC), have performance and power consumption issues in key exchange and digital signature operations, making it difficult to meet low power consumption and high security requirements, especially in IoT devices and In devices with long deployment cycles.
A computing device is designed that integrates an elliptic curve cryptography (ECC) engine, which implements fast and power-efficient cryptographic operations through hardware acceleration, including basic operations such as point multiplication, point addition/double, and prime field operations. Enter protected mode for increased security when executing encryption algorithms.
Significantly improves the performance and power consumption efficiency of elliptic curve encryption operations, is suitable for low-power devices, provides high security and long-term deployment capabilities, and is suitable for the Internet of Things and other low-power devices.
Smart Images

Figure CN109218023B_ABST
Abstract
Description
Background Art
[0001] As computing devices and electronic communications networks continue to proliferate in various forms, information security remains a significant concern. Cryptographic techniques are often used to ensure that electronic information is securely delivered to its intended recipient, and to determine whether a device and / or process or other device requesting access to information should be granted such access. Public key cryptography is a technique that typically uses two keys: a private key, which is kept secret; and a public key, which can be freely disclosed to define membership in a group of trusted computing devices. Although public and private keys are related, the private key cannot be predictably determined from the public key.
[0002] Elliptic curve cryptography (ECC) is a type of public key cryptography based on cryptographic operations using elliptic curves over finite fields. ECC operations can be used to perform traditional cryptographic operations including key exchange and digital signature operations. For example, common cryptographic algorithms using ECC operations include Elliptic Curve Diffie-Hellman (ECDH) for key exchange, Elliptic Curve Digital Signature Algorithm (ECDSA) for signing / verifying operations for digital signatures, Enhanced Privacy ID (EPID) for proof, and other cryptographic algorithms. BRIEF DESCRIPTION OF THE DRAWINGS
[0003] The concepts described in the present application are illustrated in the accompanying drawings by way of example and not by way of limitation. For simplicity and clarity of description, the elements illustrated in the drawings are not necessarily drawn to scale. Where deemed appropriate, reference numerals have been repeated in the drawings to indicate corresponding or similar elements.
[0004] Figure 1 is a simplified block diagram of at least one embodiment of a computing device for robustly computing elliptic curve digital signatures;
[0005] Figure 2 It can be done by Figure 1 A simplified block diagram of at least one embodiment of an environment established by a computing device;
[0006] Figure 3 yes Figure 1-2 A simplified block diagram of at least one embodiment of an elliptic curve cryptography (ECC) engine;
[0007] Figure 4 yes Figure 1-3 A simplified pinout diagram of at least one embodiment of an ECC engine;
[0008] Figure 5 It can be done by Figure 1-4 A simplified flowchart of at least one embodiment of a method for driving an ECC engine performed by a computing device of
[0009] Figure 6 It can be done by Figure 1-4 A simplified flowchart of at least one embodiment of a method for robustly computing an elliptic curve digital signature performed by a computing device of;
[0010] Figure 7-8 It can be done by Figure 1-4 A simplified flowchart of at least one embodiment of a method for performing an ECC operation performed by a computing device of
[0011] Figure 9-10 It can be done by Figure 1-4 A simplified flow chart of at least one embodiment of a method for performing ECC operations performed by a computing device. DETAILED DESCRIPTION
[0012] Although the concept of the present disclosure is susceptible to various modifications and alternative forms, specific embodiments thereof have been shown in the drawings by way of example and will be described in detail in this application. However, it should be understood that there is no intention to limit the concept of the present disclosure to the specific form disclosed, but on the contrary, it is intended to cover all modifications, equivalents and alternatives consistent with the present disclosure and the appended claims.
[0013] References in the specification to "one embodiment," "an embodiment," "an illustrative embodiment," and the like indicate that the described embodiment may include a particular feature, structure, or characteristic, but each embodiment may or may not include the particular feature, structure, or characteristic. In addition, such phrases do not necessarily refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it is claimed that it is within the knowledge of a person skilled in the art to implement such feature, structure, or characteristic in conjunction with other embodiments, whether or not explicitly described. In addition, it should be understood that items included in a list of the form "at least one of A, B, and C" may refer to (A); (B); (C); (A and B); (A and C); (B and C); or (A, B, and C). Similarly, items listed in the form "at least one of A, B, or C" may refer to (A); (B); (C); (A and B); (A and C); (B and C); or (A, B, and C).
[0014] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried by or stored on one or more volatile or non-volatile machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. A machine-readable storage medium may be implemented as any storage device, mechanism, or other physical structure (e.g., volatile or non-volatile memory, media disk, or other media device) for storing or sending information in a form readable by a machine.
[0015] In the accompanying drawings, some structural or method features may be shown in a particular arrangement and / or order. However, it should be understood that such a particular arrangement and / or order may not be required. Rather, in some embodiments, such features may be arranged in a different manner and / or order than shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular drawing does not imply that such features are required in all embodiments, and in some embodiments, such features may not be included or may be combined with other features.
[0016] Reference now Figure 1 In an illustrative embodiment, a computing device 100 for robustly computing elliptic curve digital signatures includes a processor 120 and an elliptic curve cryptography (ECC) engine 122. As described below, software and / or firmware executed by the processor 120 can offload elliptic curve cryptographic operations to the ECC engine 122. The processor 120 loads appropriate parameters and / or operands to one or more registers of the ECC engine 122, and instructs the ECC engine 122 to perform cryptographic operations, such as signing a message using an elliptic curve digital signature algorithm (ECDSA). When the ECC engine 122 is signing a message, the ECC engine 122 can be in a protected mode, wherein the ECC engine 122 will ignore inputs to the ECC engine 122, such as data entry, instruction validity, ECC instructions, etc., until the signing of the message is completed. The processor 120 can then read the result data from the ECC engine 122. Compared to performing the same operation using a general-purpose processor core, the ECC engine 122 can provide fast and power-efficient calculation of ECC cryptographic operations with improved performance and / or power consumption. For example, one potential embodiment of the ECC engine 122 has been developed to occupy approximately 22,500 square microns or approximately 101,000 logic gates. By providing lower power consumption and a relatively high level of security strength, the ECC engine 122 may be suitable for IoT devices or other low-power devices with longer deployment cycles (e.g., 15-20 years).
[0017] The computing device 100 may be implemented as any type of computing device or computer device capable of performing the functions described in this application, including, but not limited to, a computer, a mobile computing device, an Internet of Things device, a network appliance, a network device, a wearable computing device, a laptop computer, a notebook computer, a tablet computer, a desktop computer, a workstation, a server, a distributed computing system, a processor-based system, and / or a consumer electronic device. Figure 1 As shown in , computing device 100 illustratively includes processor 120, input / output subsystem 124, memory 126, data storage device 128, and / or other components and devices generally found in IoT devices or similar computing devices. Of course, in other embodiments, computing device 100 may include other or additional components, such as those generally found in mobile computing devices (e.g., various input / output devices). In addition, in some embodiments, one or more of the illustrative components may be incorporated into another component or otherwise form a part of another component. In some embodiments, for example, memory 126 or a portion thereof may be incorporated into processor 120.
[0018] Processor 120 can be implemented as any type of processor capable of performing the functions described in this application. Processor 120 can be implemented as a single-core or multi-core processor, a digital signal processor, a microcontroller, or other processors or processing circuits / control circuits. As shown, processor 120 includes an ECC engine 122. ECC engine 122 can be implemented as any functional block, IP core, embedded controller, logic circuit, logic gate and / or other components of the processor 120 capable of performing the functions described in this application. In addition, although described as being included in processor 120, it should be understood that in some embodiments, ECC engine 122 can be included in different components of computing device 100 such as I / O subsystem 124 or can be implemented as a separate accelerator, coprocessor, security engine, field programmable gate array (FPGA) or other integrated circuit.
[0019] The memory 126 may be implemented as any type of volatile or non-volatile memory or data storage device capable of performing the functions described in the present application. In operation, the memory 126 may store various data and software used during operation of the computing device 100, such as operating systems, applications, programs, libraries, and drivers. The memory 126 is communicatively coupled to the processor 120 via the I / O subsystem 124, which may be implemented as circuits and / or components for facilitating input / output operations with the processor 120, the memory 126, and other components of the computing device 100. For example, the I / O subsystem 124 may be implemented as or otherwise include a memory controller hub, an input / output control hub, a platform controller hub, an integrated control circuit, a firmware device, a communication link (i.e., a point-to-point link, a bus link, a wire, a cable, a light guide, a printed circuit board trace, etc.) and / or other components and subsystems for facilitating input / output operations. In some embodiments, I / O subsystem 124 may form part of a system on a chip (SoC) and be incorporated onto a single integrated circuit chip along with processor 120 , memory 126 , and other components of computing device 100 .
[0020] The data storage device 128 may be implemented as any type of device or devices configured for short-term or long-term storage of data, such as, for example, memory devices and circuits, memory cards, hard drives, solid-state drives, or other data storage devices.
[0021] As shown, computing device 100 may also include one or more peripheral devices 132. Peripheral devices 132 may include any number of additional input / output devices, interface devices, and / or other peripheral devices. For example, in some embodiments, peripheral devices 132 may include a display, a touch screen, graphics circuitry, a keyboard, a mouse, a speaker system, a microphone, a network interface, and / or other input / output devices, interface devices, and / or peripheral devices.
[0022] Reference now Figure 2In an illustrative embodiment, the computing device 100 establishes an environment 200 during operation. The illustrative environment 200 includes an encryption client 202, an encryption driver 204, and an ECC engine 122. The various components of the environment 200 may be implemented as hardware, firmware, software, or a combination thereof. Thus, in some embodiments, one or more components of the environment 200 may be implemented as a collection of circuits or electronic devices (e.g., encryption client circuit 202, encryption driver circuit 204, and / or ECC engine circuit 122). It should be understood that in such embodiments, one or more of the encryption client circuit 202, the encryption driver circuit 204, and / or the ECC engine circuit 122 may form part of one or more of the processor 120, the I / O subsystem 124, and / or other components of the computing device 100. In addition, in some embodiments, one or more of the illustrative components may form part of another component and / or one or more of the illustrative components may be independent of each other.
[0023] The encryption client 202 can be implemented as any operating system, library, application or other computer program executed by the computing device 100 using elliptic curve cryptography (ECC) to perform the encryption process. For example, the encryption client 202 can be implemented as a library or application that performs an encryption protocol including ECC operations, and the encryption protocol is, for example, ECDSA, ECDH, EPID or other protocols. In order to perform the encryption process, the encryption client 202 calls the encryption driver 204 to perform one or more encryption operations, such as elliptic curve scalar multiplication, elliptic curve point addition, elliptic curve same point double, prime field exponentiation, prime field multiplication, prime field addition and / or prime field subtraction. In an illustrative embodiment, the encryption client 202 can call the encryption driver 204 to perform an algorithm involving an encryption operation, which involves several steps and intermediate encryption calculations, such as elliptic curve digital signature algorithm (ECDSA) signature operation or ECDSA verification operation. As further described below, the encryption driver 204 is configured to program the ECC engine 122 to perform the requested encryption operation.
[0024] The ECC engine 122 is configured to read a data path selector signal of the ECC engine 122. The data path selector signal indicates a data width of 256 bits or a data width of 384 bits. The ECC engine 122 is further configured to read one or more parameter values corresponding to the parameters of the requested encryption operation from the data port of the ECC engine 122. Each parameter has a data width indicated by the data path selector signal. The ECC engine 122 is further configured to read an opcode indicating the requested encryption operation from the instruction port of the ECC engine 122 and perform the requested encryption operation. The encryption operation also has a data width indicated by the data path selector signal. In some embodiments, the opcode can indicate a register of the ECC engine 122, and the ECC engine 122 can store the parameter value in the identified register. After receiving an instruction to perform a particular operation, such as an ECDSA signature operation, the ECC engine 122 may enter a protected mode in which the ECC engine will ignore some or all of the inputs provided to the ECC engine 122, such as data entry, data entry valid, reset, ECC start, instruction valid, ECC instruction, etc. The ECC engine 122 may remain in the protected mode until the operation is completed, and then the ECC engine 122 may exit the protected mode. The ECC engine 122 is further configured to write result data to an output port of the ECC engine 122 in response to performing the cryptographic operation. The result data also has a data width indicated by the data path selector signal.
[0025] The encryption driver 204 is configured to determine whether the busy signal of the ECC engine 122 is set and then set the data path selector signal of the ECC engine 122 in response to determining that the busy signal is not set. The encryption driver 204 is further configured to assert the start signal of the ECC engine 122 in response to setting the data path selector signal. The encryption driver 204 is further configured to write an operation code to the instruction port of the ECC engine 122 in response to asserting the start signal and assert the instruction valid signal of the ECC engine 122 in response to writing the operation code.
[0026] The ECC engine 122 is further configured to determine whether the start signal is rendered valid and set a busy signal in response to determining that the start signal is rendered valid. The ECC engine 122 is further configured to determine whether the instruction valid signal is rendered valid in response to determining that the start signal is rendered valid and read the operation code in response to determining that the instruction valid signal is rendered valid. The ECC engine 122 is further configured to clear the busy signal in response to performing the encryption operation and enable the operation completion signal of the ECC engine 122 in response to clearing the busy signal. The encryption driver 204 is further configured to determine whether the operation completion signal of the ECC engine 122 is rendered valid and read the result data from the output port of the ECC engine 122 in response to determining that the operation completion signal of the ECC engine 122 is rendered valid.
[0027] Reference now Figure 3 , diagram 300 depicts one potential embodiment of various components of the ECC engine 122. As shown, the ECC engine 122 may include an execution controller 302, a plurality of execution resources 304, and registers 318. The execution resources 304 illustratively include a point multiplication unit 306, a point addition / double unit 308, a p-exponentiation unit 310, a p-multiplication-addition-subtraction (p-MAS) unit 312, an elliptic curve digital signature algorithm (ECDSA) signature unit 314, and an ECDSA verification unit 316. Each of the execution resources 304 may load data from and store data into registers 318. In addition, data may be transferred directly between certain execution resources 304. For example, the point multiplication unit 306 may provide data to the point addition / double unit 308, the p-exponentiation unit 310, and the p-MAS unit 312, the point addition / double unit 308 may provide data to the p-MAS unit 312, and the p-exponentiation unit 310 may provide data to the p-MAS unit 312. In some embodiments, each of the ECDSA signature unit 314 and the ECDSA verification unit 316 may send data to one or more of the point multiplication unit 306, the point addition / double unit 308, the p-exponentiation unit 310, and the p-multiplication-addition-subtraction (p-MAS) unit 312 and receive data from one or more of the above units.
[0028] The execution controller 302 is configured to decode the instructions provided to the ECC engine 122 and generate corresponding internal control signals. As further described below, the execution controller 302 can also convert input data from affine coordinates (e.g., x and y coordinates) to Jacobian matrix projection coordinates for certain operations. The execution controller 302 activates the corresponding execution resource 304 to execute the current instruction. After execution, the execution controller 302 can convert the Jacobian matrix projection coordinates back to affine coordinates. The execution controller 302 is configured to output the result data on one or more data out ports and send a signal to the encryption driver 204 that the result is ready.
[0029] The dot multiplication unit 306 is configured to compute a scalar multiplication operation [d] P, where d is a scalar value and P is a point on the elliptic curve. In some embodiments, the dot multiplication unit 306 can perform the scalar multiplication operation using a binary left-2-right double-and-add process. Additionally or alternatively, in some embodiments, the dot multiplication unit 306 can perform the scalar multiplication using a Montgomery ladder process.
[0030] The point addition / double unit 308 is configured to perform a point addition operation A+B and a point double operation 2A, where A and B are both points on an elliptic curve. In some embodiments, the point addition / double unit 308 may perform the A+B and 2A operations based on affine coordinates. Additionally or alternatively, in some embodiments, the point addition / double unit 308 may perform the A+B and 2A operations based on a standard Jacobian matrix projection coordinate point addition formula. In some embodiments, the point addition / double unit 308 may provide acceleration of the 2A operation for certain elliptic curves by performing different operations based on the value a of the curve parameter. For example, if a is zero, the point addition / double unit 308 may perform the 2A operation using six prime field multiplication operations, if a is 3, the point addition / double unit 308 may perform the 2A operation using 8 prime field multiplication operations, and if a is not zero and not 3, the point addition / double unit 308 may perform the 2A operation using 10 prime field multiplication operations.
[0031] p exponentiation unit 310 is configured to calculate the prime field exponentiation a using timing and simple power / electromagnetic radiation protection b (modulo p). Similarly, the p-MAS unit 312 is configured to compute prime field multiplication a·b (modulo p), prime field addition a+b (modulo p), and prime field subtraction ab (modulo p) with timing and simple power / electromagnetic radiation protection.
[0032] The ECDSA signature unit 314 is configured to perform an ECDSA signature operation. In an ECDSA signature operation, a private key is used to generate a signature value based on a message, and a third party can then verify that the private key was used to generate the signature value. To perform an ECDSA signature operation, appropriate input parameters are loaded into registers 318. For example, in an illustrative embodiment, the inputs include e (the lower 256 or 348 bits of the message hash to be signed), G x (x coordinate of base point G), G y (y coordinate of base point G), n (order of G), p (prime number defining the finite field), a (constant used in the definition of the elliptic curve), d (private key), k (random number used in the signature algorithm), and λ (a second random number used in the signature algorithm). The message hash for e can be any suitable hash or cryptographic hash, such as SHA-2. After receiving a signal to start the ECDSA algorithm, the ECC engine 122 can enter a protected mode in which the ECC engine 122 will ignore some or all of the inputs provided to the ECC engine 122, such as data in, data in valid, reset, ECC start, instruction valid, ECC instruction, etc. As described below in Figure 7-8 As described in more detail in , ECDSA signature unit 314 may use operations such as point multiplication, point addition / doubling, p-exponentiation, p-multiplication-addition-subtraction as part of implementing the ECDSA algorithm. When ECC engine 122 has completed the ECDSA signature algorithm, ECC engine 122 exits protected mode and provides the signature as an output of ECC engine 122.
[0033] In some embodiments, the ECDSA signature unit 314 may use certain protections to prevent side channel attacks. For example, the ECDSA signature unit 314 may use a second random number λ to convert the base point G into one, two, or more identical randomized Jacobian matrix coordinates. It should be appreciated that the use of randomized Jacobian matrix coordinates results in scrambling of the bits when the Jacobian matrix coordinates are calculated, which may prevent the secret bits from being leaked to an eavesdropper via, for example, electromagnetic radiation. Additionally or alternatively, the point multiplication used as part of the ECDSA signature operation may use a Montemerie ladder, as described below for Figure 7-8 As discussed in more detail, the dot product can be performed at a fixed time with a value that is independent of the private key d.
[0034] The ECDSA verification unit 316 is configured to perform an ECDSA verification operation. In an ECDSA verification operation, a signature value corresponding to a certain message is verified to have been generated using a private key corresponding to a known public key. To perform an ECDSA verification operation, appropriate input parameters are loaded into registers 318. For example, in an illustrative embodiment, the inputs include e (the lower 256 or 348 bits of the message hash to be signed), G, and x (x coordinate of base point G), G y (y coordinate of base point G), Q x (x coordinate of public key Q), Q y (y coordinate of the public key Q), n (the order of G), p (the prime number defining the finite field), a (a constant used in the definition of the elliptic curve), r (the first signature value), and s (the second signature value). As described below in Figure 9-10 As described in more detail in , the ECDSA verification unit 316 can use operations such as point multiplication, point addition / doubling, p exponentiation, p-multiplication-addition-subtraction as part of implementing the ECDSA algorithm. When the ECC engine 122 has completed the ECDSA verification algorithm, the ECC engine 122 provides an output indicating whether the signature is verified. In an illustrative embodiment, the ECC engine 122 can provide a plurality of bits indicating whether the signature is verified. For example, when the signature is verified, each bit in the output register can be 1, and when the signature is not verified, each bit in the same output register can be zero. Using multiple redundant bits as output can help prevent certain attacks that may flip a single bit, such as a fault injection attack. It should be understood that, in general, signature calculations are not secret, so the ECDSA verification unit 316 may not use bypass protection techniques.
[0035] In some embodiments, the ECDSA verification unit 316 may perform certain steps of the ECDSA verification algorithm in a manner that speeds up the computation. Figure 9-10 As discussed in more detail, the ECDSA verification operation requires computing the sum of two point multiplication operations, for example, a point addition of the form [u1]G+[u2]Q. The ECDSA verification unit 316 can compute the sum of the two point multiplication operations using a single loop that traverses the bits of the scalar multipliers u1 and u2, as opposed to computing each result of the two point multiplication operations separately and then adding the results together. Such an approach can significantly speed up the calculation, for example reducing the execution time by a factor of approximately 1.5.
[0036] Reference now Figure 4, diagram 400 illustrates one potential embodiment of registers 318 and various input / output signals, lines, pins, buses, or other interface connections provided by the ECC engine 122. As further described below, software and / or firmware executed by the processor 120 may control the ECC engine 122 by reading or writing data and / or control signals to the ECC engine 122.
[0037] As shown, the illustrative ECC engine 122 includes 10 registers 318. Each of the registers 318 is 384 bits wide. As further described below, the ECC engine 122 can be programmed to use all 384 bits of each register 318 for 384-bit operations or can be programmed to use the least significant 256 bits of each register 318 for 256-bit operations. Each of the registers 318 can store parameter data provided by the processor 120 and intermediate data and result data generated by the ECC engine 122. As shown in FIG. Figure 4 As shown in FIG. 1 , register 318 includes e register 402, G x Register 404, G y Register 406, n register 408, p register 410, a register 412, d / Q x Register 414, k / Q y 4, 416, λ / r register 418, and s register 420. The semantics of each register 318 may depend on the specific cryptographic operation performed by ECC engine 122 and is further described below. In some embodiments, some of the registers may have different widths. For example, a register 412 may not require 384 bits and may be implemented as a smaller register, such as an 8-bit register. Of course, in addition to Figure 4 In addition to the top-level registers 318 shown in FIG. 1 , in some embodiments, the ECC engine 122 may include additional registers not shown.
[0038] The ECC engine 122 includes a data entry port 422 and a data entry valid signal 424. The data entry port may include 384 individual signals, lines, bits, pins, or other interface connections. As further described below, the processor 120 may write parameter data to the data entry port 422, which will be stored in one of the registers 318. The processor 120 may set the data entry valid signal 424 to indicate that valid data is present on the data entry port 422.
[0039] The ECC engine 122 includes a data out port 426 and a data out port 428. Each of the data out ports 426, 428 may include 384 separate signals, lines, bits, pins, or other interface connections. As further described below, the ECC engine 122 may write data from the ECC operation to one or more of the data out ports 426, 428. For example, the ECC engine 122 may write the x, y coordinates of point C to the data out ports 426, 428, respectively. The ECC engine 122 further includes a data out valid signal 434. The ECC engine 122 may set the data out valid signal 434 to indicate that valid data is located on the data out ports 426, 428.
[0040] The ECC engine 122 includes an ECC busy signal 430 and an ECC completion signal 432. The ECC engine 122 can set the ECC busy signal 430 to indicate that it is currently processing a cryptographic operation and that the processor 120 should not start a new cryptographic operation. The ECC engine 122 can make a pulse on the ECC completion signal 432 valid to indicate that the cryptographic operation is complete. As further described below, after the ECC completion signal 432 is rendered valid, the processor 120 can read the result data from the data out ports 426, 428. The ECC engine 122 further includes a clock signal 436 and an asynchronous reset signal 438.
[0041] As shown, the ECC engine 122 includes a data path selector signal 440. As described further below, the processor 120 can set the data path selector signal 440 to program the ECC engine 122 to perform a 384-bit encryption operation on 384-bit data, or can clear the data path selector signal 440 to program the ECC engine 122 to perform a 256-bit encryption operation on 256-bit data.
[0042] The ECC engine 122 further includes an ECC start signal 442, an instruction valid signal 444, and an instruction port 446. As further described below, the processor 120 can make the pulse on the ECC start signal 442 valid so that the ECC engine 122 starts to process a new encryption operation. As described above, the ECC engine 122 can set the ECC busy signal 430 after the ECC start signal 442 is made valid. The processor 120 can write an instruction opcode to the instruction port 446. As further described below, the instruction opcode can identify the register 318 to be loaded with data or the encryption operation to be performed. When the valid instruction opcode has been written to the instruction port 446, the processor 120 can also make the pulse on the instruction valid signal 444 valid. As further described below, in response to making the instruction valid signal 444 valid, the ECC engine 122 can read data into the specified register 318 or perform the specified encryption operation.
[0043] Reference now Figure 5 In use, the computing device 100 may execute the method 500 for driving the ECC engine 122. It should be understood that in some embodiments, the method 500 may be performed as in Figure 2 100 to perform the operations of method 500. For example, method 500 may be performed by encryption driver 204, which may be implemented as software, firmware, and / or microcode executed by processor 120. Method 500 begins in block 502, where computing device 100 determines whether ECC engine 122 is busy. Computing device 100 may, for example, read ECC busy signal 430 of ECC engine 122 and determine whether ECC busy signal 430 is set. If ECC engine 122 is busy, method 500 loops back to block 502 to continue waiting for ECC engine 122. If ECC engine 122 is not busy, method 500 proceeds to block 504.
[0044] In block 504, the computing device 100 sets the 256-bit / 384-bit datapath selector signal 440 of the ECC engine 122 according to the desired bit width for the ECC encryption operation. For example, the processor 120 may set the datapath selector signal 440 to program the ECC engine 122 to perform a 384-bit encryption operation on 384-bit data, or may clear the datapath selector signal 440 to program the ECC engine 122 to perform a 256-bit encryption operation on 256-bit data. Of course, in some embodiments, the meaning of the datapath selector signal 440 may be reversed. Thus, the bit width of various parameters and result data depends on the value of the datapath selector signal 440.
[0045] In block 506, the computing device 100 asserts the enable signal 442 of the ECC engine 122. For example, the processor 120 may assert a pulse on the enable signal 442. Figure 6 As further described, the ECC engine 122 begins processing ECC operations in response to a pulse on the start signal 442 being asserted.
[0046] In block 508, the computing device 100 writes the parameter value to the data entry port 422 of the ECC engine 122. The computing device 100 may write a 384-bit value to the data entry port 422 or a 256-bit value to the least significant 256 bits of the data entry port 422, depending on the value of the data path selector signal 440. The computing device 400 also sets the data entry valid signal 424 to indicate that valid data has been written to the data entry port 422. The computing device 100 may write any of the parameters required for the ECC operation to be performed by the ECC engine 122. Specifically, the parameter value may be the same as Figure 4 420. For example, the parameters may correspond to the lower 256 or 348 bits of the message hash e to be signed or verified, the x or y coordinate of the base point G, the order n of the base point G, the prime number p defining the finite field of the elliptic curve, the constant a used in the definition of the elliptic area, the private key d, the x or y coordinate of the public key Q, the random number k, the second random number λ, the first signature value r, or the second signature value s.
[0047] In block 510, the computing device 100 writes an opcode to the instruction port 446 of the ECC engine 122, which identifies the registers 402 to 420 for storing the data written to the data entry port 422. Each of the opcodes can be implemented as a five-bit binary value identifying a specific instruction to be executed by the ECC engine 122. Various opcodes can specify the register location to which the data will be written or can specify the ECC related operations to be performed. After writing the opcode to the instruction port 446, in block 512, the computing device 100 enables the instruction valid signal 444 of the ECC engine 122. For example, the processor 120 can enable the pulse on the instruction valid signal 444. As further described below, in response to the instruction valid signal 444 being rendered valid, the ECC engine 122 can read parameter data from the data entry port 422 and store the data in the register identified by the opcode written to the instruction port 446.
[0048] In block 514, the computing device 100 determines whether additional parameters are to be loaded into the ECC engine 122 for the ECC operation to be performed. If additional parameters remain, the method 500 loops back to block 508 to load the remaining parameters. If no additional parameters remain, the method 500 proceeds to block 516.
[0049] In box 516, the computing device 100 writes the opcode for the ECC operation to be performed to the instruction port 446 of the ECC engine 122. Specifically, the computing device 100 can write an opcode for an ECC-related operation, such as an opcode for elliptic curve scalar multiplication, an opcode for elliptic curve point addition, an opcode for elliptic curve point doubling, an opcode for prime field power, an opcode for prime field multiplication, an opcode for prime field addition, an opcode for prime field subtraction, an opcode for ECDSA signature, or an opcode for ECDSA verification. In box 518, the computing device 100 enables the instruction valid signal 444 of the ECC engine 122. For example, the processor 120 can enable the pulse on the instruction valid signal 444. As further described below, in response to the instruction valid signal 444 being rendered valid, the ECC engine 122 performs the ECC operation specified by the opcode written to the instruction port 446. The ECC engine 122 may perform 384-bit operations or 256-bit operations based on the data lane selector signal 440 .
[0050] In block 520, the computing device 100 determines whether the ECC engine 122 has completed processing the ECC operation. For example, the processor 120 may wait for a pulse to be asserted by the ECC engine 122 on the ECC done signal 432. If the ECC engine 122 has not completed processing the ECC operation, the method 500 loops back to block 520 to continue waiting for the ECC engine 122. If the ECC operation is complete, the method 500 proceeds to block 522.
[0051] In box 522, the computing device 100 reads the result data from one or more of the data out ports 426, 428 of the ECC engine 122. If the data out valid signal 434 of the ECC engine 122 is set, the computing device 100 can only read the result data. The specific data read by the computing device 100 can depend on the ECC operation performed. For example, for elliptic curve operations, the computing device 100 can read the x coordinate of the result point from the data out port 426 and read the y coordinate of the result point from the data out port 428. As another example, for prime field operations, the computing device 100 can read the result value from the data out port 426. The computing device 100 can read 384 bits of result data or 256 bits of result data depending on the value of the data path selector signal 440. In some cases, such as after the ECDSA verification operation, the computing device 100 can determine the output of the operation based on several bits of the data out port 428, even if the bits of the output register are expected to be all the same. For example, for a successful verification of the signature, the output of the data out port 428 may be all 1s, while for a failed verification of the signature, the output of the data out port 428 may be all 0s. The computing device 100 may evaluate the value of two or more bits of the data out port 428 to determine whether the verification is successful. Such a scheme may prevent certain attacks such as flipping the value of a 1-bit. After reading the result data, the method 500 loops back to block 502 to perform another ECC operation.
[0052] Reference now Figure 6 In use, the computing device 100 may perform the method 600 for robust computation of ECC operations. It should be understood that in some embodiments, the operations of the method 600 may be performed by, for example, Figure 2 100, such as the ECC engine 122. The method 600 begins in block 602, where the ECC engine 122 monitors for a pulse asserted on the start signal 442 of the ECC engine 122. As described above, software and / or firmware executed by the processor 120 may assert a pulse on the start signal 442 to begin processing an ECC operation. If a pulse is not detected, the method 600 loops back to block 602 to continue monitoring the start signal 442. If a pulse is detected, the method 600 proceeds to block 604.
[0053] In block 604, the ECC engine 122 sets the busy signal 430. The busy signal 430 indicates that the ECC engine is currently processing an ECC operation. As described above, the software and / or firmware executed by the computing device 100 may wait until the busy signal 430 is cleared before starting another ECC operation.
[0054] In block 606, the ECC engine 122 reads the 256-bit / 384-bit datapath selector signal 440 and activates the selected datapath. As described above, the processor 120 may set the datapath selector signal 440 to program the ECC engine 122 to perform a 384-bit encryption operation on 384-bit data, or may clear the datapath selector signal 440 to program the ECC engine 122 to perform a 256-bit encryption operation on 256-bit data.
[0055] In block 608, the ECC engine 122 monitors for a pulse asserted on the instruction valid signal 444. As described above, software and / or firmware executed by the processor 120 may assert a pulse on the instruction valid signal 444 after an instruction to write data to a register or to perform an ECC operation has been written to the instruction port 446. If a pulse is not detected, the method 600 loops back to block 608 to continue monitoring the instruction valid signal 444. If a pulse is detected, the method 600 proceeds to block 610.
[0056] In block 610, the ECC engine 122 reads the instruction opcode from the instruction port 446. As described above, the opcode is illustratively implemented as a five-bit value that identifies the instruction to be executed by the ECC engine 122. In block 612, the ECC engine 122 determines whether the opcode identifies a write instruction corresponding to the register 318. If the opcode does not identify a write instruction, the method 600 branches to block 618, described below. If the opcode identifies a write instruction, the method 600 proceeds to block 614.
[0057] In block 614, the ECC engine 122 reads parameter data from the data entry port 422. The ECC engine 122 may only read parameter data if the data entry valid signal 424 is set. Additionally or additionally, in some embodiments, the ECC engine 122 may read parameter data in response to a pulse on the data entry valid signal 424 being rendered valid. The ECC engine 122 may read 384 bits of data or 256 bits of data from the data entry port 422 depending on the value of the data path selector signal 440. In block 616, the ECC engine 122 stores the data read from the data entry port 422 in the register 318 specified by the write instruction. After storing the data, the method 600 loops back to block 608 to continue monitoring the instruction valid signal 444. As shown in conjunction with Figure 5 As described above, software and / or firmware executed by processor 120 may execute additional write instructions to write parameter data into each of registers 318 used by a particular ECC operation to be performed.
[0058] Referring back to block 612, if the instruction opcode does not identify a write instruction, the method 600 branches to block 618, where the ECC engine 122 may enter a protected mode based on the particular instruction. In an illustrative embodiment, the ECC engine 122 may enter a protected mode when the instruction is an ECDSA signature instruction. In protected mode, the ECC engine 122 will ignore some or all of the inputs provided to the ECC engine 122, such as data in, data in valid, reset, ECC start, instruction valid, ECC instruction, etc., until the operation is completed. In block 620, the ECC engine 122 performs the selected cryptographic operation.
[0059] In block 622, the ECC engine 122 outputs data to one or more of the data out ports 426, 428 and sets the data out valid signal 434. For example, the ECC engine 122 may copy data from one or more of the registers 318 to the data out ports 426, 428. The specific data output depends on the instruction executed by the ECC engine 122. For example, for an elliptic curve point instruction, the ECC engine 122 may output the x coordinate of the result point to the data out port 426 and the y coordinate of the result point to the data out port 428. For a prime field instruction, the ECC engine 122 may output a value to the data out port 426. For an ECDSA signature instruction, the ECC engine 122 may output a first signature value r to the data out port 426 and output a second signature value s to the data out port 428. For the ECDSA verification instruction, if the verification is successful, the ECC engine 122 can provide a value of all 1s to one of the data outgoing ports 426, 428, and if the verification is unsuccessful, output a value of all 0s to one of the data outgoing ports 426, 428. Providing a number of redundant bits for the output of the verification operation can prevent certain attacks such as flipping the value of a bit. According to the data path selector signal 440, the ECC engine 122 can output 384 bits of data or 256 bits of data. In block 622, the ECC engine 122 exits the protected mode.
[0060] In block 626, the ECC engine 122 clears the busy signal 430. Clearing the busy signal indicates that the ECC engine 122 is ready to process another ECC operation. In block 628, the ECC engine 122 asserts a pulse on the ECC completion signal 432. As described above, after the ECC completion signal 432 is asserted, the software and / or firmware executed by the processor 120 can read the results from the data out ports 426, 428. After the ECC completion signal 432 is asserted, the method 600 loops back to block 602 to monitor additional ECC operations.
[0061] Reference now Figure 7In use, the computing device 100 may execute the method 700 for performing ECDSA signature. It should be understood that in some embodiments, the operations of the method 700 may be performed by Figure 2 The method 700 may be performed by one or more components of the environment 200 of the computing device 100 shown in FIG. 1 , such as the ECC engine 122. Specifically, the method 700 may be combined with the above-described Figure 6 It should be appreciated that prior to executing method 700, computing device 100 may load appropriate values into one or more registers 318 of ECC engine 122. In the illustrative embodiment, computing device 100 (i) loads the lower 256 or 348 bits of the message hash to be signed into register e 402, and (ii) loads the x-coordinate of base point G into register G x In 404, (iii) the y coordinate of the base point G is loaded into register G y 406, (iv) load the order n of G into register n 408, (v) load the index p defining the finite field into register p 410, (vi) record the constant a used in the definition of the elliptic curve into register a 412, (vii) load the private key d into register d / Q x In 414, (viii) the first random number k used in the signature algorithm is loaded into register k / Q y 416, and (ix) loading a second random number λ used in the signature algorithm into register λ / r 418. It should be understood that some of the values referenced in method 700, such as R0, R1, j, i, and t, may be stored in one or more of registers 402-420, which may require that the value in one of registers 402-420 no longer needs to be overwritten. In addition or alternatively, some or all of the values referenced in method 700 may be stored in register 318 or other storage device in ECC engine 122 that is different from registers 402-420. It should also be understood that some steps of method 700 may be performed using components of ECC engine 122, such as point multiplication unit 306, point addition / double unit 308, p-exponentiation unit 310, and / or p-MAS unit 312.
[0062] The method 700 begins in block 702, where the ECC engine 122 converts a base point G from affine coordinates to Jacobian coordinates using a random number λ. Affine coordinates may describe a point G using x and y values corresponding to a point on an elliptic curve equation. Converting affine coordinates to Jacobian coordinates projects these points into a different but equivalent coordinate system that may allow for more efficient computation of certain point operations. Specifically, an affine point (x, y) may be converted into an equivalent Jacobian point (xz) for any point z in the domain.2 , yz 3 , z). The ECC engine 122 may convert the base point G into any suitable Jacobian matrix point, such as (G x λ 2 , G y λ 3 ,λ) or (G x λ 4 , G y λ 6 , 2 In the illustrative embodiment, in block 704, the ECC engine 122 converts the base point G into two different Jacobian matrix representations, such as (G x λ 2 , G y λ 3 ,λ) or (G x λ 4 , G y λ 6 , 2 ). By transforming the coordinates of the base point G using the random number λ, the coordinates of the base point G are effectively transformed into random numbers, which can prevent certain side channel attacks such as monitoring electromagnetic radiation from the ECC engine 122. Of course, it should be understood that in some embodiments, the ECC engine 122 may perform the calculations of the method 700 in affine coordinates or using a transformation other than transformation to Jacobian matrix coordinates.
[0063] In block 706, the ECC engine 122 loads a representation of G into R0, such as the Jacobian matrix representation (G x λ 4 , G y λ 6 , 2 In block 708, the ECC engine 122 loads a representation of [2]G into R1, such as the Jacobian matrix representation [2](G x λ 2 , G y λ 3 , λ). It should be understood that each of R1 and R0 may be implemented as more than one register, such as two registers for affine coordinates or three registers for Jacobian matrix coordinates.
[0064] In blocks 710 through 726, the ECC engine 122 calculates [k]G using a Montgomery ladder scheme that allows the calculation to be calculated in a fixed amount of time. It should be appreciated that certain other operations of the method 700, such as determining the number of leading zeros in k, may also be performed in a fixed amount of time, such that the overall execution time of the method 700 is fixed. In block 710, the ECC engine 122 determines the number of leading zeros in k and stores the number in a variable j. In block 712, the ECC engine 122 initializes the index i to the length k in bits (e.g., 256 or 384) minus j minus 2.
[0065] In block 714, if index i is zero or greater, the method 700 continues to block 716. In block 716, if the i-th bit of k is zero, the method 700 continues to block 718, where the ECC engine 122 sets R1 to the dot sum of R1 and R0. In block 720, the ECC engine 122 sets R0 to the dot double of R0.
[0066] Referring back now to block 716, if the i-th bit of k is not zero, the method 700 proceeds to block 722 where the ECC engine 122 sets R0 to the dot sum of R1 and R0. In block 720, the ECC engine 122 sets R1 to the dot double of R1.
[0067] In block 726, the ECC engine 122 decrements the index i and loops back to block 714. Referring back to block 714, if the index i is not zero or greater, the method 700 jumps down to block 728. It should be understood that after the bitwise addition of k in blocks 714 to 726, the result [k]G is stored in R0.
[0068] In block 728, the ECC engine 122 performs j imaginary point additions and imaginary point doubles. It should be noted that since the loop from block 714 to block 726 is not performed for leading zeros of k, the skipped computation time is made up by performing imaginary operations, which can help ensure a fixed execution time for the method 700. In block 730, the ECC engine 122 converts R0 from Jacobian matrix coordinates to affine coordinates. Since only the x coordinates of the affine coordinates of R0 are used (see block 732), the ECC engine 122 can only determine the x coordinates of the affine coordinates.
[0069] exist Figure 8 In block 732, the ECC engine 122 sets the variable r to the x-coordinate of R0 modulo n. In block 734, if r is equal to zero, the message signature using the random value selected for k is invalid, so the method 700 jumps to block 750, where a failure is indicated by the ECC engine 122. If r is not equal to zero, the method 700 continues to block 736.
[0070] In block 736, the ECC engine 122 sets the variable t to k -1 In block 738, the ECC engine sets the variable s to r times d modulo n. In block 740, the ECC engine 122 sets s equal to e plus s modulo n. In block 744, the ECC engine 122 sets s to t times s modulo n.
[0071] In block 746, if s is equal to zero, the message signature using the random value selected for k is invalid, so the method 700 jumps to block 750 where a failure is indicated by the ECC engine 122. If s is not equal to zero, the method 700 continues to block 748. In block 748, the ECC engine 122 provides r and s as signature values as output from the ECC engine 122, such as by storing r and s in data out ports 426 and 428.
[0072] Referring back to blocks 734 and 746, if r or s is zero, the method 700 continues to block 750. In block 750, the ECC engine 122 indicates a failure to sign the message due to the particular value k selected for the signature. The ECC engine 122 may indicate the failure in any suitable manner, such as by providing all zero values in one or both of the data out ports 426 and 428.
[0073] Reference now Fig. 9 In use, the computing device 100 may execute the method 900 for performing ECDSA signature verification. It should be understood that in some embodiments, the method may be performed by Figure 2 One or more components of the environment of the computing device 100 shown in FIG. 100 perform the operations of the method 900, such as the ECC engine 122. Specifically, the method 900 can be combined with the above-described Figure 6 It should be understood that prior to executing method 900, computing device 100 may load appropriate values into one or more registers 318 of ECC engine 122. In an alternative embodiment, computing device 100 (i) loads the lower 256 or 348 bits of the message hash to be signed into register e 402, (ii) loads the x-coordinate G of base point G into register e 402, x Load into register G x In 404, (iii) the y coordinate G of the base point G is y Load into register G y 406, (iv) load the order n of G into register n 408, (v) load the prime number p defining the finite field into register p 410, (vi) load the constant a used in the definition of the elliptic curve into register a 412, (vii) load the x coordinate Q of the public key Q x Load into register d / Qx In 414, (viii) the y coordinate Q of the public key Q y Load into register k / Q y 416, (ix) loading the first signature value r into register λ / r 418, and (x) recording the second signature value s into register s 420. It should be understood that some of the values referenced in method 900, such as t1, t2, u1, u2, T, j, and i, can be stored in one or more of registers 402-420, which may require that the value in one of registers 402-420 no longer needs to be overwritten. In addition or alternatively, some or all of the values referenced in method 900 can be stored in register 318 or other memory in ECC engine 122 that is different from registers 402-420. It should also be understood that some steps of method 900 can be performed using components of ECC engine 122, such as point multiplication unit 306, point addition / double unit 308, p-exponentiation unit 310, and / or p-MAS unit 312.
[0074] As part of performing the ECDSA signature algorithm in method 900, the ECC engine 122 computes a dot addition of two dot multiplication operations of the form [u1]G+[u2]Q. The ECC engine 122 may perform such a computation by performing a bitwise superposition on u1 and u2 simultaneously and adding the sum of G, Q, or G and Q to an intermediate result stored in R, depending on the particular bit values at the current indexes u1 and u2. Since the sum of G and Q is computed in advance, a single dot addition operation may be utilized to add the sum of G and Q to the intermediate result stored in R. It should be appreciated that with such a scheme, only a dot addition is required when the bit value of the current index is 1 for both u1 and u2. In contrast, if the computation is performed by first computing [u1]G and [u2]G separately, two dot additions are required when the bit value of a given index is 1 for both u1 and u2. Such a scheme may significantly speed up the computation, for example reducing the execution time by a factor of approximately 1.5.
[0075] The method 900 begins in block 902, where the ECC engine 122 converts the base point G and the public key Q from affine coordinates to Jacobian coordinates. As stated above, affine coordinates can describe a point using x and y values corresponding to a point on an elliptic curve equation. Converting affine coordinates to Jacobian coordinates projects these points to a different but equivalent coordinate system, which can allow for more efficient computation of certain point operations. Specifically, an affine point (x, y) can be converted to an equivalent Jacobian point (xz) for any point z in the domain. 2 , yz 3 , z). The ECC engine 122 may convert points G and Q into any appropriate Jacobian matrix points, such as (Gx , G y , 1) or (Q x , Q y , 1). Of course, it should be understood that in some embodiments, the ECC engine 122 may perform the calculations of method 900 in affine coordinates or using a transformation other than a transformation to Jacobian matrix coordinates. It should be understood that points such as G, Q, T, and R may be implemented as more than one register, such as two registers for affine coordinates or three registers for Jacobian matrix coordinates.
[0076] In block 904, the ECC engine 122 sets the variable t1 to s -1 In block 906, the ECC engine 122 sets the variable t2 to e modulo n. In block 908, the ECC engine 122 sets the variable u1 to t2 times t1 modulo n. In block 910, the ECC engine 122 sets the variable u2 to r times r1 modulo n. In block 912, the ECC engine 122 sets the variable T to the dot sum of G and Q.
[0077] In block 914, the ECC engine 122 determines the smaller number of leading zeros in u1 and u2 and stores the number in variable j. For example, if u1 has 3 leading zeros and u2 has 2 leading zeros, the ECC engine 122 stores 2 in j. In block 916, the ECC engine 122 sets the index i to the length u1 minus j minus 1.
[0078] In block 918, if the i-th bit of u1 and u2 are both 1, the method 900 proceeds to block 920, where the value of T is stored in the variable R. From block 920, the method proceeds to Fig.10 9, wherein the ECC engine 122 decrements the index i by 1. Referring back to block 918, if it is not the case that the i-th bits of u1 and u2 are both 1, the method 900 continues to block 922.
[0079] In block 922, if the i-th bit of u1 is 1 and the i-th bit of u2 is 0, the method 900 proceeds to block 924, where the value of Q is stored in variable R. From block 924, the method proceeds to Fig.10 928 in which the ECC engine 122 decrements the index i by 1. Referring back to block 922, if it is not the case that the i-th bit of u1 is 1 and the i-th bit of u2 is 0, the method 900 continues to block 926. In block 926, the value of G is stored in the variable R.
[0080] In block 928, the ECC engine 122 decrements the index by 1. In block 930, if the index i is not greater than or equal to 0, the method 900 continues to block 946, where the ECC engine 122 converts R from Jacobian matrix coordinates to affine coordinates. If the index i is greater than or equal to 0, the method 900 continues to block 932. In block 932, the ECC engine 122 stores the point double of R into R.
[0081] In block 934, if the i-th bit of u1 is 0 and the i-th bit of u2 is 1, the method 900 continues to block 936, where the ECC engine 122 stores the sum of R and Q back into R, and then loops back to block 928. Referring back to block 934, if it is not the case that the i-th bit of u1 is 0 and the i-th bit of u2 is 1, the method 900 continues to block 938.
[0082] In block 938, if the i-th bit of u1 is 1 and the i-th bit of u2 is 0, the method 900 continues to block 940, where the ECC engine 122 stores the sum of R and G back into R, and then loops back to block 928 to decrement the index i by 1. Referring back to block 938, if it is not the case that the i-th bit of u1 is 1 and the i-th bit of u2 is 0, the method 900 continues to block 942.
[0083] In block 942, if the i-th bit of u1 is 1 and the i-th bit of u2 is 1, the method 900 continues to block 944, where the ECC engine 122 stores the sum of R and T back into R, and then loops back to block 928 to decrement the index i by 1. Referring back to block 942, if it is not the case that the i-th bit of u1 is 1 and the i-th bit of u2 is 1, the method 900 loops back to block 928.
[0084] Referring back to block 930, if the index i is not greater than or equal to 0, the method 900 jumps to block 946. At block 946, the ECC engine 122 converts R from Jacobian matrix coordinates to affine coordinates. Since only the x-coordinate of the affine coordinates of R is used (see block 948), the ECC engine 122 can only determine the x-coordinate of the affine coordinates of R.
[0085] In block 948, the signature value r is compared to the x-coordinate modulo n of R. If r is equal to Rx modulo n, the method continues to block 950, where the ECC engine 122 outputs a signal that the signature is valid, such as by writing a value of all 1s to one or both of the data outgoing ports 426, 428. Referring back to block 948, if r is not equal to Rx modulo n, the method 900 continues to block 952, where the ECC engine 122 outputs a signal that the signature is invalid, such as by writing a value of all 0s to one or both of the data outgoing ports 426, 428. It should be appreciated that changing the value of several bits based on whether the signature verification is successful can prevent certain attacks, such as fault injection attacks that can change the value of a single bit.
[0086] It should be understood that in some embodiments, methods 500, 600, 700, and / or 900 may be implemented as various instructions stored on a computer-readable medium, which may be executed by the processor 120, the ECC engine 122, the I / O subsystem 124, and / or other components of the computing device 100 to cause the computing device 100 to perform the corresponding method 500, 600, 700, and / or 900. The computer-readable medium may be implemented as any type of medium that can be read by the computing device 100, including but not limited to the memory 126, the data storage device 128, the firmware device, and / or other media.
[0087] Example
[0088] Illustrative examples of the devices, systems, and methods disclosed in the present application are provided below. Embodiments of the devices, systems, and methods may include one or more of the examples described below, and any combination thereof.
[0089] Example 1 includes a computing device for calculating an elliptic curve digital signature, the computing device including an elliptic curve cryptography (ECC) engine, wherein the ECC engine is used to: read a parameter value for each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; read an operation code from an instruction port of the ECC engine, wherein the operation code indicates the elliptic curve digital signature algorithm signature operation; enter a protected mode in response to reading the operation code, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; execute the elliptic curve digital signature algorithm signature operation in response to reading the operation code; exit the protected mode in response to completion of the elliptic curve digital signature algorithm signature operation; and write result data to an output port of the ECC engine in response to executing the elliptic curve digital signature algorithm signature operation.
[0090] Example 2 includes the subject matter of Example 1, and wherein the ECC engine is further used to read a second opcode from the instruction port, wherein the second opcode indicates a cryptographic operation different from the elliptic curve digital signature algorithm signature operation; perform the cryptographic operation without entering the protected mode in response to reading the second opcode; and write second result data to the output port of the ECC engine in response to performing the cryptographic operation.
[0091] Example 3 includes the subject matter of Examples 1 and 2, wherein performing the encryption operation comprises performing prime field arithmetic operations.
[0092] Example 4 includes the subject matter of any of Examples 1-3, wherein performing the prime field arithmetic operation comprises performing a prime field exponentiation operation, a prime field multiplication operation, a prime field addition operation, or a prime field subtraction operation.
[0093] Example 5 includes the subject matter of any of Examples 1-4, wherein performing the cryptographic operation comprises performing an elliptic curve point operation.
[0094] Example 6 includes the subject matter of any of Examples 1-5, wherein performing an elliptic curve operation comprises performing an elliptic curve scalar multiplication operation, an elliptic curve point addition operation, or an elliptic curve subtraction operation.
[0095] Example 7 includes the subject matter of any of Examples 1-6, wherein performing the elliptic curve digital signature algorithm signing operation comprises performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the plurality of parameters.
[0096] Example 8 includes the subject matter of any one of Examples 1-7, wherein one of the multiple parameters is a random number, and wherein performing the elliptic curve digital signature algorithm signing operation includes using the random number to convert a point on the elliptic curve into Jacobian matrix coordinates.
[0097] Example 9 includes the subject matter of any one of Examples 1-8, wherein performing the elliptic curve digital signature algorithm signing operation includes converting a point on the elliptic curve into two different Jacobian matrix coordinates using the random number.
[0098] Example 10 includes the subject matter of any one of Examples 1-9, wherein one of the multiple parameters is a second random number, wherein the second random number has one or more leading zeros, wherein performing the elliptic curve digital signature algorithm signature operation includes: performing an elliptic curve point addition operation and an elliptic curve point doubling operation for each bit after a first bit in the second random number that is after the one or more leading zeros; and performing a virtual elliptic curve point addition operation and a virtual elliptic curve point doubling operation for each leading zero of the one or more leading zeros, wherein the virtual elliptic curve point addition operation and the virtual elliptic curve point doubling operation have no effect on the result data.
[0099] Example 11 includes the subject matter of any one of Examples 1-10, wherein the ECC engine is further used to: read a second opcode from the instruction port, wherein the second opcode indicates an elliptic curve digital signature algorithm verification operation; in response to reading the second opcode, perform the elliptic curve digital signature algorithm verification operation without entering the protected mode, wherein performing the elliptic curve digital signature algorithm verification operation includes: determining a first intermediate value u1; determining a second intermediate value u2; determining the smaller number of leading zeros of u1 and u2; for each index position of u1 after the first bit after the smaller number of leading zeros, perform one or more elliptic curve operations, wherein for u1 after the smaller number of leading zeros Performing one or more elliptic curve operations at each index position after the first bit includes: when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 0, performing a point doubling operation; when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0, performing a point doubling operation and a point addition operation; when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1, performing a point doubling operation and a point addition operation; and when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1, performing a point doubling operation and only one point addition operation; and in response to the execution of the elliptic curve digital signature algorithm verification operation, writing the second result data to the output port of the ECC engine.
[0100] Example 12 includes the subject matter of any of Examples 1-11, wherein writing the second result data comprises writing a plurality of redundant bit values to the output port.
[0101] Example 13 includes a method for calculating an elliptic curve digital signature, the method comprising: an elliptic curve cryptography (ECC) engine of a computing device reading a parameter value for each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; the ECC engine reading an operation code from an instruction port of the ECC engine, wherein the operation code indicates the elliptic curve digital signature algorithm signature operation; the ECC engine entering a protected mode in response to reading the operation code, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; the ECC engine executing the elliptic curve digital signature algorithm signature operation in response to reading the operation code; the ECC engine exiting the protected mode in response to completion of the elliptic curve digital signature algorithm signature operation; and the ECC engine writing result data to an output port of the ECC engine in response to executing the elliptic curve digital signature algorithm signature operation.
[0102] Example 14 includes the subject matter of Example 13, further comprising: reading, by the ECC engine, a second opcode from the instruction port, wherein the second opcode indicates an encryption operation different from the elliptic curve digital signature algorithm signature operation; executing, by the ECC engine in response to reading the second opcode, the encryption operation without entering the protected mode; and writing, by the ECC engine in response to executing the encryption operation, second result data to the output port of the ECC engine.
[0103] Example 15 includes the subject matter of any of Examples 13-14, wherein performing the encryption operation comprises performing prime field arithmetic operations.
[0104] Example 16 includes the subject matter of any of Examples 13-15, wherein performing the prime field arithmetic operation comprises performing a prime field exponentiation operation, a prime field multiplication operation, a prime field addition operation, or a prime field subtraction operation.
[0105] Example 17 includes the subject matter of any of Examples 13-16, wherein performing the cryptographic operation comprises performing an elliptic curve point operation.
[0106] Example 18 includes the subject matter of any of Examples 13-17, wherein performing an elliptic curve operation comprises performing an elliptic curve scalar multiplication operation, an elliptic curve point addition operation, or an elliptic curve subtraction operation.
[0107] Example 19 includes the subject matter of any of Examples 13-18, wherein performing the elliptic curve digital signature algorithm signing operation comprises performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the plurality of parameters.
[0108] Example 20 includes the subject matter of any one of Examples 13-19, wherein one of the multiple parameters is a random number, and wherein performing the elliptic curve digital signature algorithm signing operation includes using the random number to convert a point on the elliptic curve into Jacobian matrix coordinates.
[0109] Example 21 includes the subject matter of any one of Examples 13-20, wherein performing the elliptic curve digital signature algorithm signing operation includes using the random number to convert a point on the elliptic curve into two different Jacobian matrix coordinates.
[0110] Example 22 includes the subject matter of any one of Examples 13-21, wherein one of the multiple parameters is a second random number, wherein the second random number has one or more leading zeros, wherein performing the elliptic curve digital signature algorithm signature operation includes: performing an elliptic curve point addition operation and an elliptic curve point doubling operation for each bit after a first bit after the one or more leading zeros in the second random number; and performing a virtual elliptic curve point addition operation and a virtual elliptic curve point doubling operation for each leading zero of the one or more leading zeros, wherein the virtual elliptic curve point addition operation and the virtual elliptic curve point doubling operation have no effect on the result data.
[0111] Example 23 includes the subject matter of any one of Examples 13-22, further comprising: reading a second opcode by the ECC engine from the instruction port, wherein the second opcode indicates an elliptic curve digital signature algorithm verification operation; executing the elliptic curve digital signature algorithm verification operation by the ECC engine in response to reading the second opcode without entering the protected mode, wherein executing the elliptic curve digital signature algorithm verification operation includes: determining a first intermediate value u1; determining a second intermediate value u2; determining the smaller number of leading zeros of u1 and u2; performing one or more elliptic curve operations for each index position after the first bit of u1 after the smaller number of leading zeros, wherein for u1 between the smaller number of leading zeros One or more elliptic curve operations are performed at each index position after the first bit, including: when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 0, a point doubling operation is performed; when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0, a point doubling operation and a point addition operation are performed; when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1, a point doubling operation and a point addition operation are performed; and when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1, a point doubling operation and only one point addition operation are performed; and the ECC engine writes second result data to the output port of the ECC engine in response to executing the elliptic curve digital signature algorithm verification operation.
[0112] Example 24 includes the subject matter of any of Examples 13-23, wherein writing the second result data comprises writing a plurality of redundant bit values to the output port.
[0113] Example 25 includes one or more computer-readable media including a plurality of instructions stored thereon that, when executed, cause an ECC device to perform the method of any one of Examples 13-24.
[0114] Example 26 includes a computing device for calculating an elliptic curve digital signature, the computing device including an elliptic curve cryptography (ECC) engine, wherein the ECC engine includes: a unit for reading a parameter value of each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; a unit for reading an opcode from an instruction port of the ECC engine, wherein the opcode indicates the elliptic curve digital signature algorithm signature operation; a unit for entering a protected mode in response to reading the opcode, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; a unit for executing the elliptic curve digital signature algorithm signature operation in response to reading the opcode; a unit for exiting the protected mode in response to completion of the elliptic curve digital signature algorithm signature operation; and a unit for writing result data to an output port of the ECC engine in response to executing the elliptic curve digital signature algorithm signature operation.
[0115] Example 27 includes the subject matter of Example 26, wherein the ECC engine further includes a unit for reading a second opcode from the instruction port, wherein the second opcode indicates a cryptographic operation different from the elliptic curve digital signature algorithm signature operation; a unit for performing the cryptographic operation without entering the protected mode in response to reading the second opcode; and a unit for sucking second result data into the output port of the ECC engine in response to performing the cryptographic operation.
[0116] Example 28 includes the subject matter of Examples 26 and 27, wherein the means for performing the cryptographic operation comprises means for performing prime field arithmetic operations.
[0117] Example 29 includes the subject matter of any one of Examples 26-28, wherein the unit for performing the prime field arithmetic operation includes a unit for performing a prime field exponentiation operation, a prime field multiplication operation, a prime field addition operation, or a prime field subtraction operation.
[0118] Example 30 includes the subject matter of any of Examples 26-29, wherein the means for performing the cryptographic operation comprises means for performing elliptic curve point operations.
[0119] Example 31 includes the subject matter of any of Examples 26-30, wherein the means for performing elliptic curve operations comprises means for performing elliptic curve scalar multiplication operations, elliptic curve point addition operations, or elliptic curve subtraction operations.
[0120] Example 32 includes the subject matter of any of Examples 26-31, wherein the unit for performing the elliptic curve digital signature algorithm signing operation includes a unit for performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the multiple parameters.
[0121] Example 33 includes the subject matter of any one of Examples 26-32, wherein one of the multiple parameters is a random number, and wherein the unit for performing the elliptic curve digital signature algorithm signature operation includes a unit for converting a point on the elliptic curve into Jacobian matrix coordinates using the random number.
[0122] Example 34 includes the subject matter of any one of Examples 26-33, wherein the unit for performing the elliptic curve digital signature algorithm signing operation includes a unit for converting a point on the elliptic curve into two different Jacobian matrix coordinates using the random number.
[0123] Example 35 includes the subject matter of any one of Examples 26-34, wherein one of the multiple parameters is a second random number, wherein the second random number has one or more leading zeros, wherein the unit for performing the elliptic curve digital signature algorithm signature operation includes: a unit for performing an elliptic curve point addition operation and an elliptic curve point doubling operation for each bit after a first bit in the second random number that is after the one or more leading zeros; and a unit for performing a virtual elliptic curve point addition operation and a virtual elliptic curve point doubling operation for each leading zero of the one or more leading zeros, wherein the virtual elliptic curve point addition operation and the virtual elliptic curve point doubling operation have no effect on the result data.
[0124] Example 36 includes the subject matter of any one of Examples 26-35, wherein the ECC engine further includes: a unit for reading a second opcode from the instruction port, wherein the second opcode indicates an elliptic curve digital signature algorithm verification operation; a unit for performing the elliptic curve digital signature algorithm verification operation without entering the protected mode in response to reading the second opcode, wherein the unit for performing the elliptic curve digital signature algorithm verification operation includes: a unit for determining a first intermediate value u1; a unit for determining a second intermediate value u2; a unit for determining a smaller number of leading zeros of u1 and u2; a unit for performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros, wherein the unit for performing the elliptic curve operation for u1 after the smaller number of leading zeros The unit for performing one or more elliptic curve operations at each index position after the first bit after the small number includes: a unit for performing a point doubling operation when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 0; a unit for performing a point doubling operation and a point addition operation when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0; a unit for performing a point doubling operation and a point addition operation when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1; and a unit for performing a point doubling operation and only one point addition operation when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1; and a unit for writing second result data to the output port of the ECC engine in response to the ECC engine performing the elliptic curve digital signature algorithm verification operation.
[0125] Example 37 includes the subject matter of any of Examples 26-36, wherein the means for writing the second result data comprises means for writing a plurality of redundant bit values to the output port.
Claims
1. A computing device for computing an elliptic curve digital signature, the computing device comprising: An elliptic curve cryptography (ECC) engine, wherein the ECC engine is used to: Reading a parameter value of each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; Reading an operation code from an instruction port of the ECC engine, wherein the operation code indicates a signature operation of the elliptic curve digital signature algorithm; entering a protected mode in response to reading the opcode, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; performing the elliptic curve digital signature algorithm signature operation in response to reading the operation code; exiting the protected mode in response to completion of the elliptic curve digital signature algorithm signature operation; and Writing result data to an output port of the ECC engine in response to performing the elliptic curve digital signature algorithm signature operation.
2. The computing device of claim 1, wherein: The ECC engine is further configured to: reading a second opcode from the instruction port, wherein the second opcode indicates an encryption operation different from the elliptic curve digital signature algorithm signature operation; performing the cryptographic operation without entering the protected mode in response to reading the second opcode; and Second result data is written to the output port of the ECC engine in response to performing the cryptographic operation.
3. The computing device of claim 2, wherein: Performing the encryption operation includes performing prime field arithmetic operations.
4. The computing device of claim 2, wherein: Performing the cryptographic operation includes performing an elliptic curve operation.
5. The computing device of claim 4, wherein: Performing an elliptic curve operation includes performing an elliptic curve scalar multiplication operation, an elliptic curve point addition operation, or an elliptic curve subtraction operation.
6. The computing device of claim 1, wherein: Performing the elliptic curve digital signature algorithm signing operation includes performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the plurality of parameters.
7. The computing device of claim 6, wherein: One of the multiple parameters is a random number, wherein performing the elliptic curve digital signature algorithm signature operation includes: using the random number to convert a point on the elliptic curve into a Jacobian matrix coordinate.
8. The computing device of claim 7, wherein: Executing the elliptic curve digital signature algorithm signature operation includes: using the random number to convert a point on the elliptic curve into two different Jacobian matrix coordinates.
9. The computing device of claim 8, wherein: One of the plurality of parameters is a second random number, wherein the second random number has one or more leading zeros, wherein performing the elliptic curve digital signature algorithm signature operation comprises: performing an elliptic curve point addition operation and an elliptic curve point doubling operation on each bit after a first bit after the one or more leading zeros in the second random number; and For each leading zero of the one or more leading zeros, a virtual elliptic curve point addition operation and a virtual elliptic curve point doubling operation are performed, wherein the virtual elliptic curve point addition operation and the virtual elliptic curve point doubling operation have no effect on the result data.
10. The computing device of claim 1, wherein: The ECC engine is further configured to: Reading a second opcode from the instruction port, wherein the second opcode indicates an elliptic curve digital signature algorithm verification operation; In response to reading the second opcode, performing the elliptic curve digital signature algorithm verification operation without entering the protected mode, wherein performing the elliptic curve digital signature algorithm verification operation includes: Determine a first intermediate value u1; Determine a second intermediate value u2; Determine the smaller number of leading zeros of u1 and u2; For each index position of u1 after a first bit after the smaller number of leading zeros, performing one or more elliptic curve operations, wherein performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros comprises: When the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 0, a doubling operation is performed; When the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0, a dot doubling operation and a dot addition operation are performed; When the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1, performing a dot doubling operation and a dot addition operation; and When the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1, a dot doubling operation and only one dot addition operation are performed; and In response to execution of the elliptic curve digital signature algorithm verification operation, second result data is written to the output port of the ECC engine.
11. The computing device of claim 10, wherein: Writing the second result data includes writing a plurality of redundant bit values to the output port.
12. A method for calculating an elliptic curve digital signature, the method comprising: reading, by an elliptic curve cryptography (ECC) engine of the computing device, a parameter value for each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; The ECC engine reads an operation code from an instruction port of the ECC engine, wherein the operation code indicates a signature operation of the elliptic curve digital signature algorithm; entering, by the ECC engine in response to reading the opcode, a protected mode, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; performing, by the ECC engine in response to reading the operation code, the elliptic curve digital signature algorithm signature operation; Exiting the protected mode by the ECC engine in response to completion of the elliptic curve digital signature algorithm signature operation; and The ECC engine writes result data to an output port of the ECC engine in response to performing the elliptic curve digital signature algorithm signature operation.
13. The method according to claim 12, further comprising: Reading, by the ECC engine, a second opcode from the instruction port, wherein the second opcode indicates an encryption operation different from the elliptic curve digital signature algorithm signature operation; performing, by the ECC engine in response to reading the second opcode, the cryptographic operation without entering the protected mode; and Second result data is written by the ECC engine to the output port of the ECC engine in response to performing the encryption operation.
14. The method according to claim 13, wherein: Performing the encryption operation includes performing prime field arithmetic operations.
15. The method according to claim 13, wherein: Performing the cryptographic operation includes performing an elliptic curve operation.
16. The method according to claim 15, wherein: Performing an elliptic curve operation includes performing an elliptic curve scalar multiplication operation, an elliptic curve point addition operation, or an elliptic curve subtraction operation.
17. The method according to claim 12, wherein: Performing the elliptic curve digital signature algorithm signing operation includes performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the plurality of parameters.
18. The method according to claim 17, wherein: One of the multiple parameters is a random number, wherein performing the elliptic curve digital signature algorithm signature operation includes: using the random number to convert a point on the elliptic curve into a Jacobian matrix coordinate.
19. The method according to claim 18, wherein: Executing the elliptic curve digital signature algorithm signature operation includes: using the random number to convert a point on the elliptic curve into two different Jacobian matrix coordinates.
20. The method according to claim 19, wherein: One of the plurality of parameters is a second random number, wherein the second random number has one or more leading zeros, wherein performing the elliptic curve digital signature algorithm signature operation comprises: performing an elliptic curve point addition operation and an elliptic curve point doubling operation on each bit after a first bit after the one or more leading zeros in the second random number; and For each leading zero of the one or more leading zeros, a virtual elliptic curve point addition operation and a virtual elliptic curve point doubling operation are performed, wherein the virtual elliptic curve point addition operation and the virtual elliptic curve point doubling operation have no effect on the result data.
21. The method of claim 12, further comprising: The ECC engine reads a second operation code from the instruction port, wherein the second operation code indicates an elliptic curve digital signature algorithm verification operation; performing, by the ECC engine in response to reading the second opcode, the elliptic curve digital signature algorithm verification operation without entering the protected mode, wherein performing the elliptic curve digital signature algorithm verification operation comprises: Determine a first intermediate value u1; Determine a second intermediate value u2; Determine the smaller number of leading zeros of u1 and u2; Performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros, wherein performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros comprises: When the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 0, a doubling operation is performed; When the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0, a dot doubling operation and a dot addition operation are performed; When the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1, performing a dot doubling operation and a dot addition operation; and When the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1, a dot doubling operation and only one dot addition operation are performed; and Second result data is written by the ECC engine to the output port of the ECC engine in response to performing the elliptic curve digital signature algorithm verification operation.
22. The method according to claim 21, wherein: Writing the second result data includes writing a plurality of redundant bit values to the output port.
23. A computing device for computing an elliptic curve digital signature, the computing device comprising an elliptic curve cryptography (ECC) engine, wherein: The ECC engine comprises: a unit for reading a parameter value for each of a plurality of parameters for an elliptic curve digital signature algorithm signature operation from a data port of the ECC engine; a unit for reading an opcode from an instruction port of the ECC engine, wherein the opcode indicates an elliptic curve digital signature algorithm signature operation; means for entering a protected mode in response to reading the opcode, wherein the ECC engine is configured to ignore input from the data port when in the protected mode; means for performing said elliptic curve digital signature algorithm signing operation in response to reading said opcode; means for exiting the protected mode in response to completion of the elliptic curve digital signature algorithm signature operation; and Unit for writing result data to an output port of the ECC engine in response to performing the ECDSA signature operation.
24. The computing device of claim 23, wherein: The means for performing the elliptic curve digital signature algorithm signing operation includes means for performing the elliptic curve digital signature algorithm signing operation in a fixed amount of time independent of parameter values of the plurality of parameters.
25. The computing device of claim 23, wherein: The ECC engine further comprises: means for reading a second opcode from the instruction port, wherein the second opcode indicates an elliptic curve digital signature algorithm verification operation; Unit for performing the elliptic curve digital signature algorithm verification operation without entering the protected mode in response to reading the second opcode, wherein the unit for performing the elliptic curve digital signature algorithm verification operation comprises: A unit for determining a first intermediate value u1; a unit for determining a second intermediate value u2; A unit for determining the smaller number of leading zeros of u1 and u2; A unit for performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros, wherein the unit for performing one or more elliptic curve operations for each index position of u1 after a first bit after the smaller number of leading zeros comprises: a unit for performing a point doubling operation when the bit value at the index position of u1 is 0 and the bit value at the index position of u2 is 0; a unit for performing a dot doubling operation and a dot addition operation when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 0; a unit for performing a dot doubling operation and a dot addition operation when the bit value of the index position of u1 is 0 and the bit value of the index position of u2 is 1; and a unit for performing a point doubling operation and only one point addition operation when the bit value of the index position of u1 is 1 and the bit value of the index position of u2 is 1; and Means for writing, by the ECC engine in response to performing the Elliptic Curve Digital Signature Algorithm verification operation, second result data to the output port of the ECC engine.
