Encryption device, encryption method, and encryption program
The encryption device optimizes AES round function execution by grouping and parallel processing, addressing speed limitations in conventional methods, thereby increasing encryption speed and efficiency.
Patent Information
- Application Number
- JP2021127442
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-08-03
- Publication Date
- 2024-10-24
- Estimated Expiration
- 2041-08-03
AI Technical Summary
Conventional encryption methods using AES round functions require numerous instructions, leading to insufficient processing speed.
An encryption device and method that groups AES round functions for parallel execution, utilizing processor instructions with bit limits to minimize processing load, and optimizes grouping based on common operations and input values.
Enhances encryption speed by reducing processing cycles and improving efficiency through parallel processing of grouped AES round functions.
Smart Images

Figure 0007572922000001 
Figure 0007572922000002 
Figure 0007572922000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a method for fast implementation of a cryptographic scheme. [Background technology]
[0002] Conventionally, processors such as CPUs have been equipped with special instruction sets for executing specific processes at high speed. For example, CPUs manufactured by Intel (registered trademark) are equipped with an instruction set (AES-NI) for executing AES (Advanced Encryption Standard) processes at high speed, and by utilizing this, it is possible to process AES round functions at high speed. In Non-Patent Document 1, a study is conducted on the implementation of a high-speed encryption method using this instruction set. [Prior art documents] [Non-patent literature]
[0003] [Non-Patent Document 1] J. Jean and I. Nikolic, "Efficient Design Strategies Based on the AES Round Function," in Fast Software Encryption, vol. 9783, T. Peyrin, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 2016, pp. 334-353. Summary of the Invention [Problem to be solved by the invention]
[0004] However, in conventional implementations, it was necessary to call instructions for the number of rounds of the AES, which was not sufficiently fast.
[0005] An object of the present invention is to provide an encryption device, an encryption method, and an encryption program that can quickly execute an encryption scheme that uses AES round functions. [Means for solving the problem]
[0006] The encryption device of the present invention is an encryption device that implements an encryption method in which an AES round function is executed multiple times to update each of multiple internal states of a specified bit length, and is equipped with a processing unit that processes a group of the round functions that can be executed in parallel together by a single invocation of a specified instruction, the instruction having an upper limit on the number of bits that can be processed, and the round functions are grouped so that the processing load according to the number of invocations of the instruction is minimized.
[0007] Among the plurality of round functions, those having a common type of subsequent operation may be grouped.
[0008] Among the plurality of round functions, those having at least a portion of a common input value to the subsequent operation may be grouped.
[0009] The round functions may be grouped according to a plurality of instructions each having a different upper limit on the number of bits that can be processed.
[0010] In the encryption method of the present invention, when a computer implements an encryption scheme in which an AES round function is executed multiple times to update each of multiple internal states of a specified bit length, a group of the round functions that can be executed in parallel are processed collectively by a single invocation of a specified instruction, the instruction having an upper limit on the number of bits that can be processed, and the round functions are grouped so that the processing load according to the number of invocations of the instruction is minimized.
[0011] An encryption program according to the present invention causes a computer to function as the encryption device. Effect of the Invention
[0012] According to the present invention, an encryption method using AES round functions can be executed at high speed. [Brief description of the drawings]
[0013] [Figure 1] FIG. 1 illustrates a conventional implementation of a cryptographic method. [Diagram 2] FIG. 2 is a diagram illustrating a functional configuration of an encryption device according to an embodiment. [Diagram 3] FIG. 2 is a diagram illustrating an implementation method of an encryption method according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0014] An example of an embodiment of the present invention will now be described. In this embodiment, the conventional implementation method of the encryption method is improved, and by using an instruction set provided in a specific CPU, the number of processing cycles required to execute the AES round functions is reduced, thereby achieving higher speeds.
[0015] FIG. 1 is a diagram illustrating a conventional implementation of a cryptographic method. This example is one of the configurations proposed in the aforementioned Non-Patent Document 1. Here, for seven internal states (0 to 6), each of which is a 128-bit value, the AES round function (A) is executed five times, and an XOR operation with the message (M1 or M2) is executed seven times, converting the state into a new internal state. Here, by implementing an instruction set for fast execution of the round functions, the processing speed of the entire encryption method is improved.
[0016] In this embodiment, as shown in FIG. 1, an encryption device is provided that implements an encryption method that executes the round function of AES multiple times to update multiple internal states of a specified bit length (for example, 128 bits).
[0017] FIG. 2 is a diagram showing the functional configuration of the encryption device 1 in this embodiment. The encryption device 1 is an information processing device (computer) that includes a control unit 10, a storage unit 20, and various input / output interfaces.
[0018] The control unit 10 is a part that controls the entire encryption device 1, and realizes each function in this embodiment by appropriately reading and executing various programs stored in the storage unit 20. The control unit 10 may be a CPU.
[0019] The storage unit 20 is a storage area for various programs for causing the hardware group to function as the encryption device 1, various data, and the like, and may be a ROM, a RAM, a flash memory, a hard disk drive (HDD), or the like. Specifically, the storage unit 20 stores a program (encrypted program) for causing the control unit 10 to execute each function of the present embodiment.
[0020] The control unit 10 executes the encryption program to function as a processing unit 11. The processing unit 11 collectively processes a group of round functions that can be executed in parallel by calling a predetermined instruction once. Here, a specific instruction implemented in the control unit 10 (processor) and called by the processing unit 11 has an upper limit on the number of bits that can be processed, and the round functions are grouped so that the processing load according to the number of times the instruction is called is minimized.
[0021] For example, Intel CPUs of the Ice Lake generation implement the following two instructions that can process 256-bit and 512-bit data together. __m256i _mm256_aesenc_epi128 (__m256i a, __m256i RoundKey) __m512i _mm512_aesenc_epi128 (__m512i a, __m512i RoundKey) By calling these instructions once, it is possible to simultaneously execute the processing of the round functions on inputs (multiple internal states) of up to 256 bits (two round functions) or 512 bits (four round functions).
[0022] FIG. 3 is a diagram illustrating an implementation method of the encryption method according to the present embodiment. In the implementation method shown in the conventional example (Figure 1), it was necessary to call the process to execute the AES round function a total of five times. In contrast, in the implementation method of this embodiment, the round functions (128-bit input) that are executed a total of five times are grouped into, for example, two times and three times, and the processing unit 11 processes two round functions using instructions with 256-bit input, and three round functions using instructions with 512-bit input, together in one run.
[0023] As a result, a process that previously required (the number of cycles in one round x 5) can be executed with a reduced number of cycles (the number of cycles in one round x 2). In the example of Fig. 3, the five round functions are independent of each other and there is no restriction on the execution order, so that they can be executed in parallel in terms of the algorithm. Therefore, any combination of groupings is acceptable, but in order to improve processing efficiency, it is preferable to determine the combination as follows:
[0024] In various cryptographic methods, the result of a round function is often further transformed by a subsequent operation. In this case, the processing may be made more efficient by grouping together multiple round functions that have a common type of subsequent operation (e.g., XOR, AND, etc.), and further by grouping together multiple round functions that have at least a portion of the input values (messages) to the subsequent operation in common.
[0025] For example, in the example of Figure 3, two round functions for internal states 0 and 1 are grouped together in which message M1 is a common input to the subsequent XOR operation, and are executed simultaneously by an instruction processing 256 bits or an instruction processing 512 bits. In addition, the three round functions for internal states 3 to 5 are grouped together in which message M2 is commonly input to the subsequent XOR operation, and are executed simultaneously by an instruction that processes 512 bits.
[0026] In addition, when multiple instructions are available, such as for 256 bits and 512 bits as mentioned above, if the processing load varies depending on the number of invocations, the overall processing load depending on the combination of round function groups and instructions may be compared, and the group and instruction that results in the smallest processing load may be determined.
[0027] According to this embodiment, a predetermined instruction set implemented in a processor is used in an encryption method having AES round functions as components. This allows the encryption device 1 to execute multiple round functions collectively, thereby reducing the total number of processing cycles required for encryption and decryption, i.e., the processing time. As a result, an increase in encryption processing speed and further an increase in the speed of encrypted communication are realized.
[0028] In addition, the encryption device 1 groups and processes round functions that have a common type of subsequent operation, and further those that have at least some of the common input values to the subsequent operation, thereby making the overall processing more efficient.
[0029] Furthermore, the encryption device 1 can appropriately group the round functions by appropriately selecting a plurality of instructions each having a different upper limit on the number of processable bits, thereby making it possible to improve the efficiency of processing.
[0030] In addition, the above-mentioned embodiment can realize, for example, high-speed encryption processing, which can contribute to Goal 9 of the Sustainable Development Goals (SDGs) led by the United Nations, which is to "Develop resilient infrastructure, promote sustainable industrialization and foster innovation."
[0031] Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments. Furthermore, the effects described in the above-described embodiments are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the embodiments.
[0032] The encryption method by the encryption device 1 is realized by software. When realized by software, a program constituting this software is installed in an information processing device (computer). These programs may be recorded on a removable medium such as a CD-ROM and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer as a Web service via a network without being downloaded. [Explanation of symbols]
[0033] 1 Encryption device 10 Control section 11 Processing section 20 Memory section
Claims
1. An encryption device that implements an encryption method that executes a round function of AES multiple times to update multiple internal states of a specified bit length, a processing unit that collectively processes a group of the round functions that can be executed in parallel by a single invocation of a predetermined instruction; The instruction has an upper limit on the number of bits that can be processed, and among the multiple round functions, round functions that have a common type of subsequent operation are grouped preferentially so as to minimize the number of times the instruction is called.
2. The encryption device according to claim 1 , wherein among the plurality of round functions, those having at least a part of a common input value to the subsequent operation are grouped.
3. 3. The encryption device according to claim 1, wherein the round functions are grouped according to a plurality of instructions each having a different upper limit on the number of processable bits.
4. When a computer implements an encryption method in which the round function of AES is executed multiple times to update multiple internal states of a specified bit length, processing a group of said round functions that are executable in parallel together in a single invocation of a predetermined instruction; The instruction has an upper limit on the number of bits that can be processed, and among the multiple round functions, round functions that have a common type of subsequent operation are preferentially grouped so as to minimize the number of times the instruction is called.
5. An encryption program for causing a computer to function as the encryption device according to any one of claims 1 to 3.
Citation Information
Patent Citations
Encryption processing device, encryption processing method, and program
JP2012215816A
