JP5319209B2 - Apparatus, method and program for scheduling key used in encryption - Google Patents
Apparatus, method and program for scheduling key used in encryption Download PDFInfo
- 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
Links
Images
Abstract
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).
しかしながら、(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
鍵スケジュール装置100および暗号化装置200は、例えば、AESにしたがってデータを暗号化する回路であるAES暗号化回路に含まれる鍵スケジュール回路、および、データ暗号化回路として実現することができる。
The
第1記憶部320は、複数のラウンドに対応する複数のラウンド鍵を記憶するレジスタである。第1記憶部320は、128ビット(16バイト)のラウンド鍵を4バイトごとに記憶する4つのレジスタ320a〜320dから構成される。
The
レジスタ320a〜320dには、後述する更新部312によって互いに異なるラウンドのラウンド鍵が記憶される。具体的には、レジスタ320aおよび320bは、レジスタ320cおよび320dより1つ進んだラウンドのラウンド鍵が記憶される。
In the
第2記憶部330は、レジスタ320aおよび320bに記憶されているラウンド鍵の1つ前のラウンドの対応するラウンド鍵を記憶するレジスタである。第2記憶部330は、レジスタ320aおよび320bにそれぞれ対応するラウンド鍵を記憶するレジスタ330aおよび330bから構成される。
The
レジスタ330aおよび330bを備えることにより、鍵スケジュール装置100の出力がラウンドごとに揃うように調節することができる。すなわち、レジスタ330aおよび330bは、後述する出力部313が、暗号化装置200に同一のラウンドのラウンド鍵の全部を出力するときに参照される。
By providing the
スケジュール部310は、第1記憶部320に記憶された複数のラウンドのラウンド鍵を参照して、次のラウンドのラウンド鍵を順次算出する鍵スケジュール演算処理を実行する。スケジュール部310は、詳細な構成として、演算部311と、更新部312と、出力部313とを備えている。
The
演算部311は、所定の処理サイクルで、第1記憶部320に記憶されたラウンド鍵の次のラウンドのラウンド鍵を算出する。例えば、鍵スケジュール装置100をハードウェア回路で実現する場合、演算部311は、同期を取るためのクロック信号の周期(クロック周期)を所定の処理サイクルとすることができる。また、例えば、第5の実施の形態(後述)のように、鍵スケジュール装置100の処理をプログラムにより実現する場合、演算部311は、当該プログラムで定められた所定の処理(ステップ)を実行する周期を所定の処理サイクルとすることができる。
The
演算部311は、各処理サイクルで、第1記憶部320に記憶されたラウンド鍵のうち、更新する対象となるラウンド鍵を表す更新対象鍵を取得し、更新対象鍵に対する次のラウンドのラウンド鍵を算出する。本実施の形態では、演算部311は、第1記憶部320に記憶された複数のラウンドのラウンド鍵それぞれを更新対象鍵としてラウンド鍵を算出する。
The
更新部312は、算出されたラウンド鍵で、第1記憶部320に記憶された更新対象鍵を更新する。
The
出力部313は、第1記憶部320のレジスタ320cおよび320dに記憶されたラウンド鍵と、第2記憶部330のレジスタ330aおよび330bに記憶されたラウンド鍵とを、暗号化装置200に出力する。これにより、暗号化装置200は、同一のラウンドのラウンド鍵を同時に取得することができる。なお、暗号化装置200が、ラウンド鍵が計算されるタイミングの相違を調整するように構成してもよい。この場合は、レジスタ330aおよび330bは不要となる。
The
次に、鍵スケジュール装置100を実現する回路例について図2を用いて説明する。図2は、第1の実施の形態の鍵スケジュール装置100の一例を示す回路図である。
Next, a circuit example for realizing the
同図に示すように、鍵スケジュール装置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
なお、同図では、Ri(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
排他的論理和回路302a〜302dは、ビットごとの排他的論理和を計算する。
The exclusive OR
選択器303a〜303dは、鍵スケジュール装置100への入力と、排他的論理和回路302a〜302dの出力とを、クロック信号に応じて選択して出力する。鍵スケジュール装置100への入力とは、ラウンド鍵の演算に用いる鍵として入力される、ラウンド鍵の初期状態(初期値)である秘密鍵を意味する。また、同図に示すように、本実施の形態では、128ビット(16バイト)の秘密鍵を4バイトずつ分割したデータが、選択器303a〜303dにそれぞれ入力される。
The
選択器303eは、クロック信号に応じて、レジスタ320dが保持する値、または排他的論理和回路302dが出力する値のいずれかを選択して出力する回路である。
The
選択器303a〜303eは、事前に設定された情報または外部から指示された命令等にしたがって、いずれの値を選択するかを決定する。選択器303a〜303eによるクロックごとの選択方法の詳細については後述する。
The
RotWord演算部304は、4バイトのデータ「ki,12ki,13ki,14ki,15」を入力として、バイトの順番を入れ替えたデータ「ki,13ki,14ki,15ki,12」を出力する。なお、記号「ki,j」は、iラウンド目のラウンド鍵の(j+1)バイト目のデータを表す。そして、例えばデータ「ki,12ki,13ki,14ki,15」は、各1バイトのデータである「ki,12」、「ki,13」、「ki,14」、および「ki,15」をこの順序で連結した4バイトのデータを表す。
SubByte演算部305は、4バイトのデータを入力として、入力された4バイトの各バイトにAESの仕様で定められた非線形演算を施して出力する。
The
AddRCon演算部306は、4バイトのデータを入力として、AESの仕様でラウンドごとに定められたラウンド定数を入力された4バイトに加算(排他的論理和演算)して出力する。
The
上述のように、本実施の形態では、レジスタ320aおよび320bに保持されるラウンド鍵は、レジスタ320cおよび320dに保持されるラウンド鍵よりも1ラウンド分進んだラウンド鍵となる。
As described above, in the present embodiment, the round key held in the
次に、このように構成された鍵スケジュール装置100による鍵スケジュール演算処理について説明する。図3は、第1の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。
Next, a key schedule calculation process by the
以下に、最初のクロックである時刻C0から、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.
(時刻C0)選択器303aから303dは、それぞれ鍵スケジュール装置100の入力として受け付けた4バイトの鍵「k0,0k0,1k0,2k0,3」、「k0,4k0,5k0,6k0,7」、「k0,8k0,9k0,10k0,11」、および「k0,12k0,13k0,14k0,15」を選択する。レジスタ320aから320dは、クロック周期の終わりに、図3のC0に対応する行に示すような値をそれぞれ保持する。
The (time C 0 )
(時刻C1)レジスタ320aから320dは保持している値を出力する。選択器303aと303bは、排他的論理和回路302aと302bの出力を選択して出力する。このように、ラウンド鍵を算出する最初のクロックでは、入力された鍵の先頭8バイトに相当する要素のみが選択され、後述するようにこの先頭8バイトのみが次のラウンド鍵に更新される。すなわち、この場合は、先頭8バイトに相当する要素が更新対象鍵となる。
(Time C 1 ) The
選択器303cと303dは、鍵スケジュール装置100の入力として受け付けた4バイトの鍵「k0,8k0,9k0,10k0,11」および「k0,12k0,13k0,14k0,15」をそれぞれ選択する。
選択器303eは、レジスタ320dが保持する値を選択して出力する。このとき、レジスタ320dに保持される「k0,12k0,13k0,14k0,15」は、RotWord演算部304、SubByte演算部305、およびAddRCon演算部306で変換されて排他的論理和回路302aに送られ、レジスタ320aに保持される「k0,0k0,1k0,2k0,3」を「k1,0k1,1k1,2k1,3」に更新する。更新された「k1,0k1,1k1,2k1,3」は、排他的論理和回路302bに送られ、レジスタ320bに保持される「k0,4k0,5k0,6k0,7」を「k1,4k1,5k1,6k1,7」に更新する。
The
一方、レジスタ320cと320dに保持される「k0,8k0,9k0,10k0,11」と「k0,12k0,13k0,14k0,15」は同一の値に更新される。すなわち、これらのレジスタに保持されるデータの値は変化しない。更新された値は、クロック周期の終わりに、図3に示すようにレジスタ320aから320dに保持される。レジスタ330aと330bは、レジスタ320aと320bと同一の値が保持される。
On the other hand, it is held in the
(時刻C2)レジスタ320aから320dおよびレジスタ330aから330bは、保持している値を出力する。選択器303aから303dは、排他的論理和回路302aから302dの出力を選択して出力する。選択器303eは、排他的論理和回路302dが出力する値を選択して出力する。レジスタ320bに保持される「k1,4k1,5k1,6k1,7」は、排他的論理和回路302cに送られ、レジスタ320cに保持される「k0,8k0,9k0,10k0,11」を「k1,8k1,9k1,10k1,11」に更新する。更新された「k1,8k1,9k1,10k1,11」は、排他的論理和回路302dに送られ、レジスタ320dに保持される「k0,12k0,13k0,14k0,15」を「k1,12k1,13k1,14k1,15」に更新する。更新された「k1,12k1,13k1,14k1,15」は、RotWord演算部304、SubByte演算部305、およびAddRCon演算部306で変換されて排他的論理和回路302aに送られ、レジスタ320aに保持される「k1,0k1,1k1,2k1,3」を「k2,0k2,1k2,2k2,3」に更新する。
(Time C 2 ) The
更新された「k2,0k2,1k2,2k2,3」は、排他的論理和回路302bに送られ、レジスタ320bに保持される「k1,4k1,5k1,6k1,7」を「k2,4k2,5k2,6k2,7」に更新する。レジスタ330aと330bに保持される値「k1,0k1,1k1,2k1,3」と「k1,4k1,5k1,6k1,7」、および、排他的論理和回路302cと302dの出力「k1,8k1,9k1,10k1,11」と「k1,12k1,13k1,14k1,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
時刻C10まで同様の処理が繰り返され、9ラウンド目のラウンド鍵「k9,0k9,1k9,2k9,3」、「k9,4k9,5k9,6k9,7」、「k9,8k9,9k9,10k9,11」、および「k9,12k9,13k9,14k9,15」が出力され、図3に示すようにレジスタ320a(および330a)、レジスタ320b(および330b)、レジスタ320c、およびレジスタ320dに、それぞれ「k10,0k10,1k10,2k10,3」、「k10,4k10,5k10,6k10,7」、「k9,8k9,9k9,10k9,11」、および「k9,12k9,13k9,14k9,15」が保持される。
Time C 10 to a similar process is repeated, 9 round of the round-
(時刻C11)レジスタ320aから320dおよびレジスタ330aから330bは、保持している値を出力する。選択器303aから303dは、排他的論理和回路302aから302dの出力を選択して出力する。選択器303eは、排他的論理和回路302dが出力する値を選択して出力する。レジスタ320bに保持される「k10,4k10,5k10,6k10,7」は、排他的論理和回路302cに送られ、レジスタ320cに保持される「k9,8k9,9k9,10k9,11」を「k10,8k10,9k10,10k10,11」に更新する。
(Time C 11 ) The
更新された「k10,8k10,9k10,10k10,11」は、排他的論理和回路302dに送られ、レジスタ320dに保持される「k9,12k9,13k9,14k9,15」を「k10,12k10,13k10,14k10,15」に更新する。レジスタ330aと330bに保持される「k10,0k10,1k10,2k10,3」と「k10,4k10,5k10,6k10,7」、および、更新された「k10,8k10,9k10,10k10,11」と「k10,12k10,13k10,14k10,15」は、10ラウンド目のラウンド鍵として鍵スケジュール装置100から出力される。レジスタ320aおよび320bに保持される値は、更新された「k10,12k10,13k10,14k10,15」に基づいて、実際には使用されない値に更新されて保持される。例えば、上記と同様の処理により、11ラウンド目に相当する値に更新されて保持される。図3では、使用されないことを示すために、この値を記号「---」で表している。
Updated "k 10,8 k 10,9 k 10,10 k 10,11" exclusively sent to the
このようにして鍵スケジュール演算処理を実行することにより、非特許文献1などで開示されている故障利用解析で秘密鍵を導出することが困難となる。すなわち、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻C9またはC10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵の一部である「k8,8k8,9k8,10k8,11k8,12k8,13k8,14k8,15」、または、10ラウンド目のラウンド鍵の一部である「k10,0k10,1k10,2k10,3k10,4k10,5k10,6k10,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
また、上記非特許文献2のように、付加情報の計算や、計算結果の比較などのような、ラウンド鍵以外の情報のための計算が不要であるため、計算量の増大を抑止することができる。また、11クロック(時刻C11)で10ラウンド目までのラウンド鍵が算出できるため、10クロックで10ラウンド目までのラウンド鍵を算出する従来の方法と比較したラウンド鍵を計算するための計算量の増加も最小限にすることができる。
Further, as in
これまでは、レジスタ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
このように、第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
第2の実施の形態では、上述のように1バイト単位でラウンド鍵の更新を制御するようにスケジュール部510と、第1記憶部520と、第2記憶部530とを構成した点が、第1の実施の形態と異なっている。以下では、第2の実施の形態の鍵スケジュール装置500を実現する回路例である図5を用いて、鍵スケジュール装置500の機能について説明する。図5は、第2の実施の形態の鍵スケジュール装置500の一例を示す回路図である。
In the second embodiment, the
同図に示すように、鍵スケジュール装置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
レジスタ520aから520dは、第1の実施の形態におけるレジスタ320aに対応し、ラウンド鍵の先頭4バイトをバイトごとに保持するレジスタである。同様に、レジスタ520eから520h、レジスタ520iから520l、およびレジスタ520mから520pは、それぞれ第1の実施の形態におけるレジスタ320b、レジスタ320c、およびレジスタ320dに対応する。
The
レジスタ530aから530hは、第1の実施の形態におけるレジスタ330aと330bと同様に、鍵スケジュール装置500の出力が、ラウンドごとに揃うように調節するために用いられる。
The
レジスタ501yと501zは、特定の時刻で計算されるラウンド鍵のラウンドに差分を生じさせるために用いられる。
The
排他的論理和回路502aから502pは、第1の実施の形態における排他的論理和回路302aから302dをバイトごとに分割した回路であり、2つの1バイトの入力に対して、ビットごとに排他的論理和を計算した結果を出力する。
The exclusive OR
選択器503aから503pは、第1の実施の形態における選択器303aから303dをバイトごとに分割した回路であり、排他的論理和回路502aから502pの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する。
The
選択器503qと503sは、レジスタ520mと520oの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する回路である。
The
選択器503rと503tは、排他的論理和回路502nと502pの出力、または鍵スケジュール装置500の入力のいずれかを、クロック信号に応じて選択して出力する回路である。
The
RotWord演算部304、およびSubByte演算部305は、第1の実施の形態の鍵スケジュール装置100の回路図である図2と同様であるため同一の符号を付し、説明は省略する。
The
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
以下に、最初のクロックである時刻C0から、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.
(時刻C0)選択器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
(時刻C1)レジスタ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
このとき、選択器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
更新された「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
一方、レジスタ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
更新された値は、クロック周期の終わりに、図6に示すようにレジスタ520aから520p(R0〜R15に対応)、およびレジスタ501yと501z(T12、T14に対応)に保持される。
The updated values are held in
レジスタ530aから530hは、更新された「k1,0」、「k1,2」、「k1,4」、「k1,6」、「k1,8」、「k1,10」、「k1,12」、および「k1,14」を保持する。
The
(時刻C2)レジスタ520aから520p、レジスタ501y、およびレジスタ501zは保持している値を出力する。選択器503aから503pは、それぞれ排他的論理和回路502aから502pの出力を選択して出力する。選択器503qおよび503sは、それぞれレジスタ520mおよび520oが出力する値を選択して出力する。選択器503rおよび503tは、それぞれ排他的論理和回路502nおよび502pの出力を選択して出力する。
(Time C 2 ) The
レジスタ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
さらに、更新された「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
更新された「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
更新された値は、クロック周期の終わりに、図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
時刻C10まで同様の処理が繰り返され、9ラウンド目のラウンド鍵「k9,0k9,1k9,2k9,3k9,4k9,5k9,6k9,7k9,8k9,9k9,10k9,11k9,12k9,13k9,14k9,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
(時刻C11)レジスタ520aから520p、レジスタ501y、およびレジスタ501zは保持している値を出力する。選択器503aから503pは、排他的論理和回路502aから502pの出力を選択して出力する。選択器503qと503sは、レジスタ520mと520oが出力する値を選択して出力する。選択器503rと503tは、排他的論理和回路502nと502pの出力を選択して出力する。
(Time C 11 ) The
レジスタ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」に更新される。
さらに、更新された「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
更新された「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
第2の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻C9またはC10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵の一部「k8,1k8,3k8,5k8,7k8,9k8,11k8,13k8,15」、または10ラウンド目のラウンド鍵の一部「k10,0k10,2k10,4k10,6k10,8k10,10k10,12k10,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
これまでは、例えば最初の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
例えば、以下の組み合わせが可能である。
(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
(変形例)
上記第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
そこで、第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
図7に示すように、本変形例では、第2の実施の形態の鍵スケジュール装置500の選択器503aから503pの代わりに(図5参照)、三入力一出力の選択器553aから553pを利用して鍵スケジュール演算処理を実行する。そして、このような選択器553aから553pを用いることにより、あるクロック周期では、8バイトの情報の一部のみを選択して更新するように構成する。
As shown in FIG. 7, in this modification, instead of the
図8は、本変形例における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。同図は、例えば、レジスタ520aと520c、520eと520g、520iと520k、および520mと520oに保持される8バイトの情報を、2つのクロック周期(例えば、時刻C1と時刻C2)に分けて更新する例を示している。 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
第3の実施の形態では、上述のように、連続する2つのラウンドのラウンド鍵を同一クロックで算出するようにスケジュール部710と、第1記憶部720と、第2記憶部730とを構成した点が、第1の実施の形態と異なっている。以下では、第3の実施の形態の鍵スケジュール装置700を実現する回路例である図10を用いて、鍵スケジュール装置700の機能について説明する。図10は、第3の実施の形態の鍵スケジュール装置700の一例を示す回路図である。
In the third embodiment, as described above, the
同図に示すように、鍵スケジュール装置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
レジスタ720aから720dは、第1の実施の形態におけるレジスタ320aから320dに対応し、16バイトのラウンド鍵を4バイトごとに分割して保持する。
レジスタ730aから730hは、鍵スケジュール装置700から出力するラウンド鍵を保持するレジスタである。第3の実施の形態では、1時刻(クロック周期)あたりに2ラウンド分のラウンド鍵が計算される。上述したとおり、データ暗号化回路(暗号化装置200)は通常1時刻あたりに1ラウンドの暗号化処理を行う。このため、データ暗号化回路が各ラウンドのラウンド鍵を参照できるように、時刻Ci(i=1,2,3,4,5)終了時に、レジスタ730aから730dが第2*i−1ラウンド目のラウンド鍵を保持し、レジスタ730eから730hが第2*iラウンド目のラウンド鍵を保持するように構成する。
The
データ暗号化回路を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
排他的論理和回路702aから702d、および排他的論理和回路702eから702hは、ビットごとの排他的論理和を計算する。
Exclusive OR
選択器703aから703dは、選択器303a〜303dは、鍵スケジュール装置700への入力と、排他的論理和回路702e〜702hの出力とを、クロック信号に応じて選択して出力する。
The
RotWord演算部304aと304bは、それぞれ第1の実施の形態のRotWord演算部304と同様の機能を備えている。
The
SubByte演算部305aと305bは、それぞれ第1の実施の形態のAddRCon演算部305と同様の機能を備えている。
The
AddRCon演算部306aと306bは、それぞれ第1の実施の形態のAddRCon演算部306と同様の機能を備えている。
The
次に、このように構成された鍵スケジュール装置700による鍵スケジュール演算処理について説明する。図11は、第3の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。
Next, key schedule calculation processing by the
(時刻C0)選択器703aから703dは、それぞれ鍵スケジュール装置700の入力として受け付けた4バイトの鍵「k0,0k0,1k0,2k0,3」、「k0,4k0,5k0,6k0,7」、「k0,8k0,9k0,10k0,11」、および「k0,12k0,13k0,14k0,15」を選択する。レジスタ720aから720dは、クロック周期の終わりに、図11に示すようにそれぞれの値を保持する。
(Time C 0 ) The
(時刻C1)レジスタ720aから720dは、保持している値を出力する。選択器703aから703dは、それぞれ排他的論理和回路702eから702hの出力を選択して出力する。このとき、レジスタ720dに保持される「k0,12k0,13k0,14k0,15」は、RotWord演算部304a、SubByte演算部305a、およびAddRCon演算部306aで変換されて排他的論理和回路702aに送られる。排他的論理和回路702aは、レジスタ720aに保持される「k0,0k0,1k0,2k0,3」から「k1,0k1,1k1,2k1,3」を出力して、レジスタ720e、排他的論理和回路702bおよび702eに送る。
(Time C 1 ) The
排他的論理和回路702bに送られた「k1,0k1,1k1,2k1,3」は、レジスタ720bに保持される「k0,4k0,5k0,6k0,7」と排他的論理和演算が施され、「k1,4k1,5k1,6k1,7」が出力される。同様に、排他的論理和回路702cおよび702dでは、それぞれレジスタ720cおよび720dに保持される「k0,8k0,9k0,10k0,11」および「k0,12k0,13k0,14k0,15」に基づいて、「k1,8k1,9k1,10k1,11」と「k1,12k1,13k1,14k1,15」が出力される。
“K 1,0 k 1,1 k 1,2 k 1,3 ” sent to the exclusive OR
排他的論理和回路702dが出力する「k1,12k1,13k1,14k1,15」は、RotWord演算部304b、SubByte演算部305b、およびAddRCon演算部306bで変換されて排他的論理和回路702eに送られる。排他的論理和回路702eは、排他的論理和回路702aが出力する「k1,0k1,1k1,2k1,3」に基づいて「k2,0k2,1k2,2k2,3」を出力して、選択器703a、レジスタ730e、および排他的論理和回路702fに送る。
Exclusive OR
排他的論理和回路702fに送られた「k2,0k2,1k2,2k2,3」は、排他的論理和回路702bが出力する「k1,4k1,5k1,6k1,7」と排他的論理和演算が施され、「k2,4k2,5k2,6k2,7」が出力される。同様に、排他的論理和回路702gおよび702hでは、それぞれ排他的論理和回路702cおよび702dが出力する「k1,8k1,9k1,10k1,11」および「k1,12k1,13k1,14k1,15」に基づいて、それぞれ「k2,8k2,9k2,10k2,11」および「k2,12k2,13k2,14k2,15」が出力される。
“K 2,0 k 2,1 k 2,2 k 2,3 ” sent to the exclusive OR
更新された「k2,0k2,1k2,2k2,3」、「k2,4k2,5k2,6k2,7」、「k2,8k2,9k2,10k2,11」、および「k2,12k2,13k2,14k2,15」は、図11に示すようにレジスタ720aから720dに保持されるほか、2ラウンド目で利用するラウンド鍵として、レジスタ730eから730hに保持される。排他的論理和回路702aから702dが出力する「k1,0k1,1k1,2k1,3」、「k1,4k1,5k1,6k1,7」、「k1,8k1,9k1,10k1,11」、および「k1,12k1,13k1,14k1,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
同様の処理により、時刻C5までに10ラウンド目までのラウンド鍵が更新されて出力される。 By the same process, the round keys up to 10 round by the time C 5 is output is updated.
第3の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻C5で計算を誤らせる必要がある。しかし、このとき10ラウンド目のラウンド鍵「k10,0k10,1k10,2k10,3」、「k10,4k10,5k10,6k10,7」、「k10,8k10,9k10,10k10,11」、および「k10,12k10,13k10,14k10,15」にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。
In the third embodiment, in order to produce a calculation error in the
なお、これまでは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
第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
同図に示すように、鍵スケジュール装置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
レジスタ920aと920bは、第1の実施の形態におけるレジスタ320aに対応し、ラウンド鍵の先頭2バイトを保持するレジスタである。同様に、レジスタ920cと920d、レジスタ920eと920f、およびレジスタ920gから920hは、それぞれ第1の実施の形態におけるレジスタ320b、レジスタ320c、およびレジスタ320dに対応する。
The
レジスタ930aから930fは、第1の実施の形態におけるレジスタ330aと330bと同様に、鍵スケジュール装置900の出力がラウンドごとに揃うように調節するために用いられる。
The registers 930a to 930f are used for adjusting the outputs of the
排他的論理和回路902aから902hは、第1の実施の形態における排他的論理和回路302aから302dを2バイトごとに分割した回路であり、2つの2バイトの入力に対して、ビットごとに排他的論理和を計算した結果を出力する。
The exclusive OR
排他的論理和回路902iと902jは、2つの2バイトの入力について、ビットごとの排他的論理和を計算した結果を出力する。
Exclusive OR
選択器903aから903hは、第1の実施の形態における選択器303aから303dを2バイトごとに分割した回路であり、それぞれレジスタ920aから920hの出力、排他的論理和回路902aから902hの出力、または鍵スケジュール装置900の入力のいずれかを、クロック信号に応じて選択して出力する回路である。
The
選択器903iから903nは、それぞれレジスタ920aから920fの出力である2バイトのデータをバイトごとに分割して、それぞれ0(1バイト)を付加して2バイトに拡張した2つの2バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。
The
選択器903oおよび903pは、それぞれレジスタ920gおよび920hの出力である2バイトのデータを分割した2つの1バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。
The
選択器903qおよび903rは、AESの仕様でラウンドごとに定められたラウンド定数を、それぞれ排他的論理和回路902iおよび902jで加算するために、対応するラウンド定数を切り出す(不要なラウンド定数を切り落とす)ためのマスクを選択する回路である。
The
SubByte演算部905aおよび905bは、それぞれ選択器903oおよび903pの出力(1バイト)を入力として、AESの仕様で定められるSubByte処理を施して、1バイトの値を出力する。
選択器903sおよび903tは、SubByte演算部905aおよび905bの出力に0(1バイト)を付加して2バイトに拡張した2つの2バイトのデータのいずれかを、クロック信号に応じて選択して出力する回路である。選択器903sおよび903tは、第1の実施の形態におけるRotWord演算部304に相当する。
The
AND回路907aと907bは、2つの2バイトの入力について、ビットごとの積を計算して出力する。
The AND
次に、このように構成された鍵スケジュール装置900による鍵スケジュール演算処理について説明する。図14は、第4の実施の形態における鍵スケジュール演算処理の各クロックで出力されるデータの一例を示す図である。
Next, a key schedule calculation process performed by the
(時刻C0)選択器903aから903hは、それぞれ鍵スケジュール装置900の入力として受け付けた2バイトの鍵「k0,0k0,1」、「k0,2k0,3」、「k0,4k0,5」、「k0,6k0,7」、「k0,8k0,9」、「k0,10k0,11」、「k0,12k0,13」、および「k0,14k0,15」を選択する。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。
(Time C 0 ) The
(時刻C1)レジスタ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.
レジスタ920gおよび920hにそれぞれ保持される「k0,12k0,13」と「k0,14k0,15」は、バイトごとに分割されたのち、「k0,13」と「k0,15」がそれぞれ選択器903oおよび903pで選択して出力され、それぞれSubByte演算部905aおよび905bで変換される。そして、それぞれ選択器903sおよび903tによって、SubByte演算部905aおよび905bの出力の後ろに0(1バイト)を付加した2バイトの値として選択され、それぞれ排他的論理和回路902iおよび902jで1ラウンド目に対応するラウンド定数が加算されたのち、それぞれ排他的論理和回路902aおよび902bに送られる(それぞれの下位バイトは0)。
排他的論理和回路902aおよび902bでは、それぞれレジスタ920aおよび920bが保持する「k0,0k0,1」および「k0,2k0,3」が、「k1,0k0,1」および「k1,2k0,3」にそれぞれ更新される。レジスタ920cから920hにそれぞれ保持される「k0,4k0,5」、「k0,6k0,7」、「k0,8k0,9」、「k0,10k0,11」、「k0,12k0,13」、および「k0,14k0,15」は、同じ値に更新される。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。
In the exclusive OR
(時刻C2)レジスタ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
レジスタ920gおよび920hにそれぞれ保持される「k0,12k0,13」と「k0,14k0,15」は、バイトごとに分割されたのち、「k0,12」と「k0,14」が、それぞれ選択器903oおよび903pで選択して出力され、それぞれSubByte演算部905aおよび905bで変換される。そして、それぞれ選択器903sおよび903tによって、SubByte演算部905bおよび905aの出力の前に0(1バイト)を付加した2バイトの値として選択され、それぞれ排他的論理和回路902iおよび902jで1ラウンド目に対応するラウンド定数が加算されたのち、排他的論理和回路902aと902bに送られる(それぞれの下位バイトは0)。
排他的論理和回路902aおよび902bでは、それぞれレジスタ920aおよび920bが保持する「k1,0k0,1」と「k1,2k0,3」が、「k1,0k1,1」と「k1,2k1,3」にそれぞれ更新される。選択器903iおよび903jでそれぞれ選択された「k1,00」(「k1,0」に「0」を付加した2バイトのデータ)と「k1,20」(「k1,2」に「0」を付加した2バイトのデータ)は、それぞれ排他的論理和回路902cおよび902dで、レジスタ920cおよび920dが保持する「k0,2k0,3」および「k0,4k0,5」から、それぞれ「k1,2k0,3」および「k1,4k0,5」に更新される。レジスタ920eから920hに保持される「k0,8k0,9」、「k0,10k0,11」、「k0,12k0,13」、および「k0,14k0,15」は、同じ値に更新される。レジスタ920aから920hは、クロック周期の終わりに、図14に示すようにそれぞれの値を保持する。
In the exclusive OR
同様の処理により、時刻C4までラウンド鍵が更新される。時刻C5では、図14に示すようにラウンド鍵を更新するとともに、レジスタ930aから930fに保持される「k1,0k1,1」、「k1,2k1,3」、「k1,4k1,5」、「k1,6k1,7」、「k1,8k1,9」、および「k1,10k1,11」と、選択器903gおよび903hそれぞれの出力「k1,12k1,13」および「k1,14k1,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
同様の処理により、さらに時刻C41までラウンド鍵が更新され出力される。 By the same process, the round key is updated is output further to time C 41.
第4の実施の形態で、9ラウンド目のラウンド鍵に計算誤りを生じさせるためには、時刻C36から時刻C40で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵「k8,0k8,1k8,2k8,3」、「k8,4k8,5k8,6k8,7」、「k8,8k8,9k8,10k8,11」、および「k8,12k8,13k8,14k8,15」の一部、または、10ラウンド目のラウンド鍵「k10,0k10,1k10,2k10,3」、「k10,4k10,5k10,6k10,7」、「k10,8k10,9k10,10k10,11」、および「k10,12k10,13k10,14k10,15」の一部にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。
In the fourth embodiment, in order to produce a calculation error in the
なお、これまで説明した回路例と同様の手法により、レジスタ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
入出力部1101は、データの入出力が可能な入出力装置やネットワーク回線に接続され、データを入出力するとともに、暗号化実行の命令を受け付ける。また、入出力部1101は、暗号化結果を表示するための情報を出力する。
The input /
制御部1102は、入出力部1101から入力データとともに暗号化実行の命令を受け付けたときに、補助記憶装置1105に記憶されるプログラムとデータに基づいてデータの暗号化を実行するように、演算装置1103と主記憶装置1104に命令を発行する。
When the
演算装置1103は、制御部1102の命令に基づいて受け付けたデータを入力として、コピー、反転、シフト演算、和、積、および排他的論理和演算などのビット演算や、加算、乗算、剰余算などの算術演算を行う。制御部1102、および演算装置1103は、CPU(Central Processing Unit)などによって構成することができる。
The
主記憶装置1104は、補助記憶装置1105が記憶するデータや演算装置1103が処理したデータを一時的に記憶する。主記憶装置1104は、補助記憶装置1105よりも高速にデータの入出力が可能であり、処理を高速化する目的で使用される。主記憶装置1104は、例えば、RAM(Random Access Memory)などにより構成することができる。
The
補助記憶装置1105は、暗号処理のプログラムや変数を記憶する。暗号処理に用いる秘密鍵は、補助記憶装置1105に記憶してもよいし、暗号化処理を実行するごとに入出力部1101から受け付けてもよい。補助記憶装置1105は、例えば、HDD(Hard Disk Drive)などにより構成することができる。
The
なお、鍵スケジュール装置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
また、鍵スケジュール装置1100で実行される鍵スケジュールプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、鍵スケジュール装置1100で実行される鍵スケジュールプログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。
Alternatively, the key schedule program executed by the
また、鍵スケジュールプログラムを、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
次に、鍵スケジュール演算処理で利用される各種データを記憶するための主記憶装置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
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
まず、主記憶装置1104上に生成されたスケジュール部は、主記憶装置1104上に、図16で示したような各領域を確保し、所定の値で初期化する。そして、スケジュール部は、入力された秘密鍵を所定の領域に保存する(ステップS1701)。
First, the schedule unit generated on the
次に、スケジュール部は、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の実施の形態の時刻C0からC11にそれぞれ対応するステップS0からステップ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
なお、以下のステップS0が、図17のステップS1701に対応する。また、ステップS1が、図17のステップS1702に対応する。また、ステップS2からステップ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.
(ステップS0(初期化))16バイト(128ビット)の鍵「k0,0k0,1k0,2k0,3」、「k0,4k0,5k0,6k0,7」、「k0,8k0,9k0,10k0,11」、および「k0,12k0,13k0,14k0,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バイト)とのビット積を記憶する。ステップS0終了時には、各領域は図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 ]
(ステップS1)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*ik0,4*i+1k1,4*i+2k0,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*ik0,4*i+1k0,4*i+2k0,4*i+3」が記憶される。MemD[i]の記憶する「k0,0k0,1k0,2k0,3」、「k0,4k0,5k0,6k0,7」、「k0,8k0,9k0,10k0,11」、および「k0,12k0,13k0,14k0,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バイト)とのビット積を記憶する。ステップS1終了時には、各領域は図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.
(ステップS2)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*ik1,4*i+1k2,4*i+2k1,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*ik1,4*i+1k1,4*i+2k1,4*i+3」が記憶される。MemD[i]の記憶する「k1,0k1,1k1,2k1,3」、「k1,4k1,5k1,6k1,7」、「k1,8k1,9k1,10k1,11」、および「k1,12k1,13k1,14k1,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バイト)とのビット積を記憶する。ステップS2終了時には、各領域は図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.
(ステップS3)MemT[0]とMemT[1]との役割を入れ替えて、ステップS2と同様の処理を行い、図21に示す値に更新し、MemD[i]の記憶する「k2,0k2,1k2,2k2,3」、「k2,4k2,5k2,6k2,7」、「k2,8k2,9k2,10k2,11」、および「k2,12k2,13k2,14k2,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.
ステップS4からステップS10まで同様の処理を繰り返し、各領域の値を更新するとともに、ラウンド鍵を出力する。なお、図22および図23は、それぞれステップS9およびステップ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
(ステップ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*ik10,4*i+1k10,4*i+2k10,4*i+3」が記憶される。MemD[i]の記憶する「k10,0k10,1k10,2k10,3」、「k10,4k10,5k10,6k10,7」、「k10,8k10,9k10,10k10,11」、および「k10,12k10,13k10,14k10,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ラウンド目のラウンド鍵に計算誤りを生じさせるためには、ステップS9またはステップS10で計算を誤らせる必要がある。しかし、このとき8ラウンド目のラウンド鍵「k8,0k8,1k8,2k8,3」、「k8,4k8,5k8,6k8,7」、「k8,8k8,9k8,10k8,11」、および「k8,12k8,13k8,14k8,15」の一部、または、10ラウンド目のラウンド鍵「k10,0k10,1k10,2k10,3」、「k10,4k10,5k10,6k10,7」、「k10,8k10,9k10,10k10,11」、および「k10,12k10,13k10,14k10,15」の一部にも計算誤りが生じる可能性があり、非特許文献1などで開示されている故障利用解析により秘密鍵を求めることは困難となる。
In the fifth embodiment, in order to produce a calculation error in the
このように、第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.
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
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要素と前記第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要素を更新すること、
を特徴とする請求項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要素を含むラウンド鍵を構成する要素のうち、前記第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
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)
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)
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 |
-
2008
- 2008-08-29 JP JP2008221805A patent/JP5319209B2/en active Active
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 |