WO2012077419A1 - 暗号処理装置、および暗号処理方法、並びにプログラム - Google Patents

暗号処理装置、および暗号処理方法、並びにプログラム Download PDF

Info

Publication number
WO2012077419A1
WO2012077419A1 PCT/JP2011/074468 JP2011074468W WO2012077419A1 WO 2012077419 A1 WO2012077419 A1 WO 2012077419A1 JP 2011074468 W JP2011074468 W JP 2011074468W WO 2012077419 A1 WO2012077419 A1 WO 2012077419A1
Authority
WO
WIPO (PCT)
Prior art keywords
data
line
matrix
unit
cryptographic processing
Prior art date
Application number
PCT/JP2011/074468
Other languages
English (en)
French (fr)
Inventor
玄良 樋渡
徹 秋下
Original Assignee
ソニー株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ソニー株式会社 filed Critical ソニー株式会社
Priority to CN2011800580020A priority Critical patent/CN103238291A/zh
Priority to US13/990,829 priority patent/US9031230B2/en
Priority to EP11846328.0A priority patent/EP2651070B1/en
Priority to KR1020137014092A priority patent/KR20130126924A/ko
Publication of WO2012077419A1 publication Critical patent/WO2012077419A1/ja

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • GPHYSICS
    • G09EDUCATION; CRYPTOGRAPHY; DISPLAY; ADVERTISING; SEALS
    • G09CCIPHERING OR DECIPHERING APPARATUS FOR CRYPTOGRAPHIC OR OTHER PURPOSES INVOLVING THE NEED FOR SECRECY
    • G09C1/00Apparatus or methods whereby a given sequence of signs, e.g. an intelligible text, is transformed into an unintelligible sequence of signs by transposing the signs or groups of signs or by replacing them by others according to a predetermined system
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/06Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols the encryption apparatus using shift registers or memories for block-wise or stream coding, e.g. DES systems or RC4; Hash functions; Pseudorandom sequence generators
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • H04L9/0625Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation with splitting of the data block into left and right halves, e.g. Feistel based algorithms, DES, FEAL, IDEA or KASUMI
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2209/00Additional information or applications relating to cryptographic mechanisms or cryptographic arrangements for secret or secure communication H04L9/00
    • H04L2209/12Details relating to cryptographic hardware or logic circuitry
    • H04L2209/122Hardware reduction or efficient architectures

Definitions

  • the present invention relates to a cryptographic processing device, a cryptographic processing method, and a program. More specifically, the present invention relates to a cryptographic processing apparatus, a cryptographic processing method, and a program that execute a common key block cipher having a Feistel structure or a generalized Feistel structure.
  • common key block cipher There are various cryptographic processing algorithms, but one of the basic techniques is called common key block cipher.
  • the encryption key and the decryption key are common.
  • a plurality of keys are generated from the common key, and the data conversion process is repeatedly executed in a certain block unit, for example, a block data unit such as 64 bits, 128 bits, 256 bits.
  • DES Data Encryption Standard
  • AES Advanced Encryption Standard
  • CLEFIA proposed by Sony Corporation in 2007 is one of the common key block ciphers.
  • Such a common key block cipher algorithm mainly includes an encryption processing unit having a round function execution unit that repeatedly executes conversion of input data, and a key schedule unit that generates a round key to be applied in each round of the round function unit. It is comprised by.
  • the key schedule unit first generates an extended key with an increased number of bits based on a master key (primary key) that is a secret key, and applies it to each round function unit of the cryptographic processing unit based on the generated extended key. Generate a round key (subkey).
  • Non-Patent Document 1 Non-Patent Document 2
  • Non-Patent Document 2 for example, as documents describing encryption processing using the Feistel structure.
  • Non-Patent Document 3 Panu Hamalainen, Timo Alho, Marko Hannikainen, and Timo D.Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core. In DSD, pages 577-583 IEEE Computer cie Society, 2006.9].
  • this small packaging method is adapted to the processing sequence unique to the AES algorithm using the SPN structure, and is a cryptographic algorithm having the above-described Feistel structure or generalized Feistel structure different from the SPN structure. There is a problem that even if it is applied to the algorithm as it is, sufficient miniaturization cannot be realized.
  • the AES cipher described above is an encryption algorithm using an SPN structure
  • the DES cipher and the CLEFIA cipher are encryption algorithms using a Feistel structure or a generalized Feistel structure different from the SPN structure.
  • the present invention has been made in view of, for example, the above-described situation, and provides a cryptographic processing device, a cryptographic processing method, and a program that achieve miniaturization in a cryptographic processing configuration using a Feistel structure or a generalized Feistel structure. For the purpose.
  • the first aspect of the present invention is: It has a cryptographic processing unit that repeatedly inputs data bits that constitute the data block to be processed into a plurality of lines and repeatedly executes a data conversion process that applies a round function to the transmission data of each line, The cryptographic processing unit The conversion data for the first line data of the plurality of lines is generated, the generated conversion data is calculated with the second line data different from the first line, and the calculation result is input to the next round of input data.
  • the computing unit is A matrix calculation execution unit that performs linear transformation applying a matrix to the data of the first line;
  • the matrix operation execution unit In the execution cycle of the matrix operation on the data of the first line, the cryptographic processing device executes the operation with the data of the second line when executing the matrix operation of the first cycle.
  • the matrix operation execution unit is configured to execute matrix operations on a plurality of unit data sequentially output from a preceding nonlinear conversion unit in a plurality of cycles, In the first cycle of the cycle, the calculation with the data of the second line is executed together with the matrix calculation of the unit data input from the nonlinear conversion unit.
  • the cryptographic processing apparatus executes an operation on the data on the second line after completion of an arithmetic cycle necessary for a matrix operation on the data on the first line.
  • the independent register for holding the data of the second line necessary for the above is reduced, and the register for holding the intermediate result of the matrix operation for the data of the first line is used as the register for holding the data of the second line. It has a configuration.
  • the matrix calculation execution unit performs the matrix calculation process data for the first line and the second line in an initial cycle for executing a matrix calculation for the data of the first line. Performs an exclusive OR operation with the line data.
  • the matrix operation execution unit is configured to execute a matrix operation to which a cyclic matrix or a Hadamard matrix is applied.
  • the cryptographic processing unit is configured to execute a nonlinear transformation process that performs a nonlinear transformation process and a linear transformation process that performs a linear transformation process using a matrix as the round function execution unit. It has a matrix calculation execution part as a conversion part.
  • the matrix operation execution unit sequentially inputs the output of the S-box as the nonlinear conversion unit and executes the matrix operation on the input data as a one-cycle process. .
  • the cryptographic processing executed by the cryptographic processing unit is cryptographic processing to which a Feistel structure or a generalized Feistel structure is applied.
  • the cryptographic processing executed by the cryptographic processing unit is cryptographic processing according to the CLEFIA cryptographic algorithm.
  • the second aspect of the present invention provides A cryptographic processing method for performing cryptographic processing in a cryptographic processing device, A cryptographic processing step in which a cryptographic processing unit repeatedly inputs a constituent bit of a data block to be data processed into a plurality of lines and repeatedly executes a data conversion process that applies a round function to transmission data of each line.
  • a conversion process of data of the first line constituting the plurality of lines is executed, an operation is performed on the generated conversion data with data of a second line different from the first line, and the calculation is performed.
  • the encryption processing method executes the calculation with the data of the second line in the matrix calculation process of the first cycle.
  • the third aspect of the present invention provides A program for executing cryptographic processing in the cryptographic processing device, An encryption processing step for inputting the constituent bits of the data block to be processed into a plurality of lines to the encryption processing unit and repeatedly executing a data conversion process applying a round function to the transmission data of each line Have
  • a conversion process of data of the first line constituting the plurality of lines is executed, an operation is performed on the generated conversion data with data of a second line different from the first line, and the calculation is performed.
  • the program executes the calculation with the data of the second line in the matrix calculation process of the first cycle.
  • the program of the present invention is a program provided by, for example, a storage medium to an information processing apparatus or a computer system that can execute various program codes. By executing such a program by the program execution unit on the information processing apparatus or the computer system, processing according to the program is realized.
  • system is a logical set configuration of a plurality of devices, and is not limited to one in which the devices of each configuration are in the same casing.
  • the present invention it is possible to reduce the size and power consumption of a cryptographic processing configuration to which a generalized Feistel structure is applied.
  • the first line A matrix operation execution unit that executes a linear transformation process that applies a matrix to the data of the data performs an operation of the matrix operation process data and the data of the second line in the first cycle during the execution cycle of the matrix operation.
  • Block cipher inputs plaintext P and key K and outputs ciphertext C.
  • the bit length of plaintext and ciphertext is called a block size, and is denoted by n here.
  • n can take an arbitrary integer value, it is usually a predetermined value for each block cipher algorithm.
  • a block cipher with a block length of n is sometimes called an n-bit block cipher.
  • the bit length of the key is represented by k.
  • the key can take any integer value.
  • the bit sizes of plaintext [P], ciphertext [C], and key [K] are indicated as follows.
  • Plaintext P n bits
  • Ciphertext C n bits
  • K k bits
  • FIG. 1 is a diagram for explaining an n-bit common key block cipher algorithm corresponding to a k-bit key length.
  • the common key block cipher process inputs n-bit plaintext P and k-bit secret key K, executes a predetermined encryption algorithm, and converts n-bit ciphertext C into Output.
  • FIG. 1 shows an encryption process for generating ciphertext from plaintext, in the decryption process for generating plaintext from ciphertext, the key input order is reversed and the inverse function of the round function is configured. Thus, the decoding process is performed.
  • Block encryption can be divided into two parts.
  • One is a key scheduling unit 111 that takes a key K as an input, expands the bit length of the input secret key K by a predetermined step, and outputs an expanded key K ′ (bit length k ′), a plaintext P, and a key scheduling unit 111 receives the round key RK and the like generated from the expanded key K ′ input from 111, inputs the plaintext P, executes encryption processing using the round key RK and the like, and generates the ciphertext C
  • a data encryption unit 112 that performs conversion. As described above, the decryption process can be realized by changing the data encryption unit 112.
  • the common key block cipher algorithm includes a data encryption unit 112 having a round function that repeatedly executes conversion of input data, and a key schedule unit 111 that generates a round key to be applied in each round of the round function unit. Consists of.
  • the key schedule unit 111 inputs the secret key K and generates a round key to be input to each round function. For example, in a block cipher configured to perform r stages of round functions, RK 1 , RK 2 ..., R r round keys are input to the round functions from 1 to r stages, respectively. Further, the key schedule unit 111 outputs IK as an initial key and FK as a final key to the data encryption unit 112, and these keys and processing data are subjected to exclusive OR.
  • FIG. 2 shows a specific configuration example of the Feistel structure when the block length is n bits (n-bit).
  • the Feistel structure has a structure that converts plaintext into ciphertext by simple repetition of a round function including an F function as a data conversion function.
  • F function linear transformation processing and nonlinear transformation processing are executed.
  • FIG. 2 shows the overall structure of the Feistel structure on the right side, and a detailed configuration diagram of one F function 120 on the left side.
  • the n-bit data is divided into n / 2-bit 2-lines, and one of the n / 2-bits is input to the F function in the round.
  • the output is exclusively ORed with the other n / 2-bit.
  • Round keys RK 1 to RK r generated from the extended key K ′ input from the key schedule unit 111 are input to the F function in each round.
  • an exclusive OR operation unit 121 that performs an exclusive OR operation with a round key
  • a non-linear transformation unit [S] 122 called S-box that performs non-linear transformation processing on the output of the logical sum operation unit 121
  • linear transformation processing by matrix operation on the output of the non-linear transformation unit [S] 122 A configuration having a linear conversion unit [M] 123 to perform is known.
  • FIG. 2 is one of structural examples of the Feistel structure.
  • various configurations such as a configuration in which the position where the exclusive OR operation of the initial key IK and the final key FK is changed, for example.
  • the configuration shown in FIG. 2 is a configuration in which an n-bit input (for example, plaintext configuration data) P to be processed is divided into two and processed as 2-line by n / 2-bit.
  • a configuration in which processing is performed by dividing the input into two in this way is called a Feistel structure.
  • the number of divisions of the processing target data is not limited to two, and various settings are possible.
  • a Feistel structure in which the number of divisions is not limited to 2 is called a generalized Feistel structure.
  • FIG. 3 An example of the generalized Feistel structure will be described with reference to FIG.
  • the configuration illustrated in FIG. 3 is a configuration example in which processing target data is divided into four and processed.
  • the Feistel structure described with reference to FIG. 2 has a configuration in which n-bit plaintext data, which is data to be processed, is divided into 2-line by n / 2-bit and processed.
  • the configuration shown in FIG. 3 has a configuration in which n-bit plaintext data, which is data to be processed, is divided into n / 4-bit 4-lines.
  • the configuration shown in FIG. 3 is called a 4-line generalized Feistel structure.
  • the 4-line generalized Feistel structure shown in FIG. 3 has a configuration that repeatedly executes a round function having an F function, like the Feistel structure described with reference to FIG.
  • n bits are divided into four and the data flow is complicated.
  • n-bit data is divided into n / 4-bit 4-lines, each 2-line is input to the F function, and its output is exclusive with the other 2-lines. It is the composition which performs logical OR.
  • the F function corresponds to the outputs of the exclusive OR operation unit 121 and the exclusive OR operation unit 121 that perform the exclusive OR operation with the round key.
  • a non-linear conversion unit [S] 122 called S-box that executes non-linear conversion processing, and a linear conversion unit [M] 123 that performs linear conversion processing by matrix operation on the output of the non-linear conversion unit [S] 122
  • S-box that executes non-linear conversion processing
  • M] 123 that performs linear conversion processing by matrix operation on the output of the non-linear conversion unit [S] 122
  • FIG. 3 shows a 4-line generalized Feistel structure, but all Feistel structures with processing data of 2-line or more are called generalized Feistel structures.
  • the present invention is not limited to a 4-line generalized Feistel structure, any of a 2-line Feistel structure and a generalized Feistel structure having an arbitrary number of processing lines greater than 2 lines (2-line). It is also applicable to.
  • Non-Patent Document 3 Panu Hamalainen, Timo Alho, Marko Hannikainen, and Timo D.Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core. In DSD, pages 577-583 IEEE Computer cie Society, 2006.9].
  • FIG. 4 is a diagram illustrating a configuration example of a round function execution unit used in the AES encryption algorithm to which the SPN structure is applied.
  • the round function shown in FIG. 4 is repeated a plurality of times to generate ciphertext from plaintext or plaintext from ciphertext.
  • the round function execution unit shown in FIG. 4 includes the following components.
  • a non-linear conversion unit 201 composed of 16 S-boxes of 8-bit input / output for executing non-linear conversion processing; Shift Low execution unit 202 as replacement processing of 8-bit output from the S-box constituting the nonlinear conversion unit 201,
  • a linear transformation unit 203 comprising four matrix operation units for executing a linear transformation process by applying an output of the Shift Low execution unit 202 in units of 32 bits and applying a matrix;
  • An exclusive OR operation unit 204 composed of four operation units that performs an exclusive OR operation with a 32-bit round key on the 32-bit output from each of the four matrix operation units constituting the linear conversion unit 203. Have.
  • a non-linear transformation unit 201, a Shift Low execution unit 202, a linear transformation unit 203, an exclusive OR operation unit 204, and a series of processes to which these are applied are executed as one round function execution process, and this round function is executed a plurality of times.
  • 128-bit output for example, ciphertext
  • 128-bit input data for example, plaintext
  • processing of one round function (1 round) that is, a non-linear conversion unit 201, a shift low execution unit 202, a linear conversion unit 203, an exclusive OR operation unit 204, and a series of processes using these are applied.
  • one cycle (1 cycle) at least 16 S-box circuits and 4 matrix operation circuits are required as the configuration of the data encryption unit as shown in FIG.
  • Hamalainen et al Realized a reduction in the size of the data encryption unit by setting the processing of one round function (1 round) as serial processing in 16 cycles instead of 1 cycle. In this miniaturized configuration, only one S-box circuit is used, and one matrix operation is executed over 4 cycles (4 cycles). By adopting such an implementation, the matrix operation circuit can be reduced in size.
  • Fig. 5 shows the data path of the data encryption unit that executes the AES encryption proposed by Hamalainen et al.
  • the configuration shown in FIG. 5 corresponds to a hardware configuration that executes the round function of the AES encryption shown in FIG.
  • FIG. 5 shows 19 registers (r01 to r19). Each of the 19 registers (r01 to r19) is an 8-bit register that holds 8-bit data.
  • FIG. 4 is an input / output 128-bit round function execution unit
  • FIG. 5 shows an input / output 128-bit round function as serial processing of 8-bit unit data.
  • FIG. 4 corresponds to the hardware configuration to be executed.
  • data replacement is performed by the Shift Low execution unit between the S-box that performs nonlinear transformation and the matrix operation that performs linear transformation.
  • the replacement performed in the Shift Low execution unit is realized by introducing multiplexers m01 to m08 before some registers in FIG.
  • the output of the S-box 252 is input to the matrix calculation circuit 253, and the matrix calculation circuit 253 executes a linear transformation process using the matrix.
  • the processing data by S-box is replaced by the Shift-Low execution unit, and then the matrix operation is performed.
  • the output of S-box 252 is the matrix operation.
  • the circuit 253 is directly input.
  • processing corresponding to the replacement processing in the Shift-Low execution unit is executed by the operations of the multiplexers m01 to m08 in the register groups r01 to r19 shown in FIG.
  • the processes of the four matrix operation circuits of the linear conversion unit 203 shown in FIG. 4 are sequentially executed.
  • the linear conversion process to which a matrix executed by one matrix operation circuit of the four matrix operation circuits of the linear conversion unit 203 shown in FIG. 4 is executed in four cycles. This process will be described in detail later.
  • the exclusive OR operation processing of the exclusive OR operation unit 203 shown in FIG. 4 is executed in the exclusive OR operation units 254a and 254b in FIG.
  • exclusive OR operation processing of the processing data and the round key output from the key generation unit 251 is executed.
  • the register group 261 in FIG. 6 corresponds to a circuit including the twelve registers r04 to r15 and multiplexers m05 to m08 in FIG. 5, holds 96-bit data, and takes into account Shift Low. Represents a set.
  • Equation 1 (x 0 , x 1 , x 2 , x 3 ) shown in Equation 1 is an input to the matrix operation circuit 253 (output from the S-box), (Y 0 , y 1 , y 2 , y 3 ) is the output of the matrix operation circuit 253 (linear conversion result),
  • the 4 ⁇ 4 matrix corresponds to a matrix (linear transformation matrix) applied in the matrix operation circuit 253.
  • the elements of the 4 ⁇ 4 linear transformation matrix are shown as hexadecimal values.
  • each of (x 0 , x 1 , x 2 , x 3 ) is an output per cycle from the S-box 252 and is 8-bit data.
  • Each of the outputs (y 0 , y 1 , y 2 , y 3 ) is also 8-bit data.
  • the matrix calculation circuit 253 in FIG. 7 performs processing of the linear conversion unit 203 including the four matrix calculation units illustrated in FIG.
  • Each of the four matrix operation units shown in FIG. 4 inputs the output (8-bit output) of the non-linearly converted data in the four S-boxes, and executes linear conversion.
  • the S-box is reduced to only one S-box 252, and one S-box output from the 16 S-boxes shown in FIG. 4 is output in one cycle. Only done.
  • the matrix operation circuit 253 of FIG. 7 outputs (x 0 , x 1 , x 2 , x 3 ) from the four S-boxes shown in FIG. 4 required from one S-box 252 over four cycles are obtained. Will be input.
  • the S-box outputs (1) to (4) for the matrix operation circuit 203a shown in FIG. Are sequentially input from the S-box 252 over 4 cycles.
  • the matrix conversion circuit 253 shown in FIG. 7 performs this data conversion using a matrix, and the above (Expression 1) expresses this conversion processing by an expression.
  • each of the outputs x 0 , x 1 , x 2 , x 3 in each cycle of the S-box 252 is 8-bit data, and y as a linear transformation result obtained by applying the matrix in the matrix calculation circuit 253 0, each of y 1, y 2, y 3 also 8-bit data, respectively.
  • processing in each cycle will be described.
  • Matrix operation circuit 253 shown in FIG. 7 inputs x 0 as input data in one cycle (1 cycle) eyes (din). At this time, the enable signal (en) input to the AND circuits 271 to 274 is set to 0. Although not shown in FIGS. 5 to 7, control is performed by the control unit.
  • x 1 , x 2 , and x 3 are input as input data (din), respectively.
  • the second, third, and fourth cycles set the enable signal (en) input to the AND circuits 271 to 274 to 1.
  • the exclusive OR units 281 to 284 execute exclusive OR operations of the input data or the multiplied values thereof and the outputs from the AND circuits 271 to 274, and the results are stored in the registers r16 to r19. Will be.
  • the processing described with reference to FIG. 7 is a circuit that implements linear transformation processing by matrix operation using a cyclic matrix adopted in AES, but linear transformation processing using another different matrix is also performed by the circuit. This can be realized by changing the setting of the multiplier and the connection configuration.
  • a circuit that realizes a matrix operation to which the following Hadamard matrix is applied can be realized by a matrix operation circuit 290 shown in FIG.
  • (x 0 , x 1 , x 2 , x 3 ) shown in Expression 2 is an input to the matrix operation circuit 290 shown in FIG. 8 (output from the S-box).
  • (Y 0 , y 1 , y 2 , y 3 ) is the output of the matrix operation circuit 290 (linear conversion result)
  • the 4 ⁇ 4 matrix corresponds to a matrix (linear transformation matrix) applied in the matrix operation circuit 290.
  • the elements of the 4 ⁇ 4 linear transformation matrix are shown as hexadecimal values.
  • a difference between a matrix operation circuit 290 that implements a matrix operation using the Hadamard matrix shown in FIG. 8 and a matrix operation circuit 253 that implements a cyclic matrix shown in FIG. 7 is, for example, the following configuration.
  • the multipliers 291 to 294 are set to correspond to the elements of the linear transformation matrix composed of the 4 ⁇ 4 Hadamard matrix shown in Equation 2.
  • the AND circuit is changed to a multiplexer (Multiplexer) 295 to 298, and the input to each of the registers r16 to r19 is set to select the output from two other registers or 0, one of these three.
  • the necessary registers to be applied to one round operation are as follows when simple calculation is performed.
  • FIG. 9 is a diagram showing a schematic diagram of a data operation unit circuit when the implementation method of Hamalainen et al. Is applied to a 4-line generalized Feistel structure.
  • FIG. 9 as with the AES data path described above with reference to FIG. 6, the replacement operation at the end of the round function of the generalized Feistel structure and the key schedule part are omitted.
  • the block size as the processing data size in the round operation is n bits.
  • n / 4 bits are input to each of the four lines and sequentially transferred.
  • the register group 301 in FIG. 9 corresponds to the register group 261 shown in FIG.
  • the register group 301 in FIG. 9 corresponding to the 4-line generalized Feistel structure realizes processing similar to the replacement operation at the end of the round function and the register that holds (3/4) n-bit data. It is configured as a combination of multiplexers and the like. That is, assuming that the data operation unit on the lower side of the register group 301 holds (1/4) n bits of data for one line, the register group 301 in FIG. A register that holds data for bits is required.
  • a round function including the F function in the 4-line generalized Feistel structure shown in FIG. 3 is executed using the data path shown in FIG.
  • a specific example of the F function in the round function is shown in FIG.
  • the F function shown in FIG. 10 has the following components, like the F function of the Feistel structure described above with reference to FIG. (A) an exclusive OR operation unit 321 that performs an exclusive OR operation with a round key; (B) a nonlinear transformation unit [S] 322 composed of an S-box that performs nonlinear transformation processing on the output of the exclusive OR operation unit 321; (C) a linear transformation unit [M] 323 that performs linear transformation processing by matrix operation on the output of the nonlinear transformation unit [S] 322; Having these components.
  • the input / output for the F function in the 4-line generalized Feistel structure is n / 4 bits.
  • the matrix applied to the linear transformation process as the matrix operation to which the matrix executed by the linear transformation unit [M] 323 is applied is assumed to be a cyclic matrix in which the first row element is (a, b, c, d). is doing. That is, the matrix shown in the following (formula 3).
  • the circuit shown in FIG. 9 has only one S-box as in the circuit shown in FIG. This is the S-box 303 shown in FIG.
  • This S-box 303 executes the processing of one S-box set in the F function shown in FIG. 10 in one cycle.
  • Each S-box shown in FIG. 10 is sequentially processed for each cycle.
  • one S-box of the F function is inputted with 1/4 of n / 4 bits that transmit one line of the 4-line generalized Feistel structure, that is, n / 16 bits, and is nonlinear. Conversion processing is executed.
  • n / 16 bits are input every cycle, and nonlinear conversion processing is executed.
  • n / 16-bit data which is the processing unit of the S-box 303, is output from the register group 301 in units of one cycle.
  • the n / 16 bits are first set to the exclusive OR unit.
  • a non-linear transformation is executed by an S-box that performs exclusive OR with the configuration data of the round key.
  • Data subjected to non-linear conversion in the S-box 303 is input to the next matrix operation circuit 304 in units of 1/16 bits every n / 16 bits.
  • the matrix operation circuit 304 linear transformation processing using a predetermined matrix is executed.
  • the register gate size is relatively large compared to other cells, and an increase in the number of registers greatly affects the gate size. Therefore, it is important to consider a mounting method that suppresses an increase in registers as one direction for realizing miniaturization.
  • the encryption algorithm applying the SPN structure is different from the encryption algorithm applying the generalized Feistel structure.
  • the encryption algorithm applying the generalized Feistel structure after obtaining the matrix operation result, This is considered to be caused by the fact that it is set to perform exclusive OR. That is, in the encryption algorithm to which the generalized Feistel structure is applied, both a register that holds the intermediate result of the matrix and a register that holds data of other lines are required.
  • the number of necessary registers is reduced by changing the operation order by using the combination rule in exclusive OR operation, that is, the following equation is established.
  • the operation order is changed so that the result of the matrix operation is exclusively ORed with the register holding the data of other lines.
  • FIG. 11 shows a data path, that is, an arithmetic circuit configuration as an embodiment of the present invention.
  • the arithmetic circuit shown in FIG. 11 is a cryptographic algorithm execution circuit to which the 4-line generalized Feistel structure described above with reference to FIG. 3 is applied. Specifically, by replacing the circulant matrix calculation unit with a Hadamard matrix calculation unit, for example, the circuit can be used as an execution circuit for CLEFIA encryption.
  • a register group 501 in FIG. 11 corresponds to the register group 301 shown in FIG. That is, the register group 501 includes a register for holding data and a circuit having a function for executing a replacement operation at the end of the round function. However, the register group 501 in FIG. 11 is set to have a smaller number of registers than the register group 301 shown in FIG.
  • the register group 301 shown in FIG. 9 is described as a configuration including a register that holds (3/4) n-bit worth of data and a circuit that has a function of executing a replacement operation at the end of the round function. did.
  • the registers included in the register group 501 shown in FIG. 11 are only registers that hold n / 2-bit worth of data.
  • n 128-bit
  • registers of 32 bits are reduced compared to the configuration of FIG.
  • FIG. 12 and Table 1 below show a matrix operation sequence in the matrix operation circuit 304 according to the data path shown in FIG.
  • FIG. 13 and Table 2 shown below show a matrix operation sequence in the matrix operation circuit 504 according to the data path shown in FIG.
  • Table 1 (FIG. 12) showing a matrix operation sequence in the configuration shown in FIG. 9, Differences between the processes will be described with reference to Table 2 (FIG. 13) showing the matrix operation sequence in the configuration shown in FIG.
  • the matrix operation circuit 304 outputs the output (y 0 , y 1 , y 2 , y 3 ) generated by the matrix operation to which the matrix is applied to the exclusive OR operation unit 305.
  • the exclusive OR operation unit 305 the output (y 0 , y 1 , y 2 , y 3 ) of the matrix operation circuit 304 and the output (E 0 , E 1 , E 2 and E 3 ).
  • Outputs (E 0 , E 1 , E 2 , E 3 ) from other lines correspond to, for example, the processing result of the round operation in the previous round.
  • each of the inputs (x 0 , x 1 , x 2 , x 3 ) to the matrix operation circuit 304 is n / 16 bits, and from the output (y 0 , y 1 , y 2 , y 3 ) and other lines
  • the outputs (E 0 , E 1 , E 2 , E 3 ) are all n / 16-bit data.
  • each element of the matrix calculation result based on the input element x 0 to the matrix calculation circuit 304 is stored in the registers R 0 , R 1 , R 2 , and R 3 .
  • the enable signal (en) input to the AND circuit 313 is set to 0, and the multiplication result of the multiplication unit 311 based on the input element x 0 is stored in the registers R 0 , R 1 , R 2 , R 3 .
  • Register R 0 d ⁇ x 0
  • Register R 1 stored value: c ⁇ x
  • Register R 2 stored values: b ⁇ x
  • Stored value of the register R 3 a ⁇ x 0,
  • the input element x 1 is input to the matrix operation circuit 304 in the second cycle.
  • the enable signal (en) input to the logical product circuit 313 is set to 1
  • the exclusive OR operation unit 312 determines the multiplication result of the multiplication unit 311 of the input element x 1 and the previous cycle.
  • An exclusive OR operation with the values stored in the registers R 0 , R 1 , R 2 , R 3 is executed, and the result is stored in the registers R 0 , R 1 , R 2 , R 3 .
  • the output element E 0 from the other line is stored in the register R 7 .
  • the input element x 3 is input to the matrix operation circuit 304. Input of input data (x 0 , x 1 , x 2 , x 3 ) is completed, and in the fourth cycle, matrix operation results (y 0 , y 1 , y 2 , y 3 ) are registered in registers R 0 , R 1. , R 2 , R 3 .
  • Equation 5 corresponds to the round output data (D) of the connection part between rounds shown in FIG.
  • the calculation for the first element x ′ 0 of the input values (x ′ 0 , x ′ 1 , x ′ 2 , x ′ 3 ) to the next matrix calculation circuit 304 is performed in the registers R 0 , R 1 , R 2 , R 3 .
  • the value shown in the above (formula 6) is stored. These values are stored in the registers R 4 , R 5 , R 6 , and R 7 in the fifth cycle, and input to the register 501 as utilization data for the next round operation via the line 506 shown in FIG.
  • the configuration shown in FIG. 11 is a configuration in which the number of registers is reduced from the configuration shown in FIG. 9, but as a result, the same arithmetic processing as shown in FIG. 9 is realized. However, the calculation sequence is different. Processing in each cycle will be described.
  • the output (E 0 , E 1 , E 2 , E 3 ) corresponding to the processing result of the round operation in the previous round is output from the register 501.
  • the data is sequentially stored in the registers R 7 , R 6 , and R 5 via the 521.
  • Register R 5 has E 0
  • Register R 6 has E 1
  • Register R 7 has E 2
  • These data are set in a stored state.
  • E 3 is input to the exclusive OR operation unit 512 via the multiplexer 513. Note that these arithmetic controls are performed based on, for example, a control unit (not shown) and control based on clock input information.
  • the value E 1 stored in the register R 6 is input to the exclusive OR operation unit 512 via the multiplexer m 0, and the exclusive OR result with d ⁇ x 0 is stored.
  • the value E 2 stored in the register R 7 is input to the exclusive OR operation unit 512 via the multiplexer m 1, and the exclusive OR result with c ⁇ x 0 is stored.
  • the output value E 3 output from the register group via the line 521 is input to the register R 2 via the multiplexer m 2 to the exclusive OR operation unit 512, and the exclusive OR result with b ⁇ x 0 is obtained.
  • the value E 0 stored in the register R 5 is input to the exclusive OR operation unit 512 via the multiplexer m 3, and the exclusive OR result with a ⁇ x 0 is stored. That is, each value shown in the following (Expression 7) is stored in the registers R 0 , R 1 , R 2 , and R 3 .
  • the multiplexer 513 (m0 to m3) performs the same processing as the selector that outputs one input selected from two inputs.
  • the stored values of the registers R 7 , R 6 and R 5 and the output value of the line 521 are set to be output. These controls are performed by control of a control unit (not shown).
  • exclusive OR operation processing with outputs (E 0 , E 1 , E 2 , E 3 ) from other lines is executed in advance. As a result, it is not necessary to hold the outputs (E 0 , E 1 , E 2 , E 3 ) from other lines until the matrix operation period requiring 4 cycles is completed. The number of necessary registers is reduced by this arithmetic sequence change processing.
  • the input element x 1 is input to the matrix operation circuit 504 in the second cycle.
  • the multiplexer 513 (m0 to m3) is controlled so as to selectively output the stored values of the registers R 0 , R 1 , R 2 , and R 3 .
  • the exclusive OR of the exclusive-OR operation unit 512, and the multiplication result of the multiplying unit 511 of the input element x 1, and the value stored in the register R 0, R 1, R 2 , R 3 in the previous cycle The operation is performed and the result is stored in registers R 0 , R 1 , R 2 , R 3 .
  • the output element E ′ 0 from the other line is stored in the register R 7 .
  • the input element x 3 is input to the matrix operation circuit 504.
  • the input of the input data (x 0 , x 1 , x 2 , x 3 ) is completed, and in this fourth cycle, the register R 0 , R 1 , R 2 , R 3 contains the matrix operation result (y 0 , y 1 , y 2 , y 3 ) and the outputs (E 0 , E 1 , E 2 , E 3 ) from other lines are stored as exclusive OR results.
  • the output from the next other line is the stored value of the registers R 7 , R 6 , R 5 , and the output of the line 521.
  • the exclusive OR operation unit 512 calculates the exclusive OR result of these input values, the new input x ′ 0 to the matrix operation circuit 504, and the multiplication result in the multiplication unit 511, and registers R 0 and R 1. , R 2 , R 3 .
  • This register storage value that is, data shown in the following equation (Equation 8) is input to the register group 501 as use data for the next round operation via a line 506 shown in FIG.
  • the exclusive OR operation with the outputs (E 0 , E 1 , E 2 , E 3 ) from other lines is executed in advance in the matrix calculation process. Eliminates the need for separate registers for storing outputs from other lines (E 0 , E 1 , E 2 , E 3 ) and for storing intermediate results of matrix operations. By sharing these registers, the total number of necessary registers is reduced.
  • exclusive OR operation with outputs (E 0 , E 1 , E 2 , E 3 ) from other lines corresponding to the processing result of the round operation in the previous round is executed in advance.
  • the outputs (E 0 , E 1 , E 2 , E 3 ) from other lines are registered. and via the multiplexer 513 is input prior to the exclusive-OR operation unit 512 from such, the first input value for the matrix operation circuit 504 and (x 0) of the multiplying unit 511 multiplies the result in (d ⁇ x 0, etc.) Perform exclusive OR processing.
  • the 1-line required in the configuration shown in FIG. It is possible to eliminate the circuit of the minute register, the exclusive logical sum of 1-line, and the logical product of 1-line. In the configuration shown in FIG. 11, the size can be reduced by these differences. In addition, with this miniaturization, low power consumption can be expected. In particular, since the gate size of the register is relatively larger than that of other cells, the reduction of the 1-line register contributes particularly to downsizing.
  • the application example to the 4-line generalized Feistel structure has been described as a representative example of the application configuration of the present invention.
  • the processing sequence described with reference to FIG. 11 and FIG. 13 (Table 1), that is, applying the output values from other lines to the matrix operation in advance is not possible with generalized Feistel structures other than 4-line.
  • the present invention can also be applied to the Feistel structure, and a reduction in the circuit configuration of the register and the like similar to that described with reference to FIG. That is, the present invention can be applied not only to a 4-line generalized Feistel structure but also to a structure in which the inside of a round function is deformed or expanded.
  • a 2-line Feistel structure or an arbitrary x (x is 2 or more) This is also applicable to the x-line generalized Feistel structure.
  • the matrix applied in the matrix operation circuit is a circulant matrix
  • the matrix applied in the matrix operation circuit is not limited to the circulant matrix, and other types of matrices such as Hadamard matrix, for example. It is also possible to apply.
  • the matrix applied in the matrix operation circuit is not only a 4 ⁇ 4 matrix, Any xx matrix, where x is a natural number greater than or equal to 2, Such various matrixes can be applied.
  • the configuration of the present invention is not limited to the configuration having the F function described above with reference to FIG. 2 but can be applied to any algorithm that executes a round function that does not include nonlinear transformation after matrix calculation. The effect of downsizing can be expected.
  • the configuration described in the above embodiment is an example of a type-2 generalized Feistel structure in a 4-line generalized Feistel structure.
  • the present invention is not limited to other types of type-1 or type-3.
  • the present invention can be applied to a modified Feistel structure, and the same effect can be expected.
  • FIG. 14 shows a circuit configuration example as a data path to which the present invention is applied to a 2-line Feistel structure.
  • outputs (E 0 , E 1 , E 2 , E 3 ) from the other lines as the calculation results of the previous round are stored in the registers R 4 , R 5 , R 6 , R 7.
  • the output from running the exclusive logical sum of the multiplication results of the input value x 0 and multiplying unit 611 from the S-box603 in the first processing, et al cycle of the matrix calculation in the matrix first arithmetic circuit 604 (1 cycle) Store in the registers R 0 , R 1 , R 2 , R 3 .
  • matrix operations can be executed in the same processing sequence as described above with reference to FIG. 11, and this process can reduce the hardware configuration by reducing the number of registers. It becomes possible.
  • a cyclic matrix, Hadamard matrix, or the like can be used as the matrix applied in the matrix calculation circuit 604, and x ⁇ x (where x ⁇ 2 is an integer). Any matrix can be used.
  • the present invention is not limited to the configuration having the F function described with reference to FIG. 2, but may be any round function that does not execute nonlinear transformation after matrix calculation.
  • FIG. 15 shows a configuration example of an IC module 700 as a cryptographic processing apparatus that executes cryptographic processing according to the above-described embodiment.
  • the above-described processing can be executed in, for example, various information processing apparatuses such as a PC, an IC card, a reader / writer, and the IC module 700 illustrated in FIG. 15 can be configured in these various devices.
  • a CPU (Central processing Unit) 701 shown in FIG. 15 is a processor that executes start and end of cryptographic processing, control of data transmission / reception, control of data transfer between components, and other various programs.
  • the memory 702 includes a ROM (Read-Only-Memory) that stores programs executed by the CPU 701 or fixed data such as calculation parameters, a program executed in the processing of the CPU 701, and a parameter storage area that changes as appropriate in the program processing, It consists of RAM (Random Access Memory) used as a work area.
  • the memory 702 can be used as a storage area for key data necessary for encryption processing, data to be applied to a conversion table (substitution table) or conversion matrix applied in the encryption processing, and the like.
  • the data storage area is preferably configured as a memory having a tamper resistant structure.
  • the cryptographic processing unit 703 has a cryptographic processing configuration described with reference to FIGS. 11 and 14, for example, a cryptographic process and a decryption process according to a common key block cryptographic process algorithm to which, for example, a generalized Feistel structure or a Feistel structure is applied. Execute.
  • the cryptographic processing means is an individual module, but such an independent cryptographic processing module is not provided, for example, a cryptographic processing program is stored in the ROM, and the CPU 701 reads and executes the ROM stored program. You may comprise.
  • the random number generator 704 executes random number generation processing necessary for generating a key necessary for encryption processing.
  • the transmission / reception unit 705 is a data communication processing unit that performs data communication with the outside.
  • the data transmission / reception unit 705 performs data communication with an IC module such as a reader / writer, and outputs ciphertext generated in the IC module or an external reader. Data input from devices such as writers is executed.
  • the series of processes described in the specification can be executed by hardware, software, or a combined configuration of both.
  • the program recording the processing sequence is installed in a memory in a computer incorporated in dedicated hardware and executed, or the program is executed on a general-purpose computer capable of executing various processing. It can be installed and run.
  • the program can be recorded in advance on a hard disk or ROM (Read Only Memory) as a recording medium.
  • the program is temporarily or permanently stored on a removable recording medium such as a flexible disk, CD-ROM (Compact Disc Read Only Memory), MO (Magneto optical disc), DVD (Digital Versatile Disc), magnetic disk, or semiconductor memory. It can be stored (recorded).
  • a removable recording medium can be provided as so-called package software.
  • the program is wirelessly transferred from the download site to the computer, or is wired to the computer via a network such as a LAN (Local Area Network) or the Internet.
  • the computer can receive the program transferred in this manner and install it on a recording medium such as a built-in hard disk.
  • system is a logical set configuration of a plurality of devices, and the devices of each configuration are not limited to being in the same casing.
  • the encryption processing configuration to which the generalized Feistel structure is applied can be reduced in size and power can be saved.
  • the first line A matrix operation execution unit that executes a linear transformation process that applies a matrix to the data of the data performs an operation of the matrix operation process data and the data of the second line in the first cycle during the execution cycle of the matrix operation.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Storage Device Security (AREA)

Abstract

一般化Feistel構造を適用した暗号処理構成の小型化を実現する。データを複数ラインに分割入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する一般化Feistel構造を適用した暗号処理構成において、第1ラインのデータに対する行列を適用した線形変換処理を実行する行列演算実行部が行列演算の実行サイクル中、最初のサイクルにおいて行列演算過程データと第2ラインのデータとの演算を実行する。本構成により、第2ラインのデータ保持用のレジスタと第1ラインの行列演算途中結果保持用のレジスタの共有化が可能となり、総レジスタ数の削減、小型化が実現された。

Description

暗号処理装置、および暗号処理方法、並びにプログラム
 本発明は、暗号処理装置、および暗号処理方法、並びにプログラムに関する。さらに詳細には、Feistel構造や一般化Feistel構造を持つ共通鍵ブロック暗号を実行する暗号処理装置、および暗号処理方法、並びにプログラムに関する。
 情報化社会が発展すると共に、扱う情報を安全に守るための情報セキュリティ技術の重要性が増してきている。情報セキュリティ技術の構成要素の一つとして暗号技術があり、現在では様々な製品やシステムで暗号技術が利用されている。
 暗号処理アルゴリズムには様々なものがあるが、基本的な技術の一つとして、共通鍵ブロック暗号と呼ばれるものがある。共通鍵ブロック暗号では、暗号化用の鍵と復号用の鍵が共通のものとなっている。暗号化処理、復号処理共に、その共通鍵から複数の鍵を生成し、あるブロック単位、例えば64ビット、128ビット、256ビット等のブロックデータ単位でデータ変換処理を繰り返し実行する。
 代表的な共通鍵ブロック暗号のアルゴリズムとしては、過去の米国標準であるDES(Data Encryption Standard)や現在の米国標準であるAES(Advanced Encryption Standard)が知られている。他にも様々な共通鍵ブロック暗号が現在も提案され続けており、2007年にソニー株式会社が提案したCLEFIAも共通鍵ブロック暗号の一つである。
 このような、共通鍵ブロック暗号のアルゴリズムは、主として、入力データの変換を繰り返し実行するラウンド関数実行部を有する暗号処理部と、ラウンド関数部の各ラウンドで適用するラウンド鍵を生成する鍵スケジュール部とによって構成される。鍵スケジュール部は、秘密鍵であるマスター鍵(主鍵)に基づいて、まずビット数を増加させた拡大鍵を生成し、生成した拡大鍵に基づいて、暗号処理部の各ラウンド関数部で適用するラウンド鍵(副鍵)を生成する。
 このようなアルゴリズムを実行する具体的な構造として、線形変換部および非線形変換部を有するラウンド関数を繰り返し実行する構造が知られている。例えば代表的な構造にFeistel構造や一般化Feistel構造がある。Feistel構造や一般化Feistel構造は、データ変換関数としてのF関数を含むラウンド関数の単純な繰り返しにより、平文を暗号文に変換する構造を持つ。F関数においては、線形変換処理および非線形変換処理が実行される。なお、Feistel構造を適用した暗号処理について記載した文献としては、例えば非特許文献1、非特許文献2がある。
 暗号アルゴリズムの実装形態には、ソフトウェア実装とハードウェア実装の二種類が存在する。ハードウェア実装では、回路規模が小さくなるように実装することで、ハードウェア化の際のコストダウンや低消費電力化が期待できる。そのため、新アルゴリズム、既存アルゴリズムを問わず、小型化するための実装法が様々、提案されている。
 例えばHamalainen,Alho、Hannikainen、Hamalainenらは、Substitution Permutation Network(SPN)構造を持つAES暗号アルゴリズムに対する小型実装法を提案している。この小型実装法については、非特許文献3[Panu Hamalainen,Timo Alho,Marko Hannikainen,and Timo D.Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core. In DSD,pages 577-583.IEEE Computer Society,2006.9]に開示されている。
 しかし、この小型実装法は、SPN構造を利用したAESアルゴリズム固有の処理シーケンスに適応するものであり、SPN構造とは異なる上述のFeistel構造や一般化Feistel構造を持つ暗号アルゴリズムであるDESやCLEFIA暗号アルゴリズムへそのまま適用しても十分な小型化を実現できないという問題がある。
 なお、上述したAES暗号は、SPN構造を利用した暗号アルゴリズムであり、DES暗号や、CLEFIA暗号はSPN構造とは異なるFeistel構造や一般化Feistel構造を利用した暗号アルゴリズムである。これらの具体的な構造については後段で詳細に説明する。
K. Nyberg, "Generalized Feistel networks", ASIACRYPT'96, SpringerVerlag, 1996, pp.91--104. Yuliang Zheng, Tsutomu Matsumoto, Hideki Imai: On the Construction of Block Ciphers Provably Secure and Not Relying on Any Unproved Hypotheses. CRYPTO 1989: 461-480 Panu Hamalainen,Timo Alho,Marko Hannikainen,and Timo D.Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core. In DSD,pages 577-583.IEEE Computer Society,2006.9
 本発明は、例えば上述の状況に鑑みてなされたものであり、Feistel構造や一般化Feistel構造を利用した暗号処理構成における小型化を実現する暗号処理装置、および暗号処理方法、並びにプログラムを提供することを目的とする。
 本発明の第1の側面は、
 データ処理対象となるデータブロックの構成ビットを複数のラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する暗号処理部を有し、
 前記暗号処理部は、
 前記複数ラインの第1ラインのデータに対する変換データを生成し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行する演算部と、
 前記演算部の演算結果を保持するレジスタを有し、
 前記演算部は、前記レジスタから順次、データを取得して取得データ順の演算を実行して演算結果を前記レジスタに格納する構成であり、
 前記演算部は、
 前記第1ラインのデータに対する行列を適用した線形変換を実行する行列演算実行部を有し、
 前記行列演算実行部は、
 前記第1ラインのデータに対する行列演算の実行サイクル中、最初のサイクルの行列演算の実行に際して前記第2ラインのデータとの演算を実行する暗号処理装置にある。
 さらに、本発明の暗号処理装置の一実施態様において、前記行列演算実行部は、前段の非線形変換部から順次出力される複数の単位データに対する行列演算を複数サイクルで実行する構成であり、前記複数サイクルの最初のサイクルで、前記非線形変換部から入力する単位データの行列演算に併せて前記第2ラインのデータとの演算を実行する。
 さらに、本発明の暗号処理装置の一実施態様において、前記暗号処理装置は、前記第1ラインのデータに対する行列演算に必要な演算サイクルの完了後に前記第2ラインのデータとの演算を実行する場合に必要となる前記第2ラインのデータ保持用の独立したレジスタを削減し、前記第1ラインのデータに対する行列演算の途中結果の保持用レジスタを前記第2ラインのデータ保持用のレジスタとして利用した構成を有する。
 さらに、本発明の暗号処理装置の一実施態様において、前記行列演算実行部は、前記第1ラインのデータに対する行列演算を実行する初期サイクルにおいて、前記第1ラインに対する行列演算過程データと前記第2ラインのデータとの排他的論理和演算を実行する。
 さらに、本発明の暗号処理装置の一実施態様において、前記行列演算実行部は、巡回行列またはアダマール行列を適用した行列演算を実行する構成である。
 さらに、本発明の暗号処理装置の一実施態様において、前記暗号処理部は、前記ラウンド関数の実行部として、非線形変換処理を実行する非線形変換部と、行列を適用した線形変換処理を実行する線形変換部としての行列演算実行部を有する。
 さらに、本発明の暗号処理装置の一実施態様において、前記行列演算実行部は、前記非線形変換部としてのS-boxの出力を、順次入力して入力データに対する行列演算を1サイクル処理として実行する。
 さらに、本発明の暗号処理装置の一実施態様において、前記暗号処理部の実行する暗号処理は、Feistel構造または一般化Feistel構造を適用した暗号処理である。
 さらに、本発明の暗号処理装置の一実施態様において、前記暗号処理部の実行する暗号処理は、CLEFIA暗号アルゴリズムに従った暗号処理である。
 さらに、本発明の第2の側面は、
 暗号処理装置において暗号処理を実行する暗号処理方法であり、
 暗号処理部が、データ処理対象となるデータブロックの構成ビットを複数ラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する暗号処理ステップを有し、
 前記暗号処理ステップにおいて、前記複数ラインを構成する第1ラインのデータの変換処理を実行し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行し、
 前記第1ラインのデータの変換データ生成処理において実行する行列演算処理の実行サイクル中、最初のサイクルの行列演算処理に際して前記第2ラインのデータとの演算を実行する暗号処理方法にある。
 さらに、本発明の第3の側面は、
 暗号処理装置において暗号処理を実行させるプログラムであり、
 暗号処理部に、データ処理対象となるデータブロックの構成ビットを複数ラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行させる暗号処理ステップを有し、
 前記暗号処理ステップにおいて、前記複数ラインを構成する第1ラインのデータの変換処理を実行し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行させ、
 前記第1ラインのデータの変換データ生成処理において実行する行列演算処理の実行サイクル中、最初のサイクルの行列演算処理に際して前記第2ラインのデータとの演算を実行させるプログラムにある。
 なお、本発明のプログラムは、例えば、様々なプログラム・コードを実行可能な情報処理装置やコンピュータ・システムに対して例えば記憶媒体によって提供されるプログラムである。このようなプログラムを情報処理装置やコンピュータ・システム上のプログラム実行部で実行することでプログラムに応じた処理が実現される。
 本発明のさらに他の目的、特徴や利点は、後述する本発明の実施例や添付する図面に基づくより詳細な説明によって明らかになるであろう。なお、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。
 本発明の一実施例によれば、一般化Feistel構造を適用した暗号処理構成の小型化や省電力化が実現される。
 具体的には、データを複数ラインに分割入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する一般化Feistel構造を適用した暗号処理構成において、第1ラインのデータに対する行列を適用した線形変換処理を実行する行列演算実行部が行列演算の実行サイクル中、最初のサイクルにおいて行列演算過程データと第2ラインのデータとの演算を実行する。本構成により、第2ラインのデータ保持用のレジスタと第1ラインの行列演算途中結果保持用のレジスタの共有化が可能となり、総レジスタ数の削減、小型化が実現される。さらに回路構成の小型化、エレメント数の削減により電力消費量の削減も可能となる。
kビットの鍵長に対応したnビット共通鍵ブロック暗号アルゴリズムを説明する図である。 Feistel構造の全体構造と、1つのF関数の詳細構成例について説明する図である。 一般化Feistel構造の一例について説明する図である。 SPN構造を適用したAES暗号アルゴリズムのラウンド関数の構造について説明する図である。 Hamalainenらの提案したAES暗号を実行するデータ暗号化部のデータパスを示す図である。 Hamalainenらの提案したAES暗号を実行するデータ暗号化部のデータパスを簡略化して示した図である。 行列を適用した線形変換処理を実行する行列演算回路253の動作について説明する図である。 アダマール行列を適用した行列演算を実現する行列演算回路について説明する図である。 Hamalainenらの実装法を4-line一般化Feistel構造に適用した場合のデータ演算部回路の概要図である。 F関数の構成例について説明する図である。 本発明の一実施例としてのデータパス、すなわち演算回路構成を示す図である。 図9に示すデータパスに従った行列演算回路304における行列演算シーケンスを示す図である。 図11に示すデータパスに従った行列演算回路504における行列演算シーケンスを示す図である。 2ラインのFeistel構造に対して本発明を適用したデータパスとしての回路構成例について説明する図である。 暗号処理装置としてのICモジュール700の構成例を示す図である。
 以下、図面を参照しながら本発明の暗号処理装置、および暗号処理方法、並びにプログラムの詳細について説明する。説明は、以下の項目に従って行う。
 1.共通鍵ブロック暗号の概要
 2.SPN構造を適用したAES暗号アルゴリズムにおける小型実装手法の概要について
 3.SPNの小型実装構成における行列演算回路の構成と処理の詳細について
 4.SPN構造の小型実装構成の一般化Feisel構造への適用と問題点について
 5.一般化Feistel構造の小型化の実現構成について
 6.本発明の構成による効果および変形例について
 7.暗号処理装置のICカードとしての構成例について
  [1.共通鍵ブロック暗号の概要]
 まず、本発明の適用可能な共通鍵ブロック暗号の概要について説明する。本明細書において、共通鍵ブロック暗号(以下ではブロック暗号)は、以下に定義するものを指すものとする。
 ブロック暗号は平文Pと鍵Kを入力し、暗号文Cを出力する。平文と暗号文のビット長をブロックサイズと呼び、ここではnで示す。nは任意の整数値を取りうるが、通常、ブロック暗号アルゴリズムごとに、予め1つに決められている値である。なお、複数のブロック長に対応するアルゴリズムもある。ブロック長がnのブロック暗号のことをnビットブロック暗号と呼ぶこともある。
 鍵のビット長はkで表す。鍵は任意の整数値を取りうる。共通鍵ブロック暗号アルゴリズムは1つまたは複数の鍵サイズに対応することになる。例えば、あるブロック暗号アルゴリズムAはブロックサイズn=128であり、ビット長k=128、またはk=192またはk=256の各種の鍵サイズに対応するという構成もありうる。
 平文[P]、暗号文[C]、鍵[K]の各ビットサイズは、以下のように示される。
 平文P:nビット
 暗号文C:nビット
 鍵K:kビット
 図1にkビットの鍵長に対応したnビット共通鍵ブロック暗号アルゴリズムを説明する図を示す。図1に示すように、共通鍵ブロック暗号処理は、nビットの平文Pと、kビットの秘密鍵Kを入力して、予め定められた暗号アルゴリズムを実行して、nビットの暗号文Cを出力する。なお、図1には平文から暗号文を生成する暗号化処理を示しているが、暗号文から平文を生成する復号処理では、鍵の入力順を逆にし、ラウンド関数の逆関数を構成することにより、復号処理がなされる。
 ブロック暗号は2つの部分に分けて考えることができる。ひとつは鍵Kを入力とし、ある定められたステップにより入力秘密鍵Kのビット長を拡大して拡大鍵K'(ビット長k')を出力する鍵スケジュール部111と、平文Pと鍵スケジュール部111から入力する拡大鍵K'から生成されるラウンド鍵RK等を受け取り、平文Pを入力して、ラウンド鍵RK等を適用した暗号処理を実行して、暗号文Cを生成するためのデータの変換を実行するデータ暗号化部112である。なお、先に説明したように、データ暗号化部112を変更することにより、復号処理を実現できる。
 このように、共通鍵ブロック暗号のアルゴリズムは、入力データの変換を繰り返し実行するラウンド関数を有するデータ暗号化部112と、ラウンド関数部の各ラウンドで適用するラウンド鍵を生成する鍵スケジュール部111とによって構成される。鍵スケジュール部111は秘密鍵Kを入力し、各ラウンド関数に入力するラウンド鍵を生成する。例えば、r段のラウンド関数を行なう構成としたブロック暗号においては、1からr段までのラウンド関数にそれぞれRK、RK・・・、Rのラウンド鍵が入力される。また、鍵スケジュール部111は、初期鍵としてIK、最終鍵としてFKをデータ暗号化部112に出力し、これらの鍵と処理データとの排他的論理和がなされる。
 先に説明したように共通鍵ブロック暗号におけるデータ暗号化部112の代表的な構造としてFeistel構造がある。ブロック長をnビット(n-bit)とした場合の具体的なFeistel構造の構成例を図2に示す。
 Feistel構造は、データ変換関数としてのF関数を含むラウンド関数の単純な繰り返しにより、平文を暗号文に変換する構造を持つ。F関数においては、線形変換処理および非線形変換処理が実行される。
 図2には右側にFeistel構造の全体構造を示し、左側に1つのF関数120の詳細構成図を示している。
 図2右側のFeistel構造に示すように、n-bitのデータをn/2-bitずつの2-lineに分割し、そのn/2-bitの片方をラウンド内のF関数に入力し、その出力をもう片方のn/2-bitと排他的論理和していく構成となっている。
 各ラウンドにおけるF関数には、鍵スケジュール部111から入力する拡大鍵K'から生成されるラウンド鍵RK~RKが入力される。
 F関数の構成には様々なタイプのものがあるが、例えば、図2に示すF関数120のように、ラウンド鍵との排他的論理和演算を実行する排他的論理和演算部121、排他的論理和演算部121の出力に対して非線形変換処理を実行するS-boxと呼ばれる非線形変換部[S]122、非線形変換部[S]122の出力に対して、行列演算により線形変換の処理を行なう線形変換部[M]123を有する構成が知られている。
 なお、図2に示した構造は、Feistel構造の構成例の1つである。この構造の他、例えば初期鍵IKや、最終鍵FKの排他的論理和演算を行う位置を変更した構成など、様々な構成がある。
 図2に示す構成は、処理対象となるn-bitの入力(例えば平文の構成データ)Pを2つに分割してn/2-bitずつの2-lineとして処理を行う構成であった。このように入力を2分割して処理を行う構成をFeistel構造と呼ぶ。
 処理対象データの分割数は2分割に限らず、様々な設定が可能である。分割数を2に限定しないFeistel構造を一般化Feistel構造と呼ぶ。
 図3を参照して、一般化Feistel構造の一例について説明する。図3に示す構成は、処理対象データを4分割して処理を行う構成例である。
 図2を参照して説明したFeistel構造は、処理対象データであるn-bitの平文データを、n/2-bitずつの2-lineに分割し、処理を行なう構成であった。これに対して、図3に示す構成は、処理対象データであるn-bitの平文データを、n/4-bitずつの4-lineに分割して処理を行なう構成を持つ。
 図3に示す構成は、4-line一般化Feistel構造と呼ばれる。図3に示す4-line一般化Feistel構造も、図2を参照して説明したFeistel構造と同様、F関数を持つラウンド関数を繰り返し実行する構成を持つ。
 ただし、図3に示すように入力nビットは4分割され、データの流れが複雑になっている。図3に示す構成では、n-bitのデータをn/4-bitずつの4-lineに分割し、そのうちの2-lineをそれぞれF関数に入力し、その出力をその他の2-lineと排他的論理和していく構成となっている。
 F関数は、例えば図2を参照して説明したF関数120と同様、ラウンド鍵との排他的論理和演算を実行する排他的論理和演算部121、排他的論理和演算部121の出力に対して非線形変換処理を実行するS-boxと呼ばれる非線形変換部[S]122、非線形変換部[S]122の出力に対して、行列演算により線形変換の処理を行なう線形変換部[M]123を有する構成が利用される。
 図3に示す4-line一般化Feistel構造のように、データ暗号化部における処理ラインを2-lineから4-lineに変更することにより、ラウンド鍵RK、初期鍵IK、最終鍵FKも、n/2-bitから、n/4-bitのRK[0]、RK[1]、IK[0]、IK[1]、FK[0]、FK[1]に分割される。
 なお、図3は4-line一般化Feistel構造を示しているが、処理データを2-line以上としたFeistel構造については全て一般化Feistel構造と呼ぶ。
 以下の本発明の説明においては、4-line一般化Feistel構造における本発明の適用例について説明する。ただし、本発明は、4-line一般化Feistel構造のみならず、2ライン(2-line)のFeistel構造、2ライン(2-line)以上の任意の処理ライン数を持つ一般化Feistel構造のいずれにも適用可能である。
  [2.SPN構造を適用したAES暗号アルゴリズムにおける小型実装手法の概要について]
 次に、本発明の実施例の説明の前提として、既に提案されているSPN構造を適用したAES暗号アルゴリズムにおける小型実装手法の概要について説明する。
 先に説明したように、例えばHamalainen,Alho、Hannikainen、Hamalainenらは、Substitution Permutation Network(SPN)構造を持つAES暗号アルゴリズムに対する小型実装法として例えば必要なレジスタ数を削減した構成を提案している。この小型実装法については、非特許文献3[Panu Hamalainen,Timo Alho,Marko Hannikainen,and Timo D.Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core. In DSD,pages 577-583.IEEE Computer Society,2006.9]に開示されている。
 このAES暗号アルゴリズムの小型実装手法について説明する。
 まず、図4を参照してSPN構造を適用したAES暗号アルゴリズムのラウンド関数の構造について説明する。
 なお、SPN構造を適用したAES暗号アルゴリズムにおいてもFeistel構造と同様、ラウンド関数を複数回、繰り返し実行する構成を持つ。
 図4は、SPN構造を適用したAES暗号アルゴリズムにおいて利用されるラウンド関数実行部の構成例を示す図である。AESでは、図4に示すラウンド関数を、複数回、繰り返して平文から暗号文、または暗号文から平文の生成を行う。
 図4に示すラウンド関数実行部は以下の構成要素によって構成される。
 非線形変換処理を実行する8ビット入出力の16個のS-boxからなる非線形変換部201、
 非線形変換部201を構成するS-boxからの8ビット出力の入れ替え処理としてのShift Low実行部202、
 Shift Low実行部202の出力を32ビット単位で入力して行列を適用した線形変換処理を実行する4つの行列演算部からなる線形変換部203、
 線形変換部203を構成する4つの行列演算部各々からの32ビット出力に対して32ビットのラウンド鍵との排他的論理和演算を実行する4つの演算部からなる排他的論理和演算部204を有する。
 図4に示す例は、入出力128ビットのラウンド関数実行部であり、16個のS-box各々に8ビット、計8×16=128ビットを入力し、4つの排他的論理和部の各々~32ビット、計32×4=128ビット出力を行う構成である。非線形変換部201、Shift Low実行部202、線形変換部203、排他的論理和演算部204、これらを適用した一連の処理を1回のラウンド関数の実行処理として実行し、このラウンド関数を複数回、繰り返して128ビットの入力データ(例えば平文)から、128ビットの出力(例えば暗号文)を生成して出力する。
 AESの実装において、1つのラウンド関数の処理(1 round)、すなわち、非線形変換部201、Shift Low実行部202、線形変換部203、排他的論理和演算部204、これらを適用した一連の処理を、1サイクル(1 cycle)で実行しようとすると、少なくとも、図4に示すように、16個のS-boxの回路と、4個の行列演算回路がデータ暗号化部の構成として必要となる。
 Hamalainenらは、1つのラウンド関数の処理(1 round)を、1サイクルではなく、16サイクル(16 cycle)で順次シリアル処理として行う設定とすることで、データ暗号化部の小型化を実現した。
 この小型化構成では、S-boxの回路は1個しか用いず、さらに、4サイクル(4cycle)かけて1つの行列演算を実行する。このような実装とすることで、行列演算回路の小型化を実現している。
 図5にHamalainenらの提案したAES暗号を実行するデータ暗号化部のデータパスを示す。図5に示す構成は、図4に示すAES暗号のラウンド関数を実行するハードウェア構成に相当する。
 図5に示す構成において、演算中のデータは8-bit単位に分割され、各8ビットデータをレジスタr01~r19に格納している。図5には19個のレジスタ(r01~r19)が示されている。19個のレジスタ(r01~r19)の各々は8ビットデータを保持する8ビットレジスタである。
 図4を参照して説明した通り、図4に示す構成例は、入出力128ビットのラウンド関数実行部であり、図5は、入出力128ビットのラウンド関数を8ビット単位データのシリアル処理として実行するハードウェア構成に対応する。
 図5の構成において、入出力データをすべて格納するために必要となる8ビットレジスタの数は、128/8=16であり、16個のレジスタがあればよい。図5には19個のレジスタがあり、3つのレジスタが余分であるが、これら24ビット分の3つのレジスタは、行列を適用した線形変換処理を実行するための行列演算処理のために利用される。
 また、図4を参照して説明したように、AESでは、非線形変換を実行するS-boxと線形変換を実行する行列演算の間にShift Low実行部によるデータ置換が実行される。Hamalainenらの実装手法では、図5中のいくつかのレジスタの前にマルチプレクサ(Multiplexer)m01~m08を導入することにより、Shift Low実行部で行なわれる置換を実現している。
 図5に示すように、非線形変換部としてのS-box252は1個しかない。このS-box252に対して8ビットデータを順次入力し、16サイクルで図4に示す16個のS-boxによる非線形変換処理を実行する。
 S-box252の出力は行列演算回路253に入力され、行列演算回路253において行列を適用した線形変換処理が実行される。なお、図4の構成ではS-boxによる処理データをShift-Low実行部で置換した後、行列演算を行う構成となっているが、図5に示す例では、S-box252の出力を行列演算回路253に直接入力する構成としている。図5の構成では、Shift-Low実行部での置換処理に相当する処理は図5に示すレジスタ群r01~r19内のマルチプレクサm01~m08の動作によって実行する。
 図5に示す行列演算回路253では、図4に示す線形変換部203の4つの行列演算回路の処理が順次実行される。図4に示す線形変換部203の4つの行列演算回路の1つの行列演算回路で実行する行列を適用した線形変換処理を4サイクルで実行する。この処理については後段で詳細に説明する。
 図4に示す排他的論理和演算部203の排他的論理和演算処理は、図5の排他的論理和演算部254a,254bにおいて実行される。これら排他的論理和演算部254a,254bにおいて、処理データと、鍵生成部251の出力するラウンド鍵との排他的論理和演算処理を実行する。
 図4に示すShift Low実行部202のデータ置換処理は、前述したように図5に示すレジスタ群r01~r19内のマルチプレクサm01~m08の動作によって実行されることになる。
 図5に示すHamalainenらの提案したSPN構造によるAESアルゴリズムの実行構成では、S-boxを1つのみとしている。
 レジスタ数は、図5に示すように152ビット分のレジスタ(8ビットレジスタ×19)となっている。なお、鍵生成部251にも128ビット鍵データを保持する128ビットレジスタが必要となる。
 図5に示すHamalainenらの提案したSPN構造を適用したAESアルゴリズムの実行構成は、S-box数を1つのみとし、また必要なレジスタ数も最小限の設定とした小型実装を実現している。
  [3.SPNの小型実装構成における行列演算回路の構成と処理の詳細について]
 次に、図5を参照して説明したSPNの小型実装構成における行列演算回路の構成と処理の詳細について説明する。
 図5を参照して説明したHamalainenらの提案したSPN構造によるAESアルゴリズムの実行構成中、行列演算回路253の実行する行列を適用した線形変換処理について説明する。
 説明の簡単化のため、図6のように、Shift Low実行部によるデータ置換を行なう回路や、鍵スケジュール部については省略したデータパスを用いて説明する。
 図6中のレジスタ群261は、図5中の12個のレジスタr04~r15とマルチプレクサm05~m08を含む回路に相当し、96-bit分のデータを保持し、Shift Lowも考慮されたレジスタの集合を表す。
 図7を用いて行列を適用した線形変換処理を実行する行列演算回路253の動作について説明する。今、下記の演算を図7に示す行列演算回路253を用いて実行するとする。なお、下記の演算は全て、ある有限体GF(2)上で行われるものとする。
Figure JPOXMLDOC01-appb-M000001
 なお、式1に示す(x、x、x、x)は、行列演算回路253に対する入力(S-boxからの出力)、
 (y、y、y、y)は、行列演算回路253の出力(線形変換結果)、
 4×4の行列は、行列演算回路253において適用する行列(線形変換行列)に対応する。
 なお、4×4の線形変換行列の要素は16進数値として示している。
 本例では、(x、x、x、x)の各々は、S-box252からの1サイクルあたりの出力であり8ビットデータである。出力(y、y、y、y)の各々も8ビットデータである。
 なお、図7の行列演算回路253では、図4に示す4つの行列演算部からなる線形変換部203の処理を行う。図4に示す4つの行列演算部の各々は、4つのS-boxにおいてそれぞれ非線形変換されたデータの出力(8ビット出力)を入力して線形変換を実行する。しかし、図5、図7に示す構成では、S-boxが1つのS-box252のみに削減され、1サイクルで図4に示す16個のS-box中の1つ分のS-boxの出力のみが行われる。
 従って、図7の行列演算回路253では、1つのS-box252から4サイクルかけて必要となる図4に示す4つのS-boxからの出力(x、x、x、x)を入力することになる。
 例えば図7の行列演算回路253において、図4に示す行列演算回路203aの行列演算処理を実行する場合、図4に示す行列演算回路203aに対するS-box出力(1)~(4)が図7に示す行列演算回路253に順次S-box252から4サイクルかけて入力されることになる。
 図7に示す行列演算回路253に対するS-box252からの入力は、
 第1サイクルにおいてデータx
 第2サイクルにおいてデータx
 第3サイクルにおいてデータx
 第4サイクルにおいてデータx
 これらのデータであり、このデータを用いて行列を適用した線形変換結果としての(y,y,y,y)を出力する。
 このデータ変換を、行列を用いて行うのが図7に示す行列演算回路253であり、この変換処理を式で表現したのが前記の(式1)である。
 前述したように、S-box252の各サイクルにおける出力x、x、x、x、の各々はそれぞれ8ビットデータであり、行列演算回路253における行列を適用した線形変換結果としてのy,y,y,yの各々もそれぞれ8ビットデータである。
 以下、各サイクルにおける処理について説明する。
 図7に示す行列演算回路253は、1サイクル(1cycle)目に入力データ(din)としてxを入力する。この時点で、論理積回路271~274に入力されているイネーブル信号(en)を0にしておく。なお、図5~図7には示されていないが、制御部によって制御がなされる。
 図7に示す最上段のラインL1では、入力データ(din)=xがそのまま排他論理和部281を通過してレジスタr16に格納される。
 2番目のラインL2でも、入力データ(din)=xがそのまま排他論理和部282を通過してレジスタr17に格納される。
 3番目のラインL3と、4番目のラインL4では、入力データ(din)としてのxと予め規定された値:2、3との有限体上での乗算処理が実行される。すなわち、乗算部285,286において以下の乗算が実行される。
 x・2、
 x・3、
 これらを計算する。
 これらの演算結果が、排他論理和部283,284を通過してレジスタr18,r19に格納される。
 なお、1番目のラインL1と、2番目のラインL2には乗算部が設定されていないが、入力データ(din)としてのxと予め規定された値:1との有限体上での乗算処理が実行されていると同等である。
 2、3、4cycle目には、入力データ(din)としてx、x、xをそれぞれ入力する。この2、3、4cycle目は、1cycle目とは異なり、論理積回路271~274に入力されているイネーブル信号(en)を1にする。
 この設定により、排他論理和部281~284では、入力データまたはその乗算値と論理積回路271~274からの出力との排他的論理和演算が実行され、その結果がレジスタr16~r19に格納されることになる。
 このような処理によって、4cycle後のレジスタr16~r19には、前記式(式1)に従って算出される結果が格納される。すなわち、
 (dout,dout,dout,dout
=(y,y,y,y
 となる。
 このように、図7に示す行列演算回路253により、4サイクルの処理で上記(式1)に従った行列演算が実行されることになる。
 なお、図7を参照して説明した処理は、AESで採用されている巡回行列による行列演算による線形変換処理を実現する回路であるが、他の異なる行列を適用した線形変換処理も、回路の乗算部の設定と、接続構成等を変更することで実現できる。例えば、下記のようなアダマール行列を適用した行列演算を実現する回路は図8に示す行列演算回路290によって実現可能である。
Figure JPOXMLDOC01-appb-M000002
 なお、式2に示す(x、x、x、x)は、図8に示す行列演算回路290に対する入力(S-boxからの出力)
 (y、y、y、y)は、行列演算回路290の出力(線形変換結果)
 4×4の行列は、行列演算回路290において適用する行列(線形変換行列)に対応する。
 なお、4×4の線形変換行列の要素は16進数値として示している。
 図8に示すアダマール行列を適用した行列演算を実現する行列演算回路290と、図7に示す巡回行列を実現する行列演算回路253との異なる点は、例えば以下の構成である。
 乗算部291~294が式2に示す4×4のアダマール行列からなる線形変換行列の要素に対応した設定となっている。
 論理積回路を、マルチプレクサ(Multiplexer)295~298に変更して、各レジスタr16~r19への入力を、2つの他レジスタからの出力か0、これら3つの内から1つ選択する設定としている。
 これらの構成が変更点である。
 図4~図8を参照して説明したHamalainenらの提案したSPN構造を用いたAES暗号構成の小型実装構成は、S-boxを1つのみに削減し、レジスタ数を最小限の設定とした構成を実現している。
 1ラウンドのラウンド演算に適用する必要なレジスタは、単純計算を行うと以下の通りとなる。ただしラウンド演算における処理データサイズとしてのブロックサイズnは、n=128ビットとする。
 (1)ラウンド鍵格納用の128ビットレジスタ
 (2)処理データ格納用の128ビットレジスタ
 (3)線形変換行列を適用した行列演算において演算途中結果を格納するための32ビットレジスタ
 データ演算部には、(2),(3)のレジスタが必要となり、128+32=160ビットレジスタが必要となると計算される。
 しかし、図5に示すHamalainenらの提案した構成では、160ビットより8ビット少ない152ビットレジスタ(=8ビットレジスタ×19)とすることに成功している。
 Hamalainenらの提案した構成は、S-boxから行列演算回路へ入力が済んだ値(8ビット)が次のラウンドでは不要となる。このことに着目し、行列演算回路へS-boxから入力する32-bitのうち、はじめに入力する8-bit分のレジスタを行列演算回路内のレジスタと共有する構成とすることで、8-bit分のレジスタを削減したものである。
  [4.SPN構造の小型実装構成の一般化Feisel構造への適用と問題点について]
 上述したように、HamalainenらはSPN構造の小型化を実現している。しかし、この小型化構成はSPN構造に対応した特有の構成であり、この小型実装構成を一般化Feisel構造へ適用しても十分な小型化の効果は得られない。以下、この問題点について説明する。なお、以下の説明では、一般化Feisel構造はFeisel構造を含む概念であるものとして説明する。
 図5を参照して説明したHamalainenらの提案構成を一般化Feistel構造を持つCLEFIA等のアルゴリズムを実行する構成に単純に適用すると、行列演算のために、行列の出力ビット長分のデータを格納するレジスタが必要になる。これは、一般化Feistel構造がSPN構造とは異なり、例えばラウンド関数内のF関数に入力した値を、次のラウンドでも利用する必要があるという処理シーケンスの根本的な違いに起因するものである。
 また、SPN構造では存在しなかったが、一般化Feistel構造では、ラウンド関数内において、F関数演算後に他のラインと排他的論理和を行う必要がある。そのため、排他的論理和を行うための回路も、一般化Feistel構造のラインのビット長分だけ必要となる。
 図9は、Hamalainenらの実装法を4-line一般化Feistel構造に適用した場合のデータ演算部回路の概要図を示す図である。図9では、先に図6を参照して説明したAESのデータパスと同様、一般化Feistel構造のラウンド関数終了時の置換動作や鍵スケジュール部は省略してある。
 なお、ラウンド演算における処理データサイズとしてのブロックサイズはnビットとする。先に図3を参照して説明したように、4-line一般化Feistel構造では、4つのライン各々にn/4ビットずつ入力され、順次転送される。
 図9中のレジスタ群301は、図6に示すレジスタ群261に対応する。ただし、4-line一般化Feistel構造に対応する図9のレジスタ群301は、(3/4)n-bit分のデータを保持するレジスタとラウンド関数終了時の置換動作と同様の処理を実現するマルチプレクサ等の組み合わせとして構成される。すなわち、レジスタ群301の下側のデータ演算部に1ライン分の(1/4)nビット分のデータが保持されるとすると、図9のレジスタ群301には、(3/4)n-bit分のデータを保持するレジスタが必要となる。
 なお、図9に示す4-line一般化Feistel構造を適用した暗号アルゴリズムのデータパス(演算実行回路)を適用して実行する演算は、図3に示す4-line一般化Feistel構造を適用した演算処理に対応する。
 この図9に示すデータパスを利用して図3に示す4-line一般化Feistel構造内のF関数を含むラウンド関数を実行することになる。
 ラウンド関数内のF関数の具体例を図10に示す。
 図10に示すF関数は、先に図2を参照して説明したFeistel構造のF関数と同様、以下の構成要素を持つ。
 (a)ラウンド鍵との排他的論理和演算を実行する排他的論理和演算部321、
 (b)排他的論理和演算部321の出力に対して非線形変換処理を実行するS-boxからなる非線形変換部[S]322、
 (c)非線形変換部[S]322の出力に対して、行列演算により線形変換の処理を行なう線形変換部[M]323、
 これらの構成要素を持つ。
 ただし、4-line一般化Feistel構造におけるF関数に対する入出力は、n/4ビットとなる。
 なお、線形変換部[M]323で実行する行列を適用した行列演算としての線形変換処理に適用する行列は、1行目の要素が(a,b,c,d)となる巡回行列を想定している。すなわち、以下の(式3)に示す行列である。
Figure JPOXMLDOC01-appb-M000003
 先に図4~図8を参照して説明したSPN構造を適用したAES暗号アルゴリズムの構成と比較するため、処理単位としてのブロック構成ビットnは、
 n=128-bit
 とする。
 図9に示す回路も、図6に示す回路と同様、S-boxは1つのみである。図9に示すS-box303である。このS-box303は図10に示すF関数内に設定される1つのS-boxの処理を1サイクルで実行する。サイクル毎に、順次、図10に示す各S-boxの処理を行うことになる。
 図10に示すように、F関数の1つのS-boxには、4-line一般化Feistel構造の1つのlineを伝送するn/4ビットの1/4、すなわちn/16ビットが入力され非線形変換処理が実行される。
 図9に示すS-box303には、n/16ビットずつがサイクル毎に入力され非線形変換処理が実行される。
 なお、図9の構成では、レジスタ群301から1サイクル単位でS-box303の処理単位であるn/16ビットのデータを出力する設定であり、このn/16ビットをまず、排他的論理和部302でラウンド鍵の構成データと排他的論理和を行うS-boxで非線形変換を実行する構成としている。
 S-box303において非線形変換のなされたデータは、n/16ビットごとに1サイクル単位で次の行列演算回路304に入力される。行列演算回路304では所定の行列を適用した線形変換処理が実行されることになる。
 図9に示す4-line一般化Feistel構造を適用した暗号アルゴリズムのデータパス構成中、レジスタ群301を除く演算実行回路と、先に図6を参照して説明したSPN構造を利用したAES暗号処理を実行する演算回路構成とを比較する。
 図6に示す演算回路では、8ビットレジスタがr01~r03、r16~r19の7個であるのに対して、図9に示す演算回路では、8ビットレジスタがR0~R7の8個である。すなわち、8-bitレジスタの数が1つ増えている。
 また、排他的論理和演算回路の数も増加している。
 このように、Hamalainenらの提案構成を一般化Feistel構造に適用した場合、図9に示す演算回路のように、ブロック長分のレジスタに加え、1-line分のレジスタと排他的論理和演算回路が必要になってくる。
 レジスタの増加は回路規模に大きく影響するため、ブロック長分のみのレジスタで構成できる実装法が実現できれば、そのほうが望ましい。
 なお、レジスタのゲートサイズは他のセルに比べて比較的大きなものとなり、レジスタ数の増加はゲートサイズに大きく影響する。そのため、小型化を実現するための一つの方向性として、レジスタの増加を抑えた実装法を考慮することが重要となる。
  [5.一般化Feistel構造の小型化の実現構成について]
 次に、本発明の構成、すなわち、一般化Feistel構造の小型化の実現構成について説明する。
 Hamalainenらの実装法を、一般化Feistel構造を持つ暗号アルゴリズムの実行構成に適用した場合には、前節で説明したようにレジスタと排他的論理和の回路が増加してしまい、小型化が実現されない。
 これは、SPN構造を適用した暗号アルゴリズムと、一般化Feistel構造を適用した暗号アルゴリズムが異なること、特に、一般化Feistel構造を適用した暗号アルゴリズムでは、行列演算結果を求めてから、他のラインとの排他的論理和を行う設定となっていることなどが要因であると考えられる。
 すなわち、一般化Feistel構造を適用した暗号アルゴリズムでは、行列の途中結果を保持するレジスタと他のラインのデータを保持するレジスタの両方が必要となる。
 また、一般化Feistel構造を適用した暗号アルゴリズムでは、1つのラインのデータに対する行列演算が終了すると、次のサイクル(cycle)で新たなラインの行列の演算が始まる。このため、その1cycleの間に他のラインとの排他的論理和を行なう必要がある。そのため、1-line分の排他的論理和の回路が必要となる。
 以下に説明する本発明の構成では、排他的論理和演算における結合法則、すなわち、以下の式が成立することを利用し、演算順序を変更することで必要なレジスタの削減を実現している。
Figure JPOXMLDOC01-appb-M000004
 上記式4は、排他的論理和演算の順番を変更しても同じ結果が得られることを意味している。本発明では、この法則を利用して、演算順序を変更することで必要なレジスタの削減を実現している。
 具体的には、他のラインのデータを保持しているレジスタに行列演算の途中結果を排他的論理和していくように演算順序を変更する。このように演算順序を変更することにより、行列演算の途中結果を保持する必要がなくなり、レジスタ数を削減することができる。
 図11に本発明の一実施例としてのデータパス、すなわち演算回路構成を示す。図11に示す演算回路は、先に図3を参照して説明した4-line一般化Feistel構造を適用した暗号アルゴリズムの実行回路である。具体的には、巡回行列演算部をアダマール行列演算部に置き換えることで、例えばCLEFIA暗号の実行回路として利用可能である。
 なお、図11に示す回路は、図9と同様、4-line一般化Feistel構造のラウンド関数終了時の置換動作の実行回路や鍵スケジュール部の構成については省略している。
 図11中のレジスタ群501は、図9に示すレジスタ群301に対応する。すなわち、レジスタ群501は、データ保持用のレジスタとラウンド関数終了時の置換動作の実行機能を持つ回路によって構成される。
 しかし、図11中のレジスタ群501は、図9に示すレジスタ群301よりも少ないレジスタ数に設定されている。
 図9に示すレジスタ群301は、先に説明したように、(3/4)n-bit分のデータを保持するレジスタとラウンド関数終了時の置換動作の実行機能を持つ回路を含む構成として説明した。
 これに対して、図11に示すレジスタ群501に含まれるレジスタは、n/2-bit分のデータを保持するレジスタのみである。
 処理データとしてのブロックのビット数をn、すなわち、4-line一般化Feistel構造を適用した暗号処理単位としてのブロックのビット数:nが、
 n=128-bit
 とする。
 この設定で、先に説明した図9の構成では、
 レジスタ群301に、(3/4)n-bit=96-bit
 レジスタ群301以外の演算部に8ビットレジスタが8個の8×8=64-bit
 総計で、
 96+64=160-bit
 のレジスタが必要となっている。
 一方、本発明の手法を適用した図11の構成では、
 レジスタ群501に、(1/2)n-bit=64-bit
 レジスタ群501以外の演算部に8ビットレジスタが8個の8×8=64-bit
 総計で、
 64+64=128-bit
 のレジスタが必要となっている。
 すなわち、SPN構造に対応するHamalainenらの実装法を4-line一般化Feistel構造に単純に適用した場合の図9の構成においては160-bitのレジスタが必要となるのに対して、本発明の構成である図11に示す4-line一般化Feistel構造を適用した演算回路では、128-bitのレジスタのみでよく、大幅なレジスタ削減が実現される。
 本発明の構成である図11に示す4-line一般化Feistel構造を適用した演算回路では、図9の構成に比較して32ビット分のレジスタを削減している。
 以下、詳細に説明するが、図11に示す本発明の構成では、行列演算回路において、他ラインからの出力(E、E、E、E)を利用した演算を先行して実行することで、これらの出力データ(E、E、E、E)を行列演算期間中、保持するためのレジスタ(8×4=32ビット)を削減したことによる。
 以下、このレジスタ削減を実現させる演算シーケンスについて詳細に説明する。
 レジスタ削減を実現するため、本発明の処理では、演算シーケンス、特に、線形変換を行う行列演算回路における行列を適用した演算シーケンスの設定を特別な設定とした。以下、図11に示す本発明に従ったデータパスである回路構成を適用した演算シーケンスの詳細について説明する。
 図12および以下に示す表1に図9に示すデータパスに従った行列演算回路304における行列演算シーケンスを示す。
 さらに、図13および以下に示す表2に図11に示すデータパスに従った行列演算回路504における行列演算シーケンスを示す。
Figure JPOXMLDOC01-appb-T000005
             (表1)
Figure JPOXMLDOC01-appb-T000006
              (表2)
 図9に示す構成における行列演算シーケンスを示す表1(図12)と、
 図11に示す構成における行列演算シーケンスを示す表2(図13)を用いて各処理の差異について説明する。
 まず、図9と図12(表1)を参照して、SPN構造に対応するHamalainenらの実装法を4-line一般化Feistel構造に単純適用した場合の行列演算シーケンスについて説明する。
 図9に示すデータパスの行列演算回路304に対して、S-box303からの出力として、順次、データ(x,x,x,x)が入力されて行列を適用した線形変換処理を行うものとする。
 行列演算回路304は、行列を適用した行列演算によって生成した出力(y,y,y,y)を排他的論理和演算部305に出力する。
 排他的論理和演算部305では、行列演算回路304の出力(y,y,y,y)と、4-line一般化Feistel構造における他ラインからの出力(E、E、E、E)と排他的論理和される。他ラインからの出力(E、E、E、E)は、例えば前ラウンドにおけるラウンド演算の処理結果に相当する。
 なお、行列演算回路304に対する入力(x,x,x,x)の各々はn/16ビットであり、出力(y,y,y,y)と、他ラインからの出力(E、E、E、E)の各々もすべてn/16ビットのデータである。
 このとき、図9に記載のレジスタR,R,・・・,Rの格納値は、上記および図12の表1のように変化する。
 1サイクル(1cycle)目で、レジスタR、R、R、Rに、行列演算回路304に対する入力要素xに基づく行列演算結果の各要素が格納される。この時点で、論理積回路313に入力されているイネーブル信号(en)は0に設定され、入力要素xに基づく乗算部311の乗算結果がレジスタR、R、R、Rに格納される。すなわち、
 レジスタRの格納値:d・x
 レジスタRの格納値:c・x
 レジスタRの格納値:b・x
 レジスタRの格納値:a・x
 これらのデータが各レジスタに格納される。
 その後、2サイクル目に行列演算回路304に入力要素xが入力される。2~4サイクル目では、論理積回路313に入力されるイネーブル信号(en)は1に設定され、排他論理和演算部312において、入力要素xの乗算部311の乗算結果と、前サイクルでレジスタR、R、R、Rに格納された値との排他的論理和演算が実行され、その結果がレジスタR、R、R、Rに格納される。
 また、この2サイクル目において、他ラインからの出力要素EがレジスタRに格納される。
 3サイクル目に行列演算回路304に入力要素xが入力される。2~4サイクル目では、論理積回路313に入力されるイネーブル信号(en)は1に設定され、排他論理和演算部312において、入力要素xの乗算部311の乗算結果と、前サイクルでレジスタR、R、R、Rに格納された値との排他的論理和演算が実行され、その結果がレジスタR、R、R、Rに格納される。
 また、この3サイクル目において、他ラインからの出力要素EがレジスタRに格納され、EがレジスタRに格納される。
 4サイクル目では、行列演算回路304に入力要素xが入力される。入力データ(x,x,x,x)の入力が完了し、この4サイクル目において、行列演算結果(y,y,y,y)がレジスタR、R、R、Rに格納される。
 その次の5サイクル目では、他ラインからの出力(E、E、E、E)と、行列演算回路304における行列を適用した行列演算結果(=線形変換結果)である(y,y,y,y)とが、排他的論理和演算部305において排他的論理和されて、その結果としての値が、レジスタR、R、R、Rに格納される。
 このレジスタ格納値、すなわち、下記式(式5)に示すデータが図9に示すライン306を介して次のラウンド演算の利用データとしてレジスタ群301に入力される。
Figure JPOXMLDOC01-appb-M000007
 なお、上記(式5)に示す値は、図3に示すラウンド間の接続部のラウンド出力データ(D)に相当する。
 また、この5サイクル目では、次の行列演算回路304への入力値(x',x'、x',x')の始めの要素x'に対する演算がレジスタR、R、R、Rに格納される。
 次に、図11に示す本発明に従ったデータパスを利用した行列演算回路504における行列演算のサイクル単位の遷移処理について、図11と図13(表2)を参照して説明する。
 図11に示すデータパスの行列演算回路504に対して、図9を参照して説明したと同様のS-box503からの出力として、順次、(x,x,x,x)が入力され、行列を適用した線形変換処理を行うものとする。
 この図11に示す構成を用いた行列演算を行うと、図13(表2)に示すように、4サイクル目においてレジスタR、R、R、Rに、次のラウンド演算の利用データ、すなわち、
Figure JPOXMLDOC01-appb-M000008
 なお、上記(式6)に示す値が格納される。これらの値は、第5サイクルでレジスタR、R、R、Rに格納され、図11に示すライン506を介して次のラウンド演算の利用データとしてレジスタ501に入力される。
 図11に示す構成は、図9に示す構成よりレジスタ数が削減された構成であるが、結果としては図9に示すと同様の演算処理を実現している。ただし、演算シーケンスが異なっている。
 各サイクルにおける処理について説明する。
 図11に示すデータパスを利用した処理では、例えば前ラウンドにおけるラウンド演算の処理結果に相当する他ラインからの出力(E、E、E、E)を、レジスタ501からの出力ライン521を介してレジスタR、R、Rに、順次格納する。図13(表2)に示す1サイクル目の1つ前のサイクル(0サイクル)において、
 レジスタRにはE
 レジスタRにはE
 レジスタRにはE
 これらのデータが格納された状態に設定される。
 1サイクル目において、これらのレジスタ格納値E、E、Eと、レジスタ群501から出力ライン521を介した新たな出力値Eを加えた出力(E、E、E、E)がマルチプレクサ513を介して、排他的論理和演算部512に入力される。なお、これらの演算制御は、例えば図示しない制御部やクロック入力情報に基づく制御によって行われる。
 排他的論理和演算部512では、これらの出力値(E、E、E、E)と、入力要素xに基づく乗算部311の乗算結果、すなわち、
 d・x
 c・x
 b・x
 a・x
 これらの各値との排他的論理和演算が実行される。この排他的論理和演算結果が、レジスタR、R、R、Rに格納される。
 すなわち、
 レジスタRには、レジスタRに格納された値Eが、マルチプレクサm0を介して排他論理和演算部512に入力されて、d・xとの排他論理和結果が格納される。
 レジスタRには、レジスタRに格納された値Eが、マルチプレクサm1を介して排他論理和演算部512に入力されて、c・xとの排他論理和結果が格納される。
 レジスタRには、レジスタ群からライン521を介して出力される出力値Eが、マルチプレクサm2を介して排他論理和演算部512に入力されて、b・xとの排他論理和結果が格納される。
 レジスタRには、レジスタRに格納された値Eが、マルチプレクサm3を介して排他論理和演算部512に入力されて、a・xとの排他論理和結果が格納される。
 すなわち、以下の(式7)に示す各値がレジスタR、R、R、Rに格納される。
Figure JPOXMLDOC01-appb-M000009
 なお、マルチプレクサ513(m0~m3)は、2入力から選択された1つの入力を出力するセレクタと同様の処理を行う。
 第1サイクルでは、レジスタR、R、Rの格納値、ライン521の出力値を出力するように設定される。なお、これらの制御は図示しない制御部の制御によって行われる。
 このように、本発明の構成では、図11に示す行列演算回路504に対するS-box503からの第1サイクルにおける入力xの入力タイミングにおいて、例えば前ラウンドにおけるラウンド演算の処理結果に相当する他ラインからの出力(E、E、E、E)との排他的論理和演算を実行し、その結果をレジスタR、R、R、Rに格納する。
 このように本発明の構成では、他ラインからの出力(E、E、E、E)との排他論理和演算処理を先行して実行する。この結果、4サイクルを要する行列演算期間が完了するまで他ラインからの出力(E、E、E、E)を保持する必要がなくなる。この演算シーケンスの変更処理によって必要なレジスタ数の削減を実現している。
 その後、2サイクル目に行列演算回路504に入力要素xが入力される。2~4サイクル目では、マルチプレクサ513(m0~m3)は、レジスタR、R、R、Rの格納値を選択出力するように制御される。
 この結果、排他論理和演算部512において、入力要素xの乗算部511の乗算結果と、前サイクルでレジスタR、R、R、Rに格納された値との排他的論理和演算が実行され、その結果がレジスタR、R、R、Rに格納される。
 また、この2サイクル目において、他ラインからの出力要素E'がレジスタRに格納される。
 3サイクル目に行列演算回路504に入力要素xが入力される。排他論理和演算部512において、入力要素xの乗算部511の乗算結果と、前サイクルでレジスタR、R、R、Rに格納された値との排他的論理和演算が実行され、その結果がレジスタR、R、R、Rに格納される。
 また、この3サイクル目において、他ラインからの出力要素E'がレジスタRに格納され、E'がレジスタRに格納される。
 4サイクル目では、行列演算回路504に入力要素xが入力される。入力データ(x,x,x,x)の入力が完了し、この4サイクル目において、レジスタR、R、R、Rには、行列演算結果(y,y,y,y)と他ラインからの出力(E、E、E、E)との排他論理和結果が格納されることになる。
 その次の5サイクル目では、次の他ラインからの出力(E'、E'、E'、E')がレジスタR、R、Rの格納値、ライン521の出力として、排他論理和演算部512に入力される。
 排他論理和演算部512は、これらの入力値と、行列演算回路504に対する新たな入力x'と乗算部511での乗算結果との排他論理和結果を算出して、レジスタR、R、R、Rに格納する。
 この時点で、レジスタR、R、R、Rに格納された値は、レジスタR、R、R、Rに格納される。
 このレジスタ格納値、すなわち、下記式(式8)に示すデータが図10に示すライン506を介して次のラウンド演算の利用データとしてレジスタ群501に入力される。
Figure JPOXMLDOC01-appb-M000010
 このように、本発明に従った構成では、行列の演算処理に際して他ラインからの出力(E、E、E、E)との排他的論理和演算を先行して実行することにより、他ラインからの出力(E、E、E、E)を格納するレジスタと、行列演算の途中結果を格納するレジスタを、個別に設定した独立のレジスタとする必要性をなくして、これらのレジスタの共有化を行うことで、必要な総レジスタ数を削減している。
  [6.本発明の構成による効果および変形例について]
 図11に示す本発明に従った一般化Feistel構造を適用した暗号処理を実行するデータパスでは、上述したように、先行した処理結果をラウンド演算における行列演算の最初のサイクル(1サイクル目)で排他論理和演算処理を実行してしまう構成としている。
 すなわち、例えば前ラウンドにおけるラウンド演算の処理結果に相当する他ラインからの出力(E、E、E、E)との排他的論理和演算を先行して実行する。
 図11を参照して説明したように、行列演算回路504における行列演算の最初の処理として実行する第1サイクルにおいて、他ラインからの出力(E、E、E、E)をレジスタ等からマルチプレクサ513を介して排他論理和演算部512に先行して入力させて、行列演算回路504に対する最初の入力値(x)の乗算部511での乗算結果(d・x等)と排他論理和処理を実行する。
 このように、本発明の構成では、1-line分(実施例では(n/16)×4)のマルチプレクサ(Multiplexer)を導入することで、図9に示す構成において必要であった1-line分のレジスタと1-line分の排他的論理和と1-line分の論理積の回路をなくすことができる。図11に示す構成では、これらの差分だけ、小型化を行うことができる。
 また、この小型化に伴い、低消費電力化も期待できる。
 特に、レジスタのゲートサイズは、他のセルに比べて比較的大きなものとなるため、1-line分のレジスタを削減できたことは小型化に特に寄与する。
 なお、上述した実施例では、本発明の適用構成の代表例として、4-line一般化Feistel構造への適用例について説明した。しかしながら、図11、図13(表1)を参照して説明した処理シーケンス、すなわち、他ラインからの出力値を先行して行列演算に適用することは、4-line以外の一般化Feistel構造やFeistel構造においても適用可能であり、図11を参照して説明したと同様のレジスタ他の回路構成の削減が実現される。すなわち、本発明は、4-line一般化Feistel構造のみでなく、ラウンド関数内部を変形、拡張された構造についても適用可能であり、2-lineのFeistel構造や、任意のx(xは2以上の自然数)の、x-line一般化Feistel構造にも適用できる。
 また、上述した実施例では、行列演算回路において適用する行列を巡回行列とした例について説明したが、行列演算回路において適用する行列は巡回行列に限らず、例えばアダマール行列など、その他の形式の行列を適用することも可能である。
 さらに、行列演算回路において適用する行列は、4×4行列のみでなく、
 任意のx×x行列、ただし、xは2以上の自然数、
 このような様々な行列の適用が可能である。
 また、先に図2を参照して説明したF関数を持つ構成に限らず、行列演算後に非線形変換を含まないラウンド関数を実行するアルゴリズムであれば、本発明の構成は適用可能であり、同様の小型化の効果が期待できる。
 なお、上述した実施例で説明した構成は、4-line一般化Feistel構造におけるtype-2一般化Feistel構造の例であるが、本発明は、この他のtype-1や、type-3の一般化Feistel構造に対しても適用可能であり、同様の効果が期待できる。
 2ラインのFeistel構造に対して本発明を適用したデータパスとしての回路構成例を図14に示す。
 図14に示すデータパスにおいて、例えば前ラウンドの演算結果としての他ラインからの出力(E、E、E、E)をレジスタR、R、R、Rに格納し、行列第1演算回路604における行列演算の最初の処理らサイクル(1サイクル目)においてS-box603からの入力値xと乗算部611における乗算結果との排他論理和を実行してその結果をレジスタR、R、R、Rに格納する。
 このように、先に図11を参照して説明したと同様の処理シーケンスで行列演算を実行することが可能であり、この処理により、レジスタ数の削減などによりハードウェア構成を小型化することが可能となる。
 具体的には、図14の構成とすることで、例えば図9と同様の構成に従って2ラインのFeistel構造のデータパスを設定した場合にn/2-bit分必要であった行列演算用のレジスタが不要となり、n-bit分のレジスタのみで全体を構成できる。
 なお、図14に示す2ラインのFeistel構造とした場合でも、行列演算回路604において適用する行列は巡回行列、アダマール行列等が利用可能であり、またx×x(ただしx≧2の整数)の任意の行列が利用できる。また、図2を参照して説明したF関数を持つ構成に限らず、行列演算後に非線形変換を実行しないラウンド関数であれば、本発明の適用が可能である。
  [7.暗号処理装置のICカードとしての構成例について]
 最後に、上述した実施例に従った暗号処理を実行する暗号処理装置としてのICモジュール700の構成例を図15に示す。上述の処理は、例えばPC、ICカード、リーダライタ、その他、様々な情報処理装置において実行可能であり、図15に示すICモジュール700は、これら様々な機器に構成することが可能である。
 図15に示すCPU(Central processing Unit)701は、暗号処理の開始や、終了、データの送受信の制御、各構成部間のデータ転送制御、その他の各種プログラムを実行するプロセッサである。メモリ702は、CPU701が実行するプログラム、あるいは演算パラメータなどの固定データを格納するROM(Read-Only-Memory)、CPU701の処理において実行されるプログラム、およびプログラム処理において適宜変化するパラメータの格納エリア、ワーク領域として使用されるRAM(Random Access Memory)等からなる。また、メモリ702は暗号処理に必要な鍵データや、暗号処理において適用する変換テーブル(置換表)や変換行列に適用するデータ等の格納領域として使用可能である。なおデータ格納領域は、耐タンパ構造を持つメモリとして構成されることが好ましい。
 暗号処理部703は、例えば図11や図14を参照して説明した暗号処理構成、すなわち、例えば一般化Feistel構造や、Feistel構造を適用した共通鍵ブロック暗号処理アルゴリズムに従った暗号処理、復号処理を実行する。
 なお、ここでは、暗号処理手段を個別モジュールとした例を示したが、このような独立した暗号処理モジュールを設けず、例えば暗号処理プログラムをROMに格納し、CPU701がROM格納プログラムを読み出して実行するように構成してもよい。
 乱数発生器704は、暗号処理に必要となる鍵の生成などにおいて必要となる乱数の発生処理を実行する。
 送受信部705は、外部とのデータ通信を実行するデータ通信処理部であり、例えばリーダライタ等、ICモジュールとのデータ通信を実行し、ICモジュール内で生成した暗号文の出力、あるいは外部のリーダライタ等の機器からのデータ入力などを実行する。
 以上、特定の実施例を参照しながら、本発明について詳解してきた。しかしながら、本発明の要旨を逸脱しない範囲で当業者が該実施例の修正や代用を成し得ることは自明である。すなわち、例示という形態で本発明を開示してきたのであり、限定的に解釈されるべきではない。本発明の要旨を判断するためには、特許請求の範囲の欄を参酌すべきである。
 なお、明細書中において説明した一連の処理はハードウェア、またはソフトウェア、あるいは両者の複合構成によって実行することが可能である。ソフトウェアによる処理を実行する場合は、処理シーケンスを記録したプログラムを、専用のハードウェアに組み込まれたコンピュータ内のメモリにインストールして実行させるか、あるいは、各種処理が実行可能な汎用コンピュータにプログラムをインストールして実行させることが可能である。
 例えば、プログラムは記録媒体としてのハードディスクやROM(Read Only Memory)に予め記録しておくことができる。あるいは、プログラムはフレキシブルディスク、CD-ROM(Compact Disc Read Only Memory),MO(Magneto optical)ディスク,DVD(Digital Versatile Disc)、磁気ディスク、半導体メモリなどのリムーバブル記録媒体に、一時的あるいは永続的に格納(記録)しておくことができる。このようなリムーバブル記録媒体は、いわゆるパッケージソフトウエアとして提供することができる。
 なお、プログラムは、上述したようなリムーバブル記録媒体からコンピュータにインストールする他、ダウンロードサイトから、コンピュータに無線転送したり、LAN(Local Area Network)、インターネットといったネットワークを介して、コンピュータに有線で転送し、コンピュータでは、そのようにして転送されてくるプログラムを受信し、内蔵するハードディスク等の記録媒体にインストールすることができる。
 なお、明細書に記載された各種の処理は、記載に従って時系列に実行されるのみならず、処理を実行する装置の処理能力あるいは必要に応じて並列的にあるいは個別に実行されてもよい。また、本明細書においてシステムとは、複数の装置の論理的集合構成であり、各構成の装置が同一筐体内にあるものには限らない。
 上述したように、本発明の一実施例の構成によれば、一般化Feistel構造を適用した暗号処理構成の小型化や省電力化が実現される。
 具体的には、データを複数ラインに分割入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する一般化Feistel構造を適用した暗号処理構成において、第1ラインのデータに対する行列を適用した線形変換処理を実行する行列演算実行部が行列演算の実行サイクル中、最初のサイクルにおいて行列演算過程データと第2ラインのデータとの演算を実行する。本構成により、第2ラインのデータ保持用のレジスタと第1ラインの行列演算途中結果保持用のレジスタの共有化が可能となり、総レジスタ数の削減、小型化が実現される。さらに回路構成の小型化、エレメント数の削減により電力消費量の削減も可能となる。
 111 鍵スケジュール部
 112 データ暗号化部
 120 F関数
 121 排他的論理和演算部
 122 非線形変換部
 123 線形変換部
 201 非線形変換部
 202 Shift Low実行部
 203 線形変換部
 204 排他的論理和演算部
 251 鍵生成部
 252 S-box
 253 行列演算回路
 254 排他的論理和演算部
 271~274 論理積回路
 281~284 排他的論理和演算部
 285~286 乗算部
 290 行列演算回路
 291~294 乗算部
 295~298 マルチプレクサ
 301 レジスタ群
 302 排他的論理和演算部
 303 S-box
 304 行列演算回路
 305 排他的論理和部
 311 乗算部
 312 排他的論理和部
 313 論理積回路
 321 排他的論理和演算部
 322 非線形変換部[S]
 323 線形変換部[M]
 501 レジスタ群
 502 排他的論理和演算部
 503 S-box
 504 行列演算回路
 511 乗算部
 512 排他的論理和部
 513 マルチプレクサ
 603 S-box
 604 行列演算回路
 611 乗算部
 613 マルチプレクサ
 700 ICモジュール
 701 CPU(Central processing Unit)
 702 メモリ
 703 暗号処理部
 704 乱数生成部
 705 送受信部

Claims (11)

  1.  データ処理対象となるデータブロックの構成ビットを複数のラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する暗号処理部を有し、
     前記暗号処理部は、
     前記複数ラインの第1ラインのデータに対する変換データを生成し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行する演算部と、
     前記演算部の演算結果を保持するレジスタを有し、
     前記演算部は、前記レジスタから順次、データを取得して取得データ順の演算を実行して演算結果を前記レジスタに格納する構成であり、
     前記演算部は、
     前記第1ラインのデータに対する行列を適用した線形変換を実行する行列演算実行部を有し、
     前記行列演算実行部は、
     前記第1ラインのデータに対する行列演算の実行サイクル中、最初のサイクルの行列演算の実行に際して前記第2ラインのデータとの演算を実行する暗号処理装置。
  2.  前記行列演算実行部は、
     前段の非線形変換部から順次出力される複数の単位データに対する行列演算を複数サイクルで実行する構成であり、前記複数サイクルの最初のサイクルで、前記非線形変換部から入力する単位データの行列演算に併せて前記第2ラインのデータとの演算を実行する請求項1に記載の暗号処理装置。
  3.  前記暗号処理装置は、
     前記第1ラインのデータに対する行列演算に必要な演算サイクルの完了後に前記第2ラインのデータとの演算を実行する場合に必要となる前記第2ラインのデータ保持用の独立したレジスタを削減し、
     前記第1ラインのデータに対する行列演算の途中結果の保持用レジスタを前記第2ラインのデータ保持用のレジスタとして利用した構成を有する請求項1に記載の暗号処理装置。
  4.  前記行列演算実行部は、
     前記第1ラインのデータに対する行列演算を実行する初期サイクルにおいて、前記第1ラインに対する行列演算過程データと前記第2ラインのデータとの排他的論理和演算を実行する請求項1に記載の暗号処理装置。
  5.  前記行列演算実行部は、
     巡回行列またはアダマール行列を適用した行列演算を実行する構成である請求項1に記載の暗号処理装置。
  6.  前記暗号処理部は、前記ラウンド関数の実行部として、
     非線形変換処理を実行する非線形変換部と、行列を適用した線形変換処理を実行する線形変換部としての行列演算実行部を有する請求項1に記載の暗号処理装置。
  7.  前記行列演算実行部は、
     前記非線形変換部としてのS-boxの出力を、順次入力して入力データに対する行列演算を1サイクル処理として実行する請求項1に記載の暗号処理装置。
  8.  前記暗号処理部の実行する暗号処理は、Feistel構造または一般化Feistel構造を適用した暗号処理である請求項1に記載の暗号処理装置。
  9.  前記暗号処理部の実行する暗号処理は、CLEFIA暗号アルゴリズムに従った暗号処理である請求項1に記載の暗号処理装置。
  10.  暗号処理装置において暗号処理を実行する暗号処理方法であり、
     暗号処理部が、データ処理対象となるデータブロックの構成ビットを複数ラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行する暗号処理ステップを有し、
     前記暗号処理ステップにおいて、前記複数ラインを構成する第1ラインのデータの変換処理を実行し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行し、
     前記第1ラインのデータの変換データ生成処理において実行する行列演算処理の実行サイクル中、最初のサイクルの行列演算処理に際して前記第2ラインのデータとの演算を実行する暗号処理方法。
  11.  暗号処理装置において暗号処理を実行させるプログラムであり、
     暗号処理部に、データ処理対象となるデータブロックの構成ビットを複数ラインに分割して入力し、各ラインの伝送データに対してラウンド関数を適用したデータ変換処理を繰り返して実行させる暗号処理ステップを有し、
     前記暗号処理ステップにおいて、前記複数ラインを構成する第1ラインのデータの変換処理を実行し、生成した変換データに対して前記第1ラインと異なる第2ラインのデータとの演算を行い、該演算結果を次ラウンドの入力データとする演算を繰り返し実行させ、
     前記第1ラインのデータの変換データ生成処理において実行する行列演算処理の実行サイクル中、最初のサイクルの行列演算処理に際して前記第2ラインのデータとの演算を実行させるプログラム。
PCT/JP2011/074468 2010-12-09 2011-10-24 暗号処理装置、および暗号処理方法、並びにプログラム WO2012077419A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
CN2011800580020A CN103238291A (zh) 2010-12-09 2011-10-24 代码处理装置、代码处理方法和程序
US13/990,829 US9031230B2 (en) 2010-12-09 2011-10-24 Encryption processing device, encryption processing method, and program
EP11846328.0A EP2651070B1 (en) 2010-12-09 2011-10-24 Code processing device, code processing method, and program
KR1020137014092A KR20130126924A (ko) 2010-12-09 2011-10-24 암호 처리 장치 및 암호 처리 방법, 및 프로그램

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2010274807A JP5605197B2 (ja) 2010-12-09 2010-12-09 暗号処理装置、および暗号処理方法、並びにプログラム
JP2010-274807 2010-12-09

Publications (1)

Publication Number Publication Date
WO2012077419A1 true WO2012077419A1 (ja) 2012-06-14

Family

ID=46206922

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/074468 WO2012077419A1 (ja) 2010-12-09 2011-10-24 暗号処理装置、および暗号処理方法、並びにプログラム

Country Status (7)

Country Link
US (1) US9031230B2 (ja)
EP (1) EP2651070B1 (ja)
JP (1) JP5605197B2 (ja)
KR (1) KR20130126924A (ja)
CN (1) CN103238291A (ja)
TW (1) TWI456542B (ja)
WO (1) WO2012077419A1 (ja)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10341090B2 (en) * 2014-10-14 2019-07-02 Sony Corporation Cipher processing apparatus and cipher processing method
CN118014031A (zh) * 2018-03-22 2024-05-10 亚马逊技术股份有限公司 针对多个输入数据集的处理

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003345244A (ja) * 2002-05-23 2003-12-03 Mitsubishi Electric Corp データ変換装置及びデータ変換方法及びデータ変換プログラム及びデータ変換プログラムを記録したコンピュータ読み取り可能な記録媒体

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100976750B1 (ko) * 2002-05-09 2010-08-18 오니시스 그룹 엘.에이., 엘엘시 암호 장치 및 방법, 암호 시스템
JP4622222B2 (ja) * 2003-09-30 2011-02-02 ソニー株式会社 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム
US20050276413A1 (en) * 2004-06-14 2005-12-15 Raja Neogi Method and apparatus to manage heterogeneous cryptographic operations
US8127144B2 (en) * 2005-10-12 2012-02-28 Panasonic Corporation Program loader operable to verify if load-destination information has been tampered with, processor including the program loader, data processing device including the processor, promgram loading method, and integrated circuit
JP4882598B2 (ja) * 2006-07-28 2012-02-22 ソニー株式会社 暗号処理装置、暗号処理アルゴリズム構築方法、および暗号処理方法、並びにコンピュータ・プログラム
JP5050454B2 (ja) * 2006-09-01 2012-10-17 ソニー株式会社 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム
JP5023624B2 (ja) * 2006-09-01 2012-09-12 ソニー株式会社 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム
JP2008058830A (ja) * 2006-09-01 2008-03-13 Sony Corp データ変換装置、およびデータ変換方法、並びにコンピュータ・プログラム
JP4967544B2 (ja) * 2006-09-01 2012-07-04 ソニー株式会社 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003345244A (ja) * 2002-05-23 2003-12-03 Mitsubishi Electric Corp データ変換装置及びデータ変換方法及びデータ変換プログラム及びデータ変換プログラムを記録したコンピュータ読み取り可能な記録媒体

Non-Patent Citations (7)

* Cited by examiner, † Cited by third party
Title
HÄMÄLÄINEN P. ET AL.: "Design and Implementation of Low-Area and Low-Power AES Encryption Hardware Core", 9TH EUROMICRO CONFERENCE ON DIGITAL SYSTEM DESIGN, 2006, pages 577 - 583, XP031102333 *
K. NYBERG: "ASIACRYPT '96", 1996, SPRINGER VERLAG, article "Generalized Feistel networks", pages: 91 - 104
PANU HAMALAINEN; TIMO ALHO; MARKO HANNIKAINEN; TIMO D. HAMALAINEN: "DSD", September 2006, IEEE COMPUTER SOCIETY, article "Design and implementation of low-area and low-power aes encryption hardware core", pages: 577 - 583
PANU HAMALAINEN; TIMO ALHO; MARKO HANNIKAINEN; TIMO D: "DSD", September 2006, IEEE COMPUTER SOCIETY, article "Hamalainen. Design and implementation of low-area and low-power aes encryption hardware core", pages: 577 - 583
SATOH A. ET AL.: "Hardware-Focused Performance Comparison for the Standard Block Ciphers AES, Camellia, and Triple-DES", LECTURE NOTES IN COMPUTER SCIENCE, vol. 2851, 2003, pages 252 - 266, XP055086708 *
SUGAWARE T. ET AL.: "High-performance ASIC implementations of the 128-bit block cipher CLEFIA", IEEE INTERNATIONAL SYMPOSIUM ON CIRCUITS AND SYSTEMS, vol. 2008, 2008, pages 2925 - 2928, XP055086715 *
YULIANG ZHENG; TSUTOMU MATSUMOTO; HIDEKI IMAI: "On the Construction of Block Ciphers Provably Secure and Not Relying on Any Unproved Hypotheses", CRYPTO, 1989, pages 461 - 480

Also Published As

Publication number Publication date
US9031230B2 (en) 2015-05-12
CN103238291A (zh) 2013-08-07
KR20130126924A (ko) 2013-11-21
EP2651070B1 (en) 2018-08-22
EP2651070A1 (en) 2013-10-16
US20130251144A1 (en) 2013-09-26
EP2651070A4 (en) 2017-01-18
JP2012123259A (ja) 2012-06-28
TWI456542B (zh) 2014-10-11
TW201225024A (en) 2012-06-16
JP5605197B2 (ja) 2014-10-15

Similar Documents

Publication Publication Date Title
EP2096786B1 (en) Combining instructions including an instruction that performs a sequence of transformations to isolate one transformation
JP4905000B2 (ja) 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム
JP5055993B2 (ja) 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム
EP2058781B1 (en) Encryption device, encryption method, and computer program
KR101068367B1 (ko) 병렬 연산 모드에서 aes 암호화 및 암호 해독을 최적화하는 방법 및 장치
US8165288B2 (en) Cryptographic processing apparatus and cryptographic processing method, and computer program
US8396210B2 (en) Cryptographic processing apparatus and cryptographic processing method, and computer program
WO2009087972A1 (ja) データ送信装置、データ受信装置、これらの方法、記録媒体、そのデータ通信システム
JP5652363B2 (ja) 暗号処理装置、および暗号処理方法、並びにプログラム
JP5605197B2 (ja) 暗号処理装置、および暗号処理方法、並びにプログラム
CN110071927B (zh) 一种信息加密方法、系统及相关组件
KR100788902B1 (ko) 믹스컬럼블록 장치 및 이를 이용한 곱셈연산방법
JP5223245B2 (ja) 暗号処理装置、および暗号処理方法、並びにコンピュータ・プログラム

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 11846328

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2011846328

Country of ref document: EP

ENP Entry into the national phase

Ref document number: 20137014092

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 13990829

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE