JP5319209B2 - Apparatus, method and program for scheduling key used in encryption - Google Patents

Apparatus, method and program for scheduling key used in encryption Download PDF

Info

Publication number
JP5319209B2
JP5319209B2 JP2008221805A JP2008221805A JP5319209B2 JP 5319209 B2 JP5319209 B2 JP 5319209B2 JP 2008221805 A JP2008221805 A JP 2008221805A JP 2008221805 A JP2008221805 A JP 2008221805A JP 5319209 B2 JP5319209 B2 JP 5319209B2
Authority
JP
Japan
Prior art keywords
round
key
unit
storage unit
registers
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
JP2008221805A
Other languages
Japanese (ja)
Other versions
JP2010057066A (en
Inventor
雄一 駒野
浩一 藤崎
建司 大熊
淳 新保
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2008221805A priority Critical patent/JP5319209B2/en
Publication of JP2010057066A publication Critical patent/JP2010057066A/en
Application granted granted Critical
Publication of JP5319209B2 publication Critical patent/JP5319209B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a key scheduling apparatus for executing arithmetic key schedule operation securely for fault-utilized analysis, while avoiding increase in computational complexity for computing additional information or the like. <P>SOLUTION: The key scheduling apparatus includes: a first storage unit 320 for storing a plurality of round keys corresponding to a plurality of rounds, respectively; an arithmetic unit 311 for acquiring an update target key representing either the plurality of round keys stored in the first storage unit 320 or a part of at least one of the plurality of round keys for each predetermined processing cycle and calculating the round key of a round next to the round of the acquired update target key on the basis of the acquired update target key; and an updating unit 312 for updating the update target key in the first storage unit 320 while using the calculated round key for each processing cycle. <P>COPYRIGHT: (C)2010,JPO&amp;INPIT

Description

この発明は、故障利用解析に対して安全な、共通鍵暗号方式の鍵スケジュールを実行する装置、方法およびプログラムに関する。   The present invention relates to an apparatus, a method, and a program for executing a key schedule of a common key cryptosystem that is safe against failure use analysis.

通信内容の秘匿などを目的として広範に用いられている秘密鍵ブロック暗号方式として、AES(Advanced Encryption Standard)が知られている。   AES (Advanced Encryption Standard) is known as a secret key block cipher widely used for the purpose of concealing communication contents.

近年、128ビットの秘密鍵を用いるAESに対して、9ラウンド目で使用するラウンド鍵の計算時に計算誤りを生じさせることで、ラウンド鍵の算出の元となる秘密鍵を導出する故障利用解析が報告されている(例えば、非特許文献1参照)。   In recent years, with respect to AES using a 128-bit secret key, failure use analysis has been performed to derive a secret key from which a round key is calculated by causing a calculation error when calculating the round key used in the ninth round. Have been reported (for example, see Non-Patent Document 1).

故障利用解析に対する対策としては、(i)予め計算したラウンド鍵を記憶して使用することで計算誤りが混入する恐れをなくす、(ii)パリティ情報などの付加情報を利用して計算誤りを検出または訂正する、(iii)同一の計算を複数回実行して計算結果を比較することで計算誤りを検出する、などが知られている(例えば、非特許文献2参照)。   As countermeasures against failure usage analysis, (i) eliminate the risk of calculation errors by storing and using pre-calculated round keys, and (ii) detect calculation errors using additional information such as parity information It is also known that correction is performed, (iii) a calculation error is detected by executing the same calculation a plurality of times and comparing the calculation results (see, for example, Non-Patent Document 2).

J.Takahashi,T.Fukunaga,K.Yamakoshi,“DFA,Mechanism on the AES Key Schedule”,Fault Diagnosis and Tolerance in Cryptography,pp.62−75,IEEE Computer Society,2007.J. et al. Takahashi, T .; Fukunaga, K. et al. Yamakoshi, “DFA, Mechanism on the AES Key Schedule”, Fault Diagnostics and Tolerance in Cryptography, pp. 62-75, IEEE Computer Society, 2007. C.−N.Chen,S.−M.Yen,“Differential Fault Analysis on AES Key Schedule and Some Countermeasures”,Information Security and Privacy,8th Australasian Conference,ACISP 2003,pp.118−129,Lecture Notes in Computer Science 2727,Springer−Verlag.C. -N. Chen, S.M. -M. Yen, “Differential Fault Analysis on AES Key Schedule and Some Countermeasures”, Information Security and Privacy, 8th Australian Conference 3, ACISP. 118-129, Texture Notes in Computer Science 2727, Springer-Verlag.

しかしながら、(i)の対策を用いる場合には、予め計算した鍵を記憶する安全な記憶領域が必要となる。さらに、秘密鍵が更新される場合には、ラウンド鍵を誤りなく計算して記憶しなおさなければならない。(ii)の対策を用いる場合には、付加情報を計算するための計算量および検証のための計算量が増加するという問題があった。(iii)の対策を用いる場合には、同一の回路を利用して計算を複数回実行するときには計算時間が増加するという問題や、複数の計算結果を比較するための演算等が必要になるため計算量が増加するという問題があった。なお、(iii)の対策を用いて、複数の回路を利用して複数回の計算を並行して実行すれば、計算時間や計算量の増加を抑止しうるが、回路規模が増加するという別の問題が生じる。   However, when the countermeasure (i) is used, a safe storage area for storing a pre-calculated key is required. Furthermore, when the secret key is updated, the round key must be calculated and stored without error. When the measure (ii) is used, there is a problem that the amount of calculation for calculating additional information and the amount of calculation for verification increase. When the countermeasure of (iii) is used, there is a problem that the calculation time increases when the calculation is executed a plurality of times using the same circuit, and an operation for comparing a plurality of calculation results is required. There was a problem that the calculation amount increased. If the calculation of (iii) is used and a plurality of calculations are executed in parallel using a plurality of circuits, an increase in calculation time and amount of calculation can be suppressed, but the circuit scale increases. Problem arises.

本発明は、上記に鑑みてなされたものであって、付加情報等の計算のための計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができる装置、方法およびプログラムを提供することを目的とする。   The present invention has been made in view of the above, and an apparatus capable of executing a key schedule operation that is safe for failure use analysis while avoiding an increase in the amount of calculation for calculating additional information and the like. An object is to provide a method and a program.

上述した課題を解決し、目的を達成するために、本発明は、ブロック暗号方式の各ラウンドで利用するラウンド鍵をスケジュールする鍵スケジュール装置であって、複数のラウンドそれぞれに対応する複数のラウンド鍵を記憶する第1記憶部と、予め定められた処理サイクルごとに、前記第1記憶部に記憶された複数のラウンド鍵と、複数のラウンド鍵のうち少なくとも1つのラウンド鍵の一部と、のいずれかを表す更新対象鍵を取得し、取得した前記更新対象鍵に基づいて、取得した前記更新対象鍵のラウンドの次のラウンドのラウンド鍵を算出する演算部と、前記処理サイクルごとに、算出されたラウンド鍵で、前記第1記憶部の前記更新対象鍵を更新する更新部と、を備えたことを特徴とする。   In order to solve the above-described problems and achieve the object, the present invention is a key schedule device that schedules a round key to be used in each round of a block cipher scheme, and a plurality of round keys corresponding to each of a plurality of rounds. A plurality of round keys stored in the first storage unit and a part of at least one of the plurality of round keys for each predetermined processing cycle, An update target key representing any one of them is acquired, and a calculation unit that calculates a round key of the next round of the acquired update target key based on the acquired update target key, and calculated for each processing cycle And an update unit that updates the update target key of the first storage unit with the round key that has been set.

また、本発明は、ブロック暗号方式の各ラウンドで利用するラウンド鍵をスケジュールする鍵スケジュール装置であって、ラウンド鍵を記憶する第1記憶部と、予め定められた処理サイクルごとに、前記第1記憶部に記憶されたラウンド鍵を取得し、取得したラウンド鍵に基づいて、取得したラウンド鍵のラウンドの1つ後のラウンドのラウンド鍵と、2つ後のラウンドのラウンド鍵とを算出する演算部と、前記処理サイクルごとに、算出された2つ後のラウンドのラウンド鍵で、前記第1記憶部のラウンド鍵を更新する更新部と、を備えたことを特徴とする。   The present invention is also a key schedule device that schedules a round key to be used in each round of a block cipher system, and includes a first storage unit that stores a round key, and the first storage unit that is set for each predetermined processing cycle. An operation for obtaining a round key stored in the storage unit and calculating a round key for the next round of the obtained round key and a round key for the second round based on the obtained round key. And an update unit that updates the round key of the first storage unit with the calculated round key of the next two rounds for each processing cycle.

また、本発明は、上記装置を実行することができる方法およびプログラムである。   Further, the present invention is a method and program capable of executing the above-described apparatus.

本発明によれば、計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができるという効果を奏する。   According to the present invention, it is possible to execute a safe key schedule calculation for failure utilization analysis while avoiding an increase in calculation amount.

以下に添付図面を参照して、この発明にかかる装置、方法およびプログラムの最良な実施の形態を詳細に説明する。   Exemplary embodiments of an apparatus, a method, and a program according to the present invention will be described below in detail with reference to the accompanying drawings.

(第1の実施の形態)
ブロック暗号方式で暗号化処理を行う際に用いる鍵スケジュール装置に、本発明を適用した例を説明する。ここで、ブロック暗号方式とは、方式ごとに定められたビット長ごとに、暗号処理の対象となる平文をブロック分割して、分割されたブロックごとに暗号化処理を行う方式である。ブロック暗号方式は、ラウンドとよばれる単位の処理を繰り返し行い、平文のブロックから暗号文のブロックを計算する。各ラウンドは、前のラウンドが出力するデータブロック(最初のラウンドでは平文ブロック)と、予め保持している鍵データから鍵スケジュール装置において計算されるラウンド鍵とを入力として、次のラウンドが利用するデータブロック(最後のラウンドでは暗号文ブロック)を出力する。
(First embodiment)
An example in which the present invention is applied to a key schedule device used when performing an encryption process by a block encryption method will be described. Here, the block encryption method is a method in which a plaintext to be encrypted is divided into blocks for each bit length determined for each method, and encryption processing is performed for each divided block. In the block cipher system, a process called a round is repeatedly performed to calculate a ciphertext block from a plaintext block. Each round uses a data block output by the previous round (a plaintext block in the first round) and a round key calculated by the key scheduling apparatus from previously held key data, and is used by the next round. Output data block (ciphertext block in the last round).

以下では、128ビットの秘密鍵を用いるAESの鍵スケジュール装置として実現した場合の例を説明するが、適用可能な秘密鍵は128ビットに限られるものではない。128ビットの秘密鍵を用いるAESでは、平文のブロックは128ビットであり、ラウンド数は10である。   In the following, an example in which the present invention is realized as an AES key scheduling apparatus using a 128-bit secret key will be described, but the applicable secret key is not limited to 128 bits. In AES using a 128-bit secret key, the plaintext block is 128 bits and the number of rounds is 10.

第1の実施の形態にかかる鍵スケジュール装置は、AESによる暗号化処理の各ラウンドで利用するラウンド鍵を算出するときに、所定の処理サイクルの1サイクルで複数のラウンドのラウンド鍵を算出する。ここで、所定の処理サイクルとは、1ラウンド分の処理を行う単位をあらわす。例えば、1クロックごとに1ラウンド分の処理を行うハードウェアを構成する場合には処理サイクルは1クロックであり、2クロックごとに1ラウンド分の処理を行うハードウェア構成をする場合には処理サイクルは2クロックである。これにより、上記のような故障利用解析によって9ラウンド目のラウンド鍵の計算を誤らせたとしても、その前後の8ラウンド目または10ラウンド目のラウンド鍵にも計算誤りが生じうることにより、秘密鍵の導出が困難となる。   The key schedule device according to the first embodiment calculates a round key of a plurality of rounds in one cycle of a predetermined processing cycle when calculating a round key to be used in each round of encryption processing by AES. Here, the predetermined processing cycle represents a unit for processing for one round. For example, when configuring hardware that performs processing for one round per clock, the processing cycle is one clock, and when configuring hardware that performs processing for one round every two clocks, processing cycles Is 2 clocks. As a result, even if the ninth round key is miscalculated by the failure usage analysis as described above, a calculation error may occur in the eighth or tenth round key before and after that. It is difficult to derive the key.

図1は、第1の実施の形態にかかる鍵スケジュール装置100の構成を示すブロック図である。図1に示すように、鍵スケジュール装置100は、スケジュール部310と、第1記憶部320と、第2記憶部330とを備えている。また、鍵スケジュール装置100は、鍵スケジュール装置100で算出されたラウンド鍵を用いてデータを暗号化する暗号化装置200と接続されている。   FIG. 1 is a block diagram illustrating a configuration of a key schedule apparatus 100 according to the first embodiment. As shown in FIG. 1, the key schedule device 100 includes a schedule unit 310, a first storage unit 320, and a second storage unit 330. The key schedule device 100 is connected to an encryption device 200 that encrypts data using the round key calculated by the key schedule device 100.

鍵スケジュール装置100および暗号化装置200は、例えば、AESにしたがってデータを暗号化する回路であるAES暗号化回路に含まれる鍵スケジュール回路、および、データ暗号化回路として実現することができる。   The key schedule device 100 and the encryption device 200 can be realized, for example, as a key schedule circuit and a data encryption circuit included in an AES encryption circuit that is a circuit for encrypting data according to AES.

第1記憶部320は、複数のラウンドに対応する複数のラウンド鍵を記憶するレジスタである。第1記憶部320は、128ビット(16バイト)のラウンド鍵を4バイトごとに記憶する4つのレジスタ320a〜320dから構成される。   The first storage unit 320 is a register that stores a plurality of round keys corresponding to a plurality of rounds. The first storage unit 320 includes four registers 320a to 320d that store a 128-bit (16-byte) round key every 4 bytes.

レジスタ320a〜320dには、後述する更新部312によって互いに異なるラウンドのラウンド鍵が記憶される。具体的には、レジスタ320aおよび320bは、レジスタ320cおよび320dより1つ進んだラウンドのラウンド鍵が記憶される。   In the registers 320a to 320d, round keys of different rounds are stored by the update unit 312 described later. Specifically, the registers 320a and 320b store a round key of one round advanced from the registers 320c and 320d.

第2記憶部330は、レジスタ320aおよび320bに記憶されているラウンド鍵の1つ前のラウンドの対応するラウンド鍵を記憶するレジスタである。第2記憶部330は、レジスタ320aおよび320bにそれぞれ対応するラウンド鍵を記憶するレジスタ330aおよび330bから構成される。   The second storage unit 330 is a register that stores a round key corresponding to the previous round of the round key stored in the registers 320a and 320b. The second storage unit 330 includes registers 330a and 330b that store round keys corresponding to the registers 320a and 320b, respectively.

レジスタ330aおよび330bを備えることにより、鍵スケジュール装置100の出力がラウンドごとに揃うように調節することができる。すなわち、レジスタ330aおよび330bは、後述する出力部313が、暗号化装置200に同一のラウンドのラウンド鍵の全部を出力するときに参照される。   By providing the registers 330a and 330b, it is possible to adjust the output of the key schedule device 100 so as to be aligned every round. That is, the registers 330a and 330b are referred to when the output unit 313 described later outputs all of the round keys of the same round to the encryption device 200.

スケジュール部310は、第1記憶部320に記憶された複数のラウンドのラウンド鍵を参照して、次のラウンドのラウンド鍵を順次算出する鍵スケジュール演算処理を実行する。スケジュール部310は、詳細な構成として、演算部311と、更新部312と、出力部313とを備えている。   The schedule unit 310 refers to a plurality of round keys stored in the first storage unit 320 and executes key schedule calculation processing for sequentially calculating the round keys of the next round. The schedule unit 310 includes a calculation unit 311, an update unit 312, and an output unit 313 as detailed configurations.

演算部311は、所定の処理サイクルで、第1記憶部320に記憶されたラウンド鍵の次のラウンドのラウンド鍵を算出する。例えば、鍵スケジュール装置100をハードウェア回路で実現する場合、演算部311は、同期を取るためのクロック信号の周期(クロック周期)を所定の処理サイクルとすることができる。また、例えば、第5の実施の形態(後述)のように、鍵スケジュール装置100の処理をプログラムにより実現する場合、演算部311は、当該プログラムで定められた所定の処理(ステップ)を実行する周期を所定の処理サイクルとすることができる。   The calculation unit 311 calculates a round key for the next round of the round keys stored in the first storage unit 320 in a predetermined processing cycle. For example, when the key schedule device 100 is realized by a hardware circuit, the arithmetic unit 311 can set a cycle of a clock signal (clock cycle) for synchronization as a predetermined processing cycle. Further, for example, when the process of the key schedule device 100 is realized by a program as in the fifth embodiment (described later), the arithmetic unit 311 executes a predetermined process (step) defined by the program. The period can be a predetermined processing cycle.

演算部311は、各処理サイクルで、第1記憶部320に記憶されたラウンド鍵のうち、更新する対象となるラウンド鍵を表す更新対象鍵を取得し、更新対象鍵に対する次のラウンドのラウンド鍵を算出する。本実施の形態では、演算部311は、第1記憶部320に記憶された複数のラウンドのラウンド鍵それぞれを更新対象鍵としてラウンド鍵を算出する。   The calculation unit 311 acquires an update target key representing a round key to be updated among the round keys stored in the first storage unit 320 in each processing cycle, and the round key of the next round with respect to the update target key Is calculated. In the present embodiment, the calculation unit 311 calculates a round key using each of the round keys of a plurality of rounds stored in the first storage unit 320 as an update target key.

更新部312は、算出されたラウンド鍵で、第1記憶部320に記憶された更新対象鍵を更新する。   The update unit 312 updates the update target key stored in the first storage unit 320 with the calculated round key.

出力部313は、第1記憶部320のレジスタ320cおよび320dに記憶されたラウンド鍵と、第2記憶部330のレジスタ330aおよび330bに記憶されたラウンド鍵とを、暗号化装置200に出力する。これにより、暗号化装置200は、同一のラウンドのラウンド鍵を同時に取得することができる。なお、暗号化装置200が、ラウンド鍵が計算されるタイミングの相違を調整するように構成してもよい。この場合は、レジスタ330aおよび330bは不要となる。   The output unit 313 outputs the round key stored in the registers 320 c and 320 d of the first storage unit 320 and the round key stored in the registers 330 a and 330 b of the second storage unit 330 to the encryption device 200. Thereby, the encryption apparatus 200 can acquire the round key of the same round simultaneously. Note that the encryption device 200 may be configured to adjust the difference in timing when the round key is calculated. In this case, the registers 330a and 330b are unnecessary.

次に、鍵スケジュール装置100を実現する回路例について図2を用いて説明する。図2は、第1の実施の形態の鍵スケジュール装置100の一例を示す回路図である。   Next, a circuit example for realizing the key schedule apparatus 100 will be described with reference to FIG. FIG. 2 is a circuit diagram illustrating an example of the key schedule device 100 according to the first embodiment.

同図に示すように、鍵スケジュール装置100は、上述のレジスタ320a〜320dと、レジスタ330aおよび330bとの他に、排他的論理和回路302a〜302dと、選択器303a〜303eと、RotWord演算部304と、SubByte演算部305と、AddRcon演算部306とを含んでいる。   As shown in the figure, in addition to the above-described registers 320a to 320d and registers 330a and 330b, the key schedule device 100 includes exclusive OR circuits 302a to 302d, selectors 303a to 303e, and a RotWord calculation unit. 304, a SubByte calculation unit 305, and an AddRcon calculation unit 306 are included.

なお、同図では、R(i=0〜15)は、レジスタ320a〜320dに記憶される4バイトのデータを4分割した1バイト(8ビット)のデータを表すものとする。 In the figure, R i (i = 0 to 15) represents 1-byte (8-bit) data obtained by dividing the 4-byte data stored in the registers 320a to 320d into four.

排他的論理和回路302a〜302dは、ビットごとの排他的論理和を計算する。   The exclusive OR circuits 302a to 302d calculate an exclusive OR for each bit.

選択器303a〜303dは、鍵スケジュール装置100への入力と、排他的論理和回路302a〜302dの出力とを、クロック信号に応じて選択して出力する。鍵スケジュール装置100への入力とは、ラウンド鍵の演算に用いる鍵として入力される、ラウンド鍵の初期状態(初期値)である秘密鍵を意味する。また、同図に示すように、本実施の形態では、128ビット(16バイト)の秘密鍵を4バイトずつ分割したデータが、選択器303a〜303dにそれぞれ入力される。   The selectors 303a to 303d select and output the input to the key schedule device 100 and the outputs of the exclusive OR circuits 302a to 302d according to the clock signal. The input to the key schedule device 100 means a secret key that is an initial state (initial value) of a round key, which is input as a key used for round key calculation. As shown in the figure, in this embodiment, data obtained by dividing a 128-bit (16-byte) secret key by 4 bytes is input to the selectors 303a to 303d, respectively.

選択器303eは、クロック信号に応じて、レジスタ320dが保持する値、または排他的論理和回路302dが出力する値のいずれかを選択して出力する回路である。   The selector 303e is a circuit that selects and outputs either the value held by the register 320d or the value output by the exclusive OR circuit 302d in accordance with the clock signal.

選択器303a〜303eは、事前に設定された情報または外部から指示された命令等にしたがって、いずれの値を選択するかを決定する。選択器303a〜303eによるクロックごとの選択方法の詳細については後述する。   The selectors 303a to 303e determine which value to select in accordance with information set in advance or a command instructed from the outside. Details of the selection method for each clock by the selectors 303a to 303e will be described later.

RotWord演算部304は、4バイトのデータ「ki,12i,13i,14i,15」を入力として、バイトの順番を入れ替えたデータ「ki,13i,14i,15i,12」を出力する。なお、記号「ki,j」は、iラウンド目のラウンド鍵の(j+1)バイト目のデータを表す。そして、例えばデータ「ki,12i,13i,14i,15」は、各1バイトのデータである「ki,12」、「ki,13」、「ki,14」、および「ki,15」をこの順序で連結した4バイトのデータを表す。 RotWord operation unit 304, 4-byte data "k i, 12 k i, 13 k i, 14 k i, 15 " as input, data obtained by rearranging the order of the bytes "k i, 13 k i, 14 k i , 15 k i, 12 ”. The symbol “k i, j ” represents the (j + 1) th byte data of the i-th round key. For example, the data “ki , 12 ki , 13 ki , 14 ki , 15 ” is “ki , 12 ”, “ki , 13 ”, “ki , 14 ” which is 1-byte data. ”And“ ki , 15 ”in this order represent 4-byte data.

SubByte演算部305は、4バイトのデータを入力として、入力された4バイトの各バイトにAESの仕様で定められた非線形演算を施して出力する。   The SubByte calculation unit 305 receives 4-byte data as input, performs non-linear calculation defined by the AES specification on each input 4-byte byte, and outputs the result.

AddRCon演算部306は、4バイトのデータを入力として、AESの仕様でラウンドごとに定められたラウンド定数を入力された4バイトに加算(排他的論理和演算)して出力する。   The AddRCon operation unit 306 receives 4-byte data as input, adds a round constant determined for each round in the AES specification to the input 4 bytes (exclusive OR operation), and outputs the result.

上述のように、本実施の形態では、レジスタ320aおよび320bに保持されるラウンド鍵は、レジスタ320cおよび320dに保持されるラウンド鍵よりも1ラウンド分進んだラウンド鍵となる。   As described above, in the present embodiment, the round key held in the registers 320a and 320b is a round key advanced by one round from the round key held in the registers 320c and 320d.

次に、このように構成された鍵スケジュール装置100による鍵スケジュール演算処理について説明する。図3は、第1の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。   Next, a key schedule calculation process by the key schedule device 100 configured as described above will be described. FIG. 3 is a diagram illustrating an example of data output at each clock of the key schedule calculation process according to the first embodiment.

以下に、最初のクロックである時刻Cから、10ラウンド目のラウンド鍵を算出するクロックである時刻C11までの各クロックでの処理の詳細について説明する。 Details of the processing at each clock from time C 0 as the first clock to time C 11 as the clock for calculating the round key for the tenth round will be described below.

(時刻C)選択器303aから303dは、それぞれ鍵スケジュール装置100の入力として受け付けた4バイトの鍵「k0,00,10,20,3」、「k0,40,50,60,7」、「k0,80,90,100,11」、および「k0,120,130,140,15」を選択する。レジスタ320aから320dは、クロック周期の終わりに、図3のCに対応する行に示すような値をそれぞれ保持する。 The (time C 0 ) selectors 303a to 303d receive the 4-byte keys “k 0, 0 k 0, 1 k 0, 2 k 0 , 3 ”, “k 0, 4 ” received as inputs of the key schedule device 100, respectively. k 0,5 k 0,6 k 0,7 "," k 0,8 k 0,9 k 0,10 k 0,11 ", and" k 0,12 k 0,13 k 0,14 k 0 , 15 ”is selected. 320d from the register 320a is the end of the clock period, respectively holding the values shown in the row corresponding to C 0 of FIG.

(時刻C)レジスタ320aから320dは保持している値を出力する。選択器303aと303bは、排他的論理和回路302aと302bの出力を選択して出力する。このように、ラウンド鍵を算出する最初のクロックでは、入力された鍵の先頭8バイトに相当する要素のみが選択され、後述するようにこの先頭8バイトのみが次のラウンド鍵に更新される。すなわち、この場合は、先頭8バイトに相当する要素が更新対象鍵となる。 (Time C 1 ) The registers 320a to 320d output the held values. The selectors 303a and 303b select and output the outputs of the exclusive OR circuits 302a and 302b. Thus, in the first clock for calculating the round key, only the element corresponding to the first 8 bytes of the input key is selected, and only the first 8 bytes are updated to the next round key as will be described later. That is, in this case, the element corresponding to the first 8 bytes is the update target key.

選択器303cと303dは、鍵スケジュール装置100の入力として受け付けた4バイトの鍵「k0,80,90,100,11」および「k0,120,130,140,15」をそれぞれ選択する。 Selector 303c and 303d is, 4 bytes of the key that has been received as input of the key schedule device 100 "k 0,8 k 0,9 k 0,10 k 0,11" and "k 0,12 k 0,13 k 0 , 14 k 0,15 ”.

選択器303eは、レジスタ320dが保持する値を選択して出力する。このとき、レジスタ320dに保持される「k0,120,130,140,15」は、RotWord演算部304、SubByte演算部305、およびAddRCon演算部306で変換されて排他的論理和回路302aに送られ、レジスタ320aに保持される「k0,00,10,20,3」を「k1,01,11,21,3」に更新する。更新された「k1,01,11,21,3」は、排他的論理和回路302bに送られ、レジスタ320bに保持される「k0,40,50,60,7」を「k1,41,51,61,7」に更新する。 The selector 303e selects and outputs the value held by the register 320d. At this time, held in the register 320d "k 0,12 k 0,13 k 0,14 k 0,15" is exclusively converted by the RotWord operation unit 304, SubByte calculation unit 305, and AddRCon arithmetic unit 306 “K 0,0 k 0,1 k 0,2 k 0,3 ” sent to the logical sum circuit 302 a and stored in the register 320 a is replaced with “k 1,0 k 1,1 k 1,2 k 1,3 Update to The updated “k 1,0 k 1,1 k 1,2 k 1,3 ” is sent to the exclusive OR circuit 302b and held in the register 320b “k 0,4 k 0,5 k 0”. , 6 k 0,7 ”is updated to“ k 1,4 k 1,5 k 1,6 k 1,7 ”.

一方、レジスタ320cと320dに保持される「k0,80,90,100,11」と「k0,120,130,140,15」は同一の値に更新される。すなわち、これらのレジスタに保持されるデータの値は変化しない。更新された値は、クロック周期の終わりに、図3に示すようにレジスタ320aから320dに保持される。レジスタ330aと330bは、レジスタ320aと320bと同一の値が保持される。 On the other hand, it is held in the register 320c and 320d as "k 0,8 k 0,9 k 0,10 k 0,11" "k 0,12 k 0,13 k 0,14 k 0,15" identical Updated to value. That is, the value of data held in these registers does not change. The updated value is held in registers 320a-320d as shown in FIG. 3 at the end of the clock period. The registers 330a and 330b hold the same values as the registers 320a and 320b.

(時刻C)レジスタ320aから320dおよびレジスタ330aから330bは、保持している値を出力する。選択器303aから303dは、排他的論理和回路302aから302dの出力を選択して出力する。選択器303eは、排他的論理和回路302dが出力する値を選択して出力する。レジスタ320bに保持される「k1,41,51,61,7」は、排他的論理和回路302cに送られ、レジスタ320cに保持される「k0,80,90,100,11」を「k1,81,91,101,11」に更新する。更新された「k1,81,91,101,11」は、排他的論理和回路302dに送られ、レジスタ320dに保持される「k0,120,130,140,15」を「k1,121,131,141,15」に更新する。更新された「k1,121,131,141,15」は、RotWord演算部304、SubByte演算部305、およびAddRCon演算部306で変換されて排他的論理和回路302aに送られ、レジスタ320aに保持される「k1,01,11,21,3」を「k2,02,12,22,3」に更新する。 (Time C 2 ) The registers 320a to 320d and the registers 330a to 330b output the held values. The selectors 303a to 303d select and output the outputs of the exclusive OR circuits 302a to 302d. The selector 303e selects and outputs the value output from the exclusive OR circuit 302d. “K 1,4 k 1,5 k 1,6 k 1,7 ” held in the register 320 b is sent to the exclusive OR circuit 302 c and “k 0,8 k 0, 9 k 0,10 k 0,11 ”is updated to“ k 1,8 k 1,9 k 1,10 k 1,11 ”. Updated "k 1,8 k 1,9 k 1,10 k 1,11" exclusively sent to the OR circuit 302d, is held in the register 320d "k 0,12 k 0,13 k 0 , to update the 14 k 0,15 "to" k 1,12 k 1,13 k 1,14 k 1,15 ". Updated "k 1,12 k 1,13 k 1,14 k 1,15" is converted by the RotWord operation unit 304, SubByte calculation unit 305, and AddRCon calculating section 306 sent to the exclusive OR circuit 302a and Then, “k 1,0 k 1,1 k 1,2 k 1,3 ” held in the register 320a is updated to “k 2,0 k 2,1 k 2,2 k 2,3 ”.

更新された「k2,02,12,22,3」は、排他的論理和回路302bに送られ、レジスタ320bに保持される「k1,41,51,61,7」を「k2,42,52,62,7」に更新する。レジスタ330aと330bに保持される値「k1,01,11,21,3」と「k1,41,51,61,7」、および、排他的論理和回路302cと302dの出力「k1,81,91,101,11」と「k1,121,131,141,15」は、1ラウンド目のラウンド鍵として鍵スケジュール装置100から出力される。更新された値は、クロック周期の終わりに、図3に示すようにレジスタ320aから320dに保持される。レジスタ330aと330bは、レジスタ320aと320bと同一の値が保持される。 The updated “k 2,0 k 2,1 k 2,2 k 2,3 ” is sent to the exclusive OR circuit 302b and held in the register 320b “k 1,4 k 1,5 k 1 , 6 k 1,7 ”is updated to“ k 2,4 k 2,5 k 2,6 k 2,7 ”. The values “k 1,0 k 1,1 k 1,2 k 1,3 ” and “k 1,4 k 1,5 k 1,6 k 1,7 ” held in the registers 330 a and 330 b and exclusive logical output of the OR circuit 302c and 302d as "k 1,8 k 1,9 k 1,10 k 1,11," "k 1,12 k 1,13 k 1,14 k 1,15" is, 1 round Output from the key schedule device 100 as the round key of the eye. The updated value is held in registers 320a-320d as shown in FIG. 3 at the end of the clock period. The registers 330a and 330b hold the same values as the registers 320a and 320b.

時刻C10まで同様の処理が繰り返され、9ラウンド目のラウンド鍵「k9,09,19,29,3」、「k9,49,59,69,7」、「k9,89,99,109,11」、および「k9,129,139,149,15」が出力され、図3に示すようにレジスタ320a(および330a)、レジスタ320b(および330b)、レジスタ320c、およびレジスタ320dに、それぞれ「k10,010,110,210,3」、「k10,410,510,610,7」、「k9,89,99,109,11」、および「k9,129,139,149,15」が保持される。 Time C 10 to a similar process is repeated, 9 round of the round-key "k 9,0 k 9,1 k 9,2 k 9,3", "k 9,4 k 9,5 k 9,6 k 9,7 "," k 9,8 k 9,9 k 9,10 k 9,11 ", and" k 9,12 k 9,13 k 9,14 k 9,15 "is output, in FIG. 3 shown as registers 320a (and 330a), the register 320b (and 330b), the register 320c, and the register 320d, respectively "k 10,0 k 10,1 k 10,2 k 10,3", "k 10, 4 k 10,5 k 10,6 k 10,7 "," k 9,8 k 9,9 k 9,10 k 9,11 ", and" k 9,12 k 9,13 k 9,14 k 9, 15 "is held.

(時刻C11)レジスタ320aから320dおよびレジスタ330aから330bは、保持している値を出力する。選択器303aから303dは、排他的論理和回路302aから302dの出力を選択して出力する。選択器303eは、排他的論理和回路302dが出力する値を選択して出力する。レジスタ320bに保持される「k10,410,510,610,7」は、排他的論理和回路302cに送られ、レジスタ320cに保持される「k9,89,99,109,11」を「k10,810,910,1010,11」に更新する。 (Time C 11 ) The registers 320a to 320d and the registers 330a to 330b output the held values. The selectors 303a to 303d select and output the outputs of the exclusive OR circuits 302a to 302d. The selector 303e selects and outputs the value output from the exclusive OR circuit 302d. “K 10,4 k 10,5 k 10,6 k 10,7 ” held in the register 320b is sent to the exclusive OR circuit 302c, and “k 9,8 k 9, 9 k 9,10 k 9,11 "to update the" k 10,8 k 10,9 k 10,10 k 10,11 ".

更新された「k10,810,910,1010,11」は、排他的論理和回路302dに送られ、レジスタ320dに保持される「k9,129,139,149,15」を「k10,1210,1310,1410,15」に更新する。レジスタ330aと330bに保持される「k10,010,110,210,3」と「k10,410,510,610,7」、および、更新された「k10,810,910,1010,11」と「k10,1210,1310,1410,15」は、10ラウンド目のラウンド鍵として鍵スケジュール装置100から出力される。レジスタ320aおよび320bに保持される値は、更新された「k10,1210,1310,1410,15」に基づいて、実際には使用されない値に更新されて保持される。例えば、上記と同様の処理により、11ラウンド目に相当する値に更新されて保持される。図3では、使用されないことを示すために、この値を記号「---」で表している。 Updated "k 10,8 k 10,9 k 10,10 k 10,11" exclusively sent to the OR circuit 302d, is held in the register 320d "k 9,12 k 9,13 k 9 , 14 k 9,15 "is updated to" k 10,12 k 10,13 k 10,14 k 10,15 ". It is held in the register 330a and 330b and the "k 10,0 k 10,1 k 10,2 k 10,3" "k 10,4 k 10,5 k 10,6 k 10,7", and is updated was "k 10,8 k 10,9 k 10,10 k 10,11" and "k 10,12 k 10,13 k 10,14 k 10,15", the key schedule device as a round key of the 10 round 100. Based on the updated “k 10,12 k 10,13 k 10,14 k 10,15 ”, the values held in the registers 320 a and 320 b are updated to values that are not actually used. For example, by a process similar to the above, it is updated and held at a value corresponding to the 11th round. In FIG. 3, this value is represented by the symbol “---” to indicate that it is not used.

このようにして鍵スケジュール演算処理を実行することにより、非特許文献1などで開示されている故障利用解析で秘密鍵を導出することが困難となる。すなわち、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻CまたはC10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵の一部である「k8,88,98,108,118,128,138,148,15」、または、10ラウンド目のラウンド鍵の一部である「k10,010,110,210,310,410,510,610,7」にも計算誤りが生じる可能性があるため、故障利用解析により秘密鍵を求めることが困難となる。 By executing the key schedule calculation process in this manner, it becomes difficult to derive the secret key by the failure use analysis disclosed in Non-Patent Document 1 or the like. In other words, in order to cause a calculation error in the ninth round key, it is necessary to make a calculation error at time C 9 or C 10 . However, it is part of the round key of 8 round this time "k 8,8 k 8,9 k 8,10 k 8,11 k 8,12 k 8,13 k 8,14 k 8,15 ", or, calculated it is a part of the round key of the 10 th round "k 10,0 k 10,1 k 10,2 k 10,3 k 10,4 k 10,5 k 10,6 k 10,7 " Since an error may occur, it is difficult to obtain a secret key by failure use analysis.

また、上記非特許文献2のように、付加情報の計算や、計算結果の比較などのような、ラウンド鍵以外の情報のための計算が不要であるため、計算量の増大を抑止することができる。また、11クロック(時刻C11)で10ラウンド目までのラウンド鍵が算出できるため、10クロックで10ラウンド目までのラウンド鍵を算出する従来の方法と比較したラウンド鍵を計算するための計算量の増加も最小限にすることができる。 Further, as in Non-Patent Document 2 described above, calculation for information other than the round key, such as calculation of additional information and comparison of calculation results, is not necessary, so that an increase in the amount of calculation can be suppressed. it can. In addition, since the round key up to the 10th round can be calculated at 11 clocks (time C 11 ), the amount of calculation for calculating the round key compared with the conventional method of calculating the round keys up to the 10th round at 10 clocks The increase of can also be minimized.

これまでは、レジスタ320aおよび320bが、レジスタ320cおよび320dよりも1ラウンド分進んだラウンド鍵を保持するような鍵スケジュール装置について説明した。同様の手法により、レジスタ320aが、レジスタ320b、320c、および320dよりも1ラウンド分進んだラウンド鍵を保持するような鍵スケジュール装置、または、レジスタ320a、320b、および320cが、レジスタ320dよりも1ラウンド分進んだラウンド鍵を保持する鍵スケジュール装置の構成が可能である。   So far, the key schedule device has been described in which the registers 320a and 320b hold a round key advanced by one round than the registers 320c and 320d. In a similar manner, a key scheduling device in which the register 320a holds a round key that is advanced by one round from the registers 320b, 320c, and 320d, or the registers 320a, 320b, and 320c are one more than the register 320d. It is possible to configure a key schedule device that holds round keys advanced by rounds.

このように、第1の実施の形態にかかる鍵スケジュール装置では、AESによる暗号化処理の各ラウンドで利用するラウンド鍵を算出するときに、1クロックで複数のラウンドのラウンド鍵を算出するように鍵スケジュール演算処理を実行することができる。このため、付加情報等の計算のための計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができる。   As described above, in the key schedule device according to the first embodiment, when calculating the round key used in each round of the encryption process by AES, the round key of a plurality of rounds is calculated in one clock. Key schedule calculation processing can be executed. For this reason, it is possible to execute a safe key schedule calculation for failure utilization analysis while avoiding an increase in the amount of calculation for calculating additional information and the like.

(第2の実施の形態)
第1の実施の形態にかかる鍵スケジュール装置では、16バイトのラウンド鍵を4バイト単位で分割し、先頭の8バイトが、末尾の8バイトより1ラウンド進むようにラウンド鍵を算出していた。第2の実施の形態にかかる鍵スケジュール装置は、分割した4バイトをさらに1バイトごとに分割し、先頭から奇数番目のバイトが、偶数番目のバイトより1ラウンド進むようにラウンド鍵を算出する。
(Second Embodiment)
In the key schedule device according to the first embodiment, the 16-byte round key is divided into units of 4 bytes, and the round key is calculated so that the first 8 bytes advance one round from the last 8 bytes. The key schedule device according to the second exemplary embodiment further divides the divided 4 bytes into one byte, and calculates the round key so that the odd-numbered bytes from the head advance one round from the even-numbered bytes.

図4は、第2の実施の形態にかかる鍵スケジュール装置500の構成を示すブロック図である。図4に示すように、鍵スケジュール装置500は、スケジュール部510と、第1記憶部520と、第2記憶部530とを備えている。   FIG. 4 is a block diagram illustrating a configuration of the key schedule device 500 according to the second embodiment. As shown in FIG. 4, the key schedule device 500 includes a schedule unit 510, a first storage unit 520, and a second storage unit 530.

第2の実施の形態では、上述のように1バイト単位でラウンド鍵の更新を制御するようにスケジュール部510と、第1記憶部520と、第2記憶部530とを構成した点が、第1の実施の形態と異なっている。以下では、第2の実施の形態の鍵スケジュール装置500を実現する回路例である図5を用いて、鍵スケジュール装置500の機能について説明する。図5は、第2の実施の形態の鍵スケジュール装置500の一例を示す回路図である。   In the second embodiment, the schedule unit 510, the first storage unit 520, and the second storage unit 530 are configured to control the update of the round key in units of 1 byte as described above. This is different from the first embodiment. Hereinafter, functions of the key schedule device 500 will be described with reference to FIG. 5 which is a circuit example for realizing the key schedule device 500 of the second embodiment. FIG. 5 is a circuit diagram illustrating an example of the key schedule device 500 according to the second embodiment.

同図に示すように、鍵スケジュール装置500は、第1記憶部520を構成するレジスタ520a〜520pと、第2記憶部530を構成するレジスタ530a〜530hと、レジスタ501yおよび501zと、排他的論理和回路502a〜502pと、選択器503a〜503pと、選択器503q〜503tと、RotWord演算部304と、SubByte演算部305と、AddRcon演算部506とを含んでいる。   As shown in the figure, the key schedule device 500 includes registers 520a to 520p constituting the first storage unit 520, registers 530a to 530h constituting the second storage unit 530, registers 501y and 501z, and exclusive logic. The sum circuits 502a to 502p, selectors 503a to 503p, selectors 503q to 503t, a RotWord arithmetic unit 304, a SubByte arithmetic unit 305, and an AddRcon arithmetic unit 506 are included.

レジスタ520aから520dは、第1の実施の形態におけるレジスタ320aに対応し、ラウンド鍵の先頭4バイトをバイトごとに保持するレジスタである。同様に、レジスタ520eから520h、レジスタ520iから520l、およびレジスタ520mから520pは、それぞれ第1の実施の形態におけるレジスタ320b、レジスタ320c、およびレジスタ320dに対応する。   The registers 520a to 520d correspond to the register 320a in the first embodiment, and are registers that hold the first 4 bytes of the round key for each byte. Similarly, the registers 520e to 520h, the registers 520i to 520l, and the registers 520m to 520p correspond to the register 320b, the register 320c, and the register 320d in the first embodiment, respectively.

レジスタ530aから530hは、第1の実施の形態におけるレジスタ330aと330bと同様に、鍵スケジュール装置500の出力が、ラウンドごとに揃うように調節するために用いられる。   The registers 530a to 530h are used to adjust the outputs of the key schedule device 500 so as to be aligned for each round, similarly to the registers 330a and 330b in the first embodiment.

レジスタ501yと501zは、特定の時刻で計算されるラウンド鍵のラウンドに差分を生じさせるために用いられる。   The registers 501y and 501z are used to generate a difference in the round key round calculated at a specific time.

排他的論理和回路502aから502pは、第1の実施の形態における排他的論理和回路302aから302dをバイトごとに分割した回路であり、2つの1バイトの入力に対して、ビットごとに排他的論理和を計算した結果を出力する。   The exclusive OR circuits 502a to 502p are circuits obtained by dividing the exclusive OR circuits 302a to 302d in the first embodiment for each byte, and are exclusive for each bit with respect to two 1-byte inputs. Outputs the result of calculating the logical sum.

選択器503aから503pは、第1の実施の形態における選択器303aから303dをバイトごとに分割した回路であり、排他的論理和回路502aから502pの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する。   The selectors 503a to 503p are circuits in which the selectors 303a to 303d in the first embodiment are divided for each byte, and either the outputs of the exclusive OR circuits 502a to 502p or the inputs of the key schedule device 500 are used. Are selected according to the clock signal and output.

選択器503qと503sは、レジスタ520mと520oの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する回路である。   The selectors 503q and 503s are circuits that select and output either the output of the registers 520m and 520o or the input of the key schedule device 500 according to the clock signal.

選択器503rと503tは、排他的論理和回路502nと502pの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する回路である。   The selectors 503r and 503t are circuits that select and output either the output of the exclusive OR circuits 502n and 502p or the input of the key schedule device 500 according to the clock signal.

RotWord演算部304、およびSubByte演算部305は、第1の実施の形態の鍵スケジュール装置100の回路図である図2と同様であるため同一の符号を付し、説明は省略する。   The RotWord calculation unit 304 and the SubByte calculation unit 305 are the same as those in FIG. 2 which is the circuit diagram of the key schedule device 100 according to the first embodiment, and thus the same reference numerals are given and description thereof is omitted.

AddRCon演算部506は、AESの仕様でラウンドごとに定められたラウンド定数を4バイトの入力に加算(排他的論理和演算)して出力する。ただし、以下に説明する第2の実施の形態では、AddRCon演算部506に入力される4バイトの入力は異なる複数のラウンドに対応するので、対応するラウンドの定数を適切に加算するように構成する。すなわち、AddRCon演算部506は、4バイトを構成する各バイトのラウンドを判定し、各バイトごとに、判定したラウンドに対するラウンド定数を加算する。   The AddRCon operation unit 506 adds the round constant determined for each round in the AES specification to the 4-byte input (exclusive OR operation) and outputs the result. However, in the second embodiment described below, since the 4-byte input input to the AddRCon operation unit 506 corresponds to a plurality of different rounds, the constants of the corresponding rounds are appropriately added. . That is, the AddRCon operation unit 506 determines the round of each byte constituting 4 bytes, and adds a round constant for the determined round for each byte.

次に、このように構成された鍵スケジュール装置500による鍵スケジュール演算処理について説明する。図6は、第2の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。   Next, key schedule calculation processing by the key schedule device 500 configured as described above will be described. FIG. 6 is a diagram illustrating an example of data output at each clock of the key schedule calculation process according to the second embodiment.

以下に、最初のクロックである時刻Cから、10ラウンド目のラウンド鍵を算出するクロックである時刻C11までの各クロックでの処理の詳細について説明する。 Details of the processing at each clock from time C 0 as the first clock to time C 11 as the clock for calculating the round key for the tenth round will be described below.

(時刻C)選択器503aから503p、および選択器503qと503sは、それぞれ鍵スケジュール装置500の入力として受け付けた各バイトの鍵「k0,0」、「k0,1」、「k0,2」、「k0,3」、「k0,4」、「k0,5」、「k0,6」、「k0,7」、「k0,8」、「k0,9」、「k0,10」、「k0,11」、「k0,12」、「k0,13」、「k0,14」、「k0,15」、「k0,12」、「k0,14」を選択する。レジスタ520aから520p、およびレジスタ501yと501zは、クロック周期の終わりに、図6に示すようにそれぞれの値を保持する。 (Time C 0 ) The selectors 503a to 503p and the selectors 503q and 503s receive the keys “k 0,0 ”, “k 0,1 ”, “k 0 ” of each byte received as the input of the key schedule device 500, respectively. , 2 ”,“ k 0,3 ”,“ k 0,4 ”,“ k 0,5 ”,“ k 0,6 ”,“ k 0,7 ”,“ k 0,8 ”,“ k 0, 9 "," k 0,10 "," k 0,11 "," k 0,12 "," k 0,13 "," k 0,14 "," k 0,15 "," k 0,12 And “k 0,14 ” are selected. Registers 520a through 520p and registers 501y and 501z hold their respective values as shown in FIG. 6 at the end of the clock period.

(時刻C)レジスタ520aから520p、およびレジスタ501yと501zは保持している値を出力する。選択器503a、503c、503e、503g、503i、503k、503m、および503oは、それぞれ排他的論理和回路502a、502c、502e、502g、502i、502k、502m、および502oの出力を選択して出力する。選択器503b、503d、503f、503h、503j、503l、503n、503pは、鍵スケジュール装置500の入力として受け付けた各バイトの鍵k0,1」、「k0,3」、「k0,5」、「k0,7」、「k0,9」、「k0,11」、「k0,13」、「k0,15」を選択する。選択器503qおよび503sは、それぞれレジスタ520mおよび520oが保持する値を選択して出力する。選択器503rおよび503tは、それぞれ鍵スケジュール装置500の入力として受け付けた各バイトの鍵「k0,12」および「k0,14」を選択して出力する。 (Time C 1 ) The registers 520a to 520p and the registers 501y and 501z output the held values. Selectors 503a, 503c, 503e, 503g, 503i, 503k, 503m, and 503o select and output the outputs of the exclusive OR circuits 502a, 502c, 502e, 502g, 502i, 502k, 502m, and 502o, respectively. . The selectors 503b, 503d, 503f, 503h, 503j, 503l, 503n, and 503p receive the keys k 0,1 , “k 0,3 ”, “k 0,5 ” of each byte received as the input of the key schedule device 500. "," k 0,7 "," k 0,9 "," k 0,11 "," k 0,13 ", select the" k 0,15 ". Selectors 503q and 503s select and output values held by registers 520m and 520o, respectively. The selectors 503r and 503t select and output the keys “k 0,12 ” and “k 0,14 ” of each byte received as inputs of the key schedule device 500, respectively.

このとき、選択器503rと503tが出力した「k0,13」および「k0,15」は、RotWord演算部304、およびSubByte演算部305で変換されたのち、AddRCon演算部506で1ラウンド目に対応する定数が加算されて、排他的論理和回路502aと502cに送られ、レジスタ520aと520cに保持される「k0,0」および「k0,2」をそれぞれ「k1,0」および「k1,2」に更新する。 At this time, the output selector 503r and 503t 'k 0, 13 "and" k 0, 15 ", after being converted by the RotWord operation unit 304, and SubByte calculation unit 305, first round in AddRCon arithmetic unit 506 Are added to the exclusive OR circuits 502a and 502c, and "k 0,0 " and "k 0,2 " held in the registers 520a and 520c are respectively changed to "k 1, 0 ". And “k 1,2 ”.

更新された「k1,0」および「k1,2」は、排他的論理和回路502eと502gに送られ、レジスタ520eおよび520gにそれぞれ保持される「k0,4」および「k0,6」をそれぞれ「k1,4」および「k1,6」に更新する。同様に、レジスタ520i、520k、520m、および520oにそれぞれ保持される「k0,8」、「k0,10」、「k0,12」、および「k0,14」は、「k1,8」、「k1,10」、「k1,12」、および「k1,14」にそれぞれ更新される。 The updated “k 1,0 ” and “k 1,2 ” are sent to the exclusive OR circuits 502e and 502g and held in the registers 520e and 520g, respectively, “k 0,4 ” and “k 0, 6 ”is updated to“ k 1,4 ”and“ k 1,6 ”, respectively. Similarly, “k 0,8 ”, “k 0,10 ”, “k 0,12 ”, and “k 0,14 ” held in the registers 520 i, 520 k, 520 m, and 520 o, respectively, are “k 1 , 8 ”,“ k 1,10 ”,“ k 1,12 ”, and“ k 1,14 ”, respectively.

一方、レジスタ520b、520d、520f、520h、520j、520l、520n、520o、501y、および501zにそれぞれ保持される「k0,1」、「k0,3」、「k0,5」、「k0,7」、「k0,9」、「k0,11」、「k0,13」、「k0,15」、「k0,12」、および「k0,14」は、同一の値に更新される。 On the other hand, “k 0,1 ”, “k 0,3 ”, “k 0,5 ”, “k” held in the registers 520b, 520d, 520f, 520h, 520j, 520l, 520n, 520o, 501y, and 501z, respectively. k 0,7 "," k 0,9 "," k 0,11 "," k 0,13 "," k 0,15 "," k 0,12 ", and" k 0,14 "is, Updated to the same value.

更新された値は、クロック周期の終わりに、図6に示すようにレジスタ520aから520p(R〜R15に対応)、およびレジスタ501yと501z(T12、T14に対応)に保持される。 The updated values are held in registers 520a to 520p (corresponding to R 0 to R 15 ) and registers 501y and 501z (corresponding to T 12 and T 14 ) as shown in FIG. 6 at the end of the clock period. .

レジスタ530aから530hは、更新された「k1,0」、「k1,2」、「k1,4」、「k1,6」、「k1,8」、「k1,10」、「k1,12」、および「k1,14」を保持する。 The registers 530a to 530h are updated “k 1,0 ”, “k 1,2 ”, “k 1,4 ”, “k 1,6 ”, “k 1,8 ”, “k 1,10 ”. , “K 1,12 ”, and “k 1,14 ”.

(時刻C)レジスタ520aから520p、レジスタ501y、およびレジスタ501zは保持している値を出力する。選択器503aから503pは、それぞれ排他的論理和回路502aから502pの出力を選択して出力する。選択器503qおよび503sは、それぞれレジスタ520mおよび520oが出力する値を選択して出力する。選択器503rおよび503tは、それぞれ排他的論理和回路502nおよび502pの出力を選択して出力する。 (Time C 2 ) The registers 520a to 520p, the register 501y, and the register 501z output the held values. The selectors 503a to 503p select and output the outputs of the exclusive OR circuits 502a to 502p, respectively. Selectors 503q and 503s select and output values output from registers 520m and 520o, respectively. Selectors 503r and 503t select and output the outputs of exclusive OR circuits 502n and 502p, respectively.

レジスタ501yと501zに保持される「k0,12」および「k0,14」は、RotWord演算部304、およびSubByte演算部305で変換されたのち、AddRCon演算部506で1ラウンド目に対応する定数が加算されて、排他的論理和回路502dと502bに送られ、レジスタ520dおよび520bにそれぞれ保持される「k0,3」および「k0,1」を、それぞれ「k1,3」および「k1,1」に更新する。更新された「k1,1」および「k1,3」は、排他的論理和回路502fと502hに送られ、レジスタ520fおよび520hにそれぞれ保持される「k0,5」および「k0,7」をそれぞれ「k1,5」および「k1,7」に更新する。同様に、レジスタ520j、520l、520n、および520pにそれぞれ保持される「k0,9」、「k0,11」、「k0,13」、および「k0,15」は、それぞれ「k1,9」、「k1,11」、「k1,13」、および「k1,15」に更新される。 “K 0,12 ” and “k 0,14 ” held in the registers 501y and 501z correspond to the first round in the AddRCon operation unit 506 after being converted by the RotWord operation unit 304 and the SubByte operation unit 305. The constants are added to “k 0,3 ” and “k 0,1 ” that are sent to the exclusive OR circuits 502d and 502b and held in the registers 520d and 520b, respectively, “k 1,3 ” and Update to “k 1,1 ”. The updated “k 1,1 ” and “k 1,3 ” are sent to the exclusive OR circuits 502 f and 502 h and held in the registers 520 f and 520 h, respectively, “k 0,5 ” and “k 0, 7 ”is updated to“ k 1,5 ”and“ k 1,7 ”, respectively. Similarly, the register 520j, 520L, 520n, and "k 0, 9" respectively held in 520p, "k 0, 11", "k 0, 13", and "k 0, 15", respectively "k 1,9 "," k1,11 "," k1,13 ", and" k1,15 ".

さらに、更新された「k1,13」および「k1,15」は、それぞれ選択器503rおよび503sによって選択されて出力され、RotWord演算部304、およびSubByte演算部305で変換されたのち、AddRCon演算部506で2ラウンド目に対応する定数が加算されて、排他的論理和回路502aと502cに送られる。そして、レジスタ520aおよび520cにそれぞれ保持される「k1,0」および「k1,2」を、それぞれ「k2,0」および「k2,2」に更新する。更新された「k2,0」および「k2,2」は、排他的論理和回路502eと502gに送られ、レジスタ520eおよび520gにそれぞれ保持される「k1,4」および「k1,6」を、それぞれ「k2,4」および「k2,6」に更新する。同様に、レジスタ520i、520k、520m、および520oにそれぞれ保持される「k1,8」、「k1,10」、「k1,12」、および「k1,14」は、それぞれ「k2,8」、「k2,10」、「k2,12」、および「k2,14」に更新される。 Additionally, the updated "k 1, 13" and "k 1, 15" is output after being selected by each selector 503r and 503s, after being converted by the RotWord operation unit 304, and SubByte calculation unit 305, AddRCon The arithmetic unit 506 adds the constants corresponding to the second round and sends them to the exclusive OR circuits 502a and 502c. Then, “k 1,0 ” and “k 1,2 ” held in the registers 520a and 520c are updated to “k 2,0 ” and “k 2,2 ”, respectively. The updated “k 2,0 ” and “k 2,2 ” are sent to the exclusive OR circuits 502e and 502g and held in the registers 520e and 520g, respectively, “k 1,4 ” and “k 1, 6 ”is updated to“ k 2,4 ”and“ k 2,6 ”, respectively. Similarly, “k 1,8 ”, “k 1,10 ”, “k 1,12 ”, and “k 1,14 ” held in the registers 520i, 520k, 520m, and 520o, respectively, 2,8 "," k2,10 "," k2,12 ", and" k2,14 ".

更新された「k1,1」、「k1,3」、「k1,5」、「k1,7」、「k1,9」、「k1,11」、「k1,13」、および「k1,15」は、レジスタ530aから530hに保持される「k1,0」、「k1,2」、「k1,4」、「k1,6」、「k1,8」、「k1,10」、「k1,12」、および「k1,14」とともに1ラウンド目のラウンド鍵として出力される。 Updated “k 1,1 ”, “k 1,3 ”, “k 1,5 ”, “k 1,7 ”, “k 1,9 ”, “k 1,11 ”, “k 1,13 ", and" k 1, 15 "is" k 1, 0 held from the register 530a to 530h "," k 1, 2 "," k l, 4 "," k 1, 6 "," k 1 , 8 ”,“ k 1,10 ”,“ k 1,12 ”, and“ k 1,14 ”are output as the first round key.

更新された値は、クロック周期の終わりに、図6に示すようにレジスタ520aから520pおよびレジスタ501yと501zに保持される。レジスタ530aから530hには、それぞれ「k2,0」、「k2,2」、「k2,4」、「k2,6」、「k2,8」、「k2,10」、「k2,12」、および「k2,14」が保持される。 The updated value is held in registers 520a to 520p and registers 501y and 501z as shown in FIG. 6 at the end of the clock period. The registers 530a to 530h have “k 2,0 ”, “k 2,2 ”, “k 2,4 ”, “k 2,6 ”, “k 2,8 ”, “k 2,10 ”, “K 2,12 ” and “k 2,14 ” are retained.

時刻C10まで同様の処理が繰り返され、9ラウンド目のラウンド鍵「k9,09,19,29,39,49,59,69,79,89,99,109,119,129,139,149,15」が出力され、図6に示すようにレジスタ520aから520p、レジスタ501y、およびレジスタ501zに、それぞれ「k10,0」、「k9,1」、「k10,2」、「k9,3」、「k10,4」、「k9,5」、「k10,6」、「k9,7」、「k10,8」、「k9,9」、「k10,10」、「k9,11」、「k10,12」、「k9,13」、「k10,14」、「k9,15」、「k9,12」、および「k9,14」が保持される。 The same process until the time C 10 is repeated, 9 round round keys of "k 9,0 k 9,1 k 9,2 k 9,3 k 9,4 k 9,5 k 9,6 k 9,7 k 9,8 k 9,9 k 9,10 k 9,11 k 9,12 k 9,13 k 9,14 k 9,15 "is output, 520p from the register 520a as shown in FIG. 6, the register 501y , and the register 501z, respectively "k 10, 0", "k 9,1", "k 10, 2", "k 9, 3", "k 10, 4", "k 9, 5", " k 10,6 "," k 9,7 "," k 10,8 "," k 9,9 "," k 10,10 "," k 9,11 "," k 10,12 "," k 9,13 "," k10,14 "," k9,15 "," k9,12 ", and" k9,14 "are retained.

(時刻C11)レジスタ520aから520p、レジスタ501y、およびレジスタ501zは保持している値を出力する。選択器503aから503pは、排他的論理和回路502aから502pの出力を選択して出力する。選択器503qと503sは、レジスタ520mと520oが出力する値を選択して出力する。選択器503rと503tは、排他的論理和回路502nと502pの出力を選択して出力する。 (Time C 11 ) The registers 520a to 520p, the register 501y, and the register 501z output the held values. The selectors 503a to 503p select and output the outputs of the exclusive OR circuits 502a to 502p. The selectors 503q and 503s select and output the values output from the registers 520m and 520o. The selectors 503r and 503t select and output the outputs of the exclusive OR circuits 502n and 502p.

レジスタ501yと501zにそれぞれ保持される「k9,12」および「k9,14」は、RotWord演算部304、およびSubByte演算部305で変換されたのち、AddRCon演算部506で10ラウンド目に対応する定数が加算されて、排他的論理和回路502dと502bに送られ、レジスタ520dおよび520bにそれぞれ保持される「k9,3」および「k9,1」を、それぞれ「k10,3」および「k10,1」に更新する。更新された「k10,1」および「k10,3」は、それぞれ排他的論理和回路502fと502hに送られ、レジスタ520fおよび520hにそれぞれ保持される「k9,5」および「k9,7」を、それぞれ「k10,5」および「k10,7」に更新する。同様に、レジスタ520j、520l、520n、および520pにそれぞれ保持される「k9,9」、「k9,11」、「k9,13」、および「k9,15」は、それぞれ「k10,9」、「k10,11」、「k10,13」、および「k10,15」に更新される。 Register 501y and "k 9, 12" and respectively held in 501z "k 9, 14 ', after being converted by the RotWord operation unit 304, and SubByte calculation unit 305, corresponding to 10 round in AddRCon arithmetic unit 506 are constants is added, is sent to the exclusive oR circuit 502d and 502b, "k 9, 3" and, respectively held in the register 520d and 520b to "k 9,1", respectively "k 10,3" And “k 10,1 ”. The updated “k 10,1 ” and “k 10,3 ” are sent to the exclusive OR circuits 502 f and 502 h, respectively, and “k 9,5 ” and “k 9 ” held in the registers 520 f and 520 h, respectively. , 7 "and updates to each" k 10,5 "and" k 10,7 ". Similarly, the register 520j, 520L, 520n, and "k 9, 9 'respectively held in 520p," k 9, 11 "," k 9, 13 ", and" k 9, 15 ", respectively" k 10, 9 ", is updated to" k 10,11 "," k 10,13 ", and" k 10,15 ".

さらに、更新された「k10,13」および「k10,15」は、選択器503rと503sによって選択されて出力され、RotWord演算部304、およびSubByte演算部305で変換される。しかし、AddRCon演算部506では11ラウンド目に対応する定数が定められていないため、以降のデータは無効となり、レジスタ520a、520c、520e、520g、520i、520k、520m、および520oに実際には使用されない値に更新される。 Additionally, the updated "k 10, 13" and "k 10, 15" is output after being selected by the selector 503r and 503s, are converted by the RotWord operation unit 304, and SubByte arithmetic unit 305. However, since the constant corresponding to the eleventh round is not defined in the AddRCon operation unit 506, the subsequent data becomes invalid and is actually used for the registers 520a, 520c, 520e, 520g, 520i, 520k, 520m, and 520o. Is updated to a value that is not.

更新された「k10,1」、「k10,3」、「k10,5」、「k10,7」、「k10,9」、「k10,11」、「k10,13」、および「k10,15」は、レジスタ530aから530hに保持される「k10,0」、「k10,2」、「k10,4」、「k10,6」、「k10,8」、「k10,10」、「k10,12」、および「k10,14」とともに、10ラウンド目のラウンド鍵として出力される。 It has been updated "k 10,1", "k 10,3", "k 10,5", "k 10,7", "k 10,9", "k 10,11", "k 10,13 ", and" k 10, 15 "is" k 10, 0 being held from the register 530a to 530h "," k 10, 2 "," k 10, 4 "," k 10,6 "," k 10 , 8 ”,“ k 10,10 ”,“ k 10,12 ”, and“ k 10,14 ”are output as the round key of the tenth round.

第2の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻CまたはC10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵の一部「k8,18,38,58,78,98,118,138,15」、または10ラウンド目のラウンド鍵の一部「k10,010,210,410,610,810,1010,1210,14」にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。 In the second embodiment, in order to cause a calculation error in the round key of the ninth round, it is necessary to make a calculation error at time C 9 or C 10 . However, part of the round key of 8 round this time "k 8,1 k 8,3 k 8,5 k 8,7 k 8,9 k 8,11 k 8,13 k 8,15 ", or 10 part of the round key for round "k 10,0 k 10,2 k 10,4 k 10,6 k 10,8 k 10,10 k 10,12 k 10,14 " also possible to calculate an error occurs with Therefore, it is difficult to obtain a secret key by failure utilization analysis disclosed in Non-Patent Document 1 or the like.

これまでは、例えば最初の4バイトに着目すると、レジスタ520aおよび520cが、レジスタ520bおよび520dよりも1ラウンド分進んだラウンド鍵を保持するような鍵スケジュール装置について説明した。ラウンドを進めるレジスタの組み合わせはこれに限られるものではなく、図6の回路例と同様の手法を適用できるものであればどのような組合せでもよい。   So far, for example, focusing on the first 4 bytes, a key schedule device has been described in which the registers 520a and 520c hold a round key advanced by one round from the registers 520b and 520d. The combination of registers that advance the round is not limited to this, and any combination may be used as long as the same technique as the circuit example of FIG. 6 can be applied.

例えば、以下の組み合わせが可能である。
(1)レジスタ520bと520dが、レジスタ520aと520cよりも1ラウンド分進む
(2)レジスタ520aが、レジスタ520b、520c、および520dよりも1ラウンド分進む
(3)レジスタ520bが、レジスタ520a、520c、および520dよりも1ラウンド分進む
(4)レジスタ520cが、レジスタ520a、520b、および520dよりも1ラウンド分進む
(5)レジスタ520dが、レジスタ520a、520b、および520cよりも1ラウンド分進む
(6)レジスタ520b、520c、および520dが、レジスタ520aよりも1ラウンド分進む
(7)レジスタ520a、520c、および520dが、レジスタ520bよりも1ラウンド分進む
(8)レジスタ520a、520b、および520dが、レジスタ520cよりも1ラウンド分進む
(9)レジスタ520a、520b、および520cが、レジスタ520dよりも1ラウンド分進む
For example, the following combinations are possible.
(1) Registers 520b and 520d advance one round than registers 520a and 520c (2) Register 520a advances one round more than registers 520b, 520c, and 520d (3) Register 520b uses registers 520a and 520c , And 520d advance by one round (4) register 520c advances one round more than registers 520a, 520b, and 520d (5) register 520d advances one round more than registers 520a, 520b, and 520c ( 6) Registers 520b, 520c, and 520d advance one round from register 520a (7) Registers 520a, 520c, and 520d advance one round from register 520b (8) Registers 520a, 520b, and 5 0d is, advances 1 rounds than register 520c (9) registers 520a, 520b, and 520c are, advances 1 rounds than register 520d

(変形例)
上記第2の実施の形態では、あるクロック周期で、レジスタ501yと501zに保持される情報に基づいてレジスタ520bと520d、520fと520h、520jと520l、および520nと520pに保持される8バイトの情報が順番に更新される。また、レジスタ520nと520pから更新された情報に基づいてレジスタ520aと520c、520eと520g、520iと520k、および520mと520oに保持される8バイトの情報が順番に更新される。そのため、データパスが長くなりクロック周波数を十分に高めることができなかった。
(Modification)
In the second embodiment, the 8-byte data held in the registers 520b and 520d, 520f and 520h, 520j and 520l, and 520n and 520p based on the information held in the registers 501y and 501z in a certain clock cycle. Information is updated in order. Based on the information updated from the registers 520n and 520p, 8-byte information held in the registers 520a and 520c, 520e and 520g, 520i and 520k, and 520m and 520o are updated in order. As a result, the data path becomes longer and the clock frequency cannot be sufficiently increased.

そこで、第2の実施の形態の変形例では、クロック周期内でのデータの更新を分割することでクロック周波数を高めることができる鍵スケジュール装置について説明する。図7は、第2の実施の形態の変形例にかかる鍵スケジュール装置550の一例を示す回路図である。   Thus, in a modification of the second embodiment, a key schedule device that can increase the clock frequency by dividing the update of data within the clock cycle will be described. FIG. 7 is a circuit diagram illustrating an example of a key schedule device 550 according to a modification of the second embodiment.

図7に示すように、本変形例では、第2の実施の形態の鍵スケジュール装置500の選択器503aから503pの代わりに(図5参照)、三入力一出力の選択器553aから553pを利用して鍵スケジュール演算処理を実行する。そして、このような選択器553aから553pを用いることにより、あるクロック周期では、8バイトの情報の一部のみを選択して更新するように構成する。   As shown in FIG. 7, in this modification, instead of the selectors 503a to 503p of the key schedule device 500 of the second embodiment (see FIG. 5), three-input one-output selectors 553a to 553p are used. Then, the key schedule calculation process is executed. By using such selectors 553a to 553p, only a part of 8-byte information is selected and updated in a certain clock cycle.

図8は、本変形例における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。同図は、例えば、レジスタ520aと520c、520eと520g、520iと520k、および520mと520oに保持される8バイトの情報を、2つのクロック周期(例えば、時刻Cと時刻C)に分けて更新する例を示している。 FIG. 8 is a diagram illustrating an example of data output at each clock of the key schedule calculation process in the present modification. The figure, for example, registers 520a and 520c, 520e and 520 g, 520i and 520k, and the 8 bytes of the information held in the 520m and 520O, divided into two clock periods (e.g., time C 1 and the time C 2) An example of updating is shown.

このように構成することにより、1クロック周期で8バイト分の情報を選択して更新する第2の実施の形態と比較して、データパスを短くしてクロック周波数を高めることができる。   With this configuration, it is possible to shorten the data path and increase the clock frequency, as compared with the second embodiment in which information of 8 bytes is selected and updated in one clock cycle.

以上のように、第2の実施の形態にかかる鍵スケジュール装置では、ラウンド鍵を1バイトごとに分割し、先頭から奇数番目のバイトが、偶数番目のバイトより1ラウンド進むようにラウンド鍵を算出する。これにより、付加情報等の計算のための計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができる。   As described above, in the key schedule device according to the second exemplary embodiment, the round key is divided for each byte, and the round key is calculated so that the odd-numbered bytes from the head advance one round from the even-numbered bytes. To do. As a result, it is possible to execute a safe key schedule calculation for failure utilization analysis while avoiding an increase in the amount of calculation for calculating additional information and the like.

(第3の実施の形態)
第3の実施の形態にかかる鍵スケジュール装置は、連続する2つのラウンドのラウンド鍵を同一クロックで算出する。
(Third embodiment)
The key schedule device according to the third exemplary embodiment calculates two consecutive round keys using the same clock.

図9は、第3の実施の形態にかかる鍵スケジュール装置700の構成を示すブロック図である。図9に示すように、鍵スケジュール装置700は、スケジュール部710と、第1記憶部720と、第2記憶部730とを備えている。   FIG. 9 is a block diagram illustrating a configuration of a key schedule apparatus 700 according to the third embodiment. As illustrated in FIG. 9, the key schedule device 700 includes a schedule unit 710, a first storage unit 720, and a second storage unit 730.

第3の実施の形態では、上述のように、連続する2つのラウンドのラウンド鍵を同一クロックで算出するようにスケジュール部710と、第1記憶部720と、第2記憶部730とを構成した点が、第1の実施の形態と異なっている。以下では、第3の実施の形態の鍵スケジュール装置700を実現する回路例である図10を用いて、鍵スケジュール装置700の機能について説明する。図10は、第3の実施の形態の鍵スケジュール装置700の一例を示す回路図である。   In the third embodiment, as described above, the schedule unit 710, the first storage unit 720, and the second storage unit 730 are configured to calculate the round keys of two consecutive rounds with the same clock. This is different from the first embodiment. Hereinafter, functions of the key schedule device 700 will be described with reference to FIG. 10 which is a circuit example for realizing the key schedule device 700 of the third embodiment. FIG. 10 is a circuit diagram illustrating an example of the key schedule device 700 according to the third embodiment.

同図に示すように、鍵スケジュール装置700は、第1記憶部720を構成するレジスタ720a〜720dと、第2記憶部730を構成するレジスタ730a〜730hと、排他的論理和回路702a〜702hと、選択器703a〜703dと、RotWord演算部304aおよび304bと、SubByte演算部305aおよび305bと、AddRcon演算部306aおよび306bとを含んでいる。   As shown in the figure, the key schedule device 700 includes registers 720a to 720d constituting the first storage unit 720, registers 730a to 730h constituting the second storage unit 730, and exclusive OR circuits 702a to 702h. , Selectors 703a to 703d, RotWord arithmetic units 304a and 304b, SubByte arithmetic units 305a and 305b, and AddRcon arithmetic units 306a and 306b.

レジスタ720aから720dは、第1の実施の形態におけるレジスタ320aから320dに対応し、16バイトのラウンド鍵を4バイトごとに分割して保持する。   Registers 720a to 720d correspond to the registers 320a to 320d in the first embodiment, and hold a 16-byte round key divided into four bytes.

レジスタ730aから730hは、鍵スケジュール装置700から出力するラウンド鍵を保持するレジスタである。第3の実施の形態では、1時刻(クロック周期)あたりに2ラウンド分のラウンド鍵が計算される。上述したとおり、データ暗号化回路(暗号化装置200)は通常1時刻あたりに1ラウンドの暗号化処理を行う。このため、データ暗号化回路が各ラウンドのラウンド鍵を参照できるように、時刻C(i=1,2,3,4,5)終了時に、レジスタ730aから730dが第2*i−1ラウンド目のラウンド鍵を保持し、レジスタ730eから730hが第2*iラウンド目のラウンド鍵を保持するように構成する。 The registers 730a to 730h are registers that hold round keys output from the key schedule device 700. In the third embodiment, round keys for two rounds are calculated per one time (clock cycle). As described above, the data encryption circuit (encryption device 200) normally performs one round of encryption processing per time. For this reason, at the end of time C i (i = 1, 2, 3, 4, 5) so that the data encryption circuit can refer to the round key of each round, the registers 730a to 730d are in the second * i−1 round. The second round key is held, and the registers 730e to 730h are configured to hold the second * i round key.

データ暗号化回路を1時刻あたりに2ラウンド分の処理を行うような構成にする場合などには、レジスタ730aから730hを用いずに、ラウンド鍵を鍵スケジュール装置700からそのまま出力する構成としてもよい。   When the data encryption circuit is configured to perform processing for two rounds per time, the round key may be directly output from the key schedule device 700 without using the registers 730a to 730h. .

排他的論理和回路702aから702d、および排他的論理和回路702eから702hは、ビットごとの排他的論理和を計算する。   Exclusive OR circuits 702a to 702d and exclusive OR circuits 702e to 702h calculate an exclusive OR for each bit.

選択器703aから703dは、選択器303a〜303dは、鍵スケジュール装置700への入力と、排他的論理和回路702e〜702hの出力とを、クロック信号に応じて選択して出力する。   The selectors 703a to 703d select and output the input to the key schedule device 700 and the outputs of the exclusive OR circuits 702e to 702h according to the clock signal.

RotWord演算部304aと304bは、それぞれ第1の実施の形態のRotWord演算部304と同様の機能を備えている。   The RotWord calculation units 304a and 304b have the same functions as the RotWord calculation unit 304 of the first embodiment.

SubByte演算部305aと305bは、それぞれ第1の実施の形態のAddRCon演算部305と同様の機能を備えている。   The SubByte calculation units 305a and 305b each have the same function as the AddRCon calculation unit 305 of the first embodiment.

AddRCon演算部306aと306bは、それぞれ第1の実施の形態のAddRCon演算部306と同様の機能を備えている。   The AddRCon operation units 306a and 306b have the same functions as the AddRCon operation unit 306 of the first embodiment.

次に、このように構成された鍵スケジュール装置700による鍵スケジュール演算処理について説明する。図11は、第3の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。   Next, key schedule calculation processing by the key schedule device 700 configured as described above will be described. FIG. 11 is a diagram illustrating an example of data output at each clock of the key schedule calculation process according to the third embodiment.

(時刻C)選択器703aから703dは、それぞれ鍵スケジュール装置700の入力として受け付けた4バイトの鍵「k0,00,10,20,3」、「k0,40,50,60,7」、「k0,80,90,100,11」、および「k0,120,130,140,15」を選択する。レジスタ720aから720dは、クロック周期の終わりに、図11に示すようにそれぞれの値を保持する。 (Time C 0 ) The selectors 703 a to 703 d receive the 4-byte keys “k 0,0 k 0,1 k 0,2 k 0,3 ” and “k 0,4 ” received as inputs of the key schedule device 700, respectively. k 0,5 k 0,6 k 0,7 "," k 0,8 k 0,9 k 0,10 k 0,11 ", and" k 0,12 k 0,13 k 0,14 k 0 , 15 ”is selected. Registers 720a to 720d hold their respective values as shown in FIG. 11 at the end of the clock period.

(時刻C)レジスタ720aから720dは、保持している値を出力する。選択器703aから703dは、それぞれ排他的論理和回路702eから702hの出力を選択して出力する。このとき、レジスタ720dに保持される「k0,120,130,140,15」は、RotWord演算部304a、SubByte演算部305a、およびAddRCon演算部306aで変換されて排他的論理和回路702aに送られる。排他的論理和回路702aは、レジスタ720aに保持される「k0,00,10,20,3」から「k1,01,11,21,3」を出力して、レジスタ720e、排他的論理和回路702bおよび702eに送る。 (Time C 1 ) The registers 720a to 720d output the held values. The selectors 703a to 703d select and output the outputs of the exclusive OR circuits 702e to 702h, respectively. At this time, held in the register 720d "k 0,12 k 0,13 k 0,14 k 0,15" is exclusively converted by the RotWord operation unit 304a, SubByte calculating unit 305a, and AddRCon calculation unit 306a It is sent to the logical sum circuit 702a. The exclusive OR circuit 702a includes “k 0,0 k 0,1 k 0,2 k 0,3 ” to “k 1,0 k 1,1 k 1,2 k 1,3 held in the register 720a. Is output to the register 720e and exclusive OR circuits 702b and 702e.

排他的論理和回路702bに送られた「k1,01,11,21,3」は、レジスタ720bに保持される「k0,40,50,60,7」と排他的論理和演算が施され、「k1,41,51,61,7」が出力される。同様に、排他的論理和回路702cおよび702dでは、それぞれレジスタ720cおよび720dに保持される「k0,80,90,100,11」および「k0,120,130,140,15」に基づいて、「k1,81,91,101,11」と「k1,121,131,141,15」が出力される。 “K 1,0 k 1,1 k 1,2 k 1,3 ” sent to the exclusive OR circuit 702b is stored in the register 720b as “k 0,4 k 0,5 k 0,6 k”. exclusive OR operation and 0,7 "is performed," k 1,4 k 1,5 k 1,6 k 1,7 "is output. Likewise, exclusive the OR circuit 702c and 702d, are held in the registers 720c and 720d "k 0,8 k 0,9 k 0,10 k 0,11" and "k 0, 12 k 0, 13 based on the k 0,14 k 0,15 ", and" k 1,8 k 1,9 k 1,10 k 1,11, "" k 1,12 k 1,13 k 1,14 k 1,15 " Is output.

排他的論理和回路702dが出力する「k1,121,131,141,15」は、RotWord演算部304b、SubByte演算部305b、およびAddRCon演算部306bで変換されて排他的論理和回路702eに送られる。排他的論理和回路702eは、排他的論理和回路702aが出力する「k1,01,11,21,3」に基づいて「k2,02,12,22,3」を出力して、選択器703a、レジスタ730e、および排他的論理和回路702fに送る。 Exclusive OR circuit 702d outputs "k 1,12 k 1,13 k 1,14 k 1,15" is, RotWord operation unit 304b, SubByte calculation unit 305b, and AddRCon exclusively converted by the computing unit 306b It is sent to the logical sum circuit 702e. The exclusive OR circuit 702e is configured to output “k 2,0 k 2,1 k 2,3 ” based on “k 1,0 k 1,1 k 1,2 k 1,3 ” output from the exclusive OR circuit 702a . and it outputs the 2 k 2,3 ", and sends the selector 703a, register 730e, and to the exclusive oR circuit 702f.

排他的論理和回路702fに送られた「k2,02,12,22,3」は、排他的論理和回路702bが出力する「k1,41,51,61,7」と排他的論理和演算が施され、「k2,42,52,62,7」が出力される。同様に、排他的論理和回路702gおよび702hでは、それぞれ排他的論理和回路702cおよび702dが出力する「k1,81,91,101,11」および「k1,121,131,141,15」に基づいて、それぞれ「k2,82,92,102,11」および「k2,122,132,142,15」が出力される。 “K 2,0 k 2,1 k 2,2 k 2,3 ” sent to the exclusive OR circuit 702f is “k 1,4 k 1,5 k 1 ” output from the exclusive OR circuit 702b. , 6 k 1,7 ”and an exclusive OR operation is performed to output“ k 2,4 k 2,5 k 2,6 k 2,7 ”. Similarly, in the exclusive OR circuits 702g and 702h, “k 1,8 k 1,9 k 1,10 k 1,11 ” and “k 1,12 k” output from the exclusive OR circuits 702c and 702d, respectively. on the basis of 1,13 k 1,14 k 1,15 ", each" k 2,8 k 2,9 k 2,10 k 2,11 "and" k 2,12 k 2,13 k 2,14 k 2,15 "is output.

更新された「k2,02,12,22,3」、「k2,42,52,62,7」、「k2,82,92,102,11」、および「k2,122,132,142,15」は、図11に示すようにレジスタ720aから720dに保持されるほか、2ラウンド目で利用するラウンド鍵として、レジスタ730eから730hに保持される。排他的論理和回路702aから702dが出力する「k1,01,11,21,3」、「k1,41,51,61,7」、「k1,81,91,101,11」、および「k1,121,131,141,15」は、1ラウンド目で利用するラウンド鍵として、レジスタ730aから730dに保持される。 Updated "k 2,0 k 2,1 k 2,2 k 2,3 ", "k 2,4 k 2,5 k 2,6 k 2,7 ", "k 2,8 k 2,9 " k 2,10 k 2, 11 ", and" k 2,12 k 2,13 k 2,14 k 2,15 ", in addition to being held in 720d from the register 720a as shown in FIG. 11, the second round Are stored in the registers 730e to 730h as round keys used in. “K 1,0 k 1,1 k 1,2 k 1,3 ”, “k 1,4 k 1,5 k 1,6 k 1,7 ” and “k 1,7 ” output from the exclusive OR circuits 702a to 702d, k 1,8 k 1,9 k 1,10 k 1,11 ", and" k 1,12 k 1,13 k 1,14 k 1,15 ", as a round key to be used in the first round, register 730a to 730d.

同様の処理により、時刻Cまでに10ラウンド目までのラウンド鍵が更新されて出力される。 By the same process, the round keys up to 10 round by the time C 5 is output is updated.

第3の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻Cで計算を誤らせる必要がある。しかし、このとき10ラウンド目のラウンド鍵「k10,010,110,210,3」、「k10,410,510,610,7」、「k10,810,910,1010,11」、および「k10,1210,1310,1410,15」にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。 In the third embodiment, in order to produce a calculation error in the round key 9 round, it is necessary to falsify the calculation at time C 5. However, at this time, the round keys “k 10, 0 k 10, 1 k 10 , 2 k 10 , 3 ”, “k 10, 4 k 10, 5 k 10, 6 k 10 , 7 ”, “k” of the 10th round 10,8 k 10,9 k 10,10 k 10,11 ", and" k 10,12 k 10,13 k 10,14 k 10,15 to "there is a possibility that calculation errors occur, non-Patent Document It becomes difficult to obtain the secret key by the failure use analysis disclosed in No. 1 and the like.

なお、これまでは1時刻あたりに2ラウンド分のラウンド鍵を計算する例について説明したが、同様の手法により、1時刻あたりに3ラウンド分以上のラウンド鍵を計算する鍵スケジュール装置を構成することができる。   In addition, although the example which calculates the round key for 2 rounds per time was demonstrated so far, the key schedule apparatus which calculates the round key for 3 rounds per time by the same method is comprised. Can do.

このように、第3の実施の形態にかかる鍵スケジュール装置では、連続する2つのラウンドのラウンド鍵を同一の処理サイクルで算出する。これにより、付加情報等の計算のための計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができる。   As described above, the key schedule device according to the third embodiment calculates the round keys of two consecutive rounds in the same processing cycle. As a result, it is possible to execute a safe key schedule calculation for failure utilization analysis while avoiding an increase in the amount of calculation for calculating additional information and the like.

(第4の実施の形態)
第4の実施の形態にかかる鍵スケジュール装置は、16バイトのラウンド鍵を4バイト単位に分割し、先頭の4バイトから順に、4バイトに含まれるバイトのうち所定の2バイトについて次のラウンド鍵を算出する。
(Fourth embodiment)
The key scheduling apparatus according to the fourth embodiment divides a 16-byte round key into units of 4 bytes, and in order from the first 4 bytes, the next round key for predetermined 2 bytes among the bytes included in the 4 bytes. Is calculated.

図12は、第4の実施の形態にかかる鍵スケジュール装置900の構成を示すブロック図である。図12に示すように、鍵スケジュール装置900は、スケジュール部910と、第1記憶部920と、第2記憶部930とを備えている。   FIG. 12 is a block diagram illustrating a configuration of a key schedule apparatus 900 according to the fourth embodiment. As shown in FIG. 12, the key schedule device 900 includes a schedule unit 910, a first storage unit 920, and a second storage unit 930.

第4の実施の形態では、上述のように、4バイトに含まれるバイトのうち所定の2バイトについて、先頭の4バイトから順に次のラウンド鍵を算出するようにスケジュール部910と、第1記憶部920と、第2記憶部930とを構成した点が、第1の実施の形態と異なっている。以下では、第4の実施の形態の鍵スケジュール装置900を実現する回路例である図13を用いて、鍵スケジュール装置900の機能について説明する。図13は、第4の実施の形態の鍵スケジュール装置900の一例を示す回路図である。   In the fourth embodiment, as described above, the scheduling unit 910 and the first storage so as to calculate the next round key in order from the first 4 bytes for the predetermined 2 bytes among the bytes included in the 4 bytes, as described above. The point which comprised the part 920 and the 2nd memory | storage part 930 differs from 1st Embodiment. Hereinafter, the function of the key schedule apparatus 900 will be described with reference to FIG. 13 which is a circuit example for realizing the key schedule apparatus 900 of the fourth embodiment. FIG. 13 is a circuit diagram illustrating an example of the key schedule device 900 according to the fourth embodiment.

同図に示すように、鍵スケジュール装置900は、第1記憶部920を構成するレジスタ920a〜920hと、第2記憶部930を構成するレジスタ930a〜930fと、排他的論理和回路902a〜902jと、選択器903a〜903tと、SubByte演算部905aおよび905bと、AND回路907aおよび907bと、を含んでいる。   As shown in the figure, the key schedule device 900 includes registers 920a to 920h constituting the first storage unit 920, registers 930a to 930f constituting the second storage unit 930, and exclusive OR circuits 902a to 902j. , Selectors 903a to 903t, SubByte arithmetic units 905a and 905b, and AND circuits 907a and 907b.

レジスタ920aと920bは、第1の実施の形態におけるレジスタ320aに対応し、ラウンド鍵の先頭2バイトを保持するレジスタである。同様に、レジスタ920cと920d、レジスタ920eと920f、およびレジスタ920gから920hは、それぞれ第1の実施の形態におけるレジスタ320b、レジスタ320c、およびレジスタ320dに対応する。   The registers 920a and 920b correspond to the register 320a in the first embodiment and are registers that hold the first two bytes of the round key. Similarly, registers 920c and 920d, registers 920e and 920f, and registers 920g to 920h correspond to the registers 320b, 320c, and 320d in the first embodiment, respectively.

レジスタ930aから930fは、第1の実施の形態におけるレジスタ330aと330bと同様に、鍵スケジュール装置900の出力がラウンドごとに揃うように調節するために用いられる。   The registers 930a to 930f are used for adjusting the outputs of the key schedule device 900 to be aligned for each round, similarly to the registers 330a and 330b in the first embodiment.

排他的論理和回路902aから902hは、第1の実施の形態における排他的論理和回路302aから302dを2バイトごとに分割した回路であり、2つの2バイトの入力に対して、ビットごとに排他的論理和を計算した結果を出力する。   The exclusive OR circuits 902a to 902h are obtained by dividing the exclusive OR circuits 302a to 302d in the first embodiment into two bytes, and are exclusive for each bit with respect to two 2-byte inputs. The result of calculating the logical OR is output.

排他的論理和回路902iと902jは、2つの2バイトの入力について、ビットごとの排他的論理和を計算した結果を出力する。   Exclusive OR circuits 902i and 902j output a result of calculating an exclusive OR for each bit with respect to two 2-byte inputs.

選択器903aから903hは、第1の実施の形態における選択器303aから303dを2バイトごとに分割した回路であり、それぞれレジスタ920aから920hの出力、排他的論理和回路902aから902hの出力、または鍵スケジュール装置900の入力のいずれかを、クロック信号に応じて選択して出力する回路である。   The selectors 903a to 903h are circuits in which the selectors 303a to 303d in the first embodiment are divided every two bytes, and outputs of registers 920a to 920h, outputs of exclusive OR circuits 902a to 902h, or This is a circuit that selects and outputs one of the inputs of the key schedule device 900 according to a clock signal.

選択器903iから903nは、それぞれレジスタ920aから920fの出力である2バイトのデータをバイトごとに分割して、それぞれ0(1バイト)を付加して2バイトに拡張した2つの2バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。   The selectors 903i to 903n divide the 2-byte data output from the registers 920a to 920f, respectively, into two bytes, add 0 (1 byte), and expand to 2 bytes. Any one of them is a circuit that selects and outputs one according to a clock signal.

選択器903oおよび903pは、それぞれレジスタ920gおよび920hの出力である2バイトのデータを分割した2つの1バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。   The selectors 903o and 903p are circuits that select and output one of the two 1-byte data obtained by dividing the 2-byte data output from the registers 920g and 920h, according to the clock signal.

選択器903qおよび903rは、AESの仕様でラウンドごとに定められたラウンド定数を、それぞれ排他的論理和回路902iおよび902jで加算するために、対応するラウンド定数を切り出す(不要なラウンド定数を切り落とす)ためのマスクを選択する回路である。   The selectors 903q and 903r cut out the corresponding round constants (to cut off unnecessary round constants) in order to add the round constants determined for each round in the AES specification by the exclusive OR circuits 902i and 902j, respectively. This is a circuit for selecting a mask for the purpose.

SubByte演算部905aおよび905bは、それぞれ選択器903oおよび903pの出力(1バイト)を入力として、AESの仕様で定められるSubByte処理を施して、1バイトの値を出力する。   SubByte calculation units 905a and 905b receive the outputs (1 byte) of selectors 903o and 903p, respectively, perform SubByte processing defined by the AES specification, and output a 1-byte value.

選択器903sおよび903tは、SubByte演算部905aおよび905bの出力に0(1バイト)を付加して2バイトに拡張した2つの2バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。選択器903sおよび903tは、第1の実施の形態におけるRotWord演算部304に相当する。   The selectors 903 s and 903 t select and output one of the two 2-byte data expanded by adding 0 (1 byte) to the output of the SubByte arithmetic units 905 a and 905 b according to the clock signal. Circuit. The selectors 903 s and 903 t correspond to the RotWord calculating unit 304 in the first embodiment.

AND回路907aと907bは、2つの2バイトの入力について、ビットごとの積を計算して出力する。   The AND circuits 907a and 907b calculate and output a product for each bit with respect to two 2-byte inputs.

次に、このように構成された鍵スケジュール装置900による鍵スケジュール演算処理について説明する。図14は、第4の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。   Next, a key schedule calculation process performed by the key schedule apparatus 900 configured as described above will be described. FIG. 14 is a diagram illustrating an example of data output at each clock of the key schedule calculation process according to the fourth embodiment.

(時刻C)選択器903aから903hは、それぞれ鍵スケジュール装置900の入力として受け付けた2バイトの鍵「k0,00,1」、「k0,20,3」、「k0,40,5」、「k0,60,7」、「k0,80,9」、「k0,100,11」、「k0,120,13」、および「k0,140,15」を選択する。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。 (Time C 0 ) The selectors 903 a to 903 h respectively receive the 2-byte keys “k 0,0 k 0,1 ”, “k 0,2 k 0,3 ”, “k” received as inputs of the key schedule device 900. 0,4 k 0,5 "," k 0,6 k 0,7 "," k 0,8 k 0,9 "," k 0,10 k 0,11 "," k 0,12 k 0, 13 ”and“ k 0,14 k 0,15 ”. Registers 920a through 920h hold their respective values as shown in FIG. 14 at the end of the clock period.

(時刻C)レジスタ920aから920hは保持している値を出力する。選択器903oおよび903pは、それぞれレジスタ920gおよびレジスタ920hの出力(2バイト)をバイトごとに分割して得られる下位1バイト「k0,13」および「k0,15」をそれぞれ選択して出力する。選択器903sおよび903tは、SubByte演算部905aおよび905bの出力の後ろに0(1バイト)を付加した2バイトの値を選択して出力する。選択器903qと903rは、ともにff00(2バイト)を選択する。選択器903aおよび903bは、それぞれ排他的論理和回路902aおよび902bの出力を選択して出力する。選択器903cから903hは、それぞれレジスタ920cから920hの出力を選択して出力する。選択器903iから903nは、それぞれレジスタ920aから920fの出力(2バイト)をバイトごとに分割して得られる上位1バイトの後ろに0(1バイト)を付加した2バイトの値を選択して出力する。なお、選択器903iから903nは、いずれの値を選んでも動作は変わらない。 (Time C 1 ) The registers 920a to 920h output the held values. Selector 903o and 903p, respectively registers 920g and register lower 1 byte "k 0, 13" obtained output of 920h (2 bytes) is divided into byte by byte and "k 0, 15", respectively selects and outputs To do. The selectors 903s and 903t select and output a 2-byte value obtained by adding 0 (1 byte) to the output of the SubByte arithmetic units 905a and 905b. The selectors 903q and 903r both select ff00 (2 bytes). Selectors 903a and 903b select and output the outputs of exclusive OR circuits 902a and 902b, respectively. The selectors 903c to 903h select and output the outputs of the registers 920c to 920h, respectively. The selectors 903i to 903n select and output 2-byte values obtained by adding 0 (1 byte) after the upper 1 byte obtained by dividing the outputs (2 bytes) of the registers 920a to 920f into bytes. To do. Note that the selectors 903i to 903n do not change the operation regardless of which value is selected.

レジスタ920gおよび920hにそれぞれ保持される「k0,120,13」と「k0,140,15」は、バイトごとに分割されたのち、「k0,13」と「k0,15」がそれぞれ選択器903oおよび903pで選択して出力され、それぞれSubByte演算部905aおよび905bで変換される。そして、それぞれ選択器903sおよび903tによって、SubByte演算部905aおよび905bの出力の後ろに0(1バイト)を付加した2バイトの値として選択され、それぞれ排他的論理和回路902iおよび902jで1ラウンド目に対応するラウンド定数が加算されたのち、それぞれ排他的論理和回路902aおよび902bに送られる(それぞれの下位バイトは0)。 Register 920g and each is held in 920h and "k 0, 12 k 0, 13" "k 0, 14 k 0, 15", after being divided into bytes, and "k 0, 13" "k 0 , 15 "are selected and output by the selectors 903o and 903p, respectively, and converted by the SubByte arithmetic units 905a and 905b, respectively. The selectors 903 s and 903 t select the 2-byte values obtained by adding 0 (1 byte) after the outputs of the SubByte arithmetic units 905 a and 905 b, respectively, and the exclusive OR circuits 902 i and 902 j respectively perform the first round. Are added to the exclusive OR circuits 902a and 902b (each lower byte is 0).

排他的論理和回路902aおよび902bでは、それぞれレジスタ920aおよび920bが保持する「k0,00,1」および「k0,20,3」が、「k1,00,1」および「k1,20,3」にそれぞれ更新される。レジスタ920cから920hにそれぞれ保持される「k0,40,5」、「k0,60,7」、「k0,80,9」、「k0,100,11」、「k0,120,13」、および「k0,140,15」は、同じ値に更新される。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。 In the exclusive OR circuits 902a and 902b, “k 0,0 k 0,1 ” and “k 0,2 k 0,3 ” held in the registers 920a and 920b are “k 1,0 k 0,1”, respectively. And “k 1,2 k 0,3 ” respectively. “K 0,4 k 0,5 ”, “k 0,6 k 0,7 ”, “k 0,8 k 0,9 ”, “k 0,10 k 0, respectively” held in the registers 920 c to 920 h, respectively . 11 "," k 0,12 k 0,13 ", and" k 0,14 k 0,15 "is updated to the same value. Registers 920a through 920h hold their respective values as shown in FIG. 14 at the end of the clock period.

(時刻C)レジスタ920aから920hは保持している値を出力する。選択器903oおよび903pは、それぞれレジスタ920gおよびレジスタ920hの出力(2バイト)をバイトごとに分割して得られる上位1バイト「k0,12」および「k0,14」を選択して出力する。選択器903sおよび903tは、SubByte演算部905bおよび905aの出力の前に0(1バイト)を付加した2バイトの値を選択して出力する。選択器903qおよび903rは、ともに00ff(2バイト)を選択する。選択器903aから903dは、それぞれ排他的論理和回路902aから902dの出力を選択して出力する。選択器903eから903hは、それぞれレジスタ920eから920hの出力を選択して出力する。選択器903iから903nは、それぞれレジスタ920aから920fの出力(2バイト)をバイトごとに分割して得られる上位1バイトの後ろに0(1バイト)を付加した2バイトの値を選択して出力する。なお、選択器903kから903nは、いずれの値を選んでも動作は変わらない。 (Time C 2 ) The registers 920a to 920h output the held values. The selectors 903o and 903p select and output the upper 1 byte “k 0,12 ” and “k 0,14 ” obtained by dividing the output (2 bytes) of the register 920g and the register 920h for each byte, respectively. . The selectors 903 s and 903 t select and output a 2-byte value with 0 (1 byte) added before the output of the SubByte arithmetic units 905 b and 905 a. The selectors 903q and 903r both select 00ff (2 bytes). The selectors 903a to 903d select and output the outputs of the exclusive OR circuits 902a to 902d, respectively. Selectors 903e to 903h select and output the outputs of registers 920e to 920h, respectively. The selectors 903i to 903n select and output 2-byte values obtained by adding 0 (1 byte) after the upper 1 byte obtained by dividing the outputs (2 bytes) of the registers 920a to 920f into bytes. To do. Note that the selectors 903k to 903n do not change the operation regardless of which value is selected.

レジスタ920gおよび920hにそれぞれ保持される「k0,120,13」と「k0,140,15」は、バイトごとに分割されたのち、「k0,12」と「k0,14」が、それぞれ選択器903oおよび903pで選択して出力され、それぞれSubByte演算部905aおよび905bで変換される。そして、それぞれ選択器903sおよび903tによって、SubByte演算部905bおよび905aの出力の前に0(1バイト)を付加した2バイトの値として選択され、それぞれ排他的論理和回路902iおよび902jで1ラウンド目に対応するラウンド定数が加算されたのち、排他的論理和回路902aと902bに送られる(それぞれの下位バイトは0)。 Register 920g and each is held in 920h and "k 0, 12 k 0, 13" "k 0, 14 k 0, 15", after being divided into bytes, and "k 0, 12" "k 0 , 14 "are selected and output by the selectors 903o and 903p, respectively, and converted by the SubByte arithmetic units 905a and 905b, respectively. The selectors 903 s and 903 t select the 2-byte values with 0 (1 byte) added before the outputs of the SubByte arithmetic units 905 b and 905 a, respectively, and the exclusive OR circuits 902 i and 902 j respectively perform the first round. Are added to the exclusive OR circuits 902a and 902b (each lower byte is 0).

排他的論理和回路902aおよび902bでは、それぞれレジスタ920aおよび920bが保持する「k1,00,1」と「k1,20,3」が、「k1,01,1」と「k1,21,3」にそれぞれ更新される。選択器903iおよび903jでそれぞれ選択された「k1,00」(「k1,0」に「0」を付加した2バイトのデータ)と「k1,20」(「k1,2」に「0」を付加した2バイトのデータ)は、それぞれ排他的論理和回路902cおよび902dで、レジスタ920cおよび920dが保持する「k0,20,3」および「k0,40,5」から、それぞれ「k1,20,3」および「k1,40,5」に更新される。レジスタ920eから920hに保持される「k0,80,9」、「k0,100,11」、「k0,120,13」、および「k0,140,15」は、同じ値に更新される。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。 In the exclusive OR circuits 902a and 902b, the registers 920a and 920b, each of which holds a "k 1, 0 k 0, 1", "k 1, 2 k 0, 3", "k 1, 0 k 1, 1 "And" k 1,2 k 1,3 ", respectively. “K 1,0 0” (2-byte data obtained by adding “0” to “k 1,0 ”) and “k 1,2 0” (“k 1,2 ”) selected by the selectors 903i and 903j, respectively. 2 bytes of data) with “0” added to them, respectively, are “k 0,2 k 0,3 ” and “k 0,4 k” held by the registers 920c and 920d in the exclusive OR circuits 902c and 902d, respectively. from 0,5 ', it is updated to the respective "k 1, 2 k 0, 3" and "k l, 4 k 0,5". Register "k 0, 8 k 0, 9" held in 920h from 92Oe, "k 0, 10 k 0, 11", "k 0, 12 k 0, 13", and "k 0, 14 k 0, 15 "is updated to the same value. Registers 920a through 920h hold their respective values as shown in FIG. 14 at the end of the clock period.

同様の処理により、時刻Cまでラウンド鍵が更新される。時刻Cでは、図14に示すようにラウンド鍵を更新するとともに、レジスタ930aから930fに保持される「k1,01,1」、「k1,21,3」、「k1,41,5」、「k1,61,7」、「k1,81,9」、および「k1,101,11」と、選択器903gおよび903hそれぞれの出力「k1,121,13」および「k1,141,15」とを1ラウンド目で用いるラウンド鍵として出力する。 By the same process, a round key is updated until the time C 4. At time C 5 , the round key is updated as shown in FIG. 14, and “k 1,0 k 1,1 ”, “k 1,2 k 1,3 ”, “k” held in the registers 930 a to 930 f are updated. 1, 4 k 1,5 ”,“ k 1,6 k 1,7 ”,“ k 1,8 k 1,9 ”, and“ k 1,10 k 1,11 ”, and selectors 903 g and 903 h, respectively the output of the output "k 1,12 k 1,13" and the "k 1,14 k 1,15" as a round key to be used in the first round.

同様の処理により、さらに時刻C41までラウンド鍵が更新され出力される。 By the same process, the round key is updated is output further to time C 41.

第4の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻C36から時刻C40で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵「k8,08,18,28,3」、「k8,48,58,68,7」、「k8,88,98,108,11」、および「k8,128,138,148,15」の一部、または、10ラウンド目のラウンド鍵「k10,010,110,210,3」、「k10,410,510,610,7」、「k10,810,910,1010,11」、および「k10,1210,1310,1410,15」の一部にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。 In the fourth embodiment, in order to produce a calculation error in the round key 9 round, it is necessary to misleading calculated from time C 36 at time C 40. However, 8 round of the round-key this time "k 8,0 k 8,1 k 8,2 k 8,3", "k 8,4 k 8,5 k 8,6 k 8,7", "k 8,8 k 8,9 k 8,10 k 8,11 ", and" k 8,12 k 8,13 k 8,14 k 8,15 part of ", or, 10 round of the round-key" k 10,0 k 10,1 k 10,2 k 10,3 "," k 10,4 k 10,5 k 10,6 k 10,7 "," k 10,8 k 10,9 k 10,10 k 10, 11 ", and" k 10,12 k 10,13 k 10,14 k 10,15 'may compute error and a part is caused, the fault use disclosed in non-Patent Document 1 It becomes difficult to obtain a secret key by analysis.

なお、これまで説明した回路例と同様の手法により、レジスタ920a内の2つのバイトの更新順序を入れ替える鍵スケジュール装置や、レジスタ920aの更新内容をレジスタ920cの更新に用いるタイミングを遅らせる鍵スケジュール装置を構成可能である。   A key schedule device that switches the update order of two bytes in the register 920a and a key schedule device that delays the timing of using the update contents of the register 920a for updating the register 920c by the same method as the circuit example described so far. It is configurable.

このように、第4の実施の形態にかかる鍵スケジュール装置では、16バイトのラウンド鍵を4バイト単位に分割し、先頭の4バイトから順に、4バイトに含まれるバイトのうち所定の2バイトについて次のラウンド鍵を算出することができる。これにより、付加情報等の計算のための計算量の増加を回避しつつ、故障利用解析に対して安全な鍵スケジュール演算を実行することができる。   As described above, in the key schedule device according to the fourth embodiment, a 16-byte round key is divided into units of 4 bytes, and predetermined 2 bytes among the bytes included in the 4 bytes in order from the first 4 bytes. The next round key can be calculated. As a result, it is possible to execute a safe key schedule calculation for failure utilization analysis while avoiding an increase in the amount of calculation for calculating additional information and the like.

(第5の実施の形態)
第1の実施の形態から第4の実施の形態では、鍵スケジュール装置を実現する回路の構成と動作を説明した。第5の実施の形態では、鍵スケジュール装置を実現するための鍵スケジュール演算処理を実行するプログラムについて説明する。
(Fifth embodiment)
In the first to fourth embodiments, the configuration and operation of the circuit that implements the key schedule device have been described. In the fifth embodiment, a program for executing a key schedule calculation process for realizing a key schedule device will be described.

なお、以下では、第2の実施の形態の鍵スケジュール装置を実現する鍵スケジュールプログラムについて説明する。その他の実施の形態についても、同様の手法によって対応する鍵スケジュールプログラムを構成することができる。   In the following, a key schedule program that realizes the key schedule device of the second embodiment will be described. For other embodiments, a corresponding key schedule program can be configured by the same method.

図15は、第5の実施の形態にかかる鍵スケジュール装置1100のハードウェア構成の一例を示すブロック図である。図15に示すように、鍵スケジュール装置1100は、入出力部1101と、制御部1102と、演算装置1103と、主記憶装置1104と、補助記憶装置1105と、を主なハードウェア構成として備えている。   FIG. 15 is a block diagram illustrating an example of a hardware configuration of the key schedule apparatus 1100 according to the fifth embodiment. As illustrated in FIG. 15, the key schedule device 1100 includes an input / output unit 1101, a control unit 1102, an arithmetic device 1103, a main storage device 1104, and an auxiliary storage device 1105 as main hardware configurations. Yes.

入出力部1101は、データの入出力が可能な入出力装置やネットワーク回線に接続され、データを入出力するとともに、暗号化実行の命令を受け付ける。また、入出力部1101は、暗号化結果を表示するための情報を出力する。   The input / output unit 1101 is connected to an input / output device capable of inputting / outputting data or a network line, inputs / outputs data, and accepts an encryption execution command. The input / output unit 1101 outputs information for displaying the encryption result.

制御部1102は、入出力部1101から入力データとともに暗号化実行の命令を受け付けたときに、補助記憶装置1105に記憶されるプログラムとデータに基づいてデータの暗号化を実行するように、演算装置1103と主記憶装置1104に命令を発行する。   When the control unit 1102 receives an encryption execution command together with input data from the input / output unit 1101, the control unit 1102 executes the data encryption based on the program and data stored in the auxiliary storage device 1105. Commands are issued to 1103 and the main storage device 1104.

演算装置1103は、制御部1102の命令に基づいて受け付けたデータを入力として、コピー、反転、シフト演算、和、積、および排他的論理和演算などのビット演算や、加算、乗算、剰余算などの算術演算を行う。制御部1102、および演算装置1103は、CPU(Central Processing Unit)などによって構成することができる。   The arithmetic unit 1103 receives data received based on an instruction from the control unit 1102 as input, performs bit operations such as copy, inversion, shift operation, sum, product, and exclusive OR operation, addition, multiplication, remainder calculation, etc. Performs arithmetic operations. The control unit 1102 and the arithmetic device 1103 can be configured by a CPU (Central Processing Unit) or the like.

主記憶装置1104は、補助記憶装置1105が記憶するデータや演算装置1103が処理したデータを一時的に記憶する。主記憶装置1104は、補助記憶装置1105よりも高速にデータの入出力が可能であり、処理を高速化する目的で使用される。主記憶装置1104は、例えば、RAM(Random Access Memory)などにより構成することができる。   The main storage device 1104 temporarily stores data stored in the auxiliary storage device 1105 and data processed by the arithmetic device 1103. The main storage device 1104 can input and output data faster than the auxiliary storage device 1105, and is used for the purpose of speeding up the processing. The main storage device 1104 can be constituted by, for example, a RAM (Random Access Memory).

補助記憶装置1105は、暗号処理のプログラムや変数を記憶する。暗号処理に用いる秘密鍵は、補助記憶装置1105に記憶してもよいし、暗号化処理を実行するごとに入出力部1101から受け付けてもよい。補助記憶装置1105は、例えば、HDD(Hard Disk Drive)などにより構成することができる。   The auxiliary storage device 1105 stores encryption processing programs and variables. The secret key used for the encryption process may be stored in the auxiliary storage device 1105 or may be received from the input / output unit 1101 every time the encryption process is executed. The auxiliary storage device 1105 can be configured by, for example, an HDD (Hard Disk Drive).

なお、鍵スケジュール装置1100で実行される鍵スケジュールプログラムは、インストール可能な形式又は実行可能な形式のファイルでCD−ROM(Compact Disk Read Only Memory)、フレキシブルディスク(FD)、CD−R(Compact Disk Recordable)、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。   The key schedule program executed by the key schedule device 1100 is a file in an installable format or an executable format and is a CD-ROM (Compact Disk Read Only Memory), a flexible disk (FD), a CD-R (Compact Disk). The program is recorded on a computer-readable recording medium such as a recordable (DVD) or a DVD (Digital Versatile Disk).

また、鍵スケジュール装置1100で実行される鍵スケジュールプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、鍵スケジュール装置1100で実行される鍵スケジュールプログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。   Alternatively, the key schedule program executed by the key schedule device 1100 may be stored on a computer connected to a network such as the Internet and provided by being downloaded via the network. Further, the key schedule program executed by the key schedule device 1100 may be provided or distributed via a network such as the Internet.

また、鍵スケジュールプログラムを、ROM等に予め組み込んで提供するように構成してもよい。   Further, the key schedule program may be provided by being incorporated in advance in a ROM or the like.

鍵スケジュール装置1100で実行される鍵スケジュールプログラムは、上述したスケジュール部を含むモジュール構成となっており、実際のハードウェアとしてはCPU(制御部)が上記記憶媒体から鍵スケジュールプログラムを読み出して実行することにより上記スケジュール部が主記憶装置1104上にロードされ、主記憶装置1104上に生成されるようになっている。   The key schedule program executed by the key schedule device 1100 has a module configuration including the above-described schedule unit. As actual hardware, the CPU (control unit) reads the key schedule program from the storage medium and executes it. As a result, the schedule section is loaded on the main storage device 1104 and is generated on the main storage device 1104.

次に、鍵スケジュール演算処理で利用される各種データを記憶するための主記憶装置1104の構成について説明する。図16は、主記憶装置1104に確保される領域の構成例を示す図である。図16に示すように、主記憶装置1104は、鍵スケジュール演算処理のために、それぞれ4バイト(32ビット)であるMemA[i]、MemB[i]、MemC[i]、MemD[i]、およびMemT[j](i=0,1,2,3、j=0,1)の各領域を確保する。   Next, the configuration of the main storage device 1104 for storing various data used in the key schedule calculation process will be described. FIG. 16 is a diagram illustrating a configuration example of an area secured in the main storage device 1104. As shown in FIG. 16, the main storage device 1104 performs MeA [i], MemB [i], MemC [i], MemD [i], 4 bytes (32 bits), respectively, for the key schedule calculation process. And each area of MemT [j] (i = 0, 1, 2, 3, j = 0, 1) is secured.

MemA[i]とMemB[i]は、ラウンド鍵の一部を記憶する領域である。MemB[i]は、MemA[i]に記憶されるラウンド鍵よりも1つ先のラウンドに対応するラウンド鍵を記憶する。MemC[i]は、MemA[i]とMemB[i]の排他的論理和を計算した結果を記憶する。MemD[i]は、各ステップの初めにMemB[i]が記憶するデータをコピーし、同一ステップで計算されたMemA[i]との排他的論理和を計算した結果を記憶する。MemT[j]は、次のステップでラウンド鍵を更新するための情報を一時的に記憶する。   MemA [i] and MemB [i] are areas for storing a part of the round key. MemB [i] stores a round key corresponding to one round ahead of the round key stored in MemA [i]. MemC [i] stores the result of calculating the exclusive OR of MemA [i] and MemB [i]. MemD [i] stores the result of calculating the exclusive OR with MemA [i] calculated in the same step by copying the data stored in MemB [i] at the beginning of each step. MemT [j] temporarily stores information for updating the round key in the next step.

次に、このように構成された第5の実施の形態にかかる鍵スケジュール装置1100による鍵スケジュール演算処理について図17を用いて説明する。図17は、第5の実施の形態における鍵スケジュール演算処理の全体の流れを示すフローチャートである。   Next, a key schedule calculation process by the key schedule apparatus 1100 according to the fifth embodiment configured as described above will be described with reference to FIG. FIG. 17 is a flowchart showing an overall flow of the key schedule calculation process in the fifth embodiment.

まず、主記憶装置1104上に生成されたスケジュール部は、主記憶装置1104上に、図16で示したような各領域を確保し、所定の値で初期化する。そして、スケジュール部は、入力された秘密鍵を所定の領域に保存する(ステップS1701)。   First, the schedule unit generated on the main storage device 1104 secures each area as shown in FIG. 16 on the main storage device 1104 and initializes it with a predetermined value. Then, the schedule unit stores the input secret key in a predetermined area (step S1701).

次に、スケジュール部は、1ラウンド目のラウンド鍵の一部を算出する(ステップS1702)。さらに、スケジュール部は、前のステップで算出したラウンドのラウンド鍵の残りの部分および次のラウンドのラウンド鍵の一部を算出する(ステップS1703)。   Next, the schedule unit calculates a part of the round key for the first round (step S1702). Further, the schedule unit calculates the remaining part of the round key of the round calculated in the previous step and a part of the round key of the next round (step S1703).

次に、スケジュール部は、10ラウンド目のラウンド鍵の一部まで算出したか否かを判断する(ステップS1704)。算出していない場合は(ステップS1704:NO)、さらに処理を繰り返す(ステップS1703)。算出した場合は(ステップS1704:YES)、スケジュール部は、10ラウンド目のラウンド鍵の残りの部分を算出し(ステップS1705)、鍵スケジュール演算処理を終了する。   Next, the scheduling unit determines whether or not a part of the round key for the tenth round has been calculated (step S1704). If not calculated (step S1704: NO), the process is further repeated (step S1703). When it is calculated (step S1704: YES), the schedule unit calculates the remaining part of the round key of the tenth round (step S1705), and ends the key schedule calculation process.

次に、図17で説明したフローチャートの詳細について図18から図24を用いてさらに説明する。図18から図24は、各処理サイクル実行後に、主記憶装置1104の領域に格納されるデータの一例を示す図である。以下では、第2の実施の形態の時刻CからC11にそれぞれ対応するステップSからステップS11までの各処理サイクルでの処理の詳細を説明する。 Next, the details of the flowchart described with reference to FIG. 17 will be further described with reference to FIGS. 18 to 24 are diagrams illustrating an example of data stored in the area of the main storage device 1104 after execution of each processing cycle. The following describes the details from time C 0 of the second embodiment of the processing in each processing cycle from the step S 0 corresponding respectively to the C 11 to step S 11.

なお、以下のステップSが、図17のステップS1701に対応する。また、ステップSが、図17のステップS1702に対応する。また、ステップSからステップS10が、図17のステップS1703からステップS1704に対応する。さらに、ステップS11が、図17のステップS1705に対応する。 Incidentally, steps S 0 below, corresponding to step S1701 of FIG. 17. Further, step S 1 is corresponding to step S1702 of FIG. 17. Further, the step S 10 from step S 2, corresponding to step S1704 from step S1703 in FIG. 17. Further, step S 11 corresponds to step S1705 in FIG. 17.

(ステップS(初期化))16バイト(128ビット)の鍵「k0,00,10,20,3」、「k0,40,50,60,7」、「k0,80,90,100,11」、および「k0,120,130,140,15」を受け付けたら、MemC[i]に4バイトずつ記憶する。MemA[i]、MemB[i]、MemD[i](i=0,1,2,3)、およびMemT[1]は、0x00000000(4バイト)で初期化する。MemT[0]は、MemC[3]と0xff00ff00(4バイト)とのビット積を記憶する。ステップS終了時には、各領域は図18に示す値を記憶する。 (Step S 0 (initialization)) 16-byte (128-bit) keys “k 0,0 k 0,1 k 0,2 k 0,3 ”, “k 0,4 k 0,5 k 0,6 k 0,7 "," k 0,8 k 0,9 k 0,10 k 0,11 ", and If you accept the" k 0,12 k 0,13 k 0,14 k 0,15 ", MemC [i ] Stores 4 bytes each. MemA [i], MemB [i], MemD [i] (i = 0, 1, 2, 3), and MemT [1] are initialized with 0x00000000 (4 bytes). MemT [0] stores a bit product of MemC [3] and 0xff00ff00 (4 bytes). At the end of step S 0 , each area stores the values shown in FIG.

(ステップS)MemD[i]に、MemC[i]と0xff00ff00(4バイト)とのビット積を上書きする。このとき、i=1,2,3について、MemD[i]には、4バイトの「k0,4*i0k0,4*i+20」が記憶される。 (Step S 1 ) Overwrite MemD [i] with the bit product of MemC [i] and 0xff00ff00 (4 bytes). At this time, for i = 1, 2, 3, MemD [i] stores 4 bytes of “k 0, 4 * i 0k 0, 4 * i + 2 0”.

MemA[i]に、MemC[i]と0x00ff00ff(4バイト)とのビット積を記憶する。このとき、i=1,2,3について、MemA[i]には4バイトの「0k0,4*i+10k0,4*i+3」が記憶される。 The bit product of MemC [i] and 0x00ff00ff (4 bytes) is stored in MemA [i]. At this time, for i = 1, 2, 3, 4 bytes of “0k 0, 4 * i + 1 0k 0, 4 * i + 3 ” are stored in MemA [i].

MemB[i]に、MemC[i]と0xff00ff00(4バイト)とのビット積を記憶する。このとき、i=1,2,3について、MemB[i]には4バイトの「k0,4*i0k0,4*i+20」が記憶される。 The bit product of MemC [i] and 0xff00ff00 (4 bytes) is stored in MemB [i]. At this time, for i = 1, 2, 3, MemB [i] stores 4 bytes of “k 0, 4 * i 0k 0, 4 * i + 2 0”.

MemB[i]を以下のように更新する。MemA[3]を左に8ビット巡回シフトした値に、各バイトにAESの仕様で定めるSubByte演算を施す。なお、実際には第一バイトと第三バイトにのみSubByte演算を施せば十分である。さらに、AESの仕様で定める1ラウンド目のラウンド定数を加算(排他的論理和演算)したのち、0xff00ff00(4バイト)とのビット積を行って得られる値とMemB[0]との排他的論理和演算を計算し、MemB[0]に上書きする。このとき、MemA[3]は、4バイトの「0k0,130k0,15」が記憶され、MemB[0]には4バイトの「k1,00k1,20」が記憶される。i=1,2,3について、MemB[i]を、MemB[i]とMemB[i−1]との排他的論理和で上書きする。このとき、i=1,2,3について、MemB[i]には4バイトの「k1,4*i0k1,4*i+20」が記憶される。 MemB [i] is updated as follows. A SubByte operation defined by the AES specification is performed on each byte on the value obtained by cyclically shifting MemA [3] to the left by 8 bits. In practice, it is sufficient to perform the SubByte operation only on the first byte and the third byte. Further, after adding the round constant of the first round defined by the AES specification (exclusive OR operation), the exclusive logic of MemB [0] and the value obtained by performing bit product with 0xff00ff00 (4 bytes) Calculate the sum operation and overwrite MemB [0]. At this time, MEMA [3] is stored is "0k 0, 13 0k 0, 15" of 4 bytes, are stored in the "k 1,0 0k 1,2 0" of 4 bytes for memb [0] . For i = 1, 2, 3, MemB [i] is overwritten with the exclusive OR of MemB [i] and MemB [i-1]. At this time, for i = 1, 2, 3, MemB [i] stores 4 bytes of “k 1, 4 * i 0k 1, 4 * i + 2 0”.

MemC[i]に、MemA[i]とMemB[i]との排他的論理和を上書きする。このとき、i=0,1,2,3について、MemC[i]には4バイトの「k1,4*i0,4*i+11,4*i+20,4*i+3」が記憶される。 Overwrite MemC [i] with the exclusive OR of MemA [i] and MemB [i]. At this time, for i = 0, 1, 2, 3, MemC [i] has 4 bytes of “k 1,4 * i k 0,4 * i + 1 k 1,4 * i + 2 k 0,4 * i + 3 ”. Remembered.

MemD[i]に、MemD[i]とMemA[i]との排他的論理和を上書きする。このとき、i=0,1,2,3について、MemD[i]には4バイトの「k0,4*i0,4*i+10,4*i+20,4*i+3」が記憶される。MemD[i]の記憶する「k0,00,10,20,3」、「k0,40,50,60,7」、「k0,80,90,100,11」、および「k0,120,130,140,15」を初期鍵として出力する。 Overwrite MemD [i] with the exclusive OR of MemD [i] and MemA [i]. At this time, for i = 0, 1, 2, 3, MemD [i] has 4 bytes of “k 0, 4 * i k 0, 4 * i + 1 k 0, 4 * i + 2 k 0, 4 * i + 3 ”. Remembered. Mek [i] stores “k 0,0 k 0,1 k 0,2 k 0,3 ”, “k 0,4 k 0,5 k 0,6 k 0,7 ”, “k 0,8 ” k 0,9 k 0,10 k 0,11 ", and outputs" k 0,12 k 0,13 k 0,14 k 0,15 "as an initial key.

MemT[1]は、MemC[3]と0xff00ff00(4バイト)とのビット積を記憶する。ステップS終了時には、各領域は図19に示す値を記憶する。 MemT [1] stores a bit product of MemC [3] and 0xff00ff00 (4 bytes). Step S 1 at the end, each region stores a value shown in FIG. 19.

(ステップS)MemD[i]に、MemC[i]と0xff00ff00(4バイト)とのビット積を上書きする。このとき、i=1,2,3について、MemD[i]には4バイトの「k1,4*i0k1,4*i+20」が記憶される。 (Step S 2 ) Overwrite MemD [i] with a bit product of MemC [i] and 0xff00ff00 (4 bytes). At this time, for i = 1, 2, 3, 4-byte “k 1, 4 * i 0k 1, 4 * i + 2 0” is stored in MemD [i].

MemA[i]を以下のように更新する。MemT[0]を左に8ビット巡回シフトした値に、各バイトにAESの仕様で定めるSubByte演算を施す。なお、実際には第二バイトと第四バイトにのみSubByte演算を施せば十分である。さらに、AESの仕様で定める1ラウンド目のラウンド定数を加算(排他的論理和演算)したのち、0xff00ff00(4バイト)とのビット積を行って得られる値とMemA[0]との排他的論理和演算を計算し、MemA[0]に上書きする。このとき、MemA[0]には4バイトの「0k1,10k1,3」が記憶される。i=1,2,3について、MemA[i]を、MemA[i]とMemA[i−1]との排他的論理和で上書きする。このとき、i=1,2,3について、MemA[i]には4バイトの「0k1,4*i+10k1,4*i+3」が記憶される。 Update MemA [i] as follows. A SubByte operation defined by the AES specification is performed on each byte on the value obtained by cyclically shifting MemT [0] to the left by 8 bits. In practice, it is sufficient to perform the SubByte operation only on the second byte and the fourth byte. Furthermore, after adding the round constant of the first round defined by the AES specification (exclusive OR operation), the exclusive logic of the value obtained by performing bit product with 0xff00ff00 (4 bytes) and MemA [0] Calculate the sum operation and overwrite MemA [0]. At this time, 4-byte “0k 1,1 0k 1,3 ” is stored in MemA [0]. For i = 1,2,3, MemA [i] is overwritten with an exclusive OR of MemA [i] and MemA [i-1]. At this time, for i = 1, 2, 3, MemA [i] stores 4 bytes of “0k 1, 4 * i + 1 0k 1, 4 * i + 3 ”.

MemB[i]を以下のように更新する。MemA[3]を左に8ビット巡回シフトした値に、各バイトにAESの仕様で定めるSubByte演算を施す。なお、実際には第一バイトと第三バイトにのみSubByte演算を施せば十分である。さらに、AESの仕様で定める2ラウンド目のラウンド定数を加算(排他的論理和演算)したのち、0xff00ff00(4バイト)とのビット積を行って得られる値とMemB[0]との排他的論理和演算を計算し、MemB[0]に上書きする。このとき、MemA[3]は4バイトの「0k1,130k1,15」が記憶され、MemB[0]には4バイトの「k2,00k2,20」が記憶される。i=1,2,3について、MemB[i]が記憶する値を、MemB[i]とMemB[i−1]との排他的論理和で上書きする。このとき、i=1,2,3について、MemB[i]には4バイトの「k2,4*i0k2,4*i+20」が記憶される。 MemB [i] is updated as follows. A SubByte operation defined by the AES specification is performed on each byte on the value obtained by cyclically shifting MemA [3] to the left by 8 bits. In practice, it is sufficient to perform the SubByte operation only on the first byte and the third byte. Further, after adding the round constant of the second round defined by the AES specification (exclusive OR operation), the exclusive logic of the value obtained by performing bit product with 0xff00ff00 (4 bytes) and MemB [0] Calculate the sum operation and overwrite MemB [0]. At this time, MEMA [3] is stored in the "0k 1, 13 0k 1, 15" of 4 bytes, a "k 2,0 0k 2,2 0" of 4 bytes is stored in the MemB [0]. For i = 1, 2, 3, the value stored in MemB [i] is overwritten with the exclusive OR of MemB [i] and MemB [i−1]. At this time, for i = 1, 2, 3, MemB [i] stores “k 2, 4 * i 0k 2, 4 * i + 2 0” in 4 bytes.

MemC[i]に、MemA[i]とMemB[i]との排他的論理和を上書きする。このとき、i=0,1,2,3について、MemC[i]には4バイトの「k2,4*i1,4*i+12,4*i+21,4*i+3」が記憶される。 Overwrite MemC [i] with the exclusive OR of MemA [i] and MemB [i]. At this time, for i = 0, 1, 2, 3, MemC [i] has 4 bytes of “k 2,4 * i k 1,4 * i + 1 k 2,4 * i + 2 k 1,4 * i + 3 ”. Remembered.

MemD[i]に、MemD[i]とMemA[i]との排他的論理和を上書きする。このとき、i=0,1,2,3について、MemD[i]には4バイトの「k1,4*i1,4*i+11,4*i+21,4*i+3」が記憶される。MemD[i]の記憶する「k1,01,11,21,3」、「k1,41,51,61,7」、「k1,81,91,101,11」、および「k1,121,131,141,15」を1ラウンド目で利用するラウンド鍵として出力する。 Overwrite MemD [i] with the exclusive OR of MemD [i] and MemA [i]. At this time, for i = 0, 1, 2, 3, MemD [i] has 4 bytes of “k 1,4 * i k 1,4 * i + 1 k 1,4 * i + 2 k 1,4 * i + 3 ”. Remembered. “K 1,0 k 1,1 k 1,2 k 1,3 ”, “k 1,4 k 1,5 k 1,6 k 1,7 ”, “k 1,8 ” stored in MemD [i] k 1,9 k 1,10 k 1,11 ", and outputs" k 1,12 k 1,13 k 1,14 k 1,15 "as a round key to be used in the first round.

MemT[0]は、MemC[3]と0xff00ff00(4バイト)とのビット積を記憶する。ステップS終了時には、各領域は図20に示す値を記憶する。 MemT [0] stores a bit product of MemC [3] and 0xff00ff00 (4 bytes). Step S The 2 end, each region stores a value shown in FIG. 20.

(ステップS)MemT[0]とMemT[1]との役割を入れ替えて、ステップSと同様の処理を行い、図21に示す値に更新し、MemD[i]の記憶する「k2,02,12,22,3」、「k2,42,52,62,7」、「k2,82,92,102,11」、および「k2,122,132,142,15」を2ラウンド目で利用するラウンド鍵として出力する。 (Step S 3 ) The roles of MemT [0] and MemT [1] are switched, the same processing as Step S 2 is performed, the values are updated to the values shown in FIG. 21, and “k 2 ” stored in MemD [i] is stored. , 0 k 2,1 k 2,2 k 2,3 "," k 2,4 k 2,5 k 2,6 k 2,7 "," k 2,8 k 2,9 k 2,10 k 2 , 11 ", and outputs" k 2,12 k 2,13 k 2,14 k 2,15 "as a round key to be used in the second round.

ステップSからステップS10まで同様の処理を繰り返し、各領域の値を更新するとともに、ラウンド鍵を出力する。なお、図22および図23は、それぞれステップSおよびステップS10を実行した後の主記憶装置1104の領域に記憶される値を示す。 The same process is repeated from step S 4 through step S 10, updates the value of each region, and outputs round keys. Incidentally, FIGS. 22 and 23 show the values stored in the area of the main memory 1104 after performing Step S 9 and step S 10, respectively.

(ステップS11)MemD[i]に、MemC[i]と0xff00ff00(4バイト)とのビット積を上書きする。このとき、i=1,2,3について、MemD[i]には4バイトの「k10,4*i0k10,4*i+20」が記憶される。 (Step S 11 ) Overwrite MemD [i] with the bit product of MemC [i] and 0xff00ff00 (4 bytes). At this time, for i = 1, 2, 3, MemD [i] stores 4-byte “k 10, 4 * i 0k 10, 4 * i + 2 0”.

MemA[i]を以下のように更新する。MemT[1]を左に8ビット巡回シフトした値に、各バイトにAESの仕様で定めるSubByte演算を施す。なお、実際には第二バイトと第四バイトにのみSubByte演算を施せば十分である。さらに、AESの仕様で定める10ラウンド目のラウンド定数を加算(排他的論理和演算)したのち、0xff00ff00(4バイト)とのビット積を行って得られる値とMemA[0]との排他的論理和演算を計算し、MemA[0]に上書きする。このとき、MemA[0]には4バイトの「0k10,10k10,3」が記憶される。i=1,2,3について、MemA[i]を、MemA[i]とMemA[i−1]との排他的論理和で上書きする。このとき、i=1,2,3について、MemA[i]には4バイトの「0k10,4*i+10k10,4*i+3」が記憶される。 Update MemA [i] as follows. A SubByte operation defined by the AES specification is performed on each byte on the value obtained by cyclically shifting MemT [1] to the left by 8 bits. In practice, it is sufficient to perform the SubByte operation only on the second byte and the fourth byte. Further, after adding the round constant of the 10th round defined by the AES specification (exclusive OR operation), the exclusive logic of the value obtained by performing bit product with 0xff00ff00 (4 bytes) and MemA [0] Calculate the sum operation and overwrite MemA [0]. At this time, 4-byte “0k 10,1 0k 10,3 ” is stored in MemA [0]. For i = 1,2,3, MemA [i] is overwritten with an exclusive OR of MemA [i] and MemA [i-1]. At this time, for i = 1, 2, 3, MemA [i] stores 4 bytes of “0k 10, 4 * i + 1 0k 10, 4 * i + 3 ”.

MemB[i]およびMemC[i]は値を更新しない。なお、ステップS10までと同様の処理を行ってもよいが、更新される値は実際には使用されない。図24では、使用されないことを示すために、この値を記号「---」で表している。 MemB [i] and MemC [i] do not update values. It is also possible to perform the same processing until step S 10, but the value to be updated is not actually used. In FIG. 24, this value is represented by the symbol “---” to indicate that it is not used.

MemD[i]に、MemD[i]とMemA[i]との排他的論理和を上書きする。このとき、i=0,1,2,3について、MemD[i]には4バイトの「k10,4*i10,4*i+110,4*i+210,4*i+3」が記憶される。MemD[i]の記憶する「k10,010,110,210,3」、「k10,410,510,610,7」、「k10,810,910,1010,11」、および「k10,1210,1310,1410,15」を10ラウンド目で利用するラウンド鍵として出力する。 Overwrite MemD [i] with the exclusive OR of MemD [i] and MemA [i]. At this time, for i = 0, 1, 2, 3, MemD [i] has 4 bytes of “k 10, 4 * i k 10, 4 * i + 1 k 10, 4 * i + 2 k 10, 4 * i + 3 ”. Remembered. Storing of MemD [i] "k 10,0 k 10,1 k 10,2 k 10,3", "k 10,4 k 10,5 k 10,6 k 10,7", "k 10,8 k 10,9 k 10,10 k 10,11 ", and outputs" k 10,12 k 10,13 k 10,14 k 10,15 "as a round key to be used in the 10 th round.

MemT[0]は、MemC[3]と0xff00ff00(4バイト)とのビット積を記憶する。ステップS11終了時には、各領域は図24に示す値を記憶する。 MemT [0] stores a bit product of MemC [3] and 0xff00ff00 (4 bytes). The step S 11 at the end, each region stores a value shown in FIG. 24.

第5の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、ステップSまたはステップS10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵「k8,08,18,28,3」、「k8,48,58,68,7」、「k8,88,98,108,11」、および「k8,128,138,148,15」の一部、または、10ラウンド目のラウンド鍵「k10,010,110,210,3」、「k10,410,510,610,7」、「k10,810,910,1010,11」、および「k10,1210,1310,1410,15」の一部にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。 In the fifth embodiment, in order to produce a calculation error in the round key 9 round, it is necessary to falsify the calculation in step S 9 or step S 10. However, 8 round of the round-key this time "k 8,0 k 8,1 k 8,2 k 8,3", "k 8,4 k 8,5 k 8,6 k 8,7", "k 8,8 k 8,9 k 8,10 k 8,11 ", and" k 8,12 k 8,13 k 8,14 k 8,15 part of ", or, 10 round of the round-key" k 10,0 k 10,1 k 10,2 k 10,3 "," k 10,4 k 10,5 k 10,6 k 10,7 "," k 10,8 k 10,9 k 10,10 k 10, 11 ", and" k 10,12 k 10,13 k 10,14 k 10,15 'may compute error and a part is caused, the fault use disclosed in non-Patent Document 1 It becomes difficult to obtain a secret key by analysis.

このように、第5の実施の形態にかかる鍵スケジュール装置では、第2の実施の形態の鍵スケジュール装置と同様の処理をプログラムによって実現することができる。   Thus, in the key schedule device according to the fifth embodiment, the same processing as that of the key schedule device of the second embodiment can be realized by the program.

以上のように、本発明にかかる装置、方法およびプログラムは、AESなどの共通鍵暗号方式の鍵スケジュールを実行する装置、方法およびプログラムに適している。   As described above, the apparatus, method, and program according to the present invention are suitable for an apparatus, method, and program that execute a key schedule of a common key cryptosystem such as AES.

第1の実施の形態にかかる鍵スケジュール装置の構成を示すブロック図である。It is a block diagram which shows the structure of the key schedule apparatus concerning 1st Embodiment. 第1の実施の形態の鍵スケジュール装置の一例を示す回路図である。It is a circuit diagram showing an example of a key schedule device of a 1st embodiment. 第1の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。It is a figure which shows an example of the data output with each clock of the key schedule calculation process in 1st Embodiment. 第2の実施の形態にかかる鍵スケジュール装置の構成を示すブロック図である。It is a block diagram which shows the structure of the key schedule apparatus concerning 2nd Embodiment. 第2の実施の形態の鍵スケジュール装置の一例を示す回路図である。It is a circuit diagram which shows an example of the key schedule apparatus of 2nd Embodiment. 第2の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。It is a figure which shows an example of the data output with each clock of the key schedule calculation process in 2nd Embodiment. 第2の実施の形態の変形例にかかる鍵スケジュール装置の一例を示す回路図である。It is a circuit diagram which shows an example of the key schedule apparatus concerning the modification of 2nd Embodiment. 第2の実施の形態の変形例における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。It is a figure which shows an example of the data output with each clock of the key schedule calculation process in the modification of 2nd Embodiment. 第3の実施の形態にかかる鍵スケジュール装置の構成を示すブロック図である。It is a block diagram which shows the structure of the key schedule apparatus concerning 3rd Embodiment. 第3の実施の形態の鍵スケジュール装置の一例を示す回路図である。It is a circuit diagram which shows an example of the key schedule apparatus of 3rd Embodiment. 第3の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。It is a figure which shows an example of the data output with each clock of the key schedule calculation process in 3rd Embodiment. 第4の実施の形態にかかる鍵スケジュール装置の構成を示すブロック図である。It is a block diagram which shows the structure of the key schedule apparatus concerning 4th Embodiment. 第4の実施の形態の鍵スケジュール装置の一例を示す回路図である。It is a circuit diagram which shows an example of the key schedule apparatus of 4th Embodiment. 第4の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。It is a figure which shows an example of the data output with each clock of the key schedule calculation process in 4th Embodiment. 第5の実施の形態にかかる鍵スケジュール装置のハードウェア構成の一例を示すブロック図である。It is a block diagram which shows an example of the hardware constitutions of the key schedule apparatus concerning 5th Embodiment. 主記憶装置に確保される領域の構成例を示す図である。It is a figure which shows the structural example of the area | region ensured in a main memory. 第5の実施の形態における鍵スケジュール演算処理の全体の流れを示すフローチャートである。It is a flowchart which shows the whole flow of the key schedule calculation process in 5th Embodiment. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory. 主記憶装置の領域に格納されるデータの一例を示す図である。It is a figure which shows an example of the data stored in the area | region of a main memory.

符号の説明Explanation of symbols

100 鍵スケジュール装置
200 暗号化装置
310 スケジュール部
311 演算部
312 更新部
313 出力部
320 第1記憶部
320a〜320d レジスタ
330 第2記憶部
330a、330b レジスタ
302a〜302d 排他的論理和回路
303a〜303e 選択器
304 RotWord演算部
305 SubByte演算部
306 AddRCon演算部
500 鍵スケジュール装置
510 スケジュール部
520 第1記憶部
520a〜520p レジスタ
530 第2記憶部
530a〜530h レジスタ
501y、501z レジスタ
502a〜502p 排他的論理和回路
503a〜503t 選択器
506 AddRCon演算部
550 鍵スケジュール装置
553a〜553t 選択器
700 鍵スケジュール装置
710 スケジュール部
720 第1記憶部
720a〜720d レジスタ
730 第2記憶部
730a〜730h レジスタ
702a〜702h 排他的論理和回路
703a〜703d 選択器
900 鍵スケジュール装置
910 スケジュール部
920 第1記憶部
920a〜920h レジスタ
930 第2記憶部
930a〜930f レジスタ
902a〜902h 排他的論理和回路
903a〜903t 選択器
905a、905b SubByte演算部
907a、907b AND回路
1100 鍵スケジュール装置
1101 入出力部
1102 制御部
1103 演算装置
1104 主記憶装置
1105 補助記憶装置
DESCRIPTION OF SYMBOLS 100 Key schedule apparatus 200 Encryption apparatus 310 Schedule part 311 Operation part 312 Update part 313 Output part 320 1st memory | storage part 320a-320d Register 330 2nd memory | storage part 330a, 330b Register 302a-302d Exclusive OR circuit 303a-303e selection Unit 304 RotWord arithmetic unit 305 SubByte arithmetic unit 306 AddRCon arithmetic unit 500 key schedule device 510 schedule unit 520 first storage unit 520a to 520p register 530 second storage unit 530a to 530h register 501y, 501z register 502a to 502p exclusive OR circuit 503a to 503t selector 506 AddRCon operation unit 550 key schedule device 553a to 553t selector 700 key schedule device 7 0 schedule part 720 first storage part 720a to 720d register 730 second storage part 730a to 730h register 702a to 702h exclusive OR circuit 703a to 703d selector 900 key schedule device 910 schedule part 920 first storage part 920a to 920h register 930 Second storage unit 930a to 930f Register 902a to 902h Exclusive OR circuit 903a to 903t Selector 905a, 905b SubByte operation unit 907a, 907b AND circuit 1100 Key schedule device 1101 Input / output unit 1102 Control unit 1103 Main unit 1104 Device 1105 Auxiliary storage device

Claims (8)

ブロック暗号方式の各ラウンドで利用するラウンド鍵をスケジュールする鍵スケジュール装置であって、
複数のラウンドそれぞれに対応する複数のラウンド鍵を記憶する第1記憶部と、
予め定められた処理サイクルごとに、前記第1記憶部に記憶された複数のラウンド鍵と、複数のラウンド鍵のうち少なくとも1つのラウンド鍵の一部と、のいずれかを表す更新対象鍵を取得し、取得した前記更新対象鍵に基づいて、取得した前記更新対象鍵のラウンドの次のラウンドのラウンド鍵を算出する演算部と、
前記処理サイクルごとに、算出されたラウンド鍵で、前記第1記憶部の前記更新対象鍵を更新する更新部と、
を備えたことを特徴とする鍵スケジュール装置。
A key schedule device that schedules a round key to be used in each round of block ciphers,
A first storage unit that stores a plurality of round keys corresponding to each of a plurality of rounds;
For each predetermined processing cycle, an update target key that represents one of a plurality of round keys stored in the first storage unit and a part of at least one round key among the plurality of round keys is acquired. And, based on the acquired update target key, a calculation unit that calculates a round key of the next round of the acquired update target key round;
An update unit that updates the update target key of the first storage unit with the calculated round key for each processing cycle;
A key schedule device comprising:
前記第1記憶部は、ラウンド鍵を構成する要素のうち第1要素と、前記第1要素のラウンドより後のラウンドのラウンド鍵の要素であって、前記第1要素以外の要素に対応する第2要素とを記憶し、
前記演算部は、前記処理サイクルごとに、前記第1要素と前記第2要素とを前記更新対象鍵として取得し、取得した前記第1要素から前記第1要素のラウンドの次のラウンドのラウンド鍵の前記第1要素に対応する要素を算出し、取得した前記第2要素から前記第2要素のラウンドの次のラウンドのラウンド鍵の前記第2要素に対応する要素を算出し、
前記更新部は、算出された前記第1要素に対応する要素で、前記第1記憶部の前記第1要素を更新し、算出された前記第2要素に対応する要素で、前記第1記憶部の前記第2要素を更新すること、
を特徴とする請求項1に記載の鍵スケジュール装置。
The first storage unit is a first element among the elements constituting the round key and a round key element of a round after the first element round, and corresponds to elements other than the first element. Remember two elements,
The computing unit obtains the first element and the second element as the update target key for each processing cycle, and the round key of the next round of the first element round from the obtained first element Calculating an element corresponding to the second element of the round key of the round next to the round of the second element from the acquired second element;
The update unit is an element corresponding to the calculated first element, updates the first element of the first storage unit, and is an element corresponding to the calculated second element, the first storage unit Updating the second element of
The key schedule apparatus according to claim 1.
前記第1記憶部は、さらに、入力された秘密鍵をラウンド鍵の初期値として記憶し、
前記演算部は、さらに、最初の前記処理サイクルで、ラウンド鍵の初期値の前記第1要素を前記更新対象鍵として取得し、取得した前記第1要素から最初のラウンドのラウンド鍵の前記第1要素に対応する要素を算出し、
前記更新部は、さらに、ラウンド鍵の初期値の前記第1要素に対して算出された要素で、前記第1記憶部のラウンド鍵の初期値の前記第1要素を更新すること、
を特徴とする請求項2に記載の鍵スケジュール装置。
The first storage unit further stores the input secret key as an initial value of a round key,
The computing unit further acquires the first element of the initial value of a round key as the update target key in the first processing cycle, and the first round key of the first round from the acquired first element. Calculate the element corresponding to the element,
The updating unit further updates the first element of the initial value of the round key in the first storage unit with an element calculated for the first element of the initial value of the round key;
The key schedule device according to claim 2.
前記演算部は、任意のラウンドのラウンド鍵を構成する複数の要素のそれぞれを、複数の前記処理サイクルのいずれかで前記更新対象鍵として取得し、取得した要素に基づいて、取得した要素のラウンドの次のラウンドのラウンド鍵の要素のうち、取得した要素に対応する要素を算出すること、
を特徴とする請求項1に記載の鍵スケジュール装置。
The calculation unit acquires each of a plurality of elements constituting a round key of an arbitrary round as the update target key in any of the plurality of processing cycles, and based on the acquired elements, the round of the acquired elements Calculating the element corresponding to the acquired element among the elements of the round key of the next round of
The key schedule apparatus according to claim 1.
前記第1記憶部は、ラウンド鍵を構成する要素のうち第1要素と、前記第1要素のラウンドより後のラウンドのラウンド鍵の要素であって、前記第1要素以外の要素に対応する第2要素とを記憶し、
前記第1要素を含むラウンド鍵を構成する要素のうち、前記第2要素に対応する要素を記憶する第2記憶部と、
前記第1記憶部に記憶された前記第1要素と、前記第2記憶部に記憶された前記第2要素に対応する要素と、を出力する出力部と、をさらに備えたこと、
を特徴とする請求項1に記載の鍵スケジュール装置。
The first storage unit is a first element among the elements constituting the round key and a round key element of a round after the first element round, and corresponds to elements other than the first element. Remember two elements,
A second storage unit that stores an element corresponding to the second element among the elements constituting the round key including the first element;
An output unit that outputs the first element stored in the first storage unit and the element corresponding to the second element stored in the second storage unit;
The key schedule apparatus according to claim 1.
前記演算部は、前記更新対象鍵のラウンドに応じて予め定められたラウンド定数を用いてラウンド鍵を算出すること、
を特徴とする請求項1に記載の鍵スケジュール装置。
The computing unit calculates a round key using a round constant determined in advance according to the round of the update target key;
The key schedule apparatus according to claim 1.
ブロック暗号方式の各ラウンドで利用するラウンド鍵をスケジュールする鍵スケジュール方法あって、
演算部が、予め定められた処理サイクルごとに、第1記憶部に記憶された複数のラウンドそれぞれに対応する複数のラウンド鍵と、複数のラウンド鍵のうち少なくとも1つのラウンド鍵の一部と、のいずれかを表す更新対象鍵を取得し、取得した前記更新対象鍵に基づいて、取得した前記更新対象鍵のラウンドの次のラウンドのラウンド鍵を算出する演算ステップと、
更新部が、前記処理サイクルごとに、算出されたラウンド鍵で、前記第1記憶部の前記更新対象鍵を更新する更新ステップと、
を備えたことを特徴とする鍵スケジュール方法。
There is a key scheduling method for scheduling round keys to be used in each round of block ciphers,
The arithmetic unit, for each predetermined processing cycle, a plurality of round keys corresponding to each of the plurality of rounds stored in the first storage unit, a part of at least one round key among the plurality of round keys, A calculation step of obtaining an update target key representing any one of the following, and calculating a round key of the next round of the round of the acquired update target key based on the acquired update target key;
An update unit updates the update target key of the first storage unit with the calculated round key for each processing cycle;
A key schedule method comprising:
ブロック暗号方式の各ラウンドで利用するラウンド鍵をスケジュールする鍵スケジュール装置で実行される鍵スケジュールプログラムであって、
前記鍵スケジュール装置を、
予め定められた処理サイクルごとに、第1記憶部に記憶された複数のラウンドそれぞれに対応する複数のラウンド鍵と、複数のラウンド鍵のうち少なくとも1つのラウンド鍵の一部と、のいずれかを表す更新対象鍵を取得し、取得した前記更新対象鍵に基づいて、取得した前記更新対象鍵のラウンドの次のラウンドのラウンド鍵を算出する演算部と、
前記処理サイクルごとに、算出されたラウンド鍵で、前記第1記憶部の前記更新対象鍵を更新する更新部と、
として機能させるための鍵スケジュールプログラム。
A key schedule program that is executed by a key schedule device that schedules a round key to be used in each round of a block cipher method,
The key schedule device;
For each predetermined processing cycle, one of a plurality of round keys corresponding to each of the plurality of rounds stored in the first storage unit and a part of at least one round key among the plurality of round keys. A calculation unit that obtains an update target key to be represented, and calculates a round key of a round next to the round of the acquired update target key based on the acquired update target key;
An update unit that updates the update target key of the first storage unit with the calculated round key for each processing cycle;
Key schedule program to function as
JP2008221805A 2008-08-29 2008-08-29 Apparatus, method and program for scheduling key used in encryption Active JP5319209B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008221805A JP5319209B2 (en) 2008-08-29 2008-08-29 Apparatus, method and program for scheduling key used in encryption

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008221805A JP5319209B2 (en) 2008-08-29 2008-08-29 Apparatus, method and program for scheduling key used in encryption

Publications (2)

Publication Number Publication Date
JP2010057066A JP2010057066A (en) 2010-03-11
JP5319209B2 true JP5319209B2 (en) 2013-10-16

Family

ID=42072473

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008221805A Active JP5319209B2 (en) 2008-08-29 2008-08-29 Apparatus, method and program for scheduling key used in encryption

Country Status (1)

Country Link
JP (1) JP5319209B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5379558B2 (en) * 2009-05-22 2013-12-25 日本電信電話株式会社 Cryptographic operation circuit, cryptographic operation method, program, recording medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100377172B1 (en) * 2000-06-13 2003-03-26 주식회사 하이닉스반도체 Key Scheduller of encryption device using data encryption standard algorithm
GB0214620D0 (en) * 2002-06-25 2002-08-07 Koninkl Philips Electronics Nv Round key generation for AES rijndael block cipher
JP4905000B2 (en) * 2006-09-01 2012-03-28 ソニー株式会社 Cryptographic processing apparatus, cryptographic processing method, and computer program
JP2008233683A (en) * 2007-03-22 2008-10-02 Toshiba Corp Encryption processing apparatus and program
JP4990843B2 (en) * 2008-06-16 2012-08-01 日本電信電話株式会社 Cryptographic operation apparatus, method thereof, and program

Also Published As

Publication number Publication date
JP2010057066A (en) 2010-03-11

Similar Documents

Publication Publication Date Title
Coron et al. Higher-order side channel security and mask refreshing
JP4905000B2 (en) Cryptographic processing apparatus, cryptographic processing method, and computer program
RU2383934C2 (en) Cryptographic processing device, cryptographic processing method
KR20160132943A (en) Solving digital logic constraint problems via adiabatic quantum computation
Hu et al. Automatic search for a variant of division property using three subsets
CN112070222A (en) Processing architecture, accelerator and method for federal learning
Hadipour et al. Autoguess: a tool for finding guess-and-determine attacks and key bridges
US11200346B2 (en) Secure computation for reading multiple elements from a secure text array
JP5319209B2 (en) Apparatus, method and program for scheduling key used in encryption
Momin et al. Handcrafting: Improving Automated Masking in Hardware with Manual Optimizations
Beighton et al. Algebraic attacks on Grain-like keystream generators
JP4466641B2 (en) Cryptographic processing device
KR20080052291A (en) Aes encryption and decryption apparatus and method
JPWO2016056502A1 (en) Non-decreasing sequence determination device, non-decreasing sequence determination method, and program
Davidson et al. Dynamic Circuit Specialisation for Key‐Based Encryption Algorithms and DNA Alignment
Sharma et al. New Approach To Des With Enhanced Key Management And Encryption/Decryption System (Des Ultimate)
Liu et al. Finding ordinary cube variables for Keccak-MAC with greedy algorithm
JP2013045072A (en) Arithmetic unit
Borghoff Mixed-integer linear programming in the analysis of trivium and ktantan
JP4644053B2 (en) Encryption apparatus and method, decryption apparatus and method
JPH08161284A (en) Ciphering and deciphering devices
JP5488608B2 (en) Block encryption apparatus, block encryption method and program
AU2020423665B2 (en) Secret maximum value calculation apparatus, method and program
KR20130126924A (en) Code processing device, code processing method, and program
Zhang et al. Automatic key recovery of feistel ciphers: application to SIMON and SIMECK

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20110323

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20130325

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130402

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130527

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20130618

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130711

R151 Written notification of patent or utility model registration

Ref document number: 5319209

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151