WO2002058036A1 - Encryption circuit - Google Patents

Encryption circuit Download PDF

Info

Publication number
WO2002058036A1
WO2002058036A1 PCT/JP2001/000399 JP0100399W WO02058036A1 WO 2002058036 A1 WO2002058036 A1 WO 2002058036A1 JP 0100399 W JP0100399 W JP 0100399W WO 02058036 A1 WO02058036 A1 WO 02058036A1
Authority
WO
WIPO (PCT)
Prior art keywords
function
circuit
processing
data
processing circuit
Prior art date
Application number
PCT/JP2001/000399
Other languages
French (fr)
Japanese (ja)
Inventor
Naoya Torii
Takayuki Hasebe
Souichi Okada
Tomohiro Hayashi
Chikahiro Deguchi
Yumi Fujiwara
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to PCT/JP2001/000399 priority Critical patent/WO2002058036A1/en
Priority to JP2002558244A priority patent/JP4745598B2/en
Priority to PCT/JP2001/005095 priority patent/WO2002058037A1/en
Publication of WO2002058036A1 publication Critical patent/WO2002058036A1/en

Links

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
    • H04L9/0618Block ciphers, i.e. encrypting groups of characters of a plain text message using fixed encryption transformation
    • 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

Definitions

  • the present invention relates to a data scramble circuit used for a cryptographic device, an extended key generation circuit for generating an extended key used in a destruction circuit, and a data scramble circuit and an encryption circuit including the extended key generation circuit.
  • DES Data Encryption Standard
  • NIST National Institute of Standards Technology
  • DES is a standard set by the National Institute of Standards Technology (NIST) of the United States government in 1977, with 64 bits input / output and a key length of 64 bits (of which 8 bits are parity bits). It is a block cipher with a key length of 56 bits).
  • DES is an algorithm that repeats a nonlinear function process called an F function 16 times. For this reason, an encryption circuit for processing the encryption / decryption by DES is, as shown in, for example, Japanese Patent Application Laid-Open No. 2000-77585, a technique that repeatedly performs the F function. This can be realized with a synchronous loop configuration.
  • This SC 2000 is an algorithm that repeatedly performs some basic functions like DES.If each function processing circuit is configured by hardware, it is configured to execute a loop circuit by executing a loop circuit. Can be configured. However, unlike the encryption scheme of SC20000, which is different from the encryption scheme composed of only the F function in DES, it is possible to simply configure one function processing circuit in one synchronous loop. Since it is not possible, how to arrange the various function processing circuits so that the function processing by the various function processing circuits can be performed efficiently in the synchronous loop is a major issue in hardware implementation.
  • the present invention executes the algorithm of SC2000, which is a common key block cipher with a key length of 128/192/256 bits and a processing block of 128 bits, using high-speed and compact hardware. It is an object to provide a circuit configuration that performs
  • a de-task ripple circuit includes an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a data bit.
  • Data scrambling is performed using the B function and the R function, which encrypts the key, and encrypts a common key block cipher with a key length of 128 bits / 192 bits / 256 bits and a processing block of 128 bits.
  • a data scramble circuit that performs decryption processes the I function, processes the B function, I function, R function, R function, and I function in that order.
  • an I function processing circuit that processes the I function a B function processing circuit that processes the B function, O
  • a de-task ripple circuit that implements an R function processing circuit that processes the R function.
  • the processing block that performs processing in the order of the B function, the I function, the R function, the R function, and the I function is processed n times, and then the processing is performed in the order of the B function and the I function. It can be configured to implement all I function processing circuits, B function processing circuits and R function processing circuits.
  • a B-function processing circuit, an I-function processing circuit, an R-function processing circuit, an R-function processing circuit, and a cook synchronous loop connected in the order of the I-function processing circuit are configured, and an I-function processing circuit, a clock synchronous loop, It is possible to adopt a configuration in which the B function processing circuit and the I function processing circuit are connected in this order.
  • data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits.
  • De-task rumple circuit that performs task rumpling and performs encryption / decryption of a common key block cipher with a key length of 128/192/256 bits and a processing block of 128 bits.
  • a data scramble circuit that implements an I function processing circuit that processes the I function, a B function processing circuit that processes the B function, and an R function processing circuit that processes the R function.
  • a clock synchronous loop connected in the order of the I function processing circuit, the R function processing circuit, the R function processing circuit, the I function processing circuit, and the B function processing circuit is configured, and the I function processing circuit, the B function processing circuit, A configuration in which a clock synchronous loop and an I function processing circuit are connected in this order can be provided.
  • a clock synchronous loop can be configured by the block and the B function processing circuit.
  • data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits.
  • a detask rumble circuit that performs evening scramble and performs encryption / decryption of a common key block cipher with a key length of 128 bits x 192/256 bits and a processing block of 128 bits. Then, after processing in the order of the I function, the B function, and the I function, the processing block that performs the processing in the order of the R function, the R function, the I function, the B function, and the I function is processed n times.
  • It can be configured to implement an I function processing circuit for processing functions, a B function processing circuit for processing B functions, and an R function processing circuit for processing R functions.
  • a selector for performing the operation is performed using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits.
  • a data scramble circuit that performs a ramp, performs encryption of a common key block encryption with a key length of 1 28/192/256 bits and a processing block of 128 bits, and performs Z decryption.
  • the first processing block that performs processing in the order of the function, the B function, and the I function, and the second processing block that performs processing in the order of the R function and the R function are alternately performed multiple times.
  • a configuration is proposed in which an I function processing circuit for processing an I function, a B function processing circuit for processing a B function, and an R function processing circuit for processing an R function are implemented.
  • a first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected; and a first R function processing circuit and a second R function processing circuit are connected.
  • data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits.
  • a data scramble circuit that performs task rumble and performs encryption / decryption of a common key block cipher with a key length of 1/128/192/256 bits and a processing block of 128 bits.
  • An I function processing circuit, a B function processing circuit for processing a B function, and an R function processing circuit for processing an R function In order to process the I function in order to process the first processing block that performs processing in the order of I function, B function, and I function, and the second processing block that performs R function processing in a predetermined order, , An I function processing circuit, a B function processing circuit for processing a B function, and an R function processing circuit for processing an R function.
  • a first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected; a second processing block including a first R function processing circuit; An output selector for selectively outputting either the output of the block or the output of the second processing block; and selectively inputting either the input data or the output of the output selector to the first I function processing circuit And an input-side selector for performing the operation.
  • the B function processing circuit includes an input data conversion unit that converts the input data of 32 bits X4 into input data of 4 bits X32, and 32 4 bits connected to the input data conversion unit.
  • a configuration including a cut S box and an output data conversion unit for converting a 4-bit x 32 output data output from each 4-bit S box into a 32-bit X 4 output data
  • the R function processing circuit mixes two input data bits out of the 32 bits X 4 input data to output 32 bits X 2 output data;
  • the output data of the F function processing circuit may be configured to include the remaining two of the input data and two XOR circuits for performing an exclusive OR operation.
  • the F function processing circuit includes an input data conversion unit that converts input data of 32 bits X 2 into a plurality of input data having an unequal number of bits, and a plurality of S boxes connected to the input data conversion unit. And an output data conversion unit that converts the output from the S box into 32 bits x 2 output data.
  • the plurality of SboXs are composed of two 6-bit SboXs and four 5-bit SboXs, and the input data conversion unit converts the 32-bit X2 input data into six bits. It can be configured to convert the input data into input X2 and 5-bit X4.
  • an intermediate key generation circuit for generating an intermediate key from an encryption key; an expanded key generation circuit for generating a plurality of expanded keys from the intermediate key generated from the intermediate key generation circuit; Key length 1 28/19 2/2 including a data scramble circuit that performs data scramble using I function for calculating exclusive OR with the key, B function and R function for mixing data bits 56-bit, processing block 12-bit
  • Key length 1 28/19 2/2 including a data scramble circuit that performs data scramble using I function for calculating exclusive OR with the key, B function and R function for mixing data bits 56-bit, processing block 12-bit
  • This is an encryption circuit that performs encryption / decryption of an 8-bit common key block cipher.
  • the intermediate key generation circuit is used before the data scramble processing of the data scramble circuit.
  • the intermediate key generation process is executed, and the extended key generation circuit proposes a cryptographic circuit configured to generate an extended key in parallel with the de-task ramping process of the data scramble circuit.
  • the intermediate key generation circuit uses the order parameter set corresponding to the order radix.
  • An intermediate key used in the extended key generation processing of the extended key generation circuit can be configured to be sequentially generated based on the meter table and the index parameter overnight table set in accordance with the index radix.
  • the intermediate key generation circuit includes an input data conversion unit that divides the encryption key into 32 bit units, an addition circuit that adds a predetermined value to the input data from the input data conversion unit, and an input data conversion unit that outputs the input data from the input data conversion unit.
  • a multiplying circuit for multiplying the input data by a predetermined value; and an XOR circuit for calculating an exclusive OR of an output value of the adding circuit and an output value of the multiplying circuit.
  • a configuration may further be provided with a storage means for storing the obtained set value.
  • the intermediate key generation circuit performs data scrambling based on the order parameter table set according to the order radix and the index parameter table set according to the index radix. The number of intermediate keys corresponding to the type of the order and the type of the index is generated when performing the key expansion.
  • the expanded key generation circuit is provided by the number of tables set in the index parameter template. It can be configured to generate an expanded key from an intermediate key that is selectively input according to the parameters and the index parameter table.
  • an expanded key output selector provided with the number of expanded keys required in one cycle in the data scramble circuit
  • an expanded key Storage means for storing the expanded key selection control table of the output selector.
  • FIG. 1 is a block diagram showing a schematic configuration of the present invention.
  • FIG. 2 is a circuit diagram showing the data scramble circuit of the first embodiment.
  • FIG. 3 is a circuit diagram showing the intermediate key generation circuit of the first embodiment.
  • FIG. 4 is a circuit diagram illustrating an extended key generation circuit according to the first embodiment.
  • FIG. 5 is a circuit diagram illustrating an extended key generation circuit according to the second embodiment.
  • FIG. 6 is a circuit diagram showing a detask rumble circuit according to the second embodiment.
  • FIG. 7 is a circuit diagram showing a modification of the data scramble circuit of the second embodiment.
  • FIG. 8 is a circuit diagram illustrating an intermediate key generation circuit according to the third embodiment.
  • FIG. 9 is a circuit diagram illustrating an extended key generation circuit according to the fourth embodiment.
  • FIG. 10 is a circuit diagram illustrating an output circuit of the extended key generation circuit according to the fourth embodiment.
  • FIG. 11 is a circuit diagram showing a B function processing circuit.
  • FIG. 12 is a circuit diagram showing an R function processing circuit.
  • FIG. 13 is a circuit diagram showing an F function processing circuit.
  • FIG. 14 is a circuit diagram showing another data scramble circuit according to the first embodiment.
  • FIG. 15 is a circuit diagram showing a data scramble circuit according to the fifth embodiment.
  • FIG. 16 is a circuit diagram illustrating a data scramble circuit according to the sixth embodiment.
  • FIG. 17 is a circuit diagram showing a de-task ripple circuit according to the seventh embodiment.
  • FIG. 18 is a circuit diagram showing an M function processing circuit.
  • FIG. 19 is an explanatory diagram of processing in the M function processing circuit.
  • FIG. 1 shows the basic configuration of the encryption circuit according to the present invention.
  • the encryption circuit 1 is composed of a destruction circuit 2 and an encryption key processing circuit 3.
  • the encryption key processing circuit 3 generates an intermediate key based on the input encryption key, and a plurality of expansion keys based on the intermediate key generated by the intermediate key generation circuit 4.
  • An extended key generation circuit 5 for generating a large key is provided.
  • the data scramble circuit 2 includes a plurality of types of function processing circuits inside, performs respective function processing based on the plurality of expanded keys generated by the expanded key generation circuit 5, and converts the input plaintext into ciphertext. O Encrypt and output, or decrypt the input ciphertext and output plaintext o
  • the data scramble circuit 2 includes an I function processing circuit for calculating an exclusive OR of the expanded key generated by the expanded key generation circuit 5 and the data, a B function processing circuit for mixing data bits, and an R function processing. And a plurality of circuits, for example, configured to perform function processing on IB-RRIB-IRRIBIRRIBIRRIBIRRIBI-RRIBIKRIB-ICJ.
  • the processing block length of the data input to the data scramble circuit 2 is 128 bits, which is divided into 32 bits ⁇ 4 to perform processing.
  • the extended key generation circuit 5 is configured to generate as many extended keys as necessary for each I function processing and to sequentially input these to the detask ramble circuit 2. For example, if the number of times of the I function processing in the data scramble circuit 2 is 16 as described above, four 32 bit expanded keys must be generated and input to the data scramble circuit 2. Is repeated to generate a total of 56 expanded keys.
  • the intermediate key generation processing by the intermediate key generation circuit 4 is executed.
  • the intermediate key generation circuit 4 converts the input encryption key into a plurality of 32-bit data, performs a non-linear function processing on each of them, adds a predetermined value to the input data overnight, and adds the input data to the input data. It is configured to multiply by a predetermined value, calculate exclusive OR of each calculation result, and further perform nonlinear function processing ⁇ .
  • an input data converted from a cryptographic key into 32 bits X8 is generated, and each input data is generated.
  • the output of the adjacent addition circuit and the output of the multiplication circuit are input to the XOR circuit to calculate an exclusive OR, and the output value of the XOR circuit is subjected to ⁇ -function processing to generate an intermediate key.
  • Predetermined value to be added by one adder and multiplication by one multiplier By preparing multiple fixed values, it becomes possible to obtain multiple intermediate keys from each XOR circuit.
  • the encryption key is converted into 32 bits ⁇ 8 input data and an intermediate key of 32 bits ⁇ 4 is created by four circuit rows, a predetermined value in the addition circuit and a predetermined value in the multiplication circuit are used.
  • an intermediate key of 32 bits X 4 X 3 can be obtained.
  • the extended key generation circuit 5 can appropriately select the 32-bit X4 X3 intermediate key based on the key scheduling to generate 56 extended keys.
  • FIG. 2 shows a data scramble circuit employed in the first embodiment.
  • the I function for calculating the exclusive OR of the expanded key and the data and the B function and the R function for mixing the data bits are performed several times in a predetermined order. For example, if the encryption key is 128 bits, the function processing is performed in the order of IBIRR-IBIRRIBIRRIBIRRIBIR-IM-BI-IMM-BI-IMi-IBI.
  • the I function processing circuit 21, the B function processing circuit 22, and the R function processing circuit 23 Are connected in series.
  • the data scrambling circuit 20 has 32 bits X4 input data buses a, b, c, d and 32 bits x 4 output data buses e, f, g, h. .
  • the number of I function processing circuits 21 is 14, and each I function processing circuit As for the number of extended keys used in the circuit 21, 56 extended keys are required if a 32-bit extended key is used for each of the four systems.
  • the number of I function processing circuits 21 is 16 and the number of expanded keys used in each I function processing circuit 21 is 32 for every four systems. If a pit expansion key is used, 64 expansion keys are required.
  • the B function processing circuit 22 can have a circuit configuration as shown in FIG.
  • the B function processing circuit 22 includes an input data conversion unit 61 that converts 32-bit X4 input data into 4-bit x32 input data, 32 4-bit S boxes 62 that perform nonlinear processing, and a 4-bit X box.
  • An output data conversion unit 63 for converting 32 output data into 32-bit x 4 output data is provided.
  • Bit Sbox62 performs non-linear processing to convert the input (ai, bi, ci, di) into (Ai, Bi, Ci, Di) as shown in Fig. 11 (b). o ⁇ R function processing circuit>
  • the R function processing circuit 23 can have a circuit configuration as shown in FIG.
  • the R function processing circuit 23 has a 32-bit X4 output data (e, f, g, h) for a 32-bit X4 input data (a, b, c, d). It is.
  • the F function processing circuit 73 to which the input data c and d are input, and one of the 32-bit X 2 output data of the F function processing circuit 73 and the input data a
  • An XOR circuit 71 that performs an exclusive OR operation with the input data b and an XOR circuit 71 that performs an exclusive OR operation with the input data b of the 32-bit X2 output data of the F function processing circuit 73 Have.
  • the output of the XOR circuit 71 is the output data e
  • the output of the XOR circuit 72 is the output data f
  • the inputs c and d are the outputs g and f, respectively.
  • the F function processing circuit shown in FIG. 12 can have a circuit configuration as shown in FIG.
  • the input data of 32 bits X2 is input to two 6-bit Sbox 74 and four 5-bit SBox 75, respectively.
  • nonlinear processing is performed on each bit, and the output is input to an XOR calculation device 76 using MDS.
  • the XOR calculation device 76 using the MDS executes a predetermined nonlinear process, and outputs its output to the multiplication circuits 77 and 78 and the XOR circuits 79 and 80.
  • the multiplication circuit 77 multiplies the input value by 0x55555555 or 0x33333333.
  • the multiplication circuit 78 multiplies the input value by Oxaaaaaaaa or Oxcccccccccccccc.
  • the circuit 79 calculates the exclusive OR of the output of the multiplication circuit 77 and the output of the XOR calculation device 76 using the other MDS.
  • the XOR circuit 80 calculates an exclusive OR of the output of the multiplication circuit 78 and the output of the XOR calculation device 76 using the other MDS.
  • FIGS. 3 and 4 show an example of an encryption key processing circuit 3 for generating an extended key used in such a destruction circuit 20.
  • FIG. FIG. 3 shows an example of the intermediate key generation circuit
  • FIG. 4 shows an example of the extended key generation circuit.
  • the intermediate key generation circuit 40 shown in FIG. 3 includes eight M function processing circuits 41, an addition circuit 42 corresponding to odd-numbered M function processing circuits 41, and a multiplication circuit 43 corresponding to even numbered M function processing circuits 41.
  • an XOR circuit 44 to which the output data of the adjacent addition circuit 42 and multiplication circuit 43 are input in order from the top, and an M function processing circuit 45 for performing a non-linear function process on the output data of the XOR circuit 44. It has.
  • Each processing circuit is configured to be capable of processing 32-bit data, and the 32-bit X8 input data converted from the encryption key is used to process eight M-functions. Entered in Road 41. If the encryption key is 128 bits, the four data k 0, k 1, k 2, 1 ⁇ 3 divided from the upper bit every 32 bits, (! 0, k 1 , k 2, k 3, kO, k 1, k 2, k 3) are generated in this order, and each input data is input to the M function processing circuit 41. When the encryption key is 192 bits, six data kO, k1, k2, k3, k4, 1 are similarly divided from the upper bit every 32 bits.
  • a group of input data arranged in the order of (10, k1, k2, k3, k4, k5, k0, k1) is created, and each input data is processed by the M function processing circuit.
  • the encryption key is 256 bits
  • eight data k 0, k 1, k 2, k 3, k 4, k 5, which are divided from the upper bit every 32 bits From k6 and k7 an input data group arranged in the order of (k0, k1, k2, k3, k4, k5, k6, k7) is created, and each input data is processed by the M function processing circuit 41. It is configured to input to.
  • the output of the M function processing circuit 41 that is located at the odd-numbered position from the higher order is input to the addition circuit 42.
  • the adder circuit 42 adds one of the predetermined values M (4 i), M (41 + 1), M (4 i +2), and M (4 i +3) to the input data. It is tripled corresponding to the value 0 to 2 of i.
  • the predetermined values M (4i), M (4i + 1), M (4i + 2), and M (4i + 3) are 4i, 4i + 1, 4i + 2, 4+, respectively.
  • 3 is a fixed value processed by an M function that is a non-linear function, and is configured to take three values each corresponding to the value 0 to 2 of the index i.
  • the output of the even-numbered one from the higher order is input to the multiplication circuit 43.
  • the multiplication circuit 43 multiplies input data by a predetermined value i + 1, and is tripled in correspondence with the values 0 to 2 of the index i.
  • the value of the index i is equivalent to the index value used for key scheduling at the time of generating an expanded key, and takes a value of 0 to 2, and correspondingly, the value of the predetermined value i + 1 is also three values each. It is configured to take.
  • the output data of the adjacent addition circuit 42 and multiplication circuit 43 from the upper fil are input to the XOR circuit 44, respectively.
  • Each XOR circuit 44 calculates the exclusive OR of the output value of the addition circuit 42 and the output value of the multiplication circuit 43. It is tripled in accordance with the arithmetic circuit 43.
  • an M function processing circuit 45 for processing the output data of the XOR circuit 44 is provided.
  • the M function processing circuit 45 is also tripled in correspondence with the addition circuit 42, the multiplication circuit 43 and the XOR circuit 44.
  • the intermediate key generation circuit 40 outputs the intermediate key (ai, bi, ci, di), and outputs the intermediate key from the M function processing circuit 45, which is tripled according to the value of the index i.
  • the keys (a 0, b 0, c 0, d 0), (a 1, b 1, c 1, d 1), and (a 2, b 2, c 2, d 2) are output.
  • FIG. 18 (a) shows a configuration example of the M function processing circuit.
  • the M function processing circuit 41 generates a 32-bit output w with a 32-bit input data m.
  • the M function processing circuit 41 includes two 6-bit SBoXs 46, four 5-bit SBoX47s, and an XOR calculation device 48 using MDS.
  • the configuration of the 6-bit S bo x46, the 5-bit S box 47, and the XOR calculation device 48 using the MDS includes the 6-bit S box 74, the 5-bit S bo x 75, and the 5-bit S box 74 of the F function processing circuit 73 described above.
  • a device equivalent to the XOR calculation device 76 using MDS can be used. The steps in performing the nonlinear function processing using such an M function processing circuit 41 will be described below.
  • Input data m 1, m 2, m 3, and m 4 divided into 5 bits are input to a 5-bit S box 47, respectively, according to the table of S 5 (x) in FIG. 18 (b). , Is converted to the value of S 5 (X) corresponding to the corresponding X.
  • the extended key generation circuit 50 shown in FIG. 4 has four 32-bit input data X, Y, 1, ⁇ N and a 32-bit output Kn.
  • the input data X is input to the rotate shift circuit 51.
  • the output of the rotation shift circuit 51 and the input data Y are input to the addition circuit 52.
  • the input data Z is input to the rotation shift circuit 53.
  • the output of the bit shift circuit 53 and the input data W are input to the subtraction circuit 54.
  • the output of the subtraction circuit 54 is input to the rotation shift circuit 55.
  • the output of the adder circuit 52 and the output of the rotation shift circuit 55 are input to the XOR circuit 56.
  • the output of the XOR circuit 56 is the output Kn of the extended key generation circuit 50.
  • the encryption key is 128 bits
  • 56 expansion key generation circuits 50 configured as described above are prepared to correspond to the expansion key used in the data scramble circuit 20 shown in FIG. it can.
  • 64 expansion key generation circuits 50 configured as described above are prepared to correspond to the expansion key used in the data scramble circuit 20 shown in FIG. It becomes possible.
  • the relationship between the key scheduling K n, the unique parameter t, and the index parameter s can be expressed as follows.
  • the order (a, b, c, d) is determined by referring to the order table of Table 1 from the order parameter t determined here, and the index of Table 2 is determined from the index parameter s.
  • the index (i) is determined by referring to the table.
  • the intermediate key input from the intermediate key generation circuit 40 is determined for the input data X, Y, Z, W of the expansion key generation circuit 50, and the expansion key Kn is obtained.
  • the order parameter (a, b, c, d) and the index (i) are determined from the order table and the index table, and the order parameter (t) and the index parameter (s) are determined.
  • Generates an expanded key Kn from the intermediate key input based on the key. Encryption can be performed by inputting four expanded keys K n generated by the expanded key generation circuit 50 to the I function processing circuit 21 in the order of n 0 to 63 from the beginning.
  • the intermediate key used by the extended key generation circuit 50 can be sequentially generated by the intermediate key generation circuit 40, and the pre-processing prior to the de-task ramble processing by the data scramble circuit 20 can be performed. The number of steps can be reduced, and the time required for encryption / decryption can be reduced.
  • the data scramble circuit 20 and the extended key generation circuit as shown in the first embodiment When the path 50 is used, although the processing time can be reduced, the problem that the circuit scale becomes large is included. For this reason, it is conceivable that a clock synchronization loop is formed in a part of the data scramble circuit, and the processing in the extended key generation circuit is also executed in synchronization with the clock of the data scramble circuit.
  • An example of such a circuit is shown as a second embodiment.
  • FIG. 5 is a configuration example of an extended key generation circuit employed in the second embodiment
  • FIG. 6 is a configuration example of a detask ramble circuit employed in the second embodiment.
  • a 32-bit X4 input data bus a, b, c, d is used in order to perform encryption / decryption in units of 128-bit blocks.
  • the overnight scramble circuit 200 includes a first I function processing circuit 201, a second I function processing circuit 203, a first R function processing circuit 204, and a second R function processing circuit 2 0 5, the processing block 2 10 connected to the 31st function processing circuit 206 in order, and the output of the 1st I function processing circuit 201 and the output of the processing block 210 are selectively output.
  • Selector 208, the B-function processing circuit 202 to which the output of the selector 208 is connected, and the output of the B-function processing circuit 202 are latched for each clock cycle to be processed by the processing block 210. It has a register 209 for input, and a fourth I function processing circuit 207 to which the output of the register 209 is connected.
  • the data scramble circuit 200 includes a register 211 for temporarily storing an expanded key used in the 21st function processing circuit 203.
  • the processing by the first I function processing circuit 201 and the B function processing circuit 202 is performed, and then the second processing is performed.
  • I function processing circuit 203, first R function processing circuit 204, second R function processing circuit 205, third I function processing function 206 processing block 210 and B function processing circuit 210 After repeating the clock synchronous loop including step 2 a plurality of times, the processing by the fourth I function processing circuit 207 can be executed.
  • the selector 208 is switched to the first I function processing circuit 201, and the input data a, b, c, and d are processed by the first I function processing circuit 201.
  • the B function processing circuit 202 executes the B function processing via the selector 208, and the value is held in the register 209.
  • the selector 208 is switched to the processing block 210 side, and the data output from the register 209 is processed by the processing block 210 to process each function of I-R-R-I.
  • the B function processing circuit 202 executes the B function processing via the selector 208, and the value is held in the register 209.
  • the IRRIB loop processing composed of the processing block 210 and the B function processing circuit 202 is executed five times, and the fourth The processing by the I function processing circuit 207 is executed to obtain output data e, f, g, and h.
  • the data scramble circuit 200 shown in FIG. 6 executes the IB processing in the first I function processing circuit 201 and the B function processing circuit 202, and then performs the processing block 210
  • the data scramble circuit 20 shown in FIG. Equivalent functions are realized.
  • FIG. 5 shows an extended key generation circuit for generating an extended key used in the data scramble circuit 200 shown in FIG.
  • the expanded key generation circuit 500 shown in FIG. 5 includes four selectors: an X selector 501, a Y selector 502, a Z selector 503, and a W selector 504.
  • the X selector 501, the Y selector 502, the Z selector 503, and the W selector 504 are respectively input data paths X, Y, I, All of the intermediate keys (ai, bi, ci, d) output from the intermediate key generation circuit 40 shown in FIG. 3 are connected to the input side.
  • the output of the X selector 501 is input to the rotation shift circuit 505.
  • the output of the rotate shift circuit 505 and the output of the Y selector 502 are input to the adder circuit 506.
  • the output of the Z selector 503 is input to the rotation shift circuit 507.
  • the output of the rotation shift circuit 507 and the output of the W selector 504 are input to the subtraction circuit 508. Subtraction times
  • the output of the path 508 is input to the rotation shift circuit 509. Further, the output of the adder circuit 506 and the output of the rotate shift circuit 509 are input to the XOR circuit 510.
  • the output of the XOR circuit 500 becomes the output Kn of the extended key generation circuit 500.
  • the X selector 501, the Y selector 502, the Z selector 503, and the W selector 500 are based on the order table and the index table shown in Tables 1 and 2.
  • An intermediate key to be input to 4 is selected, an expanded key is generated based on the input intermediate key, and input to the data scramble circuit 200.
  • the eight expanded keys generated by the expanded key generation circuit 500 are divided into two groups A and B, each of which is four, and the expanded key of group A is used for the current processing.
  • the expanded key of group B is stored in register 211 for the next processing.
  • the extended key of group A is used for the I function processing in the first I function processing circuit 201, and the extended key of group B is stored in the register 211.
  • the processing of the second I function processing circuit 203 is executed using the expanded key of the group B stored in the register 211.
  • two sets of expanded keys are generated by the expanded key generation circuit 500, and the I function processing is performed by the third I function processing circuit 206 using the expanded key of group A. Is stored in register 2 1 1.
  • the processing in the fourth I-function processing circuit 207 uses the group B key stored in the register 211 among the expanded keys generated in the last loop processing. Is executed.
  • the data scramble circuit 20.0 performs IB processing in the first I function processing circuit 201 and the B function processing circuit 202.
  • the IRHI-B loop processing composed of the processing block 210 and the B function processing circuit 202 is repeated seven times, and then the I processing by the fourth I function processing circuit 207 is executed.
  • the function equivalent to the data scramble circuit 20 shown in Fig. 14 is achieved. Can be realized.
  • the expanded key generation time of group B is delayed by data scrambling. It does not affect the time, and the delay time for generating the expanded key of group A can be set within the processing time of processing block 210. Therefore, the expanded key generation time does not affect the delay time of the de-task ramble process.
  • FIG. 7 shows a modification of the data scramble circuit 200 of the second embodiment.
  • the output of the B function processing circuit 202 of the de-task ripple circuit 200 in FIG. 6 is connected to both the fourth I function processing circuit 207 and the register 209. ing.
  • the output from the last B function processing circuit 202 is directly input to the fourth I function processing circuit 207 without passing through the register 209.
  • the number of clocks in the data scrambling process can be reduced by one.
  • the circuit scale can be reduced as compared with the first embodiment, and the cost can be reduced.
  • FIG. 8 shows an intermediate key generation circuit according to the third embodiment of the present invention.
  • the intermediate key generation circuit 400 shown in FIG. 8 includes two selectors 401 and 402. Each of the selectors 401 and 402 is configured to select and output one from 4 ⁇ 32-bit data.
  • the encryption key is converted into 32-bit X4 data (k0, k1, k2, k3), and the input data to be input to the selector 401 is (k0, k2, kO, k 2), and the input data to be input to the selector 402 is (k1, k3, k1, k3).
  • the encryption key is used as 32-bit X6 data (1 ⁇ 0, 11 1, 12, 13, 3, 14, 1 ⁇ 5).
  • the input data input to the selector 401 is converted into (kO, k2, k4, k0), and the input data input to the selector 402 is (k1, k3, k5, k1).
  • the encryption key is converted to 32-bit X8 data (k0, k1, k2, k3, k4, k5, k6, k 7), the input data to be input to the selector 401 is (kO, k2, k4, k6), and the input data to be input to the selector 402 is (k1, k3, k5). , k 7).
  • M function processing circuits 403 and 404 for performing M function processing are connected to the selectors 401 and 402, respectively.
  • the M function processing circuits 403 and 404 can have the same configuration as the M function processing circuit 41 described above.
  • An adder circuit 405 for adding a predetermined value is connected to the negative M function processing circuit 403. Further, the other M function processing circuit 404 is connected to a multiplication circuit 406 for multiplying a predetermined value.
  • the adder circuit 405 adds one of predetermined values M (4 i), M (4 i + 1), M (4 i + 2), and M (4 i +3) to the input data. , Index i is tripled corresponding to the value 0-2.
  • the specified values M (4 i), M (4 i + 1) s M (4 i +2) and M (4 i +3) are 4 i, 4 i + 1, 4 i + 2, 4 i +, respectively.
  • the multiplication circuit 405 multiplies the input data by a predetermined value i + 1, and is tripled corresponding to the values 0 to 2 of the index i.
  • the value of the index i is equivalent to the index value used for key scheduling when generating an expanded key, and takes a value of 0 to 2, and correspondingly, the value of the predetermined value i + 1 also corresponds to three values. It is configured to take a value.
  • the output of the addition circuit 405 and the output of the multiplication circuit 406 are respectively supplied to the XOR circuit 408. Is entered.
  • the XOR circuit 408 calculates the exclusive OR of the output value of the addition circuit 405 and the output value of the multiplication circuit 406, and corresponds to the addition circuit 405 and the multiplication circuit 406. It is tripled.
  • the output of the XOR circuit 408 is connected to an M function processing circuit 410 for processing the M function.
  • the M function processing circuit 410 is also tripled in correspondence with the addition circuit 405, the multiplication circuit 406 and the XOR circuit 408.
  • the output of the M function processing circuit 410 is connected to four selectors 411 to 414.
  • the outputs of the selectors 4 1 1 to 4 14 are stored in a register 4. 15 for holding an intermediate key.
  • the addition circuit 405, the multiplication circuit 406, the 0 1 ⁇ circuit 408, and the M function processing circuit 410 correspond to the values 0 to 2 of the index i. Therefore, it is possible to generate three 32-bit intermediate keys at the same time. Therefore, in this intermediate key generation circuit 400, three intermediate keys, a0 to a2, b0 to b2, c0 to c2, and d0 to d2, are generated at each clock, and At every clock, all intermediate keys are generated and stored in registers 415. Since such a cryptographic circuit is connected by a 32-bit bus, four clocks are required to input a 128-bit plaintext or ciphertext.
  • the intermediate key generation circuit 400 needs four clocks to generate an intermediate key. Also, by configuring the intermediate key generation processing in advance before the data scramble processing, the processing time in the intermediate key generation circuit 400 does not affect the time of the de-task ramble processing. Since the predetermined value to be input to the addition circuit 405 is calculated in advance and converted to ROM, the calculation time can be reduced and the circuit scale can be reduced.
  • the intermediate key generation circuit 400 is configured to generate three intermediate keys simultaneously according to the value of the index i (0 to 2), but to generate four intermediate keys according to the order value (a to d). It is also conceivable to configure so that the intermediate key is generated at the same time. However, with the configuration of the intermediate key generation circuit 400 shown in the third embodiment, the circuit scale can be further reduced. (Fourth embodiment)
  • FIG. 9 shows an extended key generation circuit employed in the fourth embodiment.
  • the expanded key generation circuit 520 shown in FIG. 9 includes an X selector 521, a Y selector 522, a Z selector 523, and a W selector 524.
  • the output of the X selector 521 is input to the port shift circuit 525.
  • the output of the rotation shift circuit 525 and the output of the Y selector 522 are input to the addition circuit 526.
  • the output of the Z selector 523 is input to the rotate shift circuit 527.
  • the output of the rotate shift circuit 527 and the output of the W selector 524 are input to the subtraction circuit 528.
  • the output of the subtraction circuit 528 is input to the rotation shift circuit 529.
  • the output of the adder circuit 526 and the output of the rotate shift circuit 529 are input to the XOR circuit 530.
  • the output of the XOR circuit 530 is the output K n of the expanded key generation circuit 520.
  • the X selector 521, the Y selector 522, the Z selector 523, and the W selector 524 are four-input, one-output selectors, respectively, and are registers for storing the intermediate key generated by the intermediate key generation circuit 400 as shown in FIG. The output of 5 is input.
  • nine expanded key generation circuits 520 are prepared corresponding to the number of index tables shown in Table 2.
  • the second to ninth extended key generation circuits 520 based on the value of the index i determined based on the index parameter s, (ai, bi, c, cM) is determined by the X selector 521, the Y selector 522, ⁇ ⁇ ⁇ Input to selector 523 and W selector 524.
  • Table 3 shows the correspondence of input data to the X selector 521, the Y selector 522, the Z selector 523, and the W selector 524 of the circuits 0 to 8.
  • Circuit 1 a1, b1, c1, d1 a1, b1, c1, d1 a1, b1, d, d1 a1, b1, c1, d1
  • Circuit 3 a0, b0, c0, d0 a1, b1, c1, d1 a0, b0, c0, d0 a1, b1, c1, d1
  • Circuit 4 a1, b1, c1, d1 a2, b2, c2, d2 a1, b1, c1, d1 a2, b2, c2, d2
  • Circuit 5 a2, b2, c2, d2 a0, b0, c0, d0 a2, b2, c2, d2 a0, b0, c0, d0
  • Circuit 6 a0, b0, c0, d0 a2, b2, c2, d2 a0, b0, c0, d0 a2, b2, c2, d2
  • Circuit 8 a2, b2, c2, d2 a1, b1, c1, d1 a2, b2, c2, d2 a1, b1, c1, d1
  • the selector control in the W selector 524 is performed based on the order table shown in Table 1, and the correspondence of the select control is shown in Table 4.
  • the expanded key output from each expanded key generation circuit 520 is input to a de-task ripple circuit via an output circuit 540 as shown in FIG.
  • the output circuit 540 is composed of selectors 541 to 548. KW 0 to KW 8 are input.
  • the outputs EX_A0 to EX—A3 and EX—B0 to EX_B3 of the selectors 541 to 548 output the expanded key of 32 bits X4 as two sets of groups A and B.
  • Table 5 shows the selector control table for each of the selectors 541 to 548 at the time of encryption, and Table 6 shows the table at the time of decryption.
  • the X selector 501 to W selector 504 needs to configure a circuit of 12 inputs and 1 output, which increases the circuit scale.
  • the X selectors 52 1 to W selector 524 can be configured with 4-input 1-output selector circuits, respectively. Can be greatly reduced. This means that although nine extended key generation circuits 520 in FIG. 9 need to be prepared, the circuit scale of the entire extended key generation circuit is reduced.
  • FIG. 15 shows a configuration example of the detask rumble circuit employed in the fifth embodiment.
  • the de-task ramble circuit 220 shown in FIG. 15 in order to perform encryption / decryption in units of 128-bit blocks, a 32-bit X4 input data bus a, b, c, d, and 32 bits X4 output data buses e, f, g, h.
  • the de-task function circuit 220 has a first processing block 2 28 having a first I function processing circuit 22 1, a B function processing circuit 22 2, and a second I function processing circuit 22 3, A second processing block 229 having a first R function processing circuit 224 and a second R function processing circuit 225 is provided.
  • the decoupler circuit 220 includes a selector 226 for selectively outputting the input data and the output of the second R function processing circuit 225, and a second I function processing circuit 222. There is a register 2 27 that holds the output of 3 for each clock.
  • the RRIBI processing loop consisting of the second processing block 2 229 and the first processing block 228 is repeated several times, and the result is output to the output data bus (e, f, g, h). Can be output.
  • the selector 226 is switched to the input data overnight, and the input data a, b, c, and d are processed in the first processing block 228, and then the register 227 is processed. Holds its value.
  • the selector 2 26 is switched to the second processing block 2 29, and the data output from the register 2 27 is transferred to the second processing block 2 29 and the first processing block 2 29.
  • Each function process is executed by 2 8, and it is stored in register 2 27. Is held.
  • the first I function processing circuit 221 and the second I function processing circuit 223 are generated by the expanded key generation circuit 500 shown in FIG. 5 and the expanded key generation circuit 520 shown in FIG.
  • the extended key will be entered. If the extended key generation circuit is configured to simultaneously generate two sets of extended keys of 32 bits X4, group A of the two sets of extended keys generated by one clock is the first. It can be configured so that it is used in the I function processing circuit 221 and the group B is used in the second function processing circuit 223. As a result, both the extended key generation processing by the extended key generation circuit and the data scramble processing can be performed at the same time, and a delay in processing time can be prevented.
  • FIG. 16 shows a configuration example of the data scramble circuit employed in the sixth embodiment.
  • the data scramble circuit 240 shown in FIG. 16 uses a 32-bit X4 input data bus a, b, c, d to perform encryption / decryption in a 128-bit block unit. And 32 bits x 4 output data buses e, f, g, h.
  • the de-task function circuit 240 includes a first processing function 2419 having a first I function processing circuit 241, a B function processing circuit 242, and a second I function processing circuit 243.
  • a second processing circuit 250 having a first R function processing circuit 244 and a second R function processing circuit 245 is provided.
  • the data scramble circuit 240 includes an output selector 247 for selectively outputting the output of the first processing block 249 and the output of the second processing block 250, and an output selector 224.
  • a register 248 for holding the output of the register 47 for each clock, and an input-side selector 246 for selectively outputting the input data and the output of the register 248 are provided.
  • the first I-function processing circuit 241 and the B-function processing circuit 242 are switched by appropriately switching the input selector 246 and the output selector 247.
  • the processing by the second I function processing circuit After that, the HR processing by the second processing block 250 and the IBI processing by the first processing block 249 are performed alternately and repeatedly, and the result is output to the output data bus (e, f, g, h). Can be configured.
  • the input selector 246 is switched to the input data, and the input data a, b, c, and d are processed in the first processing block 249, and then the register 2 4 8 holds that value.
  • the output selector 247 is switched to the second processing block 250, and the data output from the register 248 is processed by the second processing block 250 so that each function processing is performed. It is executed, and its value is held in register 248.
  • the input selector 246 is switched to the register 248, and the output selector 247 is switched to the first processing block 249.
  • the data output from the 248 is subjected to each function processing in the first processing procedure 249, and the value is held in the register 248.
  • the first I function processing circuit 241 and the second I function processing circuit 243 have an expanded key generation circuit 500 shown in FIG. 5 and an expanded key generation circuit 520 shown in FIG. The key will be entered. If the expanded key generation circuit is configured to generate 32 bits X4 expanded keys simultaneously for two sets, group A is the first of the two sets of expanded keys generated by one clock. It can be configured so that it is used in the I function processing circuit 241 and the group B is used in the second function processing circuit 243.
  • this data scramble circuit 240 two cycles are required for one I-B-I-R-R process, so that the effect of the delay time due to the extended key generation processing by the extended key generation circuit is eliminated.
  • FIG. 17 shows a configuration example of a data scramble circuit employed in the seventh embodiment.
  • input / output buses a, b, and c of 32 bits X4 are used to perform encryption / decryption in units of 128 bits.
  • d, and 32 bits X4 output data buses e, f, g, h.
  • the data scramble circuit 260 includes a first processing block 2668 having a first I function processing circuit 261, a B function processing circuit 262, and a second I function processing circuit 2663, and an R function A second processing block 269 comprising a processing circuit 264 is provided. Also, the detask rumble circuit 260 includes an output-side selector 266 for selectively outputting the output of the first processing block 268 and the output of the second processing block 269, and an output side. It has a register 267 for holding the output of the selector 266 for each clock, and an input-side selector 265 for selectively outputting input data and the output of the register 267.
  • the first I function processing circuit 26 1 and the B function processing circuit 26 2 2 are switched by appropriately switching the input side selector 26 5 and the output side selector 26 6.
  • the second processing block 269 After executing the processing by the second I-function processing circuit 263, then by the second processing block 269: after the processing is repeated twice and the IBI processing by the first processing block 268 is alternately repeated.
  • the output data bus (e, f, g, h) can be configured to output the result.
  • the input selector 265 is switched to the input data side, and the input data a, b, c, d are processed in the first processing block 268, and then the register 26 7 holds that value.
  • the output selector 2666 is switched to the second processing block 2697, and the data output from the register 2667 is subjected to the R function processing by the second processing block 2669. It is executed, and its value is held in register 267. Similarly, in the next clock, the output selector 266 remains at the second processing block 269, and the data output from the register 267 is converted to the R function by the second processing block 269. Processing is executed, and the value is held in the register 267.
  • the input selector 265 is switched to the register 267, and the output selector 266 is switched to the first processing block 268.
  • the output data is subjected to each function processing in the first processing block 268, and the value is held in the register 267.
  • the first I function processing circuit 26 1 and the second I function processing circuit 26 3 have the expanded key generation circuit 500 shown in FIG. 5 and the expanded key generation circuit 500 shown in FIG. The key will be entered. If the extended key generation circuit is configured to generate two sets of extended keys of 32 bits X 4 at the same time, of the two sets of extended keys generated in one clock, group A is the first I function It can be configured to be used in the processing circuit 261 and to use the group B in the second function processing circuit 263.
  • this data scramble circuit 260 three cycles are required for one I-B-I-R-R process, so that the influence of the delay time due to the extended key generation processing by the extended key generation circuit is eliminated.
  • the present invention it is possible to reduce the circuit scale by configuring a clock synchronous loop in a block cipher algorithm that repeatedly executes basic function processing. Further, by configuring the intermediate key to be generated in advance, the process of generating an expanded key from the intermediate key can be speeded up. Furthermore, in the extended key generation processing, the control of key scheduling can be simplified, and high-speed processing can be realized with a compact circuit.

Abstract

A circuit for executing the algorithm of SC 2000, i.e. a common key block cipher having key length of 128/192/256 bits and processing block of 128 bits, at high rate with a compact hardware. A data scramble circuit comprises a first I function processing circuit, a processing block comprising a second I function processing circuit, a first R function processing circuit, a second R function processing circuit, and a third I function processing circuit, a B function processing circuit, and a fourth I function processing circuit, wherein the processing block and the B function processing circuit constitute a clock lock loop.

Description

明 細 書 暗号回路 (技術分野)  Description Cryptographic circuit (Technical field)
本発明は、 暗号装置に用いられるデータスクランブル回路、 デ一タスクランプ ル回路で用いる拡大鍵を生成する拡大鍵生成回路およびこれらデータスクランプ ル回路、 拡大鍵生成回路を備える暗号回路に関する。  The present invention relates to a data scramble circuit used for a cryptographic device, an extended key generation circuit for generating an extended key used in a destruction circuit, and a data scramble circuit and an encryption circuit including the extended key generation circuit.
(背景技術) (Background technology)
現在広く使用されている共通鍵暗号として、 D E S (Data Encryption Stand ard) が知られている。 D E Sは、 1 9 7 7年に米国政府の標準局 NIST (Nation al Institute of Standard Technology) が定めた標準であり、 6 4ビット入出力 、鍵長 6 4ビッ卜 (そのうち 8ビッ卜はパリティであり実質的には鍵長 5 6ビッ 卜) のブロック暗号である。  Data Encryption Standard (DES) is known as a common key cryptosystem widely used at present. DES is a standard set by the National Institute of Standards Technology (NIST) of the United States government in 1977, with 64 bits input / output and a key length of 64 bits (of which 8 bits are parity bits). It is a block cipher with a key length of 56 bits).
D E Sは、 F関数と呼ばれる非線形関数処理を 1 6回繰り返し行うアルゴリズ ムである。 このため、 D E Sによる暗号化/復号化を処理するための暗号回路は 、 たとえば特開 2 0 0 0 - 7 5 7 8 5号公報に示されるように、 F関数を繰り返 し行うク口ック同期ループ構成で実現することが可能である。  DES is an algorithm that repeats a nonlinear function process called an F function 16 times. For this reason, an encryption circuit for processing the encryption / decryption by DES is, as shown in, for example, Japanese Patent Application Laid-Open No. 2000-77585, a technique that repeatedly performs the F function. This can be realized with a synchronous loop configuration.
D E Sにより暗号化された暗号文を暗号鍵の総当たり法により解読する場合、 鍵長 6 4ビット ( 5 6ビット) の場合であっても、 計算量的安全性評価の範囲内 であると数年前では考えられていた。 しかながら、 コンピュータの性能向上に伴 い、 鍵長 6 4ビット ( 5 6ビット) でも十分な計算量的安全性を確保することが 困難となってきている。 このため、複数の暗号鍵を用いて、処理を複数回繰り返 す多段 D E Sが用いられる。 たとえば、 2〜3の暗号鍵を用いて処理を 3回繰り 返す卜リプル D E Sが一般的に多く用いられている。  When a ciphertext encrypted by DES is decrypted by the brute force method of a cryptographic key, even if the key length is 64 bits (56 bits), it is assumed that it is within the range of the computational security evaluation. It was thought years ago. However, with the improvement in computer performance, it has become difficult to secure sufficient computational security even with a key length of 64 bits (56 bits). For this reason, a multi-stage DES that uses a plurality of encryption keys and repeats the process a plurality of times is used. For example, triple DESS, which repeats the process three times using two or three encryption keys, is generally used in many cases.
このような D E Sに代わる次世代共通鍵暗号として、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビヅ卜、 処理ブロック 1 2 8ビッ 卜の暗号 A E Sを標準化しょうとする動き があり、 米国標準としての A E Sが固まりつつある。 本件出願人は、 このような A E Sに準拠した仕様 (鍵長 1 2 8 / 1 9 2 / 2 5 6ピヅ 卜、 処理ブロック 1 2 8ビット) で高い安全性を維持するとともに高速処 理を実現するためのアルゴリズム S C 2 0 0 0を発表し、 この S C 2 0 0 0に用 いる演算装置および演算方法として特願 2 0 0 0— 2 1 2 4 8 2号、 この S C 2 0 0 0に用いる拡大鍵生成装置として特願 2 0 0 0— 2 1 2 8 1 4号において提 案している。 Movement to standardize AES with a key length of 128/192/256 bits and a processing block of 128 bits as a next generation symmetric key cryptography that replaces DES The AES as a US standard is consolidating. The applicant of the present application has been able to maintain high security with such AES-compliant specifications (key length of 128/192/256 bits, processing block of 128 bits) and perform high-speed processing. An algorithm SC2000 for realizing the algorithm was announced, and as an arithmetic unit and an arithmetic method used for this SC200, Japanese Patent Application No. 2000-0—2124482, this SC2000 It is proposed in Japanese Patent Application No. 2000-0—212814 as an extended key generation device used for.
この S C 2 0 0 0は、 D E Sと同様にいくつかの基本関数を繰り返し行うアル ゴリズムであり、 各関数処理回路をハードウェアで構成する場合、 ループ回路を 構成して繰り返し処理を実行するように構成できる。 しかしながら、 S C 2 0 0 0の暗号方式では、 D E Sにょうに F関数だけで構成される暗号方式とは異なり 、 単純に 1つの関数処理回路を 1つの同期ループ内で処理できるように構成する ことができず、 各種関数処理回路による関数処理を同期ループ内で効率的に行え るように、 各種関数処理回路をいかに配置するかがハードウエア実装時における 大きな課題となっている。  This SC 2000 is an algorithm that repeatedly performs some basic functions like DES.If each function processing circuit is configured by hardware, it is configured to execute a loop circuit by executing a loop circuit. Can be configured. However, unlike the encryption scheme of SC20000, which is different from the encryption scheme composed of only the F function in DES, it is possible to simply configure one function processing circuit in one synchronous loop. Since it is not possible, how to arrange the various function processing circuits so that the function processing by the various function processing circuits can be performed efficiently in the synchronous loop is a major issue in hardware implementation.
本発明は、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ ト、 処理プロック 1 2 8ビットの 共通鍵プロック暗号である S C 2 0 0 0のアルゴリズムを高速かつコンパク卜な ハードウエアで実行する回路構成を提供することを目的とする。  The present invention executes the algorithm of SC2000, which is a common key block cipher with a key length of 128/192/256 bits and a processing block of 128 bits, using high-speed and compact hardware. It is an object to provide a circuit configuration that performs
(発明の開示) (Disclosure of the Invention)
前述したような課題を解決するために、 本発明に係るデ一タスクランプル回路 は、 暗号鍵から生成される複数の拡大鍵とデータとの排他的論理和を演算する I 関数と、 データのビッ トを攪拌する B関数および R関数とを用いてデータスクラ ンブルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ 卜、 処理プロック 1 2 8ビッ 卜 の共通鍵ブロック暗号の暗号化/復号化を実行するデータスクランブル回路であ つて、 I関数を処理した後、 B関数、 I関数、 R関数、 R関数、 I関数の順に処 理を行う処理プロックを n回処理し、 その後 B関数、 I関数の順に処理を行うた めに、 I関数を処理する I関数処理回路と、 B関数を処理する B関数処理回路と、 R関数を処理する R関数処理回路とを実装しているデ一タスクランプル回路であ o In order to solve the above-described problem, a de-task ripple circuit according to the present invention includes an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a data bit. Data scrambling is performed using the B function and the R function, which encrypts the key, and encrypts a common key block cipher with a key length of 128 bits / 192 bits / 256 bits and a processing block of 128 bits. / A data scramble circuit that performs decryption, processes the I function, processes the B function, I function, R function, R function, and I function in that order. In order to perform processing in the order of the function and the I function, an I function processing circuit that processes the I function, a B function processing circuit that processes the B function, O A de-task ripple circuit that implements an R function processing circuit that processes the R function.
ここで、 I関数を処理した後、 B関数、 I関数、 R関数、 R関数、 I関数の順 に処理を行う処理ブロックを n回処理し、 その後 B関数、 I関数の順に処理を行 うための各 I関数処理回路、 B関数処理回路および R関数処理回路を全て実装す るように構成できる。 また、 B関数処理回路、 I関数処理回路、 R関数処理回路、 R関数処理回路、 I関数処理回路の順に接続されたク口ック同期ループを構成し、 I関数処理回路 、 クロック同期ループ、 B関数処理回路、 I関数処理回路の順に接続される構成 とすることができる。 また、 本発明では、 暗号鍵から生成される複数の拡大鍵とデータとの排他的論 理和を演算する I関数と、 データのビッ卜を攪拌する B関数および R関数とを用 いてデ一タスクランプルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビヅ卜、処理プロ ック 1 2 8ビッ卜の共通鍵ブロック暗号の暗号化/復号化を実行するデ一タスク ランプル回路であって、 I関数、 B関数を処理した後、 I関数、 R関数、 R関数、 I関数、 B関数の順に処理を行う処理ブロックを n回処理し、 その後 I関数の処 理を行うために、 I関数を処理する I関数処理回路と、 B関数を処理する B関数 処理回路と、 R関数を処理する R関数処理回路とを実装しているデータスクラン ブル回路を提案する。 ここで、 I関数処理回路、 R関数処理回路、 R関数処理回路、 I関数処理回路 、 B関数処理回路の順に接続されたクロック同期ループを構成し、 I関数処理回 路、 B関数処理回路、 クロック同期ループ、 I関数処理回路の順に接続された構 成とすることができる。 また、 第 1 I関数処理回路と;第 2 I関数処理回路、 第 1 R関数処理回路、 第 2 R関数処理回路および第 3 I関数処理回路が順に接続される処理ブロックと; 第 1 I関数処理回路の出力と、 処理ブロックの出力とを選択的に出力するセレク 夕と;セレクタの出力が接続される B関数処理回路と; B関数処理回路の出力を クロック周期毎にラッチして処理ブロックに入力するレジスタと; レジスタの出 力が接続される第 4 I関数処理回路とを備え、 処理ブロックと B関数処理回路と によりクロック同期ループを構成することができる。 また、 本発明では、 暗号鍵から生成される複数の拡大鍵とデータとの排他的論 理和を演算する I関数と、 データのビッ卜を攪拌する B関数および R関数とを用 いてデ一夕スクランブルを行い、 鍵長 1 2 8 X 1 9 2 / 2 5 6ビヅ卜、 処理プロ ック 1 2 8ビッ卜の共通鍵ブロック暗号の暗号化/復号化を実行するデ一タスク ランブル回路であって、 I関数、 B関数、 I関数の順に処理を行った後、 R関数、 R関数、 I関数、 B関数、 I関数の順に処理を行う処理ブロックを n回処理する ために、 I関数を処理するための I関数処理回路と、 B関数を処理する B関数処 理回路と、 R関数を処理する R関数処理回路とを実装する構成とすることができ る o ここで、 第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接 続される第 1処理ブロックと;第 1 R関数処理回路、 第 2 R関数処理回路が順に 接続される第 2処理ブロックと;入力データと第 2 R関数処理回路の出力とのう ちいずれかを選択的に第 1 I関数処理回路に入力するためのセレクタとを備える 構成とすることができる。 さらに、 本発明では、 暗号鍵から生成される複数の拡大鍵とデータとの排他的 論理和を演算する I関数と、 データのビッ卜を攪拌する B関数および R関数とを 用いてデ一タスクランプルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ卜、 処理ブ ロック 1 2 8ビッ卜の共通鍵プロック暗号の暗号化 Z復号化を実行するデータス クランプル回路であって、 I関数、 B関数、 I関数の順に処理を行う第 1処理ブ ロックと、 R関数、 R関数の順に処理を行う第 2処理ブロックとを交互に複数回 処理するために、 I関数を処理するための I関数処理回路と、 B関数を処理する B関数処理回路と、 R関数を処理する R関数処理回路とを実装する構成を提案す る 0 Here, after processing the I function, the processing block that performs processing in the order of the B function, the I function, the R function, the R function, and the I function is processed n times, and then the processing is performed in the order of the B function and the I function. It can be configured to implement all I function processing circuits, B function processing circuits and R function processing circuits. In addition, a B-function processing circuit, an I-function processing circuit, an R-function processing circuit, an R-function processing circuit, and a cook synchronous loop connected in the order of the I-function processing circuit are configured, and an I-function processing circuit, a clock synchronous loop, It is possible to adopt a configuration in which the B function processing circuit and the I function processing circuit are connected in this order. Further, in the present invention, data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits. De-task rumple circuit that performs task rumpling and performs encryption / decryption of a common key block cipher with a key length of 128/192/256 bits and a processing block of 128 bits. After processing the I function and the B function, the processing block that performs processing in the order of the I function, the R function, the R function, the I function, and the B function is processed n times, and then the processing of the I function is performed. Next, we propose a data scramble circuit that implements an I function processing circuit that processes the I function, a B function processing circuit that processes the B function, and an R function processing circuit that processes the R function. Here, a clock synchronous loop connected in the order of the I function processing circuit, the R function processing circuit, the R function processing circuit, the I function processing circuit, and the B function processing circuit is configured, and the I function processing circuit, the B function processing circuit, A configuration in which a clock synchronous loop and an I function processing circuit are connected in this order can be provided. A first I function processing circuit; a second I function processing circuit; a first R function processing circuit; (2) a processing block to which the R function processing circuit and the third I function processing circuit are sequentially connected; a selector for selectively outputting an output of the first I function processing circuit and an output of the processing block; A B function processing circuit connected thereto; a register for latching an output of the B function processing circuit at each clock cycle and inputting the output to the processing block; and a fourth I function processing circuit connected to the output of the register. A clock synchronous loop can be configured by the block and the B function processing circuit. Further, in the present invention, data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits. A detask rumble circuit that performs evening scramble and performs encryption / decryption of a common key block cipher with a key length of 128 bits x 192/256 bits and a processing block of 128 bits. Then, after processing in the order of the I function, the B function, and the I function, the processing block that performs the processing in the order of the R function, the R function, the I function, the B function, and the I function is processed n times. It can be configured to implement an I function processing circuit for processing functions, a B function processing circuit for processing B functions, and an R function processing circuit for processing R functions. A first processing block to which an I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected; and a first R A second processing block to which a number processing circuit and a second R function processing circuit are sequentially connected; and selectively input either input data or an output of the second R function processing circuit to the first I function processing circuit. And a selector for performing the operation. Further, in the present invention, a de-task is performed using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits. A data scramble circuit that performs a ramp, performs encryption of a common key block encryption with a key length of 1 28/192/256 bits and a processing block of 128 bits, and performs Z decryption. The first processing block that performs processing in the order of the function, the B function, and the I function, and the second processing block that performs processing in the order of the R function and the R function are alternately performed multiple times. In order to perform processing, a configuration is proposed in which an I function processing circuit for processing an I function, a B function processing circuit for processing a B function, and an R function processing circuit for processing an R function are implemented.
ここで、 第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接 続される第 1処理プロックと;第 1 R関数処理回路、 第 2 R関数処理回路が接続 される第 2処理ブロックと;第 1処理ブロックの出力と第 2処理プロックの出力 のうちいずれかを選択的に出力する出力側セレクタと;入力デ一タと出力側セレ クタの出力とのうちいずれかを選択的に第 1 I関数処理回路に入力するための入 カ側セレクタとを備える構成とすることができる。 また、本発明では、 暗号鍵から生成される複数の拡大鍵とデータとの排他的論 理和を演算する I関数と、 データのビッ卜を攪拌する B関数および R関数とを用 いてデ一タスクランブルを行い、鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ卜、処理プロ ック 1 2 8ビッ卜の共通鍵ブロック暗号の暗号化/復号化を実行するデータスク ランブル回路であって、 I関数、 B関数、 I関数の順に処理を行う第 1処理プロ ックと、 R関数処理を行う第 2処理プロックとを所定の順に複数回処理するため に、 I関数を処理するための I関数処理回路と、 B関数を処理する B関数処理回 路と、 R関数を処理する R関数処理回路とを実装する構成とすることができる。 ここで、 第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接 続される第 1処理プロックと;第 1 R関数処理回路を備える第 2処理プロックと ;第 1処理ブロックの出力と第 2処理プロックの出力のうちいずれかを選択的に 出力する出力側セレクタと;入力データと出力側セレクタの出力とのうちいずれ かを選択的に第 1 I関数処理回路に入力するための入力側セレクタとを備える構 成とすることができる。  Here, a first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected; and a first R function processing circuit and a second R function processing circuit are connected. A second processing block; an output selector for selectively outputting one of an output of the first processing block and an output of the second processing block; and one of an input data and an output of the output selector And an input-side selector for selectively inputting to the first I function processing circuit. Further, in the present invention, data is obtained by using an I function for calculating an exclusive OR of a plurality of extended keys generated from an encryption key and data, and a B function and an R function for mixing data bits. A data scramble circuit that performs task rumble and performs encryption / decryption of a common key block cipher with a key length of 1/128/192/256 bits and a processing block of 128 bits. In order to process the I function in order to process the first processing block that performs processing in the order of I function, B function, and I function, and the second processing block that performs R function processing in a predetermined order, , An I function processing circuit, a B function processing circuit for processing a B function, and an R function processing circuit for processing an R function. A first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected; a second processing block including a first R function processing circuit; An output selector for selectively outputting either the output of the block or the output of the second processing block; and selectively inputting either the input data or the output of the output selector to the first I function processing circuit And an input-side selector for performing the operation.
B関数処理回路は、 3 2ビッ卜 X 4の入力データを 4ビッ卜 X 3 2の入力デー 夕に変換する入力データ変換部と、 入力データ変換部に接続される 3 2個の 4ビ ッ 卜 S b o xと、 各 4ビッ ト S b o xから出力される 4ビヅ 卜 x 3 2の出力デ一 夕を 3 2ビヅ卜 X 4の出力データに変換する出力データ変換部とを備える構成と することができる。 また、 R関数処理回路は、 3 2ビッ ト X 4の入力データのうち 2つの入力デ一 夕のビッ 卜を攪拌して 3 2ビッ 卜 X 2の出力データを出力する F関数処理回路と 、 F関数処理回路の出力データを入力データのうち残りの 2つと排他的論理和を 演算する 2つの X 0 R回路とを備える構成とすることができる。 この F関数処理回路は、 3 2ビッ ト X 2の入力データを非均等なビッ ト数の複 数の入力データに変換する入力データ変換部と、 入力データ変換部に接続される 複数の S b o xと、 S b o xからの出力を 3 2ビッ 卜 x 2の出力データに変換す る出力データ変換部とを備える構成とすることができる。 さらに、 複数の S b o Xは、 2個の 6ビッ ト S b o Xと 4個の 5ビッ ト S b o Xとで構成され、 入力データ変換部は 3 2ビッ 卜 X 2の入力データを 6ビヅ 卜 X 2、 5ビヅ卜 X 4の入力デ一夕に変換するように構成できる。 また、 本発明では、 暗号鍵から中間鍵を生成する中間鍵生成回路と;中間鍵生 成回路から生成された中間鍵から複数の拡大鍵を生成する拡大鍵生成回路と;デ —夕と拡大鍵との排他的論理和を演算する I関数、 データのビッ トを攪拌する B 関数および R関数とを用いてデータスクランブルを行うデータスクランブル回路 とを備える鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ 卜、 処理ブロック 1 2 8ビッ 卜の共 通鍵ブロック暗号の暗号化/復号化を実行する暗号回路であって、 中間鍵生成回 路は、 データスクランブル回路のデータスクランブル処理の前に中間鍵生成処理 を実行し、 拡大鍵生成回路は、 データスクランブル回路のデ一タスクランプル処 理と並列的に拡大鍵の生成を行うように構成される暗号回路を提案する。 ここで、 中間鍵生成回路は、 オーダー基数に対応して設定されたオーダ一パラ メータテーブルと、 ィンデヅクス基数に対応して設定されたィンデックスパラメ 一夕テーブルとに基づいて、 拡大鍵生成回路の拡大鍵生成処理で使用する中間鍵 を逐次生成するように構成できる。 また、 中間鍵生成回路は、 暗号鍵を 3 2ビッ 卜単位に分ける入力データ変換部 と、 入力データ変換部からの入力データに所定値を加算する加算回路と、 入力デ —夕変換部からの入力データに所定値を乗算する乗算回路と、 加算回路の出力値 と前記乗算回路の出力値との排他的論理和を演算する X O R回路とを備え、 加算 回路において加算する所定値を予め演算により求めた既設定値として格納する記 憶手段をさらに備える構成とすることができる。 さらに、 中間鍵生成回路は、 オーダ一基数に対応して設定されたオーダ一パラ メータテーブルとインデックス基数に対応して設定されたィンデヅクスパラメ一 タテ一ブルとに基づいて、 データスクランブルを行う際にオーダ一の種類とィン デックスの種類とに応じた個数の中間鍵を生成し、 拡大鍵生成回路は、 インデッ クスパラメータテ一プルに設定されるテーブル数だけ設けられ、 オーダ一パラメ —タテ一ブルとインデックスパラメータテーブルとに従つて選択的に入力される 中間鍵から拡大鍵を生成するように構成できる。 また、 拡大鍵生成回路で生成される拡大鍵を選択的にデ—タスクランプル回路 に入力するために、 データスクランブル回路で 1サイクルに必要な拡大鍵数だけ 設けられる拡大鍵出力セレクタと、 拡大鍵出力セレクタの拡大鍵選択制御テープ ルを格納する記憶手段とをさらに備える構成とすることができる。 本発明では、 前述したようなデ一タスクランプル回路に入力される拡大鍵を生 成する拡大鍵生成回路であって、 第 2 I関数処理回路に入力される第 2拡大鍵グ ループを、 1サイクル前の第 1 I関数処理回路または第 3 I関数処理回路に入力 される第 1拡大鍵グループとともに生成する拡大鍵生成回路を提案する。 (図面の簡単な説明) The B function processing circuit includes an input data conversion unit that converts the input data of 32 bits X4 into input data of 4 bits X32, and 32 4 bits connected to the input data conversion unit. A configuration including a cut S box and an output data conversion unit for converting a 4-bit x 32 output data output from each 4-bit S box into a 32-bit X 4 output data And Further, the R function processing circuit mixes two input data bits out of the 32 bits X 4 input data to output 32 bits X 2 output data; The output data of the F function processing circuit may be configured to include the remaining two of the input data and two XOR circuits for performing an exclusive OR operation. The F function processing circuit includes an input data conversion unit that converts input data of 32 bits X 2 into a plurality of input data having an unequal number of bits, and a plurality of S boxes connected to the input data conversion unit. And an output data conversion unit that converts the output from the S box into 32 bits x 2 output data. Further, the plurality of SboXs are composed of two 6-bit SboXs and four 5-bit SboXs, and the input data conversion unit converts the 32-bit X2 input data into six bits. It can be configured to convert the input data into input X2 and 5-bit X4. Also, in the present invention, an intermediate key generation circuit for generating an intermediate key from an encryption key; an expanded key generation circuit for generating a plurality of expanded keys from the intermediate key generated from the intermediate key generation circuit; Key length 1 28/19 2/2 including a data scramble circuit that performs data scramble using I function for calculating exclusive OR with the key, B function and R function for mixing data bits 56-bit, processing block 12-bit This is an encryption circuit that performs encryption / decryption of an 8-bit common key block cipher.The intermediate key generation circuit is used before the data scramble processing of the data scramble circuit. The intermediate key generation process is executed, and the extended key generation circuit proposes a cryptographic circuit configured to generate an extended key in parallel with the de-task ramping process of the data scramble circuit. Here, the intermediate key generation circuit uses the order parameter set corresponding to the order radix. An intermediate key used in the extended key generation processing of the extended key generation circuit can be configured to be sequentially generated based on the meter table and the index parameter overnight table set in accordance with the index radix. The intermediate key generation circuit includes an input data conversion unit that divides the encryption key into 32 bit units, an addition circuit that adds a predetermined value to the input data from the input data conversion unit, and an input data conversion unit that outputs the input data from the input data conversion unit. A multiplying circuit for multiplying the input data by a predetermined value; and an XOR circuit for calculating an exclusive OR of an output value of the adding circuit and an output value of the multiplying circuit. A configuration may further be provided with a storage means for storing the obtained set value. Further, the intermediate key generation circuit performs data scrambling based on the order parameter table set according to the order radix and the index parameter table set according to the index radix. The number of intermediate keys corresponding to the type of the order and the type of the index is generated when performing the key expansion. The expanded key generation circuit is provided by the number of tables set in the index parameter template. It can be configured to generate an expanded key from an intermediate key that is selectively input according to the parameters and the index parameter table. In order to selectively input the expanded key generated by the expanded key generation circuit to the data scramble circuit, an expanded key output selector provided with the number of expanded keys required in one cycle in the data scramble circuit, and an expanded key Storage means for storing the expanded key selection control table of the output selector. According to the present invention, there is provided an extended key generation circuit for generating an extended key to be input to the de-task function circuit as described above, wherein the second extended key group input to the second I function processing circuit is: We propose an extended key generation circuit that generates with the first extended key group input to the first I function processing circuit or the third I function processing circuit before the cycle. (Brief description of drawings)
図 1は、本発明の概略構成を示すブロック図である。  FIG. 1 is a block diagram showing a schematic configuration of the present invention.
図 2は、第 1実施形態のデータスクランブル回路を示す回路図である。  FIG. 2 is a circuit diagram showing the data scramble circuit of the first embodiment.
図 3は、第 1実施形態の中間鍵生成回路を示す回路図である。  FIG. 3 is a circuit diagram showing the intermediate key generation circuit of the first embodiment.
図 4は、第 1実施形態の拡大鍵生成回路を示す回路図である。  FIG. 4 is a circuit diagram illustrating an extended key generation circuit according to the first embodiment.
図 5は、第 2実施形態の拡大鍵生成回路を示す回路図である。  FIG. 5 is a circuit diagram illustrating an extended key generation circuit according to the second embodiment.
図 6は、第 2実施形態のデ一タスクランブル回路を示す回路図である。  FIG. 6 is a circuit diagram showing a detask rumble circuit according to the second embodiment.
図 7は、第 2実施形態のデータスクランブル回路の変形例を示す回路図である o  FIG. 7 is a circuit diagram showing a modification of the data scramble circuit of the second embodiment.
図 8は、第 3実施形態の中間鍵生成回路を示す回路図である。  FIG. 8 is a circuit diagram illustrating an intermediate key generation circuit according to the third embodiment.
図 9は、第 4実施形態の拡大鍵生成回路を示す回路図である。  FIG. 9 is a circuit diagram illustrating an extended key generation circuit according to the fourth embodiment.
図 1 0は、第 4実施形態の拡大鍵生成回路の出力回路を示す回路図である。 図 1 1は、 B関数処理回路を示す回路図である。  FIG. 10 is a circuit diagram illustrating an output circuit of the extended key generation circuit according to the fourth embodiment. FIG. 11 is a circuit diagram showing a B function processing circuit.
図 1 2は、 R関数処理回路を示す回路図である。  FIG. 12 is a circuit diagram showing an R function processing circuit.
図 1 3は、 F関数処理回路を示す回路図である。  FIG. 13 is a circuit diagram showing an F function processing circuit.
図 1 4は、 第 1実施形態における他のデータスクランブル回路を示す回路図で FIG. 14 is a circuit diagram showing another data scramble circuit according to the first embodiment.
¾)る。 ¾)
図 1 5は、 第 5実施形態のデータスクランブル回路を示す回路図である。  FIG. 15 is a circuit diagram showing a data scramble circuit according to the fifth embodiment.
図 1 6は、 第 6実施形態のデータスクランブル回路を示す回路図である。  FIG. 16 is a circuit diagram illustrating a data scramble circuit according to the sixth embodiment.
図 1 7は、 第 7実施形態のデ一タスクランプル回路を示す回路図である。  FIG. 17 is a circuit diagram showing a de-task ripple circuit according to the seventh embodiment.
図 1 8は、 M関数処理回路を示す回路図である。  FIG. 18 is a circuit diagram showing an M function processing circuit.
図 1 9は、 M関数処理回路における処理の説明図。  FIG. 19 is an explanatory diagram of processing in the M function processing circuit.
(発明を実施するための最良の形態) (Best mode for carrying out the invention)
〔基本構成〕  (Basic configuration)
本発明に係る暗号回路の基本構成を図 1に示す。  FIG. 1 shows the basic configuration of the encryption circuit according to the present invention.
暗号回路 1は、 デ一タスクランプル回路 2と、 暗号鍵処理回路 3とから構成さ れている。 暗号鍵処理回路 3は、 入力される暗号鍵に基づいて中間鍵を生成する 中間鍵生成回路 4と、 中間鍵生成回路 4で生成される中間鍵に基づいて複数の拡 大鍵を生成する拡大鍵生成回路 5と備えている。 データスクランブル回路 2は、 内部に複数種の関数処理回路を備えており、 拡大鍵生成回路 5で生成される複数 の拡大鍵に基づいてそれぞれの関数処理を行い、 入力される平文を暗号文に暗号 化して出力し、 または入力される暗号文を復号化して平文を出力するものである o The encryption circuit 1 is composed of a destruction circuit 2 and an encryption key processing circuit 3. The encryption key processing circuit 3 generates an intermediate key based on the input encryption key, and a plurality of expansion keys based on the intermediate key generated by the intermediate key generation circuit 4. An extended key generation circuit 5 for generating a large key is provided. The data scramble circuit 2 includes a plurality of types of function processing circuits inside, performs respective function processing based on the plurality of expanded keys generated by the expanded key generation circuit 5, and converts the input plaintext into ciphertext. O Encrypt and output, or decrypt the input ciphertext and output plaintext o
データスクランブル回路 2は、 拡大鍵生成回路 5で生成される拡大鍵とデータ との排他的論理和を演算する I関数処理回路と、 データのビッ卜を攪拌する B関 数処理回路および R関数処理回路とを複数備えており、 たとえば、 I-B- R-R-I-B- I-R-R-I-B-I-R-R-I-B-I-R-R-I-B-I-R-R-I-B-I-R-R-I-B-I-K-R-I-B-IC J に関数処理を 行うように構成される。 このとき、 データスクランブル回路 2に入力されるデ一 夕の処理ブロック長は 1 2 8ビッ トであり、 これを 3 2ビット X 4に分割して処 理を丁つ。  The data scramble circuit 2 includes an I function processing circuit for calculating an exclusive OR of the expanded key generated by the expanded key generation circuit 5 and the data, a B function processing circuit for mixing data bits, and an R function processing. And a plurality of circuits, for example, configured to perform function processing on IB-RRIB-IRRIBIRRIBIRRIBIRRIBI-RRIBIKRIB-ICJ. At this time, the processing block length of the data input to the data scramble circuit 2 is 128 bits, which is divided into 32 bits × 4 to perform processing.
これに基づいて、 拡大鍵生成回路 5では、 各 I関数処理に必要な数だけの拡大 鍵を生成しこれを逐次デ一タスクランブル回路 2に入力するように構成する。 た とえば、 前述のようにデータスクランブル回路 2での I関数処理の回数が 1 6回 である場合には、 3 2ビッ卜の拡大鍵を 4個生成してデータスクランブル回路 2 に入力することを繰り返し、 全部で 5 6個の拡大鍵を生成するように構成する。 拡大鍵生成回路 5における拡大鍵生成処理の前に、 中間鍵生成回路 4による中 間鍵生成処理が実行される。 この中間鍵生成回路 4は、 入力される暗号鍵を複数 の 3 2ビッ卜データに変換し、 それぞれに非線形関数処理 Μを行った後、 入力デ 一夕に所定値を加算し、 入力データに所定値を乗算し、 各演算結果の排他的論理 和を演算し、 さらに非線形関数処理 Μを行うように構成される。  On the basis of this, the extended key generation circuit 5 is configured to generate as many extended keys as necessary for each I function processing and to sequentially input these to the detask ramble circuit 2. For example, if the number of times of the I function processing in the data scramble circuit 2 is 16 as described above, four 32 bit expanded keys must be generated and input to the data scramble circuit 2. Is repeated to generate a total of 56 expanded keys. Before the expanded key generation processing in the expanded key generation circuit 5, the intermediate key generation processing by the intermediate key generation circuit 4 is executed. The intermediate key generation circuit 4 converts the input encryption key into a plurality of 32-bit data, performs a non-linear function processing on each of them, adds a predetermined value to the input data overnight, and adds the input data to the input data. It is configured to multiply by a predetermined value, calculate exclusive OR of each calculation result, and further perform nonlinear function processing 処理.
たとえば、 拡大鍵生成回路 5において 5 6個の拡大鍵の生成を行うためには、 暗号鍵から 3 2ビッ卜 X 8に変換された入力デ一夕を生成し、 各入力データに対 して Μ関数処理を行った後、 所定値を加算する加算回路に奇数番目の入力データ を入力し、 所定値を乗算する乗算回路に偶数番目の入力データを入力する。 この 後、 隣接する加算回路の出力と乗算回路の出力とを X 0 R回路に入力して排他的 論理和を演算し、 この X O R回路の出力値に Μ関数処理を行って中間鍵の生成を 行う。 1つの加算回路で加算を行う所定値および 1つの乗算回路で乗算を行う所 定値を複数用意することにより、 各 X O R回路から複数の中間鍵を得ることが可 能となる。 ここで、 暗号鍵を 3 2ビッ ト X 8の入力データに変換し、 4つの回路 列で 3 2ビッ卜 X 4の中間鍵を作成する場合、 加算回路での所定値および乗算回 路での乗算値をそれぞれ 3つずつ用意することで、 3 2ビヅ卜 X 4 X 3の中間鍵 を得ることができる。拡大鍵生成回路 5では、 この 3 2ビット X 4 X 3の中間鍵 をキ一スケジュ一リングに基づいて適宜選択し 5 6個の拡大鍵を生成することが 可能となる。 For example, in order to generate 56 expanded keys in the expanded key generation circuit 5, an input data converted from a cryptographic key into 32 bits X8 is generated, and each input data is generated. Μ After performing the function processing, input the odd-numbered input data to the addition circuit that adds the predetermined value, and input the even-numbered input data to the multiplication circuit that multiplies the predetermined value. Thereafter, the output of the adjacent addition circuit and the output of the multiplication circuit are input to the XOR circuit to calculate an exclusive OR, and the output value of the XOR circuit is subjected to Μ-function processing to generate an intermediate key. Do. Predetermined value to be added by one adder and multiplication by one multiplier By preparing multiple fixed values, it becomes possible to obtain multiple intermediate keys from each XOR circuit. Here, when the encryption key is converted into 32 bits × 8 input data and an intermediate key of 32 bits × 4 is created by four circuit rows, a predetermined value in the addition circuit and a predetermined value in the multiplication circuit are used. By preparing three multiplication values, an intermediate key of 32 bits X 4 X 3 can be obtained. The extended key generation circuit 5 can appropriately select the 32-bit X4 X3 intermediate key based on the key scheduling to generate 56 extended keys.
〔第 1実施形態〕 (First Embodiment)
第 1実施形態で採用されるデータスクランブル回路を図 2に示す。  FIG. 2 shows a data scramble circuit employed in the first embodiment.
S C 2 0 0 0暗号では前述したように、 拡大鍵とデ一夕との排他的論理和を演 算する I関数と、 データのビットを攪拌する B関数および R関数とを所定の順に 複数回繰り返し行うもので、 たとえば、 暗号鍵が 1 2 8ビッ 卜の場合、 I-B-I-R-R -I-B-I-R-R-I-B-I-R-R-I-B-I-R-R-I-B-I-R-IM-B-I-IMM-B-I-IMi-I-B-Iの順に関数処 理を行うように構成される。 このような関数処理を行うために、 この第 1実施形 態のデ一タスクランプル回路 2 0では、処理を行う順に I関数処理回路 2 1、 B 関数処理回路 2 2、 R関数処理回路 2 3を直列に接続している。  As described above, in the SC2000 encryption, the I function for calculating the exclusive OR of the expanded key and the data and the B function and the R function for mixing the data bits are performed several times in a predetermined order. For example, if the encryption key is 128 bits, the function processing is performed in the order of IBIRR-IBIRRIBIRRIBIRRIBIR-IM-BI-IMM-BI-IMi-IBI. In order to perform such function processing, in the detask ripple circuit 20 of the first embodiment, the I function processing circuit 21, the B function processing circuit 22, and the R function processing circuit 23 Are connected in series.
このデータスクランブル回路 2 0では、 暗号化/復号化が 1 2 8ビヅ 卜のプロ ック単位で行われ、 さらに入力デ一夕は 3 2ビッ卜単位で処理を行う 4つの系統 で処理されて 3 2ビット X 4の出力データを得る。 このため、 データスクランプ ル回路 2 0は、 3 2ビット X 4の入力データバス a , b , c , dと、 3 2ビッ ト x 4の出力データバス e, f , g , hを備えている。  In this data scramble circuit 20, encryption / decryption is performed in 128-bit block units, and furthermore, input data is processed in four systems that process in 32-bit units. To obtain 32 bits X 4 output data. For this reason, the data scrambling circuit 20 has 32 bits X4 input data buses a, b, c, d and 32 bits x 4 output data buses e, f, g, h. .
暗号鍵が 1 2 8ビッ トの場合には、 図 2に示すように、 I関数処理回路 2 1の 後に、 B関数処理回路 2 2、 I関数処理回路 2 1、 R関数処理回路 2 3、 R関数 処理回路 2 3、 I関数処理回路 2 1で構成される処理ブロック 2 4を 6個接続し 、 その後に B関数処理回路 2 2、 I関数処理回路 2 1を順に接続する。 また、 暗 号鍵が 1 9 2ビッ卜/ 2 5 6ビッ卜の場合には、 図 1 4に示すように、 I関数処 理回路 2 1の後に、 B関数処理回路 2 2、 I関数処理回路 2 1、 R関数処理回路 2 3、 R関数処理回路 2 3、 I関数処理回路 2 1で構成される処理ブロック 2 4 を 7個接続し、 その後に B関数処理回路 22、 I関数処理回路 21を順に接続す 図 2に示すデータスクランブル回路 20では、 I関数処理回路 21の数は 14 個であり、 各 I関数処理回路 21で使用される拡大鍵数は、 4つの系統毎に 32 ビッ卜の拡大鍵を使用するとすれば、 56個の拡大鍵が必要となる。 また、 図 1 4で示すデ一夕スクランブル回路 20では、 I関数処理回路 21の数は 1 6個で あり、 各 I関数処理回路 21で使用される拡大鍵数は、 4つの系統毎に 32ピッ 卜の拡大鍵を使用するとすれば、 64個の拡大鍵が必要となる。 〈B関数処理回路〉 When the encryption key is 128 bits, as shown in FIG. 2, after the I function processing circuit 21, the B function processing circuit 22, the I function processing circuit 21, the R function processing circuit 23, Six processing blocks 24 each composed of an R function processing circuit 23 and an I function processing circuit 21 are connected, and then a B function processing circuit 22 and an I function processing circuit 21 are connected in this order. When the encryption key is 192-bit / 256-bit, as shown in FIG. 14, after the I function processing circuit 21, the B function processing circuit 22 and the I function processing Processing block 24 composed of circuit 21, R function processing circuit 23, R function processing circuit 23, and I function processing circuit 21 7 and then connect the B function processing circuit 22 and the I function processing circuit 21 in order.In the data scramble circuit 20 shown in Fig. 2, the number of I function processing circuits 21 is 14, and each I function processing circuit As for the number of extended keys used in the circuit 21, 56 extended keys are required if a 32-bit extended key is used for each of the four systems. In the descramble scramble circuit 20 shown in FIG. 14, the number of I function processing circuits 21 is 16 and the number of expanded keys used in each I function processing circuit 21 is 32 for every four systems. If a pit expansion key is used, 64 expansion keys are required. <B function processing circuit>
B関数処理回路 22は、 図 1 1に示すような回路構成とすることができる。 B関数処理回路 22は、 32ビヅト X4の入力データを 4ビッ卜 x32の入力 データに変換する入力データ変換部 61と、 非線形処理を行う 32個の 4ビッ卜 S box 62と、 4ビッ卜 X 32の出力データを 32ビッ卜 x 4の出力データに 変換する出力データ変換部 63とを備えている。  The B function processing circuit 22 can have a circuit configuration as shown in FIG. The B function processing circuit 22 includes an input data conversion unit 61 that converts 32-bit X4 input data into 4-bit x32 input data, 32 4-bit S boxes 62 that perform nonlinear processing, and a 4-bit X box. An output data conversion unit 63 for converting 32 output data into 32-bit x 4 output data is provided.
4.ビッ卜 Sbox62は、 図 1 1 (b) に示すように、 入力 ( a i , b i , c i , d i ) を (Ai , Bi, C i , D i ) に変換する非線形処理を行うものであ o 〈R関数処理回路〉  4. Bit Sbox62 performs non-linear processing to convert the input (ai, bi, ci, di) into (Ai, Bi, Ci, Di) as shown in Fig. 11 (b). o <R function processing circuit>
R関数処理回路 23は、 図 1 2に示すような回路構成とすることができる。 R関数処理回路 23は、 32ビット X4の入力デ一夕 (a, b, c, d) に対 して、 32ビット X 4の出力デ一タ (e , f , g , h ) を備えるものである。 入力データ (a, b, c, d) のうち、 入力データ c, dが入力される F関数 処理回路 73と、 F関数処理回路 73の 32ビット X 2の出力データのうち一方 と入力データ aとの排他的論理和を演算する XOR回路 71と、 F関数処理回路 73の 32ビッ卜 X 2の出力データのうち他方と入力データ bとの排他的論理和 を演算する X OR回路 72とを備えている。 XO R回路 71の出力が出力データ e、 XOR回路 72の出力が出力データ f、 入力 c, dがそれぞれ出力 g , f と なる, The R function processing circuit 23 can have a circuit configuration as shown in FIG. The R function processing circuit 23 has a 32-bit X4 output data (e, f, g, h) for a 32-bit X4 input data (a, b, c, d). It is. Among the input data (a, b, c, d), the F function processing circuit 73 to which the input data c and d are input, and one of the 32-bit X 2 output data of the F function processing circuit 73 and the input data a An XOR circuit 71 that performs an exclusive OR operation with the input data b and an XOR circuit 71 that performs an exclusive OR operation with the input data b of the 32-bit X2 output data of the F function processing circuit 73 Have. The output of the XOR circuit 71 is the output data e, the output of the XOR circuit 72 is the output data f, and the inputs c and d are the outputs g and f, respectively. Become,
〈F関数処理回路〉 <F function processing circuit>
図 1 2に示す F関数処理回路は、 図 1 3に示すような回路構成とすることがで きる。  The F function processing circuit shown in FIG. 12 can have a circuit configuration as shown in FIG.
F関数処理回路 73では、 32ビット X 2の入力データは、 それぞれ 2つの 6ビヅ卜 S b o X 74と、 4つの 5ビット S b o X 75に入力される。各 S b o x 74 , 75では、 それぞれのビヅ卜での非線形処理が行われ、 MDSを用いた XOR計算装置 76にその出力を入力する。 MD Sを用いた XOR計算装置 76 では、所定の非線形処理を実行し、 その出力を乗算回路 77, 78および XOR 回路 79, 80に出力する。乗算回路 77では、 入力される値と 0x55555555また は 0x33333333を乗算する。 また、 乗算回路 78では、 入力される値と Oxaaaaaaa aまたは Oxccccccccを乗算する。 0[¾回路79では、 乗算回路 77の出力と他方 の MD Sを用いた XOR計算装置 76の出力との排他的論理和を演算する。 また 、 XOR回路 80では、 乗算回路 78の出力と他方の MD Sを用いた X OR計算 装置 76の出力との排他的論理和を演算する。  In the F function processing circuit 73, the input data of 32 bits X2 is input to two 6-bit Sbox 74 and four 5-bit SBox 75, respectively. In each of the Sbox 74 and 75, nonlinear processing is performed on each bit, and the output is input to an XOR calculation device 76 using MDS. The XOR calculation device 76 using the MDS executes a predetermined nonlinear process, and outputs its output to the multiplication circuits 77 and 78 and the XOR circuits 79 and 80. The multiplication circuit 77 multiplies the input value by 0x55555555 or 0x33333333. The multiplication circuit 78 multiplies the input value by Oxaaaaaaaa or Oxcccccccc. 0 [¾ The circuit 79 calculates the exclusive OR of the output of the multiplication circuit 77 and the output of the XOR calculation device 76 using the other MDS. The XOR circuit 80 calculates an exclusive OR of the output of the multiplication circuit 78 and the output of the XOR calculation device 76 using the other MDS.
このようなデ一タスクランプル回路 20で使用される拡大鍵を生成するための 暗号鍵処理回路 3の一例を図 3、 図 4に示す。 図 3は中間鍵生成回路の一例を示 し、 図 4は拡大鍵生成回路の一例を示すものである。 図 3に示す中間鍵生成回路 40は、 8つの M関数処理回路 41と、 奇数番目の M関数処理回路 41に対応する加算回路 42と、偶数番目の M関数処理回路 41 に対応する乗算回路 43と、 上位から順に隣接する加算回路 42および乗算回路 43の出力データが入力される XO R回路 44と、 XO R回路 44の出力デ一夕 に対して非線形関数処理を行う M関数処理回路 45とを備えている。 FIGS. 3 and 4 show an example of an encryption key processing circuit 3 for generating an extended key used in such a destruction circuit 20. FIG. FIG. 3 shows an example of the intermediate key generation circuit, and FIG. 4 shows an example of the extended key generation circuit. The intermediate key generation circuit 40 shown in FIG. 3 includes eight M function processing circuits 41, an addition circuit 42 corresponding to odd-numbered M function processing circuits 41, and a multiplication circuit 43 corresponding to even numbered M function processing circuits 41. And an XOR circuit 44 to which the output data of the adjacent addition circuit 42 and multiplication circuit 43 are input in order from the top, and an M function processing circuit 45 for performing a non-linear function process on the output data of the XOR circuit 44. It has.
各処理回路はそれぞれ 32ビッ卜データの処理が可能な構成となっており、 暗 号鍵から変換された 32ピッ卜 X 8の入力データがそれぞれ 8つの M関数処理回 路 41に入力される。 暗号鍵が 1 28ビヅ卜の場合には、 上位ビヅ卜から 32ビ ッ卜毎に分割された 4つのデータ k 0, k 1 , k 2, 1<3から、 (! 0, k 1 , k 2, k 3, kO, k 1, k 2, k 3 ) の順に配置された入力データ群を作成し、 各入力データを M関数処理回路 41に入力するように構成する。 また、 暗号鍵が 192ビヅ 卜の場合には、 同様に上位ビッ卜から 32ビヅ卜毎に分割された 6つ のデ一タ kO, k 1 , k 2 , k 3, k 4, 1<5から、 (1 0, k 1 , k2, k 3 , k4, k 5, k 0, k 1 ) の順に配置された入力デ一夕群を作成し、 各入力デー タを M関数処理回路 41に入力するように構成する。 さらに、 暗号鍵が 256ピ ッ卜の場合には、 同様に上位ビッ卜から 32ビヅ卜毎に分割された 8つのデータ k 0 , k 1 , k 2, k 3 , k 4, k 5, k 6 , k7から、 (k0, k 1 , k 2, k 3, k4, k 5, k 6, k 7 ) の順に配置された入力データ群を作成し、 各入力 データを M関数処理回路 41に入力するように構成する。 Each processing circuit is configured to be capable of processing 32-bit data, and the 32-bit X8 input data converted from the encryption key is used to process eight M-functions. Entered in Road 41. If the encryption key is 128 bits, the four data k 0, k 1, k 2, 1 <3 divided from the upper bit every 32 bits, (! 0, k 1 , k 2, k 3, kO, k 1, k 2, k 3) are generated in this order, and each input data is input to the M function processing circuit 41. When the encryption key is 192 bits, six data kO, k1, k2, k3, k4, 1 are similarly divided from the upper bit every 32 bits. From <5, a group of input data arranged in the order of (10, k1, k2, k3, k4, k5, k0, k1) is created, and each input data is processed by the M function processing circuit. Configure to input to 41. Further, when the encryption key is 256 bits, similarly, eight data k 0, k 1, k 2, k 3, k 4, k 5, which are divided from the upper bit every 32 bits From k6 and k7, an input data group arranged in the order of (k0, k1, k2, k3, k4, k5, k6, k7) is created, and each input data is processed by the M function processing circuit 41. It is configured to input to.
M関数処理回路 41のうち、 上位から奇数番目に位置するものについては、 そ の出力が加算回路 42に入力されている。 この加算回路 42は、 入力データに所 定値 M (4 i )、 M (41 + 1 ) M (4 i +2)、 M (4 i +3) のうちいずれか を加算するものであり、 インデックス iの値 0~ 2に対応して 3重化されている 。所定値 M (4 i )、 M (4 i + 1 )、 M (4 i +2)、 M (4i +3)は、 それぞ れ 4 i、 4 i +1、 4 i + 2、 4 + 3を非線形関数である M関数で処理した固 定値であり、 ィンデヅクス iの値 0〜 2に対応してそれぞれ 3個の値をとるよう に構成されている。  The output of the M function processing circuit 41 that is located at the odd-numbered position from the higher order is input to the addition circuit 42. The adder circuit 42 adds one of the predetermined values M (4 i), M (41 + 1), M (4 i +2), and M (4 i +3) to the input data. It is tripled corresponding to the value 0 to 2 of i. The predetermined values M (4i), M (4i + 1), M (4i + 2), and M (4i + 3) are 4i, 4i + 1, 4i + 2, 4+, respectively. 3 is a fixed value processed by an M function that is a non-linear function, and is configured to take three values each corresponding to the value 0 to 2 of the index i.
M関数処理回路 41のうち、 上位から偶数番目に位置するものについては、 そ の出力が乗算回路 43に入力されている。 この乗算回路 43は、 入力データに所 定値 i +1を乗算するものであり、 インデックス iの値 0〜2に対応して 3重化 されている。 インデックス iの値は、 拡大鍵生成時のキ一スケジューリングに用 いられるインデックス値と同等であり 0〜2の値をとり、 これに対応して所定値 i + 1の値もそれぞれ 3個の値をとるように構成されている。  Of the M function processing circuits 41, the output of the even-numbered one from the higher order is input to the multiplication circuit 43. The multiplication circuit 43 multiplies input data by a predetermined value i + 1, and is tripled in correspondence with the values 0 to 2 of the index i. The value of the index i is equivalent to the index value used for key scheduling at the time of generating an expanded key, and takes a value of 0 to 2, and correspondingly, the value of the predetermined value i + 1 is also three values each. It is configured to take.
上 filから隣接する加算回路 42および乗算回路 43の出力データはそれぞれ X OR回路 44に入力される。各 XOR回路 44は、 加算回路 42の出力値と乗算 回路 43の出力値の排他的論理和を演算するものであり、 加算回路 42および乗 算回路 43に対応して 3重化されている。 The output data of the adjacent addition circuit 42 and multiplication circuit 43 from the upper fil are input to the XOR circuit 44, respectively. Each XOR circuit 44 calculates the exclusive OR of the output value of the addition circuit 42 and the output value of the multiplication circuit 43. It is tripled in accordance with the arithmetic circuit 43.
各 XOR回路 44に対応して、 その出力データを M関数処理するための M関数 処理回路 45が設けられている。 この M関数処理回路 45も、 加算回路 42, 乗 算回路 43および X 0 R回路 44に対応して 3重化されている。  For each XOR circuit 44, an M function processing circuit 45 for processing the output data of the XOR circuit 44 is provided. The M function processing circuit 45 is also tripled in correspondence with the addition circuit 42, the multiplication circuit 43 and the XOR circuit 44.
このことから、 中間鍵生成回路 40は中間鍵 (a i , b i , c i , d i ) を出 力するものであり、 インデックス iの値に応じて 3重化された M関数処理回路 4 5からそれぞれ中間鍵 (a 0 , b 0 , c 0, d 0)、 (a 1 , b 1 , c 1 , d 1 )、 (a 2, b 2, c 2, d 2) が出力される。 〈M関数処理回路〉  From this, the intermediate key generation circuit 40 outputs the intermediate key (ai, bi, ci, di), and outputs the intermediate key from the M function processing circuit 45, which is tripled according to the value of the index i. The keys (a 0, b 0, c 0, d 0), (a 1, b 1, c 1, d 1), and (a 2, b 2, c 2, d 2) are output. <M function processing circuit>
非線形関数である M関数処理について、 図 1 8、 図 1 9を用いて説明する。 図 1 8 (a) は、 M関数処理回路の構成例を示す。 この M関数処理回路 41は 、 32ビヅ卜の入力データ mで 32ビヅトの出力 wを生成するものとする。 M関 数処理回路 41は、 2つの 6ビット S b o X 46と、 4つの 5ビット S b o x 4 7と、 MD Sを用いた XO R計算装置 48とを備えている。 この 6ビッ卜 S b o x46、 5ビット S b o x 47、 M D Sを用いた X 0 R計算装置 48の構成は、 前述した F関数処理回路 73の 6ビット S b o x 74、 5ビット S bo x 75お よび MD Sを用いた XO R計算装置 76と同等のものを用いることができる。 このような M関数処理回路 41を用いて非線形関数処理を行う際の工程を以下 に示す。  The processing of the M function, which is a nonlinear function, will be described with reference to FIGS. FIG. 18 (a) shows a configuration example of the M function processing circuit. The M function processing circuit 41 generates a 32-bit output w with a 32-bit input data m. The M function processing circuit 41 includes two 6-bit SBoXs 46, four 5-bit SBoX47s, and an XOR calculation device 48 using MDS. The configuration of the 6-bit S bo x46, the 5-bit S box 47, and the XOR calculation device 48 using the MDS includes the 6-bit S box 74, the 5-bit S bo x 75, and the 5-bit S box 74 of the F function processing circuit 73 described above. A device equivalent to the XOR calculation device 76 using MDS can be used. The steps in performing the nonlinear function processing using such an M function processing circuit 41 will be described below.
(a) 32ビットの入力データを上位から順に、 6, 5, 5, 5, 5, 6ビヅ 卜の 6つの入力データ m0, m 1 , m 2 , m 3 , m 4 , m 5に分割する。  (a) Divide 32-bit input data into six, five, five, five, five, and six bits of six input data m0, m1, m2, m3, m4, and m5 in order from the top I do.
(b) 5ビットに分割した入力データ m 1 , m 2 , m 3 , m 4を、 それぞれ 5 ビヅ卜 S b o x 47に入力し、 図 1 8 (b) の S 5 (x) の表に従って、 該当す る Xに対応した S 5 (X) の値にそれぞれ変換する。  (b) Input data m 1, m 2, m 3, and m 4 divided into 5 bits are input to a 5-bit S box 47, respectively, according to the table of S 5 (x) in FIG. 18 (b). , Is converted to the value of S 5 (X) corresponding to the corresponding X.
(c) 6ビットに分割した入力データ m0, m 5は、 それぞれ 6ビヅ 卜 S b o X 46に入力し、 図 1 8 ( c) の S 6 (X) の表に従って、該当する Xに対応す る S 6 (X) の値にそれぞれ変換する。  (c) The input data m0 and m5 divided into 6 bits are respectively input to the 6-bit SboX46, and correspond to the corresponding X according to the table of S6 (X) in FIG. 18 (c). To the value of S 6 (X).
(d)各 S b ox46, 47の出力 S 0〜S 5より 32ビヅ 卜の中間データ v が生成される。 (d) 32 bits of intermediate data v from the outputs S 0 to S 5 of each S box 46, 47 Is generated.
(e) この 32ビッ卜の中間データ Vを MD Sを用いた XOR計算装置 48に 入力し、 その出力 wを演算結果として得る。 ここでは、 図 1 9 (a) で示す MD S (X ) の値を、 対応するビヅ卜 Xに応じて、 図 1 9 ( b ) に模式的に示す行列 式に移動し、 中間データ Vとの間で行列演算を行う。  (e) The 32-bit intermediate data V is input to the XOR calculator 48 using MDS, and the output w is obtained as the operation result. Here, the value of MD S (X) shown in FIG. 19 (a) is moved to the determinant schematically shown in FIG. 19 (b) according to the corresponding bit X, and the intermediate data V Perform a matrix operation between.
このような M関数処理回路は、 図 3の M関数処理回路 41、 45のいずれにも 適用することができる。 図 4に示す拡大鍵生成回路 50は、 4つの 32ビット入力データ X, Y, 1, \Nヒ、 32ビッ ト出力 K nを備えている。 入力データ Xがローテ一トシフ卜回路 51に入力されている。 ローテ一卜シフ卜回路 51の出力と入力データ Yが加算 回路 52に入力されている。 また、 入力データ Zがローテ一トシフ卜回路 53に 入力されている。 口一テートシフト回路 53の出力と入力データ Wが減算回路 5 4に入力されている。 減算回路 54の出力はローテ一トシフ卜回路 55に入力さ れている。 さらに、 加算回路 52の出力とローテ一卜シフ卜回路 55の出力が X OR回路 56に入力されている。 この XOR回路 56の出力がこの拡大鍵生成回 路 50の出力 K nとなる。  Such an M function processing circuit can be applied to any of the M function processing circuits 41 and 45 in FIG. The extended key generation circuit 50 shown in FIG. 4 has four 32-bit input data X, Y, 1, \ N and a 32-bit output Kn. The input data X is input to the rotate shift circuit 51. The output of the rotation shift circuit 51 and the input data Y are input to the addition circuit 52. The input data Z is input to the rotation shift circuit 53. The output of the bit shift circuit 53 and the input data W are input to the subtraction circuit 54. The output of the subtraction circuit 54 is input to the rotation shift circuit 55. Further, the output of the adder circuit 52 and the output of the rotation shift circuit 55 are input to the XOR circuit 56. The output of the XOR circuit 56 is the output Kn of the extended key generation circuit 50.
暗号鍵が 1 28ビッ トである場合には、 このように構成した拡大鍵生成回路 5 0を 56個用意することにより、 図 2に示すデータスクランブル回路 20で使用 する拡大鍵に対応させることができる。 暗号鍵が 1 92/256ビットである場 合には、 このように構成した拡大鍵生成回路 50を 64個用意することにより、 図 1 4に示すデータスクランブル回路 20で使用する拡大鍵に対応させることが 可能となる。  If the encryption key is 128 bits, 56 expansion key generation circuits 50 configured as described above are prepared to correspond to the expansion key used in the data scramble circuit 20 shown in FIG. it can. When the encryption key is 192/256 bits, 64 expansion key generation circuits 50 configured as described above are prepared to correspond to the expansion key used in the data scramble circuit 20 shown in FIG. It becomes possible.
各拡大鍵生成回路 50では、 表 1に示すオーダーテーブルと、 表 2に示すイン デヅクステーブルに基づくキースケジューリングにより、 中間鍵生成回路 40か らそれぞれ対応する中間鍵が入力され、 n = 00〜55もしくは n = 00〜63 に対応する拡大鍵 K nが生成される。  In each expanded key generation circuit 50, the corresponding intermediate key is input from the intermediate key generation circuit 40 by key scheduling based on the order table shown in Table 1 and the index table shown in Table 2, and n = 00 to 55 or An extended key K n corresponding to n = 00 to 63 is generated.
【表 1】 t X Y Z W 【table 1】 t XYZW
0 a b c d  0 a b c d
1 b a d c  1 b a d c
2 c d a b  2 c d a b
3 d c b a  3 d c b a
4 a c d b  4 a c d b
5 b d c a  5 b d c a
6 c a b d  6 c a b d
7 cl b a c  7 cl b a c
8 a d b c  8 a d b c
9 b c a d  9 b c a d
10 c b d a  10 c b d a
11 d a c b  11 d a c b
【表 2】 [Table 2]
ここで、 キースケジューリング K nと、 才一ダ一パラメータ t、 インデックス パラメータ sの関係は次のように表すことができる。 Here, the relationship between the key scheduling K n, the unique parameter t, and the index parameter s can be expressed as follows.
t= (n+ L n/36」) mod 1 2  t = (n + L n / 36 ") mod 1 2
s = n mod 9  s = n mod 9
1 28ビヅ 卜の暗号鍵および図 2に示すようなデータスクランブル回路 20を 用いて暗号化を行う場合には、 n = 0 0〜5 5の値に基づいて、 オーダ一パラメ —タ tとィンデヅクスパラメータ sが決定される。 ここで決定されたオーダーパ ラメータ tから表 1のオーダ一テーブルを参照してオーダ一 (a , b , c , d ) を決定し、 ィンデヅクスパラメータ sから表 2のィンデヅクステーブルを参照し てインデックス (i ) を決定する。 これにより、 拡大鍵生成回路 5 0の入力デ一 タ X , Y, Z , Wに対して中間鍵生成回路 4 0から入力する中間鍵を決定し、 拡 大鍵 K nを得る。 この拡大鍵生成回路 5 0で生成される拡大鍵 Κ ηを、 η = 0 0 〜5 5の順に最初から 4個づっ I関数処理回路 2 1に入力することにより暗号化 を行うことができる。 データスクランブル回路 2 0により復号化を行う場合には 、 拡大鍵生成回路 5 0で生成される拡大鍵 Κ ηを、 η = 5 5〜0 0の順で I関数 処理回路 2 1に入力する。 A 128-bit encryption key and a data scramble circuit 20 as shown in FIG. In the case of performing encryption using the parameters, the order parameter t and the index parameter s are determined based on the values of n = 0 to 55. The order (a, b, c, d) is determined by referring to the order table of Table 1 from the order parameter t determined here, and the index of Table 2 is determined from the index parameter s. The index (i) is determined by referring to the table. Thus, the intermediate key input from the intermediate key generation circuit 40 is determined for the input data X, Y, Z, W of the expansion key generation circuit 50, and the expansion key Kn is obtained. The extended key ηη generated by the extended key generation circuit 50 is input to the I function processing circuit 21 in the order of η = 0 to 55 in the order of η = 0 to 55, thereby performing encryption. When decryption is performed by the data scramble circuit 20, the expanded key ηη generated by the expanded key generation circuit 50 is input to the I function processing circuit 21 in the order of η = 55 to 00.
また、 1 9 2 / 2 5 6ビッ 卜の暗号鍵および図 1 4に示すようなデータスクラ ンプル回路 2 0を用いて暗号化を行う場合には、 η = 0 0〜6 3の値に基づいて 、 才一ダ一パラメータ tおよびインデックスパラメ一夕 sを決定し、 オーダ一テ —プルおよびインデックステーブルからオーダ一 (a , b , c , d ) とインデッ クス (i ) を決定し、 これに基づいて入力される中間鍵から拡大鍵 K nを生成す る。 この拡大鍵生成回路 5 0で生成される拡大鍵 K nを、 n = 0 0〜6 3の順に 最初から 4個づっ I関数処理回路 2 1に入力することにより暗号化を行うことが できる。 デ一夕スクランブル回路 2 0により復号化を行う場合には、 拡大鍵生成 回路 5 0で生成される拡大鍵 K nを、 n = 6 3〜0 0の順で I関数処理回路 2 1 に入力する。 この第 1実施形態では、 拡大鍵生成回路 5 0で使用する中間鍵を中間鍵生成回 路 4 0で逐次生成するように構成でき、 データスクランブル回路 2 0によるデ一 タスクランブル処理に先立つ前処理段階を短縮することができ、 暗号化/復号化 に要する時間を短縮することが可能となる。  When encryption is performed using a 192 / 256-bit encryption key and a data scrambling circuit 20 as shown in FIG. 14, the values of η = 0 to 63 are used. The order parameter (a, b, c, d) and the index (i) are determined from the order table and the index table, and the order parameter (t) and the index parameter (s) are determined. Generates an expanded key Kn from the intermediate key input based on the key. Encryption can be performed by inputting four expanded keys K n generated by the expanded key generation circuit 50 to the I function processing circuit 21 in the order of n = 0 to 63 from the beginning. When decryption is performed by the data scramble circuit 20, the expanded key K n generated by the expanded key generation circuit 50 is input to the I function processing circuit 21 in the order of n = 63 to 00. I do. In the first embodiment, the intermediate key used by the extended key generation circuit 50 can be sequentially generated by the intermediate key generation circuit 40, and the pre-processing prior to the de-task ramble processing by the data scramble circuit 20 can be performed. The number of steps can be reduced, and the time required for encryption / decryption can be reduced.
〔第 2実施形態〕 (Second embodiment)
第 1実施形態で示したようなデ—タスクランブル回路 2 0および拡大鍵生成回 路 5 0を用いる場合には、 処理時間を短縮できるものの、 回路規模が大きくなる という問題を包含している。 このため、 データスクランブル回路の一部にクロヅ ク同期ル一プを構成し、 拡大鍵生成回路での処理もデータスクランブル回路のク ロックに同期して処理を実行するようにすることが考えられる。 そのような回路 の一例を第 2実施形態として示す。 The data scramble circuit 20 and the extended key generation circuit as shown in the first embodiment When the path 50 is used, although the processing time can be reduced, the problem that the circuit scale becomes large is included. For this reason, it is conceivable that a clock synchronization loop is formed in a part of the data scramble circuit, and the processing in the extended key generation circuit is also executed in synchronization with the clock of the data scramble circuit. An example of such a circuit is shown as a second embodiment.
図 5は第 2実施形態に採用される拡大鍵生成回路の構成例であり、 図 6は第 2 実施形態で採用されるデ一タスクランブル回路の構成例である。 図 6に示すデ一タスクランブル回路 2 0 0では、 1 2 8ビッ トのブロック単位 で暗号化/復号化を行うために、 3 2ビット X 4の入力データバス a , b , c , dと、 3 2ビッ ト x 4の出力データバス e , f , g, hを備えている。  FIG. 5 is a configuration example of an extended key generation circuit employed in the second embodiment, and FIG. 6 is a configuration example of a detask ramble circuit employed in the second embodiment. In the de-task ramble circuit 200 shown in FIG. 6, in order to perform encryption / decryption in units of 128-bit blocks, a 32-bit X4 input data bus a, b, c, d is used. , 32 bits x 4 output data buses e, f, g, h.
このデ一夕スクランブル回路 2 0 0には、 第 1 I関数処理回路 2 0 1 と、 第 2 I関数処理回路 2 0 3、 第 1 R関数処理回路 2 0 4、 第 2 R関数処理回路 2 0 5 、 第 3 1関数処理回路 2 0 6が順に接続される処理ブロック 2 1 0と、 第 1 I関 数処理回路 2 0 1の出力と処理ブロック 2 1 0の出力とを選択的に出力するセレ クタ 2 0 8と、 セレクタ 2 0 8の出力が接続される B関数処理回路 2 0 2と、 B 関数処理回路 2 0 2の出力をクロック周期毎にラッチして処理ブロック 2 1 0に 入力するレジスタ 2 0 9と、 レジスタ 2 0 9の出力が接続される第 4 I関数処理 回路 2 0 7とを備えている。 また、 データスクランブル回路 2 0 0は、 第 2 1関 数処理回路 2 0 3で使用する拡大鍵を一時的に格納するためのレジスタ 2 1 1を 備えている。  The overnight scramble circuit 200 includes a first I function processing circuit 201, a second I function processing circuit 203, a first R function processing circuit 204, and a second R function processing circuit 2 0 5, the processing block 2 10 connected to the 31st function processing circuit 206 in order, and the output of the 1st I function processing circuit 201 and the output of the processing block 210 are selectively output. Selector 208, the B-function processing circuit 202 to which the output of the selector 208 is connected, and the output of the B-function processing circuit 202 are latched for each clock cycle to be processed by the processing block 210. It has a register 209 for input, and a fourth I function processing circuit 207 to which the output of the register 209 is connected. In addition, the data scramble circuit 200 includes a register 211 for temporarily storing an expanded key used in the 21st function processing circuit 203.
このように構成されたデータスクランブル回路 2 0 0では、 セレクタ 2 0 8を 適宜切り換えることにより、 第 1 I関数処理回路 2 0 1、 B関数処理回路 2 0 2 による処理を実行した後、 第 2 I関数処理回路 2 0 3、 第 1 R関数処理回路 2 0 4、 第 2 R関数処理回路 2 0 5、 第 3 I関数処理関数 2 0 6の処理ブロック 2 1 0と B関数処理回路 2 0 2を含むクロック同期ループを複数回繰り返した後、 第 4 I関数処理回路 2 0 7による処理を実行するように構成できる。  In the data scramble circuit 200 configured as described above, by appropriately switching the selector 208, the processing by the first I function processing circuit 201 and the B function processing circuit 202 is performed, and then the second processing is performed. I function processing circuit 203, first R function processing circuit 204, second R function processing circuit 205, third I function processing function 206 processing block 210 and B function processing circuit 210 After repeating the clock synchronous loop including step 2 a plurality of times, the processing by the fourth I function processing circuit 207 can be executed.
最初のクロックでは、 セレクタ 2 0 8が第 1 I関数処理回路 2 0 1側に切り換 えられており、 入力データ a, b , c , dは、 第 1 I関数処理回路 2 0 1で処理 された後、 セレクタ 2 0 8を経由して B関数処理回路 2 0 2により B関数処理が 実行され、 レジスタ 2 0 9にその値が保持される。 At the first clock, the selector 208 is switched to the first I function processing circuit 201, and the input data a, b, c, and d are processed by the first I function processing circuit 201. After that, the B function processing circuit 202 executes the B function processing via the selector 208, and the value is held in the register 209.
次のクロックでは、 セレクタ 2 0 8が処理ブロック 2 1 0側に切り換えられて おり、 レジスタ 2 0 9から出力されたデータは、 処理ブロック 2 1 0により I― R— R— Iの各関数処理が実行され、 セレクタ 2 0 8を経由して B関数処理回路 2 0 2による B関数処理が実行されてレジスタ 2 0 9にその値が保持される。  At the next clock, the selector 208 is switched to the processing block 210 side, and the data output from the register 209 is processed by the processing block 210 to process each function of I-R-R-I. Is executed, the B function processing circuit 202 executes the B function processing via the selector 208, and the value is held in the register 209.
この後、 鍵長 1 2 8ビヅ 卜の暗号鍵を用いる場合には、 処理ブロック 2 1 0と B関数処理回路 2 0 2で構成される I-R-R-I-Bのループ処理を 5回実行し、 さらに 第 4 I関数処理回路 2 0 7による処理を実行して、 出力デ一夕 e, f , g , hを 得る。  Thereafter, when an encryption key having a key length of 128 bits is used, the IRRIB loop processing composed of the processing block 210 and the B function processing circuit 202 is executed five times, and the fourth The processing by the I function processing circuit 207 is executed to obtain output data e, f, g, and h.
このように、 図 6に示すデータスクランブル回路 2 0 0で、 第 1 I関数処理回 路 2 0 1、 B関数処理回路 2 0 2での I-B処理を実行し、 その後、 処理ブロック 2 1 0と B関数処理回路 2 0 2で構成される I-R-R-I-Bのループ処理を 6回繰り返し 、 さらに第 4 I関数処理回路 2 0 7による I処理を実行することにより、 図 2に示 すデータスクランブル回路 2 0と同等の機能を実現している。 このような図 6に示すデータスクランブル回路 2 0 0で用いる拡大鍵を生成す るための拡大鍵生成回路を図 5に示す。  In this way, the data scramble circuit 200 shown in FIG. 6 executes the IB processing in the first I function processing circuit 201 and the B function processing circuit 202, and then performs the processing block 210 By repeating the IRRIB loop processing composed of the B function processing circuit 202 six times and further performing the I processing by the fourth I function processing circuit 207, the data scramble circuit 20 shown in FIG. Equivalent functions are realized. FIG. 5 shows an extended key generation circuit for generating an extended key used in the data scramble circuit 200 shown in FIG.
図 5に示す拡大鍵生成回路 5 0 0は、 Xセレクタ 5 0 1 , Yセレクタ 5 0 2 , Zセレクタ 5 0 3 , Wセレクタ 5 0 4の 4つのセレクタを備えている。 Xセレク タ 5 0 1 , Yセレクタ 5 0 2 , Zセレクタ 5 0 3, Wセレクタ 5 0 4は、 それそ- れ図 4に示す拡大鍵生成回路 5 0の入力データパス X , Y, I , Wに対応してお り、 図 3に示す中間鍵生成回路 4 0から出力される中間鍵 (a i , b i , c i , d ) のすべてが入力側に接続されている。  The expanded key generation circuit 500 shown in FIG. 5 includes four selectors: an X selector 501, a Y selector 502, a Z selector 503, and a W selector 504. The X selector 501, the Y selector 502, the Z selector 503, and the W selector 504 are respectively input data paths X, Y, I, All of the intermediate keys (ai, bi, ci, d) output from the intermediate key generation circuit 40 shown in FIG. 3 are connected to the input side.
この拡大鍵生成回路 5 0 0では、 Xセレクタ 5 0 1の出力がローテ一卜シフト 回路 5 0 5に入力されている。 ローテ一トシフ卜回路 5 0 5の出力と Yセレクタ 5 0 2の出力が加算回路 5 0 6に入力されている。 また、 Zセレクタ 5 0 3の出 力がローテ一トシフ卜回路 5 0 7に入力されている。 ローテ一卜シフ卜回路 5 0 7の出力と Wセレクタ 5 0 4の出力が減算回路 5 0 8に入力されている。 減算回 路 5 0 8の出力はローテ一卜シフト回路 5 0 9に入力されている。 さらに、 加算 回路 5 0 6の出力とローテ一トシフ卜回路 5 0 9の出力が X O R回路 5 1 0に入 力されている。 この X O R回路 5 1 0の出力がこの拡大鍵生成回路 5 0 0の出力 K nとなる。 In the expanded key generation circuit 500, the output of the X selector 501 is input to the rotation shift circuit 505. The output of the rotate shift circuit 505 and the output of the Y selector 502 are input to the adder circuit 506. The output of the Z selector 503 is input to the rotation shift circuit 507. The output of the rotation shift circuit 507 and the output of the W selector 504 are input to the subtraction circuit 508. Subtraction times The output of the path 508 is input to the rotation shift circuit 509. Further, the output of the adder circuit 506 and the output of the rotate shift circuit 509 are input to the XOR circuit 510. The output of the XOR circuit 500 becomes the output Kn of the extended key generation circuit 500.
図 6で示すデータスクランブル回路 2 0 0では、 各ク口ックにおいて 3 2ビッ 卜 X 4の拡大鍵が 2セッ 卜必要であり、 これに対応して図 5で示す拡大鍵生成回 路 5 0 0を 8個用意する。  In the data scramble circuit 200 shown in FIG. 6, two sets of 32 bit X4 expanded keys are required for each packet, and correspondingly, the expanded key generation circuit 5 shown in FIG. Prepare 8 0 0s.
拡大鍵生成回路 5 0 0では、 表 1および表 2で示すオーダ一テ一プルとインデ ヅクステーブルに基づいて、 Xセレクタ 5 0 1 , Yセレクタ 5 0 2, Zセレクタ 5 0 3 , Wセレクタ 5 0 4に入力する中間鍵を選択し、 入力された中間鍵に基づ いて拡大鍵を生成してデータスクランブル回路 2 0 0に入力する。  In the extended key generation circuit 500, the X selector 501, the Y selector 502, the Z selector 503, and the W selector 500 are based on the order table and the index table shown in Tables 1 and 2. An intermediate key to be input to 4 is selected, an expanded key is generated based on the input intermediate key, and input to the data scramble circuit 200.
ここで、 拡大鍵生成回路 5 0 0で生成される 8個の拡大鍵を、 4つずつの 2つ のグループ A , Bに分け、 グル一プ Aの拡大鍵を現在の処理に使用し、 グループ Bの拡大鍵を次の処理のためにレジスタ 2 1 1に保存する。 最初のクロックでは 、 グループ Aの拡大鍵は第 1 I関数処理回路 2 0 1での I関数処理のために使用 し、 グループ Bの拡大鍵はレジス夕 2 1 1に保存する。 次のクロックでは、 レジ スタ 2 1 1に保存されたグループ Bの拡大鍵を使用して第 2 I関数処理回路 2 0 3の処理を実行する。 これとともに、 拡大鍵生成回路 5 0 0で 2セッ卜の拡大鍵 を生成し、 グループ Aの拡大鍵を用いて第 3 I関数処理回路 2 0 6での I関数処 理を実行し、 グループ Bの拡大鍵をレジスタ 2 1 1に保存する。 所定回数のルー プ処理を実行した後、 最後のループ処理時に生成した拡大鍵のうちレジスタ 2 1 1に保存されているグループ Bの鍵を用いて第 4 I関数処理回路 2 0 7での処理 が実行される。 鍵長 1 9 2 / 2 5 6ビッ トの暗号鍵を用いる場合には、 データスクランブル回 路 2 0.0で、 第 1 I関数処理回路 2 0 1、 B関数処理回路 2 0 2での I-B処理を実 行し、 その後、 処理ブロック 2 1 0と B関数処理回路 2 0 2で構成される I-R-H-I- Bのループ処理を 7回繰り返し、 さらに第 4 I関数処理回路 2 0 7による I処理を 実行することにより、 図 1 4に示すデ一夕スクランブル回路 2 0と同等の機能を 実現することができる。 このようにしたデータスクランブル回路 2 0 0および拡大鍵生成回路 5 0 0で は、 どのクロックにおいても拡大鍵を 2セット 8個生成して、 生成した拡大鍵を 有効に利用することができる。 また、 以前のクロックで生成したグループ Bの拡 大鍵を処理プロック 2 1 0の前段の第 2 I関数処理回路 2 0 3で使用するため、 グループ Bの拡大鍵生成時間が、 データスクランブルによる遅延時間に影響する ことがなくなり、 グループ Aの拡大鍵の生成遅延時間が処理ブロック 2 1 0の処 理時間内に納めることができる。 したがって、 拡大鍵生成時間がデ一タスクラン ブル処理の遅延時間に影響することがない。 Here, the eight expanded keys generated by the expanded key generation circuit 500 are divided into two groups A and B, each of which is four, and the expanded key of group A is used for the current processing. The expanded key of group B is stored in register 211 for the next processing. At the first clock, the extended key of group A is used for the I function processing in the first I function processing circuit 201, and the extended key of group B is stored in the register 211. At the next clock, the processing of the second I function processing circuit 203 is executed using the expanded key of the group B stored in the register 211. At the same time, two sets of expanded keys are generated by the expanded key generation circuit 500, and the I function processing is performed by the third I function processing circuit 206 using the expanded key of group A. Is stored in register 2 1 1. After executing the loop processing a predetermined number of times, the processing in the fourth I-function processing circuit 207 uses the group B key stored in the register 211 among the expanded keys generated in the last loop processing. Is executed. When using an encryption key with a key length of 19 2/256 bits, the data scramble circuit 20.0 performs IB processing in the first I function processing circuit 201 and the B function processing circuit 202. After that, the IRHI-B loop processing composed of the processing block 210 and the B function processing circuit 202 is repeated seven times, and then the I processing by the fourth I function processing circuit 207 is executed. As a result, the function equivalent to the data scramble circuit 20 shown in Fig. 14 is achieved. Can be realized. In the data scramble circuit 200 and the extended key generation circuit 500 in this manner, two sets of eight extended keys can be generated at any clock, and the generated extended keys can be used effectively. In addition, since the expanded key of group B generated by the previous clock is used in the second I function processing circuit 203 before the processing block 210, the expanded key generation time of group B is delayed by data scrambling. It does not affect the time, and the delay time for generating the expanded key of group A can be set within the processing time of processing block 210. Therefore, the expanded key generation time does not affect the delay time of the de-task ramble process.
〔第 2実施形態の変形例〕 (Modification of the second embodiment)
図 7に第 2実施形態のデータスクランブル回路 2 0 0の変形例を示す。  FIG. 7 shows a modification of the data scramble circuit 200 of the second embodiment.
ここでは、 図 6のデ一タスクランプル回路 2 0 0の B関数処理回路 2 0 2の出 力を第 4 I関数処理回路 2 0 7とレジスタ 2 0 9との両方に接続するように構成 している。  Here, the output of the B function processing circuit 202 of the de-task ripple circuit 200 in FIG. 6 is connected to both the fourth I function processing circuit 207 and the register 209. ing.
このことにより、 所定回数のループ処理を終了した際に、 最後の B関数処理回 路 2 0 2からの出力を、 レジスタ 2 0 9を介さずに第 4 I関数処理回路 2 0 7に 直接入力することができ、 データスクランブル処理におけるクロック数を 1つ減 少させることができる。 このようにした第 2実施形態およびその変形例では、 第 1実施形態と比較して 回路規模を削減することができ、 コストダウンを図ることが可能となる。 〔第 3実施形態〕  As a result, when a predetermined number of loop processes have been completed, the output from the last B function processing circuit 202 is directly input to the fourth I function processing circuit 207 without passing through the register 209. The number of clocks in the data scrambling process can be reduced by one. In the second embodiment and its modified example, the circuit scale can be reduced as compared with the first embodiment, and the cost can be reduced. (Third embodiment)
本発明の第 3実施形態による中間鍵生成回路を図 8に示す。  FIG. 8 shows an intermediate key generation circuit according to the third embodiment of the present invention.
図 8に示す中間鍵生成回路 4 0 0は、 2つのセレクタ 4 0 1、 4 0 2を備えて いる。 このセレクタ 4 0 1、 4 0 2はそれぞれ 4 X 3 2ビットデータから 1つを 選択して出力するように構成されている。鍵長 1 2 8ビッ 卜の暗号鍵を用いる場 合には、 暗号鍵を 32ビヅ 卜 X 4のデータ (k 0, k 1 , k 2, k 3) に変換し 、 セレクタ 401に入力する入力データを (k 0, k 2, kO, k 2) とし、 セ レクタ 402に入力する入力データを (k 1, k 3 , k 1, k 3) とする。 また 、 鍵長 1 92ビッ 卜の暗号鍵を用いる場合には、 暗号鍵を 32ビッ 卜 X 6のデー タ (1< 0, 1 1 , 1 2, 1 3, 1 4, 1< 5) に変換し、 セレクタ 401に入力す る入力デ一夕を (kO, k 2 , k 4 , k 0) とし、 セレクタ 402に入力する入 力データを (k 1 , k 3 , k 5 , k 1 ) とする。 さらに、 鍵長 256ビッ 卜の暗 号鍵を用いる場合には、 暗号鍵を 32ビッ ト X 8のデータ (k 0, k 1 , k 2 , k 3 , k 4, k 5 , k 6, k 7) に変換し、 セレクタ 401に入力する入力デ一 タを (k O, k 2, k 4 , k 6) とし、 セレクタ 402に入力する入力デ一タを (k 1 , k 3 , k 5 , k 7) とする。 The intermediate key generation circuit 400 shown in FIG. 8 includes two selectors 401 and 402. Each of the selectors 401 and 402 is configured to select and output one from 4 × 32-bit data. When using a 128-bit encryption key In this case, the encryption key is converted into 32-bit X4 data (k0, k1, k2, k3), and the input data to be input to the selector 401 is (k0, k2, kO, k 2), and the input data to be input to the selector 402 is (k1, k3, k1, k3). In addition, when an encryption key having a key length of 192 bits is used, the encryption key is used as 32-bit X6 data (1 <0, 11 1, 12, 13, 3, 14, 1 <5). The input data input to the selector 401 is converted into (kO, k2, k4, k0), and the input data input to the selector 402 is (k1, k3, k5, k1). And Furthermore, when using an encryption key with a key length of 256 bits, the encryption key is converted to 32-bit X8 data (k0, k1, k2, k3, k4, k5, k6, k 7), the input data to be input to the selector 401 is (kO, k2, k4, k6), and the input data to be input to the selector 402 is (k1, k3, k5). , k 7).
セレクタ 401、 402には、 それぞれ M関数処理を行うための M関数処理回 路 403, 404が接続されている。 この M関数処理回路 403, 404は前述 した M関数処理回路 41と同様の構成とすることができる。  M function processing circuits 403 and 404 for performing M function processing are connected to the selectors 401 and 402, respectively. The M function processing circuits 403 and 404 can have the same configuration as the M function processing circuit 41 described above.
—方の M関数処理回路 403には、 所定値を加算するための加算回路 405が 接続されている。 また、 他方の M関数処理回路 404には、 所定値を乗算するた めの乗算回路 406が接続されている。 加算回路 405は、 入力データに所定値 M (4 i )、 M (4 i + 1 )、 M (4 i + 2)、 M (4 i +3) のうちいずれかを加 算するものであり、 ィンデックス iの値 0〜2に対応して 3重化されている。 所 定値 M (4 i )、 M (4 i + 1 )s M (4 i +2)、 M (4 i + 3) は、 それぞれ 4 i、 4 i + 1、 4 i + 2、 4 i +3を非線形関数である M関数で処理した固定値 であり、 ィンデックス iの値 0〜2に対応してそれぞれ 3個の値をとるように構 成され、 これらを予め算出しておき R OM409内に格納している。 また、 乗算 回路 405は、 入力データに所定値 i +1を乗算するものであり、 インデックス iの値 0〜2に対応して 3重化されている。 インデックス iの値は、 拡大鍵生成 時のキ一スケジユーリングに用いられるィンデヅクス値と同等であり 0〜2の値 をとり、 これに対応して所定値 i + 1の値もそれぞれ 3個の値をとるように構成 されている。  An adder circuit 405 for adding a predetermined value is connected to the negative M function processing circuit 403. Further, the other M function processing circuit 404 is connected to a multiplication circuit 406 for multiplying a predetermined value. The adder circuit 405 adds one of predetermined values M (4 i), M (4 i + 1), M (4 i + 2), and M (4 i +3) to the input data. , Index i is tripled corresponding to the value 0-2. The specified values M (4 i), M (4 i + 1) s M (4 i +2) and M (4 i +3) are 4 i, 4 i + 1, 4 i + 2, 4 i +, respectively. 3 is a fixed value processed by an M function that is a non-linear function, and is configured to take three values each corresponding to the value of index i 0 to 2, and these are calculated in advance and stored in ROMOM409. Is stored in Further, the multiplication circuit 405 multiplies the input data by a predetermined value i + 1, and is tripled corresponding to the values 0 to 2 of the index i. The value of the index i is equivalent to the index value used for key scheduling when generating an expanded key, and takes a value of 0 to 2, and correspondingly, the value of the predetermined value i + 1 also corresponds to three values. It is configured to take a value.
加算回路 405の出力と乗算回路 406の出力はそれぞれ XOR回路 408に 入力される。 X O R回路 4 0 8は、 加算回路 4 0 5の出力値と乗算回路 4 0 6の 出力値の排他的論理和を演算するものであり、 加算回路 4 0 5および乗算回路 4 0 6に対応して 3重化されている。 The output of the addition circuit 405 and the output of the multiplication circuit 406 are respectively supplied to the XOR circuit 408. Is entered. The XOR circuit 408 calculates the exclusive OR of the output value of the addition circuit 405 and the output value of the multiplication circuit 406, and corresponds to the addition circuit 405 and the multiplication circuit 406. It is tripled.
X O R回路 4 0 8の出力は、 M関数処理するための M関数処理回路 4 1 0に接 続されている。 この M関数処理回路 4 1 0も、 加算回路 4 0 5 , 乗算回路 4 0 6 および X O R回路 4 0 8に対応して 3重化されている。  The output of the XOR circuit 408 is connected to an M function processing circuit 410 for processing the M function. The M function processing circuit 410 is also tripled in correspondence with the addition circuit 405, the multiplication circuit 406 and the XOR circuit 408.
M関数処理回路 4 1 0の出力は、 4つのセレクタ 4 1 1〜4 1 4に接続されて いる。 各セレクタ 4 1 1〜4 1 4の出力は、 中間鍵を保持するためのレジス夕.4 1 5に格納される。  The output of the M function processing circuit 410 is connected to four selectors 411 to 414. The outputs of the selectors 4 1 1 to 4 14 are stored in a register 4. 15 for holding an intermediate key.
このようにした中間鍵生成回路 4 0 0では、 加算回路 4 0 5、 乗算回路 4 0 6 、 0 1^回路4 0 8、 M関数処理回路 4 1 0がインデックス iの値 0〜2に対応 して 3重化されているため、 3 2ビッ 卜の中間鍵を同時に 3個生成することが可 能である。 したがって、 この中間鍵生成回路 4 0 0では、 各クロックにおいて a 0〜a 2、 b 0〜b 2、 c 0〜c 2、 d 0〜d 2の各 3個の中間鍵が生成され、 4回のクロックですべての中間鍵が生成されてレジスタ 4 1 5に保存される。 このような暗号回路では 3 2ビッ 卜バスで接続されているため、 1 2 8ビヅ ト の平文または暗号文を入力するためには 4クロック必要となる。 したがって、 中 間鍵生成回路 4 0 0において中間鍵を生成するために 4クロックが必要となって も問題がない。 また、 データスクランブル処理に先だって予め中間鍵の生成処理 を行うように構成することにより、 中間鍵生成回路 4 0 0での処理時間は、 デ一 タスクランブル処理の時間に影響を与えることがなくなる。加算回路 4 0 5に入 力するための所定値は、 予め算出して R O M化しているため、 演算時間が短縮さ れるとともに回路規模を縮小することができる。  In the intermediate key generation circuit 400 thus configured, the addition circuit 405, the multiplication circuit 406, the 0 1 ^ circuit 408, and the M function processing circuit 410 correspond to the values 0 to 2 of the index i. Therefore, it is possible to generate three 32-bit intermediate keys at the same time. Therefore, in this intermediate key generation circuit 400, three intermediate keys, a0 to a2, b0 to b2, c0 to c2, and d0 to d2, are generated at each clock, and At every clock, all intermediate keys are generated and stored in registers 415. Since such a cryptographic circuit is connected by a 32-bit bus, four clocks are required to input a 128-bit plaintext or ciphertext. Therefore, there is no problem even if the intermediate key generation circuit 400 needs four clocks to generate an intermediate key. Also, by configuring the intermediate key generation processing in advance before the data scramble processing, the processing time in the intermediate key generation circuit 400 does not affect the time of the de-task ramble processing. Since the predetermined value to be input to the addition circuit 405 is calculated in advance and converted to ROM, the calculation time can be reduced and the circuit scale can be reduced.
さらに、 この中間鍵生成回路 4 0 0はインデックス iの値 (0〜2 ) に従って 3個の中間鍵を同時に生成するように構成しているが、 オーダーの値 (a〜d ) に従って 4個の中間鍵を同時に生成するように構成することも考えられる。 しか しながら、 この第 3実施形態で示す中間鍵生成回路 4 0 0の構成とすることによ り、 回路規模をより小さくすることができる。 〔第 4実施形態〕 Furthermore, the intermediate key generation circuit 400 is configured to generate three intermediate keys simultaneously according to the value of the index i (0 to 2), but to generate four intermediate keys according to the order value (a to d). It is also conceivable to configure so that the intermediate key is generated at the same time. However, with the configuration of the intermediate key generation circuit 400 shown in the third embodiment, the circuit scale can be further reduced. (Fourth embodiment)
第 4実施形態に採用される拡大鍵生成回路を図 9に示す。  FIG. 9 shows an extended key generation circuit employed in the fourth embodiment.
図 9に示す拡大鍵生成回路 520は、 Xセレクタ 521、 Yセレクタ 522、 Zセレクタ 523、 Wセレクタ 524を備えている。  The expanded key generation circuit 520 shown in FIG. 9 includes an X selector 521, a Y selector 522, a Z selector 523, and a W selector 524.
この拡大鍵生成回路 520では、 Xセレクタ 521の出力が口一テートシフト 回路 525に入力されている。 ローテ一卜シフ卜回路 525の出力と Yセレクタ 522の出力が加算回路 526に入力されている。 また、 Zセレクタ 523の出 力がローテ一トシフト回路 527に入力されている。 ローテ一トシフト回路 52 7の出力と Wセレクタ 524の出力が減算回路 528に入力されている。 減算回 路 528の出力はローテ一卜シフ卜回路 529に入力されている。 さらに、 加算 回路 526の出力とローテ—トシフ卜回路 529の出力が XO R回路 530に入 力されている。 この XOR回路 530の出力がこの拡大鍵生成回路 520の出力 K nとなる。  In the expanded key generation circuit 520, the output of the X selector 521 is input to the port shift circuit 525. The output of the rotation shift circuit 525 and the output of the Y selector 522 are input to the addition circuit 526. The output of the Z selector 523 is input to the rotate shift circuit 527. The output of the rotate shift circuit 527 and the output of the W selector 524 are input to the subtraction circuit 528. The output of the subtraction circuit 528 is input to the rotation shift circuit 529. Further, the output of the adder circuit 526 and the output of the rotate shift circuit 529 are input to the XOR circuit 530. The output of the XOR circuit 530 is the output K n of the expanded key generation circuit 520.
Xセレクタ 521、 Yセレクタ 522、 Zセレクタ 523、 Wセレクタ 524 はそれぞれ 4入力 1出力のセレクタであり、 図 8で示すような中間鍵生成回路 4 00で生成された中間鍵が保存されるレジスタ 41 5の出力が入力される。 ここ で、 この拡大鍵生成回路 520は、 表 2に示すインデックステーブルのテーブル 数に対応して 9個用意される。 1番目の拡大鍵生成回路 520の Xセレクタ 52 1、 Yセレクタ 522、 Zセレクタ 523、 Wセレクタ 524には、 それぞれィ ンデヅクステ一ブルの s = 0に対応して (aO, b 05 c 03 d O)、 (aO, b 0, c 0, d O)、 (aO, bO, c 0 , d O)、 (aO, b 0, c0, d O) が入 力される。 2番目〜 9番目の拡大鍵生成回路 520についても、 インデックスパ ラメータ sに基づいて決定されるインデヅクス iの値に基づいて、 (ai , b i , c, cM ) が Xセレクタ 521、 Yセレクタ 522、 Ζセレクタ 523、 Wセレ クタ 524に入力される。 この回路 0〜回路 8の Xセレクタ 521、 Yセレクタ 522、 Zセレクタ 523、 Wセレクタ 524に対する入力データの対応を表 3 に示す。 The X selector 521, the Y selector 522, the Z selector 523, and the W selector 524 are four-input, one-output selectors, respectively, and are registers for storing the intermediate key generated by the intermediate key generation circuit 400 as shown in FIG. The output of 5 is input. Here, nine expanded key generation circuits 520 are prepared corresponding to the number of index tables shown in Table 2. The X selector 521, the Y selector 522, the Z selector 523, and the W selector 524 of the first expanded key generation circuit 520 correspond to the indexable s = 0 (aO, b 0 5 c 0 3 dO), (aO, b0, c0, dO), (aO, bO, c0, dO), (aO, b0, c0, dO) are input. Also for the second to ninth extended key generation circuits 520, based on the value of the index i determined based on the index parameter s, (ai, bi, c, cM) is determined by the X selector 521, the Y selector 522,さ れ る Input to selector 523 and W selector 524. Table 3 shows the correspondence of input data to the X selector 521, the Y selector 522, the Z selector 523, and the W selector 524 of the circuits 0 to 8.
【表 3】  [Table 3]
拡大鍵生成回路入力信号 SelectorX SelectorY SelectorZ SelectorW Extended key generation circuit input signal SelectorX SelectorY SelectorZ SelectorW
回路 o a0,b0,c0,d0 a0,b0,c0,d0 a0,b0,c0,d0 a0,b0,c0,d0  Circuit o a0, b0, c0, d0 a0, b0, c0, d0 a0, b0, c0, d0 a0, b0, c0, d0
回路 1 a1,b1,c1,d1 a1,b1,c1,d1 a1,b1,d,d1 a1,b1,c1,d1  Circuit 1 a1, b1, c1, d1 a1, b1, c1, d1 a1, b1, d, d1 a1, b1, c1, d1
回路 2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2 a2,b2,c2,d2  Circuit 2 a2, b2, c2, d2 a2, b2, c2, d2 a2, b2, c2, d2 a2, b2, c2, d2
回路 3 a0,b0,c0,d0 a1,b1,c1,d1 a0,b0,c0,d0 a1,b1,c1,d1  Circuit 3 a0, b0, c0, d0 a1, b1, c1, d1 a0, b0, c0, d0 a1, b1, c1, d1
回路 4 a1,b1,c1,d1 a2,b2,c2,d2 a1,b1,c1,d1 a2,b2,c2,d2  Circuit 4 a1, b1, c1, d1 a2, b2, c2, d2 a1, b1, c1, d1 a2, b2, c2, d2
回路 5 a2,b2,c2,d2 a0,b0,c0,d0 a2,b2,c2,d2 a0,b0,c0,d0  Circuit 5 a2, b2, c2, d2 a0, b0, c0, d0 a2, b2, c2, d2 a0, b0, c0, d0
回路 6 a0,b0,c0,d0 a2,b2,c2,d2 a0,b0,c0,d0 a2,b2,c2,d2  Circuit 6 a0, b0, c0, d0 a2, b2, c2, d2 a0, b0, c0, d0 a2, b2, c2, d2
回路 7 a1,b1,d,d1 a0,b0,c0,d0 a1,b1,d,d1 a0,b0,c0,d0  Circuit 7 a1, b1, d, d1 a0, b0, c0, d0 a1, b1, d, d1 a0, b0, c0, d0
回路 8 a2,b2,c2,d2 a1,b1,c1,d1 a2,b2,c2,d2 a1,b1,c1,d1 また、 回路 0〜回路 8の Xセレクタ 52 1、 Yセレクタ 522、 Zセレクタ 5 23、 Wセレクタ 524におけるセレクタ制御は、 表 1に示すオーダーテーブル に基づいて行われるものであり、 このセレク夕制御の対応を表 4に示す。  Circuit 8 a2, b2, c2, d2 a1, b1, c1, d1 a2, b2, c2, d2 a1, b1, c1, d1 Also, X selector 521, Y selector 522, Z selector 5 of circuits 0 to 8 23. The selector control in the W selector 524 is performed based on the order table shown in Table 1, and the correspondence of the select control is shown in Table 4.
【表 4】  [Table 4]
拡大鍵生成回路入力セレクタ制御  Extended key generation circuit input selector control
a: 00b, b:01b, c :10b, d : 11b,無選択: 00000000b この拡大鍵生成回路 520におけるセレクタ制御のテーブルは、 ROMに格納 しておくことで制御が簡単になり、 回路規模を縮小することが可能となる。  a: 00b, b: 01b, c: 10b, d: 11b, unselected: 00000000b By storing the selector control table in this expanded key generation circuit 520 in ROM, control becomes simple, and the circuit scale can be reduced. It can be reduced.
各拡大鍵生成回路 520から出力される拡大鍵は、 図 1 0に示すような出力回 路 540を介してデ一タスクランプル回路に入力される。 この出力回路 540は 、 セレクタ 541〜548で構成されており、 それぞれ上述の回路 0〜8の出力 K W 0〜K W 8が入力される。 各セレクタ 5 4 1〜5 4 8の各出力 EX_A0〜EX— A3,EX— B0〜EX_B3は、 3 2ビッ ト X 4の拡大鍵がグループ A, Bの 2セッ ト分 として出力される。 各セレクタ 5 4 1〜5 4 8のセレクタ制御のテーブルを暗号 化時のものを表 5に、 復号化時のものを表 6に示す。 The expanded key output from each expanded key generation circuit 520 is input to a de-task ripple circuit via an output circuit 540 as shown in FIG. The output circuit 540 is composed of selectors 541 to 548. KW 0 to KW 8 are input. The outputs EX_A0 to EX—A3 and EX—B0 to EX_B3 of the selectors 541 to 548 output the expanded key of 32 bits X4 as two sets of groups A and B. Table 5 shows the selector control table for each of the selectors 541 to 548 at the time of encryption, and Table 6 shows the table at the time of decryption.
【表 5】  [Table 5]
拡大鍵生成回路入力セレクタ制御 (B音号化)  Expanded key generation circuit input selector control (B-symbolization)
【表 6】 [Table 6]
拡大鍵生成回路入力セレクタ制御 (復号)  Extended key generation circuit input selector control (decryption)
図 5に示すような拡大鍵生成回路 5 0 0を用いた場合、 Xセレクタ 5 0 1〜W セレクタ 5 0 4は 1 2入力 1出力の回路を構成する必要があり、 回路規模が増大 するという欠点があるが、 図 9に示すような拡大鍵生成回路 5 2 0を用いること により Xセレクタ 5 2 1〜Wセレクタ 5 2 4をそれぞれ 4入力 1出力のセレクタ 回路で構成でき、 回路構成を大幅に削減することが可能となる。 このことは、 図 9の拡大鍵生成回路 5 2 0を 9個用意する必要があるものの、 拡大鍵生成回路全 体としての回路規模を削減することとなる。 When an extended key generation circuit 500 as shown in FIG. 5 is used, the X selector 501 to W selector 504 needs to configure a circuit of 12 inputs and 1 output, which increases the circuit scale. However, by using an extended key generation circuit 520 as shown in FIG. 9, the X selectors 52 1 to W selector 524 can be configured with 4-input 1-output selector circuits, respectively. Can be greatly reduced. This means that although nine extended key generation circuits 520 in FIG. 9 need to be prepared, the circuit scale of the entire extended key generation circuit is reduced.
〔第 5実施形態〕 (Fifth embodiment)
第 5実施形態に採用されるデ一タスクランブル回路の構成例を図 1 5に示す。 図 1 5に示すデ一タスクランブル回路 2 2 0では、 1 2 8ビッ トのブロック単 位で暗号化//復号化を行うために、 3 2ビッ ト X 4の入力デ一夕バス a , b , c , dと、 3 2ビッ ト X 4の出力データバス e , f , g , hを備えている。  FIG. 15 shows a configuration example of the detask rumble circuit employed in the fifth embodiment. In the de-task ramble circuit 220 shown in FIG. 15, in order to perform encryption / decryption in units of 128-bit blocks, a 32-bit X4 input data bus a, b, c, d, and 32 bits X4 output data buses e, f, g, h.
このデ一タスクランプル回路 2 2 0には、 第 1 I関数処理回路 2 2 1、 B関数 処理回路 2 2 2、 第 2 I関数処理回路 2 2 3を有する第 1処理プロック 2 2 8と 、 第 1 R関数処理回路 2 2 4、 第 2 R関数処理回路 2 2 5を有する第 2処理プロ ック 2 2 9を備えている。 また、 デ一タスクランプル回路 2 2 0には、 入力デ一 夕と第 2 R関数処理回路 2 2 5の出力とを選択的に出力するセレクタ 2 2 6と、 第 2 I関数処理回路 2 2 3の出力をクロック毎に保持するレジスタ 2 2 7を備え ている。  The de-task function circuit 220 has a first processing block 2 28 having a first I function processing circuit 22 1, a B function processing circuit 22 2, and a second I function processing circuit 22 3, A second processing block 229 having a first R function processing circuit 224 and a second R function processing circuit 225 is provided. The decoupler circuit 220 includes a selector 226 for selectively outputting the input data and the output of the second R function processing circuit 225, and a second I function processing circuit 222. There is a register 2 27 that holds the output of 3 for each clock.
このように構成されたデータスクランブル回路 2 2 0では、 セレクタ 2 2 6を 適宜切り換えることにより、 第 1 I関数処理回路 2 2 1、 B関数処理回路 2 2 2 、 第 2 I関数処理回路 2 2 3による処理を実行した後、 第 2処理ブロック 2 2 9 および第 1処理ブロック 2 2 8でなる R-R-I-B-Iの処理ループを複数回繰り返した 後、 出力データバス (e, f, g , h ) に結果を出力するように構成できる。 最初のクロックでは、 セレクタ 2 2 6が入力デ一夕側に切り換えられており、 入力データ a , b , c , dは、 第 1処理ブロック 2 2 8で処理された後、 レジス タ 2 2 7にその値が保持される。  In the data scramble circuit 220 configured as described above, by appropriately switching the selector 2 26, the first I function processing circuit 22 1, the B function processing circuit 22 2, and the second I function processing circuit 22 2 After performing the processing of step 3, the RRIBI processing loop consisting of the second processing block 2 229 and the first processing block 228 is repeated several times, and the result is output to the output data bus (e, f, g, h). Can be output. In the first clock, the selector 226 is switched to the input data overnight, and the input data a, b, c, and d are processed in the first processing block 228, and then the register 227 is processed. Holds its value.
次のクロックでは、 セレクタ 2 2 6が第 2処理ブロック 2 2 9側に切り換えら れており、 レジスタ 2 2 7から出力されたデータは、 第 2処理ブロック 2 2 9お よび第 1処理ブロック 2 2 8により各関数処理が実行され、 レジスタ 2 2 7にそ の値が保持される。 At the next clock, the selector 2 26 is switched to the second processing block 2 29, and the data output from the register 2 27 is transferred to the second processing block 2 29 and the first processing block 2 29. Each function process is executed by 2 8, and it is stored in register 2 27. Is held.
この後、 鍵長 1 2 8ビッ 卜の暗号鍵を用いる場合には、 第 1処理ブロック 2 2 9と第 1処理ブロック 2 2 8で構成されるループ処理を 5回実行して、 出力デ一 夕 e, f , g, hを得る。  Thereafter, when using an encryption key with a key length of 128 bits, the loop processing composed of the first processing block 229 and the first processing block 228 is executed five times, and the output data is output. E Obtain e, f, g, h.
第 1 I関数処理回路 2 2 1、.第 2 I関数処理回路 2 2 3には、 図 5で示す拡大 鍵生成回路 5 0 0や図 9で示す拡大鍵生成回路 5 2 0で生成される拡大鍵が入力 されることとなる。 拡大鍵生成回路で 3 2ビヅ 卜 X 4の拡大鍵を 2セッ 卜同時に 生成する構成となっている場合には、 1クロックで生成される 2セッ卜の拡大鍵 のうちグループ Aを第 1 I関数処理回路 2 2 1で使用し、 グループ Bを第 2 1関 数処理回路 2 2 3で使用するように構成することができる。 このことにより、 拡 大鍵生成回路による拡大鍵生成処理と、 データスクランブル処理の両方を同時に 処理することが可能となり、 処理時間の遅延を防止することができる。  The first I function processing circuit 221 and the second I function processing circuit 223 are generated by the expanded key generation circuit 500 shown in FIG. 5 and the expanded key generation circuit 520 shown in FIG. The extended key will be entered. If the extended key generation circuit is configured to simultaneously generate two sets of extended keys of 32 bits X4, group A of the two sets of extended keys generated by one clock is the first. It can be configured so that it is used in the I function processing circuit 221 and the group B is used in the second function processing circuit 223. As a result, both the extended key generation processing by the extended key generation circuit and the data scramble processing can be performed at the same time, and a delay in processing time can be prevented.
〔第 6実施形態〕 (Sixth embodiment)
第 6実施形態に採用されるデータスクランブル回路の構成例を図 1 6に示す。 図 1 6に示すデータスクランブル回路 2 4 0では、 1 2 8ビッ 卜のプロック単 位で暗号化/復号化を行うために、 3 2ビッ ト X 4の入力データバス a , b , c , dと、 3 2ビット x 4の出力データバス e , f, g , hを備えている。  FIG. 16 shows a configuration example of the data scramble circuit employed in the sixth embodiment. The data scramble circuit 240 shown in FIG. 16 uses a 32-bit X4 input data bus a, b, c, d to perform encryption / decryption in a 128-bit block unit. And 32 bits x 4 output data buses e, f, g, h.
このデ一タスクランプル回路 2 4 0には、 第 1 I関数処理回路 2 4 1、 B関数 処理回路 2 4 2、 第 2 I関数処理回路 2 4 3を有する第 1処理プロヅク 2 4 9と 、 第 1 R関数処理回路 2 4 4、 第 2 R関数処理回路 2 4 5を有する第 2処理プロ ヅク 2 5 0を備えている。 また、 データスクランブル回路 2 4 0には、 第 1処理 ブロック 2 4 9の出力と第 2処理ブロック 2 5 0の出力とを選択的に出力する出 力側セレクタ 2 4 7と、 出力側セレクタ 2 4 7の出力をクロック毎に保持するレ ジス夕 2 4 8と、 入力データとレジスタ 2 4 8の出力とを選択的に出力する入力 側セレクタ 2 4 6とを備えている。  The de-task function circuit 240 includes a first processing function 2419 having a first I function processing circuit 241, a B function processing circuit 242, and a second I function processing circuit 243. A second processing circuit 250 having a first R function processing circuit 244 and a second R function processing circuit 245 is provided. The data scramble circuit 240 includes an output selector 247 for selectively outputting the output of the first processing block 249 and the output of the second processing block 250, and an output selector 224. A register 248 for holding the output of the register 47 for each clock, and an input-side selector 246 for selectively outputting the input data and the output of the register 248 are provided.
このように構成されたデータスクランブル回路 2 4 0では、 入力側セレクタ 2 4 6および出力側セレクタ 2 4 7を適宜切り換えることにより、 第 1 I関数処理 回路 2 4 1、 B関数処理回路 2 4 2、 第 2 I関数処理回路 2 4 3による処理を実 行した後、 第 2処理ブロック 2 5 0による H-R処理と、 第 1処理ブロック 2 4 9 による I-B-I処理を交互に繰り返し実行した後、 出力データバス (e, f, g , h ) に結果を出力するように構成できる。 In the data scramble circuit 240 configured as described above, the first I-function processing circuit 241 and the B-function processing circuit 242 are switched by appropriately switching the input selector 246 and the output selector 247. The processing by the second I function processing circuit After that, the HR processing by the second processing block 250 and the IBI processing by the first processing block 249 are performed alternately and repeatedly, and the result is output to the output data bus (e, f, g, h). Can be configured.
最初のク口ックでは、 入力側セレクタ 2 4 6が入力データ側に切り換えられて おり、 入力データ a , b , c , dは、 第 1処理ブロック 2 4 9で処理された後、 レジスタ 2 4 8にその値が保持される。  In the first session, the input selector 246 is switched to the input data, and the input data a, b, c, and d are processed in the first processing block 249, and then the register 2 4 8 holds that value.
次のクロックでは、 出力側セレクタ 2 4 7が第 2処理プロック 2 5 0側に切り 換えられており、 レジスタ 2 4 8から出力されたデータは、 第 2処理ブロック 2 5 0により各関数処理が実行され、 レジスタ 2 4 8にその値が保持される。  At the next clock, the output selector 247 is switched to the second processing block 250, and the data output from the register 248 is processed by the second processing block 250 so that each function processing is performed. It is executed, and its value is held in register 248.
さらに、 次のク口ックでは、 入力側セレクタ 2 4 6がレジスタ 2 4 8側に切り 換えられ、 出力側セレクタ 2 4 7が第 1処理ブロック 2 4 9側に切り換えられて おり、 レジス夕 2 4 8から出力されたデータは、 第 1処理プロヅク 2 4 9で各関 数処理が実行され、 レジスタ 2 4 8にその値が保持される。 これを複数回繰り返 すことで、 前述したデ一夕スクランブル回路と同等の機能を実現することが可能 となる。  In the next step, the input selector 246 is switched to the register 248, and the output selector 247 is switched to the first processing block 249. The data output from the 248 is subjected to each function processing in the first processing procedure 249, and the value is held in the register 248. By repeating this multiple times, it is possible to realize a function equivalent to the above-described overnight scrambling circuit.
第 1 I関数処理回路 2 4 1、 第 2 I関数処理回路 2 4 3には、 図 5で示す拡大 鍵生成回路 5 0 0や図 9で示す拡大鍵生成回路 5 2 0で生成される拡大鍵が入力 されることとなる。 拡大鍵生成回路で 3 2ビッ 卜 X 4の拡大鍵を 2セヅ 卜同時に 生成する構成となっている場合には、 1クロックで生成される 2セッ卜の拡大鍵 のうちグループ Aを第 1 I関数処理回路 2 4 1で使用し、 グループ Bを第 2 1関 数処理回路 2 4 3で使用するように構成することができる。  The first I function processing circuit 241 and the second I function processing circuit 243 have an expanded key generation circuit 500 shown in FIG. 5 and an expanded key generation circuit 520 shown in FIG. The key will be entered. If the expanded key generation circuit is configured to generate 32 bits X4 expanded keys simultaneously for two sets, group A is the first of the two sets of expanded keys generated by one clock. It can be configured so that it is used in the I function processing circuit 241 and the group B is used in the second function processing circuit 243.
このデータスクランブル回路 2 4 0では、 1回の I-B-I-R-R処理に 2サイクルが 必要となるため、 拡大鍵生成回路による拡大鍵生成処理による遅延時間の影響が 無くなる。  In this data scramble circuit 240, two cycles are required for one I-B-I-R-R process, so that the effect of the delay time due to the extended key generation processing by the extended key generation circuit is eliminated.
〔第 7実施形態〕 (Seventh embodiment)
第 7実施形態に採用されるデータスクランブル回路の構成例を図 1 7に示す。 図 1 7に示すデータスクランブル回路 2 6 0では、 1 2 8ビヅ 卜のブロック単 位で暗号化//復号化を行うために、 3 2ビッ 卜 X 4の入力データバス a , b , c , dと、 3 2ビッ ト X 4の出力データバス e , f , g , hを備えている。 FIG. 17 shows a configuration example of a data scramble circuit employed in the seventh embodiment. In the data scramble circuit 260 shown in FIG. 17, input / output buses a, b, and c of 32 bits X4 are used to perform encryption / decryption in units of 128 bits. , d, and 32 bits X4 output data buses e, f, g, h.
このデータスクランブル回路 2 6 0には、 第 1 I関数処理回路 2 6 1、 B関数 処理回路 2 6 2、 第 2 I関数処理回路 2 6 3を有する第 1処理プロック 2 6 8と 、 R関数処理回路 2 6 4で構成される第 2処理ブロック 2 6 9を備えている。 ま た、 デ一タスクランブル回路 2 6 0には、 第 1処理ブロック 2 6 8の出力と第 2 処理ブロック 2 6 9の出力とを選択的に出力する出力側セレクタ 2 6 6と、 出力 側セレクタ 2 6 6の出力をクロック毎に保持するレジスタ 2 6 7と、 入力データ とレジスタ 2 6 7の出力とを選択的に出力する入力側セレクタ 2 6 5とを備えて いる。  The data scramble circuit 260 includes a first processing block 2668 having a first I function processing circuit 261, a B function processing circuit 262, and a second I function processing circuit 2663, and an R function A second processing block 269 comprising a processing circuit 264 is provided. Also, the detask rumble circuit 260 includes an output-side selector 266 for selectively outputting the output of the first processing block 268 and the output of the second processing block 269, and an output side. It has a register 267 for holding the output of the selector 266 for each clock, and an input-side selector 265 for selectively outputting input data and the output of the register 267.
このように構成されたデータスクランブル回路 2 6 0では、 入力側セレクタ 2 6 5および出力側セレクタ 2 6 6を適宜切り換えることにより、 第 1 I関数処理 回路 2 6 1、 B関数処理回路 2 6 2、 第 2 I関数処理回路 2 6 3による処理を実 行した後、 第 2処理ブロック 2 6 9による: 処理を 2回と、 第 1処理ブロック 2 6 8による I-B-I処理を交互に繰り返し実行した後、 出力データバス (e , f, g , h ) に結果を出力するように構成できる。  In the data scramble circuit 260 configured as described above, the first I function processing circuit 26 1 and the B function processing circuit 26 2 2 are switched by appropriately switching the input side selector 26 5 and the output side selector 26 6. After executing the processing by the second I-function processing circuit 263, then by the second processing block 269: after the processing is repeated twice and the IBI processing by the first processing block 268 is alternately repeated. The output data bus (e, f, g, h) can be configured to output the result.
最初のクロックでは、 入力側セレクタ 2 6 5が入力データ側に切り換えられて おり、 入力デ一夕 a , b, c , dは、 第 1処理ブロック 2 6 8で処理された後、 レジスタ 2 6 7にその値が保持される。  In the first clock, the input selector 265 is switched to the input data side, and the input data a, b, c, d are processed in the first processing block 268, and then the register 26 7 holds that value.
次のクロックでは、 出力側セレクタ 2 6 6が第 2処理ブロック 2 6 9側に切り 換えられており、 レジスタ 2 6 7から出力されたデータは、 第 2処理プロック 2 6 9により R関数処理が実行され、 レジスタ 2 6 7にその値が保持される。 次の クロックでは、 同様に、 出力側セレクタ 2 6 6が第 2処理プロック 2 6 9側のま まであり、 レジスタ 2 6 7から出力されたデータは、 第 2処理プロック 2 6 9に より R関数処理が実行され、 レジスタ 2 6 7にその値が保持される。  At the next clock, the output selector 2666 is switched to the second processing block 2697, and the data output from the register 2667 is subjected to the R function processing by the second processing block 2669. It is executed, and its value is held in register 267. Similarly, in the next clock, the output selector 266 remains at the second processing block 269, and the data output from the register 267 is converted to the R function by the second processing block 269. Processing is executed, and the value is held in the register 267.
さらに、 次のクロックでは、 入力側セレクタ 2 6 5がレジスタ 2 6 7側に切り 換えられ、 出力側セレクタ 2 6 6が第 1処理ブロック 2 6 8側に切り換えられて おり、 レジスタ 2 6 7から出力されたデータは、 第 1処理プロック 2 6 8で各関 数処理が実行され、 レジスタ 2 6 7にその値が保持される。 これを複数回繰り返 すことで、 前述したデータスクランブル回路と同等の機能を実現することが可能 となる。 Further, at the next clock, the input selector 265 is switched to the register 267, and the output selector 266 is switched to the first processing block 268. The output data is subjected to each function processing in the first processing block 268, and the value is held in the register 267. By repeating this multiple times, it is possible to realize the same function as the data scramble circuit described above. Becomes
第 1 I関数処理回路 2 6 1、 第 2 I関数処理回路 2 6 3には、 図 5で示す拡大 鍵生成回路 5 0 0や図 9で示す拡大鍵生成回路 5 2 0で生成される拡大鍵が入力 されることとなる。拡大鍵生成回路で 3 2ビッ卜 X 4の拡大鍵を 2セッ卜同時に 生成する構成となっている場合には、 1クロックで生成される 2セットの拡大鍵 のうちグループ Aを第 1 I関数処理回路 2 6 1で使用し、 グループ Bを第 2 1関 数処理回路 2 6 3で使用するように構成することができる。  The first I function processing circuit 26 1 and the second I function processing circuit 26 3 have the expanded key generation circuit 500 shown in FIG. 5 and the expanded key generation circuit 500 shown in FIG. The key will be entered. If the extended key generation circuit is configured to generate two sets of extended keys of 32 bits X 4 at the same time, of the two sets of extended keys generated in one clock, group A is the first I function It can be configured to be used in the processing circuit 261 and to use the group B in the second function processing circuit 263.
このデータスクランブル回路 2 6 0では、 1回の I-B-I-R-R処理に 3サイクルが 必要となるため、 拡大鍵生成回路による拡大鍵生成処理による遅延時間の影響が 無くなる。  In this data scramble circuit 260, three cycles are required for one I-B-I-R-R process, so that the influence of the delay time due to the extended key generation processing by the extended key generation circuit is eliminated.
(産業上の利用可能性) (Industrial applicability)
本発明によれば、 基本関数処理を繰り返し実行するブロック暗号ァルゴリズム において、 クロック同期ループを構成することで、 回路規模を縮小することが可 能となる。 また、 中間鍵を事前に生成するように構成することで、 中間鍵から拡 大鍵を生成する処理を高速化することができる。 さらに、 拡大鍵生成処理におい て、 キ一スケジューリングの制御を簡易化することができ、 コンパクトな回路で 高速処理を実現することができる。  According to the present invention, it is possible to reduce the circuit scale by configuring a clock synchronous loop in a block cipher algorithm that repeatedly executes basic function processing. Further, by configuring the intermediate key to be generated in advance, the process of generating an expanded key from the intermediate key can be speeded up. Furthermore, in the extended key generation processing, the control of key scheduling can be simplified, and high-speed processing can be realized with a compact circuit.

Claims

請 求 の 範 囲 The scope of the claims
1 . 1.
暗号鍵から生成される複数の拡大鍵とデータとの排他的論理和を演算する I関 数と、 データのビットを攪拌する B関数および R関数とを用いてデ一タスクラン ブルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビヅ卜、処理プロック 1 2 8ビッ卜の 共通鍵プロック暗号の暗号化/復号化を実行するデータスクランプル回路であつ て、  Performs a de-task ramble using the I function that calculates the exclusive OR of the data and the multiple expanded keys generated from the encryption key, and the B and R functions that shuffle the bits of the data. A data scramble circuit for performing encryption / decryption of a 128-bit common key block cipher,
I関数を処理した後、 B関数、 I関数、 R関数、 R関数、 I関数の順に処理を 行う処理ブロックを n回処理し、 その後 B関数、 I関数の順に処理を行うために、 前記 I関数を処理する I関数処理回路と、 前記 B関数を処理する B関数処理回路 と、 前記 R関数を処理する R関数処理回路とを実装しているデータスクランブル 回路。  After processing the I function, the processing block that performs processing in the order of the B function, the I function, the R function, the R function, and the I function is processed n times, and then the processing is performed in the order of the B function and the I function. A data scramble circuit that includes an I function processing circuit that processes a function, a B function processing circuit that processes the B function, and an R function processing circuit that processes the R function.
2 . 2.
I関数を処理した後、 B関数、 I関数、 R関数、 R関数、 I関数の順に処理を 行う処理ブロックを n回処理し、 その後 B関数、 I関数の順に処理を行うための 各 I関数処理回路、 B関数処理回路および R関数処理回路を全て実装している、 請求項 1に記載のデータスクランブル回路。  After processing the I function, the processing block that performs processing in the order of the B function, I function, R function, R function, and the I function is processed n times, and then each I function for performing the processing in the order of the B function and the I function The data scramble circuit according to claim 1, wherein all of the processing circuit, the B function processing circuit, and the R function processing circuit are mounted.
3 . 3.
B関数処理回路、 I関数処理回路、 R関数処理回路、 R関数処理回路、 I関数 処理回路の順に接続されたクロック同期ループを構成し、 I関数処理回路、前記 クロック同期ループ、 B関数処理回路、 I関数処理回路の順に接続している、 請 求項 1に記載のデータスクランブル回路。  A clock synchronous loop connected in the order of the B function processing circuit, the I function processing circuit, the R function processing circuit, the R function processing circuit, and the I function processing circuit is configured, and the I function processing circuit, the clock synchronous loop, the B function processing circuit The data scramble circuit according to claim 1, wherein the data scramble circuit is connected to the I function processing circuit in this order.
4 . Four .
暗号鍵から生成される複数の拡大鍵とデータとの排他的論理和を演算する I関 数と、 デ一夕のビヅトを攪拌する B関数および R関数とを用いてデータスクラン ブルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ピヅト、処理プロック 1 8ビヅ 卜の 共通鍵ブロック暗号の暗号化/復号化を実行するデータスクランブル回路であつ て、 Data scrambling is performed by using an I function that performs an exclusive OR operation of data with a plurality of expanded keys generated from an encryption key and a B function and an R function that stir data bits. A data scramble circuit for performing encryption / decryption of a common key block cipher having a key length of 128 bits / 192 bits / 256 bits and a processing block of 18 bits.
I関数、 B関数を処理した後、 I関数、 R関数、 R関数、 I関数、 B関数の順 に処理を行う処理ブロックを n回処理し、 その後 I関数の処理を行うために、 前 記 I関数を処理する I関数処理回路と、前記 B関数を処理する B関数処理回路と、 前記 R関数を処理する R関数処理回路とを実装しているデ一タスクランプル回路。  After processing the I and B functions, process the processing block that performs processing in the order of the I function, R function, R function, I function, and B function n times, and then perform the processing of the I function. A de-task function circuit which includes an I function processing circuit for processing the I function, a B function processing circuit for processing the B function, and an R function processing circuit for processing the R function.
5 . Five .
I関数処理回路、 R関数処理回路、 R関数処理回路、 I関数処理回路、 B関数 処理回路の順に接続されたクロック同期ループを構成し、 I関数処理回路、 B関 数処理回路、 前記クロック同期ループ、 I関数処理回路の順に接続している、請 求項 4に記載のデ一タスクランプル回路。  A clock synchronous loop is connected in the order of the I function processing circuit, the R function processing circuit, the R function processing circuit, the I function processing circuit, and the B function processing circuit, and the I function processing circuit, the B function processing circuit, and the clock synchronization The de-task ramping circuit according to claim 4, wherein the loop is connected to the I-function processing circuit in this order.
6 . 6.
第 1 I関数処理回路と、  A first I function processing circuit;
第 2 I関数処理回路、 第 1 R関数処理回路、 第 2 R関数処理回路および第 3 I 関数処理回路が順に接続される処理プロックと、  A processing block in which a second I function processing circuit, a first R function processing circuit, a second R function processing circuit, and a third I function processing circuit are sequentially connected;
前記第 1 I関数処理回路の出力と、 前記処理プロックの出力とを選択的に出力 するセレクタと、  A selector for selectively outputting an output of the first I function processing circuit and an output of the processing block;
前記セレクタの出力が接続される B関数処理回路と、  A B function processing circuit to which the output of the selector is connected,
前記 B関数処理回路の出力をクロック周期毎にラツチして前記処理プロックに 入力するレジスタと、  A register for latching the output of the B function processing circuit every clock cycle and inputting the latched output to the processing block;
前記レジス夕の出力が接続される第 4 I関数処理回路と、  A fourth I function processing circuit to which the output of the register is connected,
を備え、前記処理ブロックと前記 B関数処理回路とによってクロック同期ループ を構成する請求項 5に記載のデータスクランブル回路。 The data scramble circuit according to claim 5, further comprising: a clock synchronous loop configured by the processing block and the B function processing circuit.
7 . 7.
暗号鍵から生成される複数の拡大鍵と —夕との排他的論理和を演算する I関 数と、 データのビットを攪袢する B関数および R関数とを用いてデータスクラン プルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビヅト、 処理ブロック 1 2 8ビットの 共通鍵プロック暗号の暗号化/復号化を実行するデータスクランプル回路であつ て、 Calculates the exclusive OR of multiple extended keys generated from an encryption key and Data scrambling is performed using a number and a B function and an R function that stagger the data bits, and a common key block with a key length of 128/192/256 bits and a processing block of 128 bits A data scramble circuit for performing encryption / decryption of encryption,
I関数、 B関数、 I関数の順に処理を行った後、 R関数、 R関数、 I関数、 B 関数、 I関数の順に処理を行う処理プロックを n回処理するために、前記 I関数 を処理するための I関数処理回路と、 前記 B関数を処理する B関数処理回路と、 前記 R関数を処理する R関数処理回路とを実装しているデータスクランブル回路。  After performing processing in the order of I function, B function, and I function, processing the I function in order to process n times the processing block that performs processing in the order of R function, R function, I function, B function, and I function A data scramble circuit that includes an I function processing circuit for performing the B function, a B function processing circuit for processing the B function, and an R function processing circuit for processing the R function.
8 . 8.
第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接続される 第 1処理ブロックと、  A first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected;
第 1 R関数処理回路、 第 2 R関数処理回路が順に接続される第 2処理ブロック と、  A second processing block in which a first R function processing circuit and a second R function processing circuit are sequentially connected;
入力データと前記第 2処理ブロックの出力とのうちいずれかを選択的に前記第 1処理プロックに入力するためのセレクタと、  A selector for selectively inputting any of input data and an output of the second processing block to the first processing block;
を備える、請求項 7に記載のデータスクランブル回路。 The data scramble circuit according to claim 7, comprising:
9 . 9.
暗号鍵から生成される複数の拡大鍵とデータとの排他的論理和を演算する I関 数と、 データのビットを攪拌する B関数および R関数とを用いてデータスクラン ブルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビッ卜、 処理ブロック 1 2 8ビヅ卜の 共通鍵ブロック暗号の暗号化/復号化を実行するデータスクランブル回路であつ て、  Data scrambling is performed by using an I function that calculates the exclusive OR of data and multiple extended keys generated from the encryption key, and a B function and an R function that shuffle the data bits. A data scramble circuit for encrypting / decrypting 28/192 bits / 256 bits, processing block 128 bits / common key block cipher,
I関数、 B関数、 I関数の順に処理を行う第 1処理ブロックと、 R関数、 R関 数の順に処理を行う第 2処理プロックとを交互に複数回処理するために、 前記 I 関数を処理するための I関数処理回路と、 前記 B関数を処理する B関数処理回路 と、 前言己 R関数を処理する R関数処理回路とを実装しているデ一タスクランプル 回路。 The I function is processed in order to alternately perform a plurality of times a first processing block that performs processing in the order of the I function, the B function, and the I function, and a second processing block that performs processing in the order of the R function and the R function. And a B-function processing circuit for processing the B function; and a R-function processing circuit for mounting the R function processing circuit for processing the R function.
1 0 . Ten .
第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接続される 第 1処理ブロックと、  A first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected;
第 1 R関数処理回路、 第 2 R関数処理回路が接続される第 2処理ブロックと、 前記第 1処理プロックの出力と前記第 2処理プロックの出力のうちいずれかを 選択的に出力する出力側セレクタと、  A second processing block to which a first R function processing circuit and a second R function processing circuit are connected, and an output side for selectively outputting one of the output of the first processing block and the output of the second processing block A selector,
入力データと前記出力側セレクタの出力とのうちいずれかを選択的に前記第 1 I関数処理回路に入力するための入力側セレクタと、  An input selector for selectively inputting either input data or an output of the output selector to the first I function processing circuit;
を備える、 請求項 9に記載のデータスクランブル回路。 The data scramble circuit according to claim 9, comprising:
1 . 1.
暗号鍵から生成される複数の拡大鍵とデータとの排他的論理和を演算する I関 数と、 データのビットを攪拌する B関数および R関数とを用いてデ一タスクラン ブルを行い、 鍵長 1 2 8 / 1 9 2 / 2 5 6ビヅ卜、 処理ブロック 1 2 8ビッ卜の 共通鍵プロック暗号の暗号化/復号化を実行するデータスクランブル回路であつ て、  Performs a de-task ramble using the I function that calculates the exclusive OR of the data and the multiple expanded keys generated from the encryption key, and the B and R functions that shuffle the bits of the data. A data scramble circuit for performing encryption / decryption of a 128-bit common key block encryption,
I関数、 B関数、 I関数の順に処理を行う第 1処理ブロックと、 R関数処理を 行う第 2処理プロックとを所定の順に複数回処理するために、 前記 I関数を処理 するための I関数処理回路と、 前記 B関数を処理する B関数処理回路と、 前記 R 関数を処理する R関数処理回路とを実装しているデータスクランブル回路。  An I function for processing the I function in order to process a first processing block that performs processing in the order of the I function, the B function, and the I function, and a second processing block that performs the R function processing a plurality of times in a predetermined order. A data scramble circuit that includes a processing circuit, a B function processing circuit that processes the B function, and an R function processing circuit that processes the R function.
1 2 . 1 2.
第 1 I関数処理回路、 B関数処理回路、 第 2 I関数処理回路が順に接続される 第 1処理ブロックと、  A first processing block in which a first I function processing circuit, a B function processing circuit, and a second I function processing circuit are sequentially connected;
第 1 R関数処理回路を備える第 2処理プロックと、  A second processing block including a first R function processing circuit;
前記第 1処理プロックの出力と前記第 2処理プロックの出力のうちいずれかを 選択的に出力する出力側セレクタと、  An output-side selector for selectively outputting one of the output of the first processing block and the output of the second processing block;
入力データと前記出力側セレクタの出力とのうちいずれかを選択的に前記第 1 I関数処理回路に入力するための入力側セレクタと、 The first selector selectively selects one of input data and an output of the output-side selector. An input selector for input to the I function processing circuit,
を備える、 請求項 1 1に記載のデータスクランブル回路。 The data scramble circuit according to claim 11, comprising:
1 3 . 13 .
前記 B関数処理回路は、 3 2ビッ 卜 X 4の入力データを 4ビッ 卜 X 3 2の入力 データに変換する入力データ変換部と、 前記入力データ変換部に接続される 3 2 個の 4ビヅ 卜 S b o Xと、 前記各 4ビヅ卜 S b o Xから出力される 4ピヅ 卜 x 3 2の出力データを 3 2ビッ 卜 X 4の出力データに変換する出力データ変換部とを 備える、 請求項 1、 4、 7、 9または 1 1に記載のデータスクランブル回路。  The B function processing circuit includes: an input data conversion unit configured to convert 32 bits X4 input data into 4 bits X32 input data; and 32 4 bits connected to the input data conversion unit. It is provided with an output SboX and an output data converter for converting the output data of 4 bits x 32 output from each of the 4 bits SboX into the output data of 32 bits X4. The data scramble circuit according to claim 1, 4, 7, 9, or 11.
1 4 . 14 .
前記 R関数処理回路は、 データのビットを攪拌する F関数処理回路を備え、 3 2ビッ ト X 4の入力データのうち 2つの入力データのビッ 卜を攪拌して 3 2ビッ ト X 2の出力デ一夕を出力する F関数処理回路と、 前記 F関数処理回路の出力デ 一夕を前記入力データのうちの残りの 2つと排他的論理和を演算する 2つの X O R回路とを備える、 請求項 1、 4、 7、 9または 1 1に記載のデ一タスクランプ ル回路。  The R function processing circuit includes an F function processing circuit that mixes data bits, and mixes two input data bits of 32 bits X 4 input data to output 32 bits X 2 outputs. An F-function processing circuit that outputs the data, and two XOR circuits that perform an exclusive OR operation on the output data of the F-function processing circuit and the remaining two of the input data. De-task clamp circuit according to 1, 4, 7, 9 or 11.
1 5 . 1 5.
前記 F関数処理回路は、 3 2ビ、ソ卜 X 2の入力データを非均等なビッ 卜数の複 数の入力データに変換する入力データ変換部と、 前記入力データ変換部に接続さ れる複数の S b o Xと、 前記 S b 0 Xからの出力が入力され M D Sを用いた排他 的論理和演算を行う M D S演算回路と、 前記出力データ変換部の出力データに所 定値を乗算する乗算回路と、 乗算回路の出力と出力データ変換部の出力との排他 的論理和を演算する X O R回路とを備える、 請求項 1 4に記載のデータスクラン ブル回路。  The F-function processing circuit includes: an input data conversion unit configured to convert input data of 32 bits and a software X2 into a plurality of input data having an unequal number of bits; and a plurality of input data conversion units connected to the input data conversion unit. S bo X, an MDS operation circuit to which an output from the S b 0 X is input and performing an exclusive OR operation using MDS, and a multiplication circuit for multiplying output data of the output data conversion unit by a predetermined value. 15. The data scramble circuit according to claim 14, further comprising: an XOR circuit for calculating an exclusive OR of an output of the multiplication circuit and an output of the output data conversion unit.
1 6 . 1 6.
前記複数の S b o xは、 2個の 6ビヅ卜 S b o xと 4個の 5ビッ卜 S b o xと で構成され、 前記入力データ変換部は 3 2ビッ ト X 2の入力データを 6ビッ 卜 X 2、 5ビッ ト X 4の入力データに変換する、 請求項 1 5に記載のデータスクラン ブル回路。 The plurality of S boxes are two 6-bit S boxes and four 5-bit S boxes. 16. The data scramble circuit according to claim 15, wherein the input data conversion unit converts 32 bits X2 input data into 6 bits X2 and 5 bits X4 input data.
1 7 . 1 7.
暗号鍵から中間鍵を生成する中間鍵生成回路と、  An intermediate key generation circuit for generating an intermediate key from the encryption key,
前記中間鍵生成回路から生成された中間鍵から複数の拡大鍵を生成する拡大鍵 生成回路と、  An expanded key generation circuit that generates a plurality of expanded keys from the intermediate key generated from the intermediate key generation circuit;
データと前記拡大鍵との排他的論理和を演算する I関数、 データのビッ トを攪 拌する B関数および R関数とを用いてデータスクランブルを行うデータスクラン ブル回路と、  A data scramble circuit for performing data scramble using an I function for calculating an exclusive OR of the data and the extended key, a B function and an R function for stirring data bits,
を備える鍵長 1 2 8/ 1 9 2 / 2 5 6ビッ 卜、 処理プロヅク 1 2 8ビッ 卜の共通 鍵ブロック暗号の暗号化/復号化を実行する暗号回路であって、 A cryptographic circuit for performing encryption / decryption of a common key block cipher having a key length of 128 bits / 192 bits / 256 bits and a processing key of 128 bits;
前記中間鍵生成回路は、 前記デ—タスクランブル回路のデータスクランブル処 理の前に中間鍵生成処理を実行し、  The intermediate key generation circuit executes an intermediate key generation process before the data scramble process of the data scramble circuit;
前記拡大鍵生成回路は、 前記デ一タスクランブル回路のデ一タスクランブル処 理と並列的に前記拡大鍵の生成を行うことを特徴とする暗号回路。  The encryption circuit, wherein the extended key generation circuit generates the extended key in parallel with the detask rumble processing of the detask rumble circuit.
1 8 . 1 8.
前記中間鍵生成回路は、 オーダ—基数に対応して設定されたオーダーパラメ一 夕テーブルと、 ィンデックス基数に対応して設定されたィンデヅクスパラメータ テーブルとに基づいて、 前記拡大鍵生成回路の拡大鍵生成処理で使用する中間鍵 を逐次生成する、 請求項 1 7に記載の暗号回路。  The intermediate key generation circuit is configured to execute the extended key generation circuit based on an order parameter table set according to an order radix and an index parameter table set according to an index radix. The encryption circuit according to claim 17, wherein the intermediate key used in the extended key generation processing is sequentially generated.
1 9 . 1 9.
前記中間鍵生成回路は、  The intermediate key generation circuit includes:
前記暗号鍵を 3 2ビッ 卜単位に分ける入力データ変換部と、  An input data conversion unit that divides the encryption key into 32 bits,
前記入力データ変換部からの入力データに所定値を加算する加算回路と、 前記入力データ変換部からの入力データに所定値を乗算する乗算回路と、 前記加算回路の出力値と前記乗算回路の出力値との排他的論理和を演算する X O R回路と、 An addition circuit that adds a predetermined value to the input data from the input data conversion unit; a multiplication circuit that multiplies the input data from the input data conversion unit by a predetermined value; An XOR circuit for calculating an exclusive OR of an output value of the addition circuit and an output value of the multiplication circuit;
を備え、 前記加算回路において加算する所定値を予め演算により求めた既設定値 として格納する記憶手段をさらに備える、 請求項 1 8に記載の暗号回路。 19. The encryption circuit according to claim 18, further comprising: a storage unit configured to store a predetermined value to be added in the addition circuit as a preset value calculated in advance.
2 0 . 2 0.
前記中間鍵生成回路は、 オーダ—基数に対応して設定されたオーダーパラメ一 タテ一ブルとインデックス基数に対応して設定されたィンデヅクスパラメ一夕テ —ブルとに基づいて、 オーダ一の種類とィンデヅクスの種類とに応じた個数の中 間鍵を生成し、  The intermediate key generation circuit, based on an order parameter table set according to the order radix and an index parameter table set according to the index radix, Generate a number of intermediate keys according to one type and the type of index,
前記拡大鍵生成回路は、 前記ィンデヅクスパラメ一タテ一ブルに設定されるテ —ブル数だけ設けられ、 前記オーダ一パラメータテーブルとィンデヅクスパラメ —タテーブルとに従って選択的に入力される前記中間鍵から拡大鍵を生成する、 請求項 1 9に記載の暗号回路。  The extended key generation circuit is provided for the number of tables set in the index parameter table, and is selectively provided according to the order parameter table and the index parameter table. 10. The encryption circuit according to claim 19, wherein an expanded key is generated from the input intermediate key.
2 1 . twenty one .
前記拡大鍵生成回路で生成される拡大鍵を選択的に前記デ一タスクランプル回 路に入力するために、 前記データスクランプル回路で 1サイクルに必要な拡大鍵 数だけ設けられる拡大鍵出力セレクタと、  An expanded key output selector provided by the data scramble circuit for the number of expanded keys required in one cycle, for selectively inputting the expanded key generated by the expanded key generation circuit to the destructive circuit; ,
前記拡大鍵出力セレクタの拡大鍵選択制御テーブルを格納する記憶手段と、 をさらに備える、 請求項 2 0に記載の暗号回路。  20. The encryption circuit according to claim 20, further comprising: storage means for storing an expanded key selection control table of the expanded key output selector.
2 2 . twenty two .
請求項 6、 7、 9、 1 1のいずれかに記載のデータスクランブル回路に入力さ れる拡大鍵を生成する拡大鍵生成回路であって、 前記第 2 I関数処理回路に入力 される第 2拡大鍵グループを、 1サイクル前の前記第 1 I関数処理回路または前 記第 3 I関数処理回路に入力される第 1拡大鍵グループとともに生成する拡大鍵 生成回路。  12. An expanded key generation circuit for generating an expanded key to be input to the data scramble circuit according to claim 6, wherein the second expansion is input to the second I function processing circuit. An expanded key generation circuit that generates a key group together with the first expanded key group input to the first I function processing circuit or the third I function processing circuit one cycle before.
PCT/JP2001/000399 2001-01-22 2001-01-22 Encryption circuit WO2002058036A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
PCT/JP2001/000399 WO2002058036A1 (en) 2001-01-22 2001-01-22 Encryption circuit
JP2002558244A JP4745598B2 (en) 2001-01-22 2001-06-14 Cryptographic circuit
PCT/JP2001/005095 WO2002058037A1 (en) 2001-01-22 2001-06-14 Cipher circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2001/000399 WO2002058036A1 (en) 2001-01-22 2001-01-22 Encryption circuit

Publications (1)

Publication Number Publication Date
WO2002058036A1 true WO2002058036A1 (en) 2002-07-25

Family

ID=11736940

Family Applications (2)

Application Number Title Priority Date Filing Date
PCT/JP2001/000399 WO2002058036A1 (en) 2001-01-22 2001-01-22 Encryption circuit
PCT/JP2001/005095 WO2002058037A1 (en) 2001-01-22 2001-06-14 Cipher circuit

Family Applications After (1)

Application Number Title Priority Date Filing Date
PCT/JP2001/005095 WO2002058037A1 (en) 2001-01-22 2001-06-14 Cipher circuit

Country Status (1)

Country Link
WO (2) WO2002058036A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4961909B2 (en) * 2006-09-01 2012-06-27 ソニー株式会社 Cryptographic processing apparatus, cryptographic processing method, and computer program
JP5223245B2 (en) * 2007-06-25 2013-06-26 ソニー株式会社 Cryptographic processing apparatus, cryptographic processing method, and computer program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05249891A (en) * 1992-03-06 1993-09-28 Hitachi Ltd Ciphering processor and ciphering process method using the same
JPH06236148A (en) * 1992-07-17 1994-08-23 Internatl Business Mach Corp <Ibm> Data processing system for executing data-encrypting algorithm, wherein performance in ansi x3.92 data-encrypting algorithm standard is strengthened
JPH07191603A (en) * 1993-12-24 1995-07-28 Canon Inc Encrypting device and confidentially verified communication system using the same

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000075785A (en) * 1998-08-26 2000-03-14 Fujitsu Ltd High-speed cipher processing circuit and processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05249891A (en) * 1992-03-06 1993-09-28 Hitachi Ltd Ciphering processor and ciphering process method using the same
JPH06236148A (en) * 1992-07-17 1994-08-23 Internatl Business Mach Corp <Ibm> Data processing system for executing data-encrypting algorithm, wherein performance in ansi x3.92 data-encrypting algorithm standard is strengthened
JPH07191603A (en) * 1993-12-24 1995-07-28 Canon Inc Encrypting device and confidentially verified communication system using the same

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
KAZUMARO AOKI ET AL.: "128 Bit block angou camellia", TECHNICAL RESEARCH REPORT, THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS (ISEC2000 1-9), vol. 100, no. 76, 18 May 2000 (2000-05-18), pages 47 - 75, XP002953189 *
MASAHIKO TAKENAKA ET AL.: "Kyoutsu kagi block angou SC2000 no jissou", 2001 NEN ANGOU TO JOHO SECURITY SYSTEM SYMPOSIUM YOKOUSHU, vol. 2, 23 January 2000 (2000-01-23), pages 743 - 748, XP002953188 *
TAKESHI SHIMOYAMA ET AL.: "Cash size ni oujite saitekika kanouna kyoutsu kagi block angou sekkeihou", 2000 NEN ANGOU TO SECURITY SYMPOSIUM, vol. A19, 27 January 2000 (2000-01-27), XP002953187 *
TAKESHI SHIMOYAMA ET AL.: "Kyoutsu kagi block angou SC2000", TECHNICAL RESEARCH REPORT, THE INSTITUTE OF ELECTRONICS, INFORMATION AND COMMUNICATION ENGINEERS (ISEC2000 68-78), vol. 100, no. 324, 22 September 2000 (2000-09-22), pages 101 - 130, XP002953186 *

Also Published As

Publication number Publication date
WO2002058037A1 (en) 2002-07-25

Similar Documents

Publication Publication Date Title
JP4127472B2 (en) Data conversion apparatus, data conversion method and program for data conversion apparatus, and computer-readable recording medium
JP3992742B2 (en) Encryption method and apparatus for nonlinearly combining data blocks and keys
EP1507247B1 (en) Data conversion apparatus and data conversion method
EP1271839B1 (en) AES Encryption circuit
US7672455B2 (en) Method and apparatus for data encryption
US5351299A (en) Apparatus and method for data encryption with block selection keys and data encryption keys
Gutub et al. Hybrid crypto hardware utilizing symmetric-key and public-key cryptosystems
JP2007041620A5 (en)
KR20020006475A (en) Encryption device, decryption device, expanded key generating device, expanded key generating method and recording medium
KR20180081559A (en) Generate key sequence for encryption operation
JP5182295B2 (en) Encryption apparatus and encryption processing method
WO2002058036A1 (en) Encryption circuit
JP4515716B2 (en) Extended key generation device, encryption device, and encryption system
KR101662291B1 (en) Device for encryption and decryption based on Lightweight encryption algorithm LEA
Kwan et al. A general purpose technique for locating key scheduling weaknesses in DES-like cryptosystems
EP1043863B1 (en) Method for the cryptographic conversion of L-bit input blocks of digital data info into L-bit output blocks
JP4117157B2 (en) Cryptographic circuit
JP4745598B2 (en) Cryptographic circuit
JP4230152B2 (en) Cryptographic circuit
Hassan New Approach for Modifying DES Algorithm Using 4-States Multi-keys
JP3748184B2 (en) Secret communication device
JP2002091296A (en) Device and program for generating expanded key, and recording medium
JPH0736673A (en) Random-number generator, communication system using the same and device therefor
JPH11212451A (en) Criptographic device
JPH06102820A (en) Cyphering device

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): JP US

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): DE FR GB

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase