An information processing apparatus is provided that performs information processing for encrypting data using aes, which includes performing a process of generating round key data on a one-byte-by-one-byte basis, performing a row shift transformation that is a process of performing row shifting for the data by use of a row shift table, performing a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table that is a one-dimensional array, performing a column mix transformation that is a process of performing column mixing for the data having undergone the byte substitution transformation based on equivalent expressions, performing a key add transformation that is a process of performing an exclusive-OR operation based on the round key data and the data having undergone the column mix transformation, wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
|
4. An information processing apparatus for decrypting data using aes, comprising:
a memory; and
an arithmetic unit coupled to the memory and configured to perform:
a process of generating round key data on a one-byte-by-one-byte basis with respect to a first one-byte array, each element of which is one byte, the process of generating round key data including a one-byte substitution process through which an element of the first one-byte array is used as an index of a second one-byte array to obtain an element of the second one-byte array as a substituting replaced with another one-byte value;
a row shift transformation that is a process of performing row shifting for the data by use of a row shift table;
a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table whose source code is implemented as a one-dimensional array having a one-dimensional index one input parameter;
a key add transformation that is a process of performing an exclusive-OR operation with respect to the data having undergone the byte substitution transformation; and
a column mix transformation that is a process of performing column mixing for the data having undergone the key add transformation based on equivalent expressions,
generation of decrypted data using the data having undergone the column mix transformation,
wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
1. An information processing apparatus for encrypting data using aes, comprising:
a memory; and
an arithmetic unit coupled to the memory and configured to perform:
a process of generating round key data on a one-byte-by-one-byte basis with respect to a first one-byte array, each element of which is one byte, the process of generating round key data including a one-byte substitution process through which an element of the first one-byte array is used as an index of a second one-byte array to obtain an element of the second one-byte array as a substituting replaced with another one-byte value;
a row shift transformation that is a process of performing row shifting for the data by use of a row shift table;
a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table whose source code is implemented as a one-dimensional array having a one-dimensional index one input parameter;
a column mix transformation that is a process of performing column mixing for the data having undergone the byte substitution transformation based on equivalent expressions; and
a key add transformation that is a process of performing an exclusive-OR operation with respect to the round key data and the data having undergone the column mix transformation,
generation of encrypted data using the data having undergone the key add transformation,
wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
8. A non-transitory computer-readable recording medium having a program recorded therein for decrypting data using aes and for causing a computer to perform information processing, the program comprising:
a generation process step causing the computer to perform a process of generating round key data on a one-byte-by-one-byte basis with respect to a first one-byte array, each element of which is one byte, the process of generating round key data including a one-byte substitution process through which an element of the first one-byte array is used as an index of a second one-byte array to obtain an element of the second one-byte array as a substituting replaced with another one-byte value;
a row shift transformation step causing the computer to perform a row shift transformation that is a process of performing row shifting for the data by use of a row shift table;
a byte substitution transformation step causing the computer to perform a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table whose source code is implemented as a one-dimensional array having a one-dimensional index one input parameter;
a key add transformation step causing the computer to perform a key add transformation that is a process of performing an exclusive-OR operation with respect to the data having undergone the byte substitution transformation; and
a column mix transformation step causing the computer to perform a column mix transformation that is a process of performing column mixing for the data having undergone the key add transformation based on equivalent expressions;
a decryption step causing the computer to perform generation of decrypted data using the data having undergone the column mix transformation,
wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
7. A non-transitory computer-readable recording medium having a program recorded therein for encrypting data using aes and for causing a computer to perform information processing, the program comprising:
a generation process step causing the computer to perform a process of generating round key data on a one-byte-by-one-byte basis with respect to a first one-byte array, each element of which is one byte, the process of generating round key data including a one-byte substitution process through which an element of the first one-byte array is used as an index of a second one-byte array to obtain an element of the second one-byte array as a substituting replaced with another one-byte value;
a row shift transformation step causing the computer to perform a row shift transformation that is a process of performing row shifting for the data by use of a row shift table;
a byte substitution transformation step causing the computer to perform a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table whose source code is implemented as a one-dimensional array having a one-dimensional index one input parameter;
a column mix transformation step causing the computer to perform a column mix transformation that is a process of performing column mixing for the data having undergone the byte substitution transformation based on equivalent expressions; and
a key add transformation step causing the computer to perform a key add transformation that is a process of performing an exclusive-OR operation with respect to the round key data and the data having undergone the column mix transformation,
an encryption step causing the computer to perform generation of encrypted data using the data having undergone the key add transformation,
wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
2. The information processing apparatus as claimed in
3. The information processing apparatus as claimed in
5. The information processing apparatus as claimed in
6. The information processing apparatus as claimed in
|
The present application is based on Japanese priority application No. 2014-105641 filed on May 21, 2014, with the Japanese Patent Office, the entire contents of which are hereby incorporated by reference. The present application is a continuation application of International Application PCT/JP2015/057935 filed on Mar. 17, 2015 and designated the U.S., the entire contents of which are incorporated herein by reference.
1. Field of the Invention
The present invention generally relates to an information processing apparatus, a program, and a recording medium.
2. Description of the Related Art
Conventionally, data encryption methods known in the art include AES (Advanced Encryption Standard) defined by FIPS (Federal Information Processing Standard) 197.
In the case of encrypting or decrypting data by use of AES, parameters used in transformations are set such that parameters used in encryption are different from parameters used in decryption. Such an arrangement is known to reduce data storage volume (see Patent Document 1, for example).
The conventional arrangement, however, is associated with the risk of the program having a large data size due to a large amount of source code descriptions.
One aspect of the present invention is aimed at reducing the program data size by use of a one-dimensional array.
According to an embodiment, an information processing apparatus for encrypting data using AES is characterized by including performing a process of generating round key data on a one-byte-by-one-byte basis, performing a row shift transformation that is a process of performing row shifting for data by use of a row shift table, performing a byte substitution transformation that is a process of performing byte substitution for the data having undergone the row shift transformation by use of a byte substitution table that is a one-dimensional array, performing a column mix transformation that is a process of performing column mixing for the data having undergone the byte substitution transformation based on equivalent expressions, performing a key add transformation that is a process of performing an exclusive-OR operation based on the round key data and the data having undergone the column mix transformation, wherein the row shift transformation, the byte substitution transformation, the column mix transformation, and the key add transformation are performed on a four-byte-by-four-byte basis.
The reduction of program data size is enabled.
In the following, a description will be given of embodiments of the present invention.
An information processing apparatus may be an embedded system 1. In the following, a description will be given by using the embedded system 1 as an example. The embedded system 1 may be embedded in industrial equipment or home electric appliances to provide specific functions, for example. The information processing apparatus may be a PC (personal computer) or the like.
<Example of Hardware Configuration of Embedded System>
The embedded system 1 includes an arithmetic unit 1H1, a memory unit 1H2, and an I/F (interface) 1H3.
The arithmetic unit 1H1 may be a CPU (central processing unit) or an MPU (micro-processing unit). The arithmetic unit 1H1 serves to perform arithmetic operations relating to various processes performed by the embedded system 1, and also serves as a control unit for controlling the devices constituting the embedded system 1. The arithmetic unit 1H1 further includes embedded memory areas such as a RAM (random access memory) 1H11 and ROM (read-only memory) 1H12.
The RAM 1H11 serves as a memory unit to which programs or data or the like are loaded when the arithmetic unit 1H1 performs arithmetic and control operations.
The ROM 1H12 serves as a memory unit which stores programs or data or the like that are used when the arithmetic unit 1H1 performs arithmetic and control operations.
The memory unit 1H2 is generally referred to as a memory. The memory unit 1H2 is a storage device to which programs or data or the like are loaded when the embedded system 1 performs various processes under the control of the arithmetic unit 1H1.
The I/F 1H3 is an interface for inputting and outputting data or the like into and from the embedded system 1. The I/F 1H3 is implemented by use of a connector, a cable, a driver, and the like.
The hardware configuration is not limited to the configuration illustrated in
<Comparative Example of Generation of Round Key Data>
First source code 2 implements the process of generating round key data of the comparative example. The process of generating round key data of the comparative example is performed with respect to each data that is input into “temp” 21 which is a memory area. A first process 22 of the first source code 2 serves to perform 4-byte-by-4-byte substitution in order to substitute the input data of an array “key” for an array “w” when the array “key” is declared as having a one-byte memory area as indicated by “byte” and the array “key” is declared as having a four-byte memory area as indicated by “word”.
The “temp” 21 is a variable declared as “word”, i.e., a four-byte memory area. The first source code 2 has a second process 23 that is performed to derive round key data for each “temp” 21. The second process 23 includes a process based on a “RotWord” function that performs the rotation shift for shifting four-byte input data to the right by 8 bits and moving the 8 overflown lower bits resulting from the right shift to the 8 upper bits. “RotWord” will hereinafter be used to refer to the above-noted function.
The second process 23 performs a process based on a “SubWord” function that performs a “SubBytes” process with respect to each one-byte data of the four-byte input data. “SubWord” will hereinafter be used to refer to the above-noted function. A description of “SubBytes” will be given later.
In the first source code 2, “Nk” is a variable that has a value indicative of the length of input key data. “Nk” will hereinafter be used to refer to the above-noted variable.
In the first source code 2, “Nb” is a variable that has a value indicative of a block length of data subjected to encryption and decryption. AES uses “Nb” that is 4, which indicates 128 bits. “Nb” will hereinafter be used to refer to the above-noted variable.
In the first source code 2, “Nr” is a variable that has a value indicative of a round number. “Nr” used in AES corresponds to the length of key data. The value of “Nr” is equal to 10 to indicate 128 bits, 12 to indicate 192 bits, and 14 to indicate 256 bits. “Nr” will hereinafter be used to refer to the above-noted variable.
In the first source code 2, “Rcon” is the function to calculate a four-byte round number for use in the arithmetic operation in the case of the variable “i” being an integer multiple of “Nk”. The one upper byte of the value calculated by “Rcon” may be expressed by the following formula (1). “Rcon” will hereinafter be used to refer to the above-noted function.
[Expression 1]
2t/Nk∈GF(28), otherwise 0 (formula 1)
<Example of Generation of Round Key Data>
Second source code 3 implements the process of generating round key data as does the first source code 2 illustrated in
With a third process 31, the embedded system 1 processes the four-byte data input into the “temp” 21 on a one-byte-by-one-byte basis. Further, the third process 31 serves to generate round key data for each byte. As is illustrated, the process of generating round key data performs a process based on the “SubBytes” function and a process based on the “Rcon” function in place of a process based on the “RotWord” function and a process based on “SubWord” function illustrated in
The process of generating round key data may be implemented by use of the method illustrated in
Performing the process of generating round key data on a one-byte-by-one-byte basis with respect to four-byte data allows the embedded system 1 to process the input data on a byte-specific basis. The four-byte data may include unneeded data. In such a case, the embedded system 1 performing a byte-specific process is able to avoid processing unneeded data, thereby improving the processing speed.
In
<Comparative Example of Entire Process of Encryption and Decryption>
Fourth source code 4A implements the process of encrypting input data 4A1 to generate output data 4A2. Further, the encryption process is performed on a unit-by-unit basis where one unit is one round of the encryption process 42 in
Fifth source code 4B implements the process of decrypting input data 4B1 to generate output data 4B2. Further, the decryption process is performed on a unit-by-unit basis where one unit is a four-byte process in one round of the decryption process 43 in
In the fourth source code 4A and the fifth source code 4B, the input data 4A1 and the input data 4B1 are input on a one-byte-by-one-byte basis into a “state” 41 that is block data having 4 rows and 4 columns, and are then processed.
Input data 4C1 is either one of the input data 4A1 illustrated in
In the comparative example, the two-dimensional data “state” comprised of 4 rows and 4 columns are subjected to processing, thereby converting the input data 401 into the output data 4C3.
The encryption process of the comparative example is implemented by the “AddRoundKey” function, the “SubBytes” function, the “ShiftRows” function, and the “MixColumns” function as illustrated in
The decryption process of the comparative example is implemented by the “AddRoundKey” function, the “InvSubBytes” function, the “InvShiftRows” function, and the “InvMixColumns” function as illustrated in
The “InvSubBytes” function is the inverse function of the “SubBytes” function. Further, the “InvShiftRows” function is the inverse function of the “ShiftRows” function. Moreover, the “InvMixColumns” function is the inverse function of the “MixColumns” function.
<Example of One-Dimensional Array>
Specifically, the one-dimensional array “S” is a one-dimensional array that stores 16 data items each of which is one byte. With this arrangement, the embedded system 1 performs each of the encryption process and the decryption process with respect to the one-dimensional array “S” on a data-item-specific basis.
<Example of Encryption and Decryption>
In one round of the encryption process, either the process illustrated in
In step S0601, the embedded system 1 performs a byte substitution transformation for performing byte substitution for data. The details of the byte substitution transformation will be described later.
In step S0602, the embedded system 1 performs a row shift transformation for performing row shifting for data. The details of the row shift transformation will be described later.
In step S0603, the embedded system 1 performs a column mix transformation for performing column mixing for data. The details of the column mix transformation will be described later.
In step S0604, the embedded system 1 performs a key add transformation for data based on round key data. The round key data is generated by the processing of generating round key data, for example. The details of the key add transformation will be described later.
In step S0701, the embedded system 1 performs a row shift transformation for performing row shifting for data. When data encrypted by the process illustrated in
In step S0701, the embedded system 1 performs a byte substitution transformation for performing byte substitution for data. When data encrypted by the process illustrated in
In step S0703, the embedded system 1 performs a key add transformation for data based on round key data.
In step S0704, the embedded system 1 performs a column mix transformation for performing column mixing for data. When data encrypted by the process illustrated in
The four-byte process in one round of decryption may be implemented by use of decryption source code 10, for example. The decryption source code 10 is an example of the decryption process for four-byte data 10IN.
In the decryption source code 10, the embedded system 1 performs, with respect to the four-byte data 10IN, the “InvShiftRows” function 10Fun1 that is an example of the row shift transformation. The process performed by the “InvShiftRows” function 10Fun1 corresponds to the process performed in step S0701 illustrated in
Further in the decryption source code 10, the embedded system 1 performs, with respect to the data generated by the “InvShiftRows” function 10Fun1, the “InvSubBytes” function 10Fun2 that is an example of the byte substitution transformation. The process performed by the “InvSubBytes” function 10Fun2 corresponds to the process performed in step S0702 illustrated in
Further in the decryption source code 10, the embedded system 1 performs, with respect to the data generated by the “InvSubBytes” function 10Fun2, a process defined by key add transformation code 1001 that is an example of the key add transformation. The process performed by the key add transformation code 1001 corresponds to the process performed in step S0703 illustrated in
Further in the decryption source code 10, the embedded system 1 performs, with respect to the data generated by the process of the key add transformation code 1001, a process defined by column mix transformation code 1002 that is an example of the column mix transformation. The process performed by the column mix transformation code 1002 corresponds to the process performed in step S0704 illustrated in
With the implementation of source code as illustrated in
In the following, a description will be given by use of the decryption process as an example.
The entire processes of encryption and decryption are not limited to the processes illustrated in
<Example of Key Add Transformation>
The key add transformation is the process performed in step S0604 illustrated in
The embedded system 1 performs the key add transformation by performing an exclusive-OR operation between an array “ADKin” 61, which is an input into the key add transformation, and an array “KD” 62, which has round key data stored therein as an input into the key add transformation. The result of performing the key add transformation is an array “ADKout” 64, for example. The round key data stored in the array “KD” 62 are the data generated by the process of generating round key data, for example. It may be noted that the operator “^” appearing in the sixth source code 6 refers to an exclusive-OR operation. The operator “^” will hereinafter be used in the same manner to refer to an exclusive-OR operation.
A variable “cnt” in the sixth source code 6 is for the purpose of performing a count-up. The variable “cnt” will hereinafter be used in the same manner to refer to a variable for such a purpose. The variable “cnt” in the sixth source code 6 may take a value ranging from 0 to 15.
A variable “ROU” in the sixth source code is for the purpose of indicating a value determined based on the length of the key. In the case of the length of the key being 128 bits, for example, the variable “ROU” takes a value ranging from 0 to 10.
Performing the key add transformation by use of one-dimensional array data, i.e., the array “ADKin” 61 illustrated in
Because of the use of a one-dimensional array input, the embedded system 1 enables processing of the key add transformation with a small amount of program code like the sixth source code 6 illustrated in
<Example of Row Shift Transformation>
The row shift transformation is the process performed in step S0602 illustrated in
The row shift transformation serves to perform row shifting with respect to data. Row shifting is implemented by use of a row shift table, for example. The row shift table is one-dimensional array data illustrated as seventh source code 7, for example.
After the one-dimensional array “S” 5 illustrated in
Eighth source code 8 implements the row shift transformation for decryption. An array “ISRin” 81 is an array that is input into the row shift transformation. The array “ISRin” 81 corresponds to the one-dimensional array “S” 5 illustrated in
The array “ISRin” 81 is subjected to the row shift transformation performed by the “InvShiftRows” function to become an array that is output as an array “ISRout” 82. The array “ISRout” corresponds to the row-shifting-performed array 51 illustrated in
The row shift transformation is equivalent to the process that shifts data in the r-th row to the right by r column positions in the two-dimensional array.
First, the row shift transformation does not shift original data 100 in the 0-th row, thereby outputting processed data 200 in the 0-th row that has the same data arrangement as the input.
Next, the row shift transformation shifts original data 110 in the 1-st row to the right by one column position, thereby outputting processed data 210 in the 1-st row. The process that shifts the original data 110 in the 1-st row to the right by one column position is illustrated by graphic illustration 10ISR. The graphic illustration 10ISR shows the process of shifting data at the 0-th column to the 1-st column, shifting data at the 1-st column to the 2-nd column, shifting data at the 2-nd column to the 3-rd column, and shifting data at the 3-rd column to the 0-th column, which is known as a rotation shift process with the right shift by one column.
Further, the row shift transformation shifts original data 120 in the 2-nd row to the right by two column positions, thereby outputting processed data 220 in the 2-nd row. The process that shifts the original data 120 in the 2-nd row to the right by two column positions is illustrated by graphic illustration 20ISR. The graphic illustration 20ISR shows the process of shifting data at the 0-th column to the 2-nd column, shifting data at the 1-st column to the 3-rd column, shifting data at the 2-nd column to the 0-th column, and shifting data at the 3-rd column to the 1-st column, which is known as a rotation shift process with the right shift by two columns.
Moreover, the row shift transformation shifts original data 130 in the 3-rd row to the right by three column positions, thereby outputting processed data 230 in the 3-rd row. The process that shifts the original data 130 in the 3-rd row to the right by three column positions is illustrated by graphic illustration 30ISR. The graphic illustration 30ISR shows the process of shifting data at the 0-th column to the 3-rd column, shifting data at the 1-st column to the 0-th column, shifting data at the 2-nd column to the 1-st column, and shifting data at the 3-rd column to the 2-nd column, which is known as a rotation shift process with the right shift by thee columns.
Performing the row shift transformation by using one-dimensional array data as the row shift table, the embedded system 1 is able to produce the same process result as the result of shifting data in the r-th row to the right by r column positions with respect to a two-dimensional input array having 4 rows and 4 columns as illustrated in
Because of the use of a one-dimensional array input, the embedded system 1 enables processing of the row shift transformation with a small amount of program code like the eighth source code 8 illustrated in
The row shift transformation described in connection with
<Example of Byte Substitution Transformation>
The byte substitution transformation is the process performed in step S0601 illustrated in
The byte substitution transformation serves to substitute data. The byte substitution transformation is implemented by a byte substitution table, for example. The byte substitution table is one-dimensional array data illustrated as ninth source code 9, for example. In the case of the input data being provided on a one-byte-by-one-byte basis and having 256 bits in total, the ninth source code is one-dimensional array data having 256 data elements. The byte substitution transformation serves to convert a value between 0 and 255 input as a parameter into the “InvSubBytes” function into a value stored in the byte substitution table, for example.
Tenth source code 11 implements the byte substitution transformation for decryption. An array “ISBin” 111 is an array that is input into the byte substitution transformation. The value input into the array “ISBin” 111 is subjected to the byte substitution transformation by the “InvSubBytes” function to become a value output as an array “ISBout” 112.
The byte substitution transformation is able to derive the same process result as the process performed by the S-BOX defined in FIPS 197 5.1.1. The process performed by the S-BOX is the byte substitution transformation using the illustrated table.
Performing the byte substitution transformation by using one-dimensional array data as the byte substitution table, the embedded system 1 is able to derive the same process result as the process performed by the S-BOX illustrated in
Because of the use of a one-dimensional array as an input, the embedded system 1 which uses the tenth source code 11 illustrated in
The byte substitution transformation described in connection with
<Example of Column Mix Transformation>
The column mix transformation is the process performed in step S0603 illustrated in
The column mix transformation serves to transform data. The column mix transformation is implemented by equivalent expressions, for example. The equivalent expressions are implemented by eleventh source code 12, for example.
As illustrated in the eleventh source code 12, the equivalent expressions are such that an exclusive-OR operation is performed between “in[0]” and “in[1]” that are input into the column mix transformation, and the result of the operation is substituted into a variable “in1_01”. Similarly, the equivalent expressions are such that an exclusive-OR operation is performed between “in[2]” and “in[3]” that are input into the column mix transformation, and the result of the operation is substituted into a variable “in1_23”.
Next, the equivalent expressions are such that an “IRPLY” function having the variable “in1_01” as a parameter is performed, and the result of the operation is substituted into a variable “in2_01”. Further, the equivalent expressions are such that the “IRPLY” function having the result of performing an exclusive-OR operation between “in[1]” and “in[2]” as a parameter is performed, and the result of the operation is substituted into a variable “in2_12”. Further, the equivalent expressions are such that an “IRPLY” function having the variable “in1_23” as a parameter is performed, and the result of the operation is substituted into a variable “in2_23”. Moreover, the equivalent expressions are such that the “IRPLY” function having the result of performing an exclusive-OR operation between “in[3]” and “in[0]” as a parameter is performed, and the result of the operation is substituted into a variable “in2_30”.
The “IRPLY” function is defined by twelfth source code 13, for example. Specifically, as illustrated in the twelfth source code 13, the “IRPLY” function is implemented as the combination of two shift operations, an exclusive-OR operation, and mapping by a table “Irply”.
Further, the equivalent expressions are such that the “IRPLY” function having the result of performing an exclusive-OR operation between the variable “in2_01” and the variable “in2_12” as a parameter is performed, and the result of the operation is substituted into a variable “in4_02”. Further, the equivalent expressions are such that the “IRPLY” function having the result of performing an exclusive-OR operation between the variable “in2_12” and the variable “in2_23” as a parameter is performed, and the result of the operation is substituted into a variable “in4_13”.
In the equivalent expressions, subsequently, the “IRPLY” function having the result of performing an exclusive-OR operation between the variable “in4_02” and the variable “in4_13” is performed. In the equivalent expressions, further, the result of performing exclusive-OR operations between the processing result of the “IRPLY” function, the variable “in1_01”, and the variable “in1_23” is substituted into a variable “in9_0123”.
In the equivalent expressions, moreover, the result of performing exclusive-OR operations between the variable “in9_0123”, the variable “in4_02”, the variable “in2_01”, and “in[0]” is obtained as “out[0]”. In the equivalent expressions, further, the result of performing exclusive-OR operations between the variable “in9_0123”, the variable “in4_13”, the variable “in2_12”, and “in[1]” is obtained as “out[1]”. In the equivalent expressions, moreover, the result of performing exclusive-OR operations between the variable “in9_0123”, the variable “in4_02”, the variable “in2_23”, and “in[2]” is obtained as “out[2]”. In the equivalent expressions, further, the result of performing exclusive-OR operations between the variable “in9_0123”, the variable “in4_13”, the variable “in2_30”, and “in[3]” is obtained as “out[3]”.
In the arithmetic operation using the “IRPLY” function, the following formula (2) is satisfied.
z=x^y Expression 2
IRPLY(z)=IRPLY(x)^IRPLY(y) (formula 2)
The embedded system 1 utilizes equivalent arithmetic operations using the “IRPLY” function based on the above-noted formula (2) to enable high-speed arithmetic computations with a small amount of code.
The calculations performed by the source code illustrated in
In the eleventh source code 12, the use of such variables enables the sharing of results of duplicated computations. The sharing of computation results allows the embedded system to reduce the amount of code necessary for computation. Because of this, the eleventh source code 12 enables the realization of the process illustrated in
The column mix transformation described in connection with
<Example of Process by Column Mix Table>
The column mix table is one-dimensional array data illustrated in
The process performed by the column mix table is a single mapping process. Because of this, the embedded system using the column mix table “Irply” is able to perform faster processing than the process that is performed by using the “IRPLY” function appearing in the twelfth source code 13 illustrated in
<Example of Result of Evaluation>
The program of the embodiment of the present invention is 1.6 kilobytes (Kbytes) more or less in data size. Because of this, the program of the embodiment of the present invention can be stored in one sector of a flash memory (registered trademark). Further, since the program of the embodiment of the present invention is 1.6 kilobytes more or less in data size, adding such a program to the memory area for storing drivers, maintenance software, OS or the like still allows the embedded system to store the program by use of a small number of sectors.
The sector area may be 4 kilobytes, and the data size of the program for AES may be 6 kilobytes. In such a case, one or two more sectors in the memory area are needed in order to store the program for AES in addition to drivers, maintenance software, and an OS. In comparison, the use of the program according to the embodiment of the present invention allows the embedded system to reduce the data size, thereby reducing the demand for memory areas.
<Example of Functional Configuration>
The embedded system 1 includes a generation process unit 1F1, an expansion process unit (i.e., a key add transformation unit) 1F2, a rearrangement process unit (i.e., row shift transformation unit) 1F3, a replacement process unit (i.e., byte substitution transformation unit) 1F4, and a transformation process unit (i.e., column mix transformation unit) 1F5.
The generation process unit 1F1 performs a process of generating round key data. The generation process unit 1F1 is implemented by the arithmetic unit 1H1 or the like illustrated in
The key add transformation unit 1F2 performs the key add transformation as illustrated in
The row shift transformation unit 1F3 performs the row shift transformation that is a process for performing row shifting for data. The row shift transformation unit 1F3 is implemented by the arithmetic unit 1H1 or the like illustrated in
The byte substitution transformation unit 1F4 performs the byte substitution transformation that is a process for performing byte substitution for data. The byte substitution transformation unit 1F4 is implemented by the arithmetic unit 1H1 or the like illustrated in
The column mix transformation unit 1F5 performs the column mix transformation that is a process for performing column mixing for data. The column mix transformation unit 1F5 is implemented by the arithmetic unit 1H1 or the like illustrated in
The embedded system 1 utilizes a one-dimensional array to enable the shared use of code between the cases of different conditions in the process of generating round key data, thereby reducing the amount of descriptions of source code to reduce program data size.
The use of a one-dimensional array in the embedded system 1 allows the key add transformation to be implemented with a small amount of code as in the case of the sixth source code 6 illustrated in
The use of a one-dimensional array in the embedded system 1 allows the row shift transformation to be implemented through a row shift table, thereby reducing the amount of descriptions of source code to suppress program data size.
The use of a one-dimensional array in the embedded system 1 allows the byte substitution transformation to be implemented through a byte substitution table, thereby reducing the amount of descriptions of source code to suppress program data size.
The use of a one-dimensional array in the embedded system 1 allows the computations of the column mix transformation to be implemented while enabling the sharing of computations, thereby reducing the amount of descriptions of source code to suppress program data size.
Accordingly, the embedded system 1 enables the reduction of program data size by performing at least one of the process of generating round key data, the key add transformation, the row shift transformation, the byte substitution transformation, and the column mix transformation of the embodiment of the present invention.
The embodiment is not limited the process for decryption. For example, the embodiment may be directed to encryption that uses the inverse functions of the respective processes.
Further, it is preferable for the embodiment to be applied to an embedded system for which many restrictions are imposed on the memory size to be used or the like. The embedded system preferably has such a hardware configuration that has a memory embedded in the arithmetic unit for the purpose of making it difficult for the program, data and the like of the embedded system to be deciphered.
All or part of the process relating to the embodiment of the present invention may be implemented as a program that is performed by a computer wherein such a program may be written in a legacy programming language or an object-oriented programming language such as assembler, C, C++, C#, and Java (registered trademark). Namely, the program is a computer program that causes a computer such as an information processing apparatus to perform all or part of each process relating to the embodiment of the present invention.
Such a program may be stored and distributed in a computer-readable recording medium such as a ROM, an EEPROM (electrically erasable programmable ROM), or the like. The recording medium may alternatively be an EPROM (erasable programmable ROM), a flash memory, a flexible disc, a CD-ROM, a CD-RW, a DVD-ROM, a DVD-RAM, a DVD-RW, a blue-ray disc, an SD (registered trademark) card, an MO, or the like. The program may also be distributed through electrical communication lines.
Further, although the preferred embodiments of the present invention have been described, the present invention is not limited to these particular embodiments, but various variations and modifications may be made without departing from the scope of the present invention described in the claims.
Patent | Priority | Assignee | Title |
Patent | Priority | Assignee | Title |
8300805, | Jan 04 2007 | Altera Corporation | AES core with independent inputs and outputs |
8391475, | Mar 30 2007 | Intel Corporation | Method and apparatus for advanced encryption standard (AES) block cipher |
8417961, | Mar 16 2010 | Oracle International Corporation | Apparatus and method for implementing instruction support for performing a cyclic redundancy check (CRC) |
8489897, | Mar 12 2010 | STMICROELECTRONICS ROUSSET SAS | Method and circuitry for detecting a fault attack |
8582757, | Aug 28 2008 | STMICROELECTRONICS ROUSSET SAS | Protection of a ciphering algorithm |
9191197, | Oct 10 2007 | Canon Kabushiki Kaisha | AES encryption/decryption circuit |
9843441, | Sep 24 2013 | Intel Corporation | Compact, low power advanced encryption standard circuit |
20110246787, | |||
20130016825, | |||
20130016836, | |||
20130202105, | |||
20140301549, | |||
20140369499, | |||
20150222423, | |||
CN102025484, | |||
JP2003195749, | |||
JP2013045072, | |||
JP2014089271, |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Feb 25 2016 | TAKATSUKASA, KENJI | FUJI ELECTRIC CO , LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 037921 | /0249 | |
Mar 08 2016 | Fuji Electric Co., Ltd. | (assignment on the face of the patent) | / |
Date | Maintenance Fee Events |
Jun 29 2022 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Date | Maintenance Schedule |
Jan 15 2022 | 4 years fee payment window open |
Jul 15 2022 | 6 months grace period start (w surcharge) |
Jan 15 2023 | patent expiry (for year 4) |
Jan 15 2025 | 2 years to revive unintentionally abandoned end. (for year 4) |
Jan 15 2026 | 8 years fee payment window open |
Jul 15 2026 | 6 months grace period start (w surcharge) |
Jan 15 2027 | patent expiry (for year 8) |
Jan 15 2029 | 2 years to revive unintentionally abandoned end. (for year 8) |
Jan 15 2030 | 12 years fee payment window open |
Jul 15 2030 | 6 months grace period start (w surcharge) |
Jan 15 2031 | patent expiry (for year 12) |
Jan 15 2033 | 2 years to revive unintentionally abandoned end. (for year 12) |