JP2009192630A - Encryption device and decrypting device - Google Patents

Encryption device and decrypting device Download PDF

Info

Publication number
JP2009192630A
JP2009192630A JP2008030876A JP2008030876A JP2009192630A JP 2009192630 A JP2009192630 A JP 2009192630A JP 2008030876 A JP2008030876 A JP 2008030876A JP 2008030876 A JP2008030876 A JP 2008030876A JP 2009192630 A JP2009192630 A JP 2009192630A
Authority
JP
Japan
Prior art keywords
data
key
block
encryption
unit data
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.)
Granted
Application number
JP2008030876A
Other languages
Japanese (ja)
Other versions
JP5020115B2 (en
Inventor
Shintaro Kamihara
慎太郎 神原
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.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
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 Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP2008030876A priority Critical patent/JP5020115B2/en
Publication of JP2009192630A publication Critical patent/JP2009192630A/en
Application granted granted Critical
Publication of JP5020115B2 publication Critical patent/JP5020115B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To make decryption of ciphertext data hard even when a common key is leaked to a third party. <P>SOLUTION: An encryption device comprises: a data register 1 capturing 128-bit unit data from input plaintext data; a common key register 3 storing a common key; a key extension block 5 generating, on the basis of the common key stored in the common key register 3, an extended key that is different each time the unit data is captured; and an AddRoundKey block 4 and an AES encryption algorithm mounting block 7 generating a plurality of round keys by inputting the extended key generated by the key extension block 5 and encrypting the unit data supplied from the data register 1. The encryption device encrypts the plaintext data into a ciphertext and outputs the ciphertext. <P>COPYRIGHT: (C)2009,JPO&INPIT

Description

本発明は、共通鍵暗号化方式を使用する暗号化装置および復号化装置に関するものである。   The present invention relates to an encryption device and a decryption device that use a common key encryption method.

従来の共通鍵暗号化方式としては、DES(Data Encryption Standard)が主流となっていたが、近年ではデータ保守性の観点から、より強固な暗号化技術であるAES(Advanced Encryption Standard)が使用されるようになっている。   As a conventional common key encryption method, DES (Data Encryption Standard) has been mainstream, but in recent years, AES (Advanced Encryption Standard), which is a stronger encryption technology, has been used from the viewpoint of data maintainability. It has become so.

AESでは、Rijndael(ラインダール)のアルゴリズムが使用される(特許文献1)。この暗号化アルゴリズムは、入力する平文データを128ビットの固定長データに順次分割して、128ビット毎にブロック暗号化するものである。すなわち、128ビットの平文データに対して行うSubByte/ShiftRow/MixColumn/AddRoundKeyの4つの演算処理を1ラウンドとして、複数ラウンド分を繰り返し適用するものである。このラウンド数は共通鍵のデータ長によって異なり、128ビット鍵では11、192ビット鍵では13、256ビット鍵では15である。なお、最初のラウンドではAddRoundKeyの演算だけが行われ、最終のラウンドではMixColumnを除いた3つの演算が行われる。AddRoundKeyの演算はXOR演算であり、共通鍵を元に作成された複数のラウンド鍵を使用して行われる。このラウンド鍵の使用形態は、共通鍵を元に順次生成して使用する場合と、共通鍵を元にして複数を予め生成して保存しておいてこれを選択使用する場合がある(特許文献2)。
特開2006−235440号公報 特開2005−004048号公報
In AES, the Rijndael algorithm is used (Patent Document 1). In this encryption algorithm, input plaintext data is sequentially divided into 128-bit fixed length data, and block encryption is performed every 128 bits. That is, four arithmetic processes of SubByte / ShiftRow / MixColumn / AddRoundKey performed on 128-bit plaintext data are set as one round, and a plurality of rounds are repeatedly applied. The number of rounds varies depending on the data length of the common key, and is 11 for a 128-bit key, 13 for a 192-bit key, and 15 for a 256-bit key. Note that only the AddRoundKey operation is performed in the first round, and three operations excluding MixColumn are performed in the final round. The operation of AddRoundKey is an XOR operation, and is performed using a plurality of round keys created based on the common key. There are cases where the round key is used by sequentially generating and using the common key based on the common key, and by generating and storing a plurality of the keys based on the common key and selectively using them (Patent Literature). 2).
JP 2006-235440 A JP-A-2005-004048

ところが、上記のDESやAES等の共通鍵暗号化方式では、共通鍵が一旦決定されると、入力される平文のデータは、固定長データ毎に同じ共通鍵にて同じアルゴリズムで暗号化が行われるので、暗号化手法が如何に複雑であっても、その共通鍵が第三者に漏洩してしまうと、その共通鍵によって暗号化された暗号文データは容易に平文データに復号化されてしまう危険性がある。   However, in the above common key encryption methods such as DES and AES, once a common key is determined, the plaintext data that is input is encrypted with the same algorithm using the same common key for each fixed-length data. Therefore, no matter how complex the encryption method is, if the common key is leaked to a third party, the ciphertext data encrypted with the common key is easily decrypted into plaintext data. There is a risk of end.

本発明の目的は、共通鍵が第三者に漏洩した場合であっても、暗号文データの復号化が困難になった暗号化装置および復号化装置を提供することである。   An object of the present invention is to provide an encryption device and a decryption device that make it difficult to decrypt ciphertext data even when a common key is leaked to a third party.

上記目的を達成するために、請求項1にかかる発明の暗号化装置は、入力された平文データから所定のデータ長を有する単位データを順次生成する単位データ生成ブロックと、共通鍵を元にして複数の拡張鍵を生成しその内から1個の拡張鍵を前記単位データの生成毎に所定の順番で供給する鍵供給ブロックと、該鍵供給ブロックから供給される拡張鍵を元に生成される複数のラウンド鍵を使用して前記単位データ生成ブロックから供給された単位データを暗号化する暗号化ブロックとを有し、前記平文データを暗号文データに暗号化して出力することを特徴とする。
請求項2にかかる発明は、請求項1に記載の暗号化装置において、前記暗号化ブロックがRijndael方式の暗号化アルゴリズムを搭載し、前記単位データが該暗号化アルゴリズムにおいて暗号化処理の単位となる固定長データであることを特徴とす。
請求項3にかかる発明は、請求項1または2に記載の暗号化装置において、前記鍵供給ブロックが、共通鍵を記憶する共通鍵レジスタと、該共通鍵レジスタから取り出した該共通鍵に所定の演算を行って前記拡張鍵を前記所定の順番で出力する鍵拡張ブロックとを有することを特徴とする。
請求項4にかかる発明は、請求項3に記載の暗号化装置において、前記鍵拡張ブロックが、前記演算の種類を多数備え、外部から受け取った命令により前記演算の種類を決定することを特徴とする。
請求項5にかかる発明は、請求項1ないし4のいずれか1つに記載の暗号化装置において、前記暗号化ブロックが前記暗号文データを出力するとき、前記所定の順番を示すデータを出力することを特徴とする。
請求項6にかかる発明の復号化装置は、平文データを所定のデータ長を有する単位データ毎に分割し、共通鍵を元にして生成された複数の拡張鍵から前記単位データの生成毎に所定の順番で選択される1個の拡張鍵を元にして複数のラウンド鍵を生成し、該複数のラウンド鍵を使用して前記単位データを暗号化することにより前記平文データを暗号化した暗号文データを、前記平文データに復号化する復号化装置において、入力された前記暗号文データから前記単位データを順次生成する単位データ生成ブロックと、共通鍵を元にして複数の前記拡張鍵を生成しその内から1個の拡張鍵を前記単位データの生成毎に前記所定の順番で供給する鍵供給ブロックと、該鍵供給ブロックから供給される拡張鍵を元に生成される複数のラウンド鍵を使用して前記単位データ生成ブロックから供給された単位データを復号化する複合化ブロックと、を有することを特徴とする。
To achieve the above object, an encryption apparatus according to a first aspect of the present invention is based on a unit data generation block that sequentially generates unit data having a predetermined data length from input plaintext data, and a common key. Generated based on a key supply block that generates a plurality of extension keys and supplies one of the extension keys in a predetermined order every time the unit data is generated, and an extension key supplied from the key supply block An encryption block that encrypts the unit data supplied from the unit data generation block using a plurality of round keys, and the plaintext data is encrypted into ciphertext data and output.
The invention according to claim 2 is the encryption apparatus according to claim 1, wherein the encryption block includes a Rijndael encryption algorithm, and the unit data is a unit of encryption processing in the encryption algorithm. It is characterized by fixed length data.
According to a third aspect of the present invention, in the encryption device according to the first or second aspect, the key supply block includes a common key register for storing a common key and a predetermined value for the common key extracted from the common key register. A key expansion block that performs an operation and outputs the extended keys in the predetermined order.
The invention according to claim 4 is the encryption apparatus according to claim 3, wherein the key expansion block includes a large number of types of the operations, and the type of the operations is determined by an instruction received from the outside. To do.
According to a fifth aspect of the invention, in the encryption device according to any one of the first to fourth aspects, when the encrypted block outputs the ciphertext data, the data indicating the predetermined order is output. It is characterized by that.
According to a sixth aspect of the present invention, there is provided a decryption apparatus that divides plaintext data into unit data having a predetermined data length, and generates predetermined unit data each time the unit data is generated from a plurality of extended keys generated based on a common key. A ciphertext obtained by encrypting the plaintext data by generating a plurality of round keys based on one extended key selected in the order of and encrypting the unit data using the plurality of round keys In the decryption device for decrypting data into the plaintext data, a unit data generation block for sequentially generating the unit data from the input ciphertext data and a plurality of the extended keys based on a common key Among them, a key supply block that supplies one extended key in the predetermined order every time the unit data is generated, and a plurality of round keys generated based on the extended key supplied from the key supply block are used. And having a composite block for decoding the unit data supplied from the unit data generating blocks by.

本発明によれば、共通鍵を元にして生成される複数の拡張鍵から、単位データの生成毎に所定の順番で1個の拡張鍵を選択し、その選択した拡張鍵を元にして複数のラウンド鍵を生成し、この複数のラウンド鍵を使用して単位データの暗号化処理を行うので、例え共通鍵が第三者に対して漏洩したとしても、当該第三者は当該共通鍵で直接的に複数のラウンド鍵を生成することになるので、本発明によって暗号化した暗号文データの復号は不可能であり、その秘匿性を保持することができる。さらに、鍵拡張ブロックが、演算の種類を多数備え、外部から受け取った命令によりその演算の種類を決定するようにすれば、その秘匿性がより向上する。   According to the present invention, one extended key is selected in a predetermined order every time unit data is generated from a plurality of extended keys generated based on a common key, and a plurality of extended keys are generated based on the selected extended key. The round key is generated and the unit data is encrypted using the plurality of round keys. Even if the common key is leaked to a third party, the third party uses the common key. Since a plurality of round keys are generated directly, the ciphertext data encrypted by the present invention cannot be decrypted, and the confidentiality thereof can be maintained. Furthermore, if the key expansion block has many types of calculations and the type of calculation is determined by an instruction received from the outside, the secrecy is further improved.

図1は鍵データ長が128ビットの共通鍵を使用するAES方式を適用した本発明の実施例の暗号化/復号化装置の全体構成を示すブロック図である。1は入力する平文データdin(例えば、ストリームデータ)を128ビット単位で取り込むデータレジスタ、2は4−1のセレクタ、3は外部から入力された128ビットの共通鍵を格納する共通鍵レジスタ、4は入力される128ビットのデータに対してXOR演算を行うAddRoundKeyブロック、5は共通鍵レジスタ3に格納した共通鍵を元に演算を行って128ビットの複数の異なる拡張鍵を生成する鍵拡張ブロック、6は3−1のセレクタ、7はAES暗号化アルゴリズム搭載ブロック、8はAES復号化アルゴリズム搭載ブロック、9は全体を制御する制御ブロックである。なお、請求項との関連では、データレジスタ1が単位データ生成ブロックの一例に、共通鍵レジスタ3と鍵拡張ブロック5が鍵供給ブロックの一例に、AddRoundKeyブロック4とAES暗号化アルゴリズム搭載ブロック7が暗号化ブロックの一例に、AddRoundKeyブロック4とAES復号化アルゴリズム搭載ブロック8が復号化ブロックの一例に、それぞれ相当する。   FIG. 1 is a block diagram showing the overall configuration of an encryption / decryption device according to an embodiment of the present invention to which an AES scheme using a common key with a key data length of 128 bits is applied. 1 is a data register that captures input plaintext data din (for example, stream data) in units of 128 bits, 2 is a selector of 4-1, 3 is a common key register that stores a 128-bit common key input from the outside, 4 Is an AddRoundKey block that performs an XOR operation on the input 128-bit data, and 5 is a key expansion block that performs an operation based on the common key stored in the common key register 3 to generate a plurality of different 128-bit extended keys. , 6 is a selector of 3-1, 7 is an AES encryption algorithm mounting block, 8 is an AES decryption algorithm mounting block, and 9 is a control block for controlling the whole. In relation to the claims, the data register 1 is an example of a unit data generation block, the common key register 3 and the key expansion block 5 are examples of a key supply block, the AddRoundKey block 4 and the AES encryption algorithm mounting block 7 are As an example of the encryption block, the AddRoundKey block 4 and the AES decryption algorithm mounting block 8 correspond to an example of the decryption block.

AddRoundKeyブロック4は、鍵拡張ブロック5から取り込んだ1つの拡張鍵を元に128ビットの11個のラウンド鍵を生成すると共に、その内の1つのラウンド鍵を使用して128ビットデータに対して、ラウンド毎にXOR処理を行う。   The AddRoundKey block 4 generates eleven 128-bit round keys based on one extended key fetched from the key expansion block 5, and uses one of the round keys for 128-bit data. XOR processing is performed for each round.

鍵拡張ブロック5は、図2に示すような複数の鍵拡張シーケンス「000」、「001」、・・・、「101」の演算式を内蔵し、その内の1つをホストのCPUで指定して、共通鍵の演算を行って拡張鍵を生成する。例えば、その内の1つのシーケンス「000」がホストのCPUで指定されたときは、共通鍵レジスタ4から渡された128ビットの共通鍵に対して、データレジスタ1に128ビットの平文データが入力する毎に、図3に示す順序の演算処理、つまり+1→−1→左シフト→右シフト→右シフト→左シフト→+1→−1→・・・の演算処理をエンドレスに繰り返す。この演算により、1つの共通鍵から複数の異なる拡張鍵が順番に生成され、AddRoundKeyブロック4に供給される。ただし、演算処理の種類および順番によっては、生成される拡張鍵の中に共通のものが含まれることもある。別のシーケンス「001」〜「101」のいずれかが指定されたときも、図3に示す順序の演算で同様にエンドレスに1つの共通鍵から複数の拡張鍵が生成される。また、この鍵拡張ブロック5は、今回使用した鍵拡張シーケンスがいずれのシーケンスであるかを示す信号key_infoを出力する。   The key expansion block 5 contains a plurality of key expansion sequences “000”, “001”,..., “101” as shown in FIG. 2, and one of them is designated by the host CPU. Then, the extended key is generated by calculating the common key. For example, when one of the sequences “000” is designated by the host CPU, 128-bit plain text data is input to the data register 1 for the 128-bit common key passed from the common key register 4. Each time, the arithmetic processing in the order shown in FIG. 3, that is, arithmetic processing of + 1 → −1 → left shift → right shift → right shift → left shift → + 1 → −1 →... Is repeated endlessly. By this calculation, a plurality of different extended keys are sequentially generated from one common key and supplied to the AddRoundKey block 4. However, a common key may be included in the generated extended key depending on the type and order of the arithmetic processing. Even when any of the other sequences “001” to “101” is designated, a plurality of extended keys are generated from one common key in an endless manner in the same manner as the calculation shown in FIG. Further, the key expansion block 5 outputs a signal key_info indicating which sequence is the key expansion sequence used this time.

AES暗号化アルゴリズム搭載ブロック7は、128ビットを16個の1バイト(8ビット)データに分割し置換処理するSubByte処理部71、16個の1バイトデータを4行4列に並べて行の左シフト処理を行うShiftRow処理部72、左シフト処理された4行4列のブロックを同列毎に列ベクトル変換の処理を行うMixColumn処理部73を備える。また、AES復号化アルゴリズム搭載ブロック8は、ShiftRow処理部72でのシフト処理と逆のシフト処理を行うInvShiftRow処理部81、SubByte処理71での置換処理と逆の置換処理を行うInvSubByte処理部82を備える。   AES encryption algorithm mounted block 7 divides 128 bits into 16 1-byte (8-bit) data and performs substitution processing. SubByte processing unit 71 arranges 16 1-byte data in 4 rows and 4 columns and shifts the row to the left. A ShiftRow processing unit 72 that performs processing, and a MixColumn processing unit 73 that performs column vector conversion processing for each 4 × 4 block subjected to left shift processing for each column. The AES decoding algorithm mounting block 8 includes an InvShiftRow processing unit 81 that performs a shift process reverse to the shift process in the ShiftRow processing unit 72, and an InvSubByte processing unit 82 that performs a replacement process reverse to the replacement process in the SubByte process 71. Prepare.

制御ブロック9は、暗号化/復号化のスタート信号start、暗号化/復号化の選択信号enc/dec、データイネーブル信号ackを入力し、データ入力準備OKのときアサートされる信号ready、出力データdoutが有効であることを示す信号validを出力する。そして、データレジスタ1、セレクタ2,6、AddRoundKeyブロック4、その他を制御する。   The control block 9 receives an encryption / decryption start signal start, an encryption / decryption selection signal enc / dec, and a data enable signal ack. The signal ready asserted when data input preparation is OK, and output data dout A signal valid indicating that is valid is output. Then, the data register 1, selectors 2 and 6, the AddRoundKey block 4 and others are controlled.

さて、共通鍵レジスタ3に共通鍵が格納されているものとすると、暗号化に際しては、信号enc/decで暗号化が指示され、信号startで処理スタートが指令されると、前段装置(図示せず)に対して信号readyがアサートされ、当該前段装置から到来する信号ackが有効になると、当該前段装置から入力データdinとして平文データが128ビット分転送され、データレジスタ1に格納される。   Assuming that a common key is stored in the common key register 3, when encryption is instructed by a signal enc / dec and a process start is instructed by a signal start, a preceding device (not shown) When the signal ready is asserted and the signal ack coming from the preceding device becomes valid, the plain text data is transferred as 128 bits of input data din from the preceding device and stored in the data register 1.

鍵拡張ブロック5において、ホストのCPUによって、例えば図2の鍵拡張シーケンス「000」が指定されているときは、そのシーケンスの識別情報が信号key_infoによって出力される。また、このときデータレジスタ1に格納される128ビットのデータは平文データの先頭データであるので、共通鍵レジスタ3に格納されている共通鍵に対して、「+1」が処理された第1の拡張鍵が生成され、AddRoundKeyブロック4に入力される。   In the key expansion block 5, for example, when the key expansion sequence “000” of FIG. 2 is designated by the host CPU, the identification information of the sequence is output by the signal key_info. At this time, since the 128-bit data stored in the data register 1 is the head data of the plain text data, the first key obtained by processing “+1” with respect to the common key stored in the common key register 3 An extended key is generated and input to the AddRoundKey block 4.

前記128ビットデータがセレクタ2からAddRoundKeyブロック4に取り込まれると、その128ビットデータに対して、上記第1の拡張鍵を元にして生成された第1ラウンド鍵でXORのAddRoundKey処理が行われる。そして、AddRoundKey処理された128ビットデータは、セレクタ6を介してAES暗号化アルゴリズム搭載ブロック7に取り込まれ、ここでSubByte処理、ShiftRow処理、MixColumn処理が順次施される。そして、セレクタ2を介して再びAddRoundKeyブロック4に取り込まれ、今度は第2ラウンド鍵でXORのAddRoundKey処理が行われる。この第2ラウンド鍵は、上記第1ラウンド鍵を元にして生成された2番目のラウンド鍵である。そして、AddRoundKey処理された128ビットデータは、AES暗号化アルゴリズム搭載ブロック7において上記同様の処理が行われて再度AddRoundKeyブロック4に取り込まれ、今度は第3ラウンド鍵でXORのAddRoundKey処理が行われる。以下、ラウンド鍵を順次更新しながらAddRoundKeyブロック4とAES暗号化アルゴリズム搭載ブロック7による暗号化処理が10回繰り返される。11回目の暗号化処理では、AES暗号化アルゴリズム搭載ブロック7でSubByte処理とShiftRow処理のみが行われて、AddRoundKeyブロック4に取り込まれ、第11ラウンド鍵でAddRoundKey処理が行われ、これにより先頭の128ビットの平文データに対する暗号化が完了して、セレクタ6から128ビットの暗号文の出力データdoutとして出力する。このとき、信号validによって暗号文データdoutが有効であることが示される。   When the 128-bit data is fetched from the selector 2 into the AddRoundKey block 4, XOR AddRoundKey processing is performed on the 128-bit data with the first round key generated based on the first extended key. The 128-bit data subjected to the AddRoundKey process is fetched into the AES encryption algorithm mounting block 7 via the selector 6, where SubByte processing, ShiftRow processing, and MixColumn processing are sequentially performed. Then, it is taken into the AddRoundKey block 4 again via the selector 2, and this time, XOR AddRoundKey processing is performed with the second round key. The second round key is a second round key generated based on the first round key. Then, the 128-bit data subjected to the AddRoundKey process is subjected to the same process as described above in the AES encryption algorithm mounting block 7 and is taken into the AddRoundKey block 4 again, and this time, the XOR AddRoundKey process is performed with the third round key. Thereafter, the encryption process by the AddRoundKey block 4 and the AES encryption algorithm mounting block 7 is repeated 10 times while sequentially updating the round key. In the eleventh encryption process, only the SubByte process and ShiftRow process are performed in the block 7 equipped with the AES encryption algorithm, and are taken into the AddRoundKey block 4, and the AddRoundKey process is performed with the eleventh round key. Encryption of the bit plaintext data is completed, and output from the selector 6 as 128-bit ciphertext output data dout. At this time, the signal valid indicates that the ciphertext data dout is valid.

データレジスタ1に次の128ビットの平文データが取り込まれると、今度は、鍵拡張ブロック5から、前記第1拡張鍵に対し「−1」された第2拡張鍵がAddRoundKeyブロック4に入力される。そして、AddRoundKeyブロック4では、この第2拡張鍵を元にして第1ラウンド鍵〜第11ラウンド鍵が生成されて、上記と同様なAddRoundKeyブロック4とAES暗号化アルゴリズム搭載ブロック7による暗号化処理が行われ、セレクタ6から次の128ビットの暗号文の出力データdoutとして出力する。   When the next 128-bit plaintext data is taken into the data register 1, the second extended key “−1” with respect to the first extended key is input from the key extended block 5 to the AddRoundKey block 4. . Then, in the AddRoundKey block 4, the first to eleventh round keys are generated based on the second extended key, and the encryption processing by the AddRoundKey block 4 and the AES encryption algorithm mounting block 7 similar to the above is performed. Is output from the selector 6 as output data dout of the next 128-bit ciphertext.

以下、順次入力される平文データの128ビット毎に、異なる拡張鍵がシーケンス「000」に従って順次更新して生成され、AddRoundKeyブロック4に入力される。そして、この拡張鍵を元にして生成された11個のラウンド鍵によって128ビット当りのAddRoundKeyブロック4とAES暗号化アルゴリズム搭載ブロック7による暗号化処理が繰り返し行われる。   Thereafter, different extended keys are sequentially updated according to the sequence “000” for every 128 bits of the plaintext data that are sequentially input, and are input to the AddRoundKey block 4. Then, encryption processing by the AddRoundKey block 4 per 128 bits and the AES encryption algorithm mounting block 7 is repeatedly performed by 11 round keys generated based on the extended key.

次に、復号化に際しては、信号enc/decで復号化が指示され、信号startで処理スタートが指令されると、前段装置(図示せず)に対して信号readyがアサートされ、当該前段装置から到来する信号ackが有効になると、当該前段装置から入力データdinとして暗号文データが128ビット分転送され、データレジスタ1に格納されて、AddRoundKeyブロック4とAES復号化アルゴリズム搭載ブロック8により復号化処理が行われる。このときは暗号化の時と同じ共通鍵が使用され、信号key_infoをホストのCPUが取り込むことで、同じ鍵拡張シーケンスが鍵拡張ブロック5に指定されるので、各128ビットの単位データの復号化には、暗号化のときと同じ拡張鍵が使用される。復号化処理では、AddRoundKeyブロック4で生成されるラウンド鍵の順序が前記暗号化の場合と逆になる。   Next, when decoding is instructed by the signal enc / dec and a process start is instructed by the signal start, the signal ready is asserted to the preceding apparatus (not shown), and the preceding apparatus When the incoming signal ack becomes valid, ciphertext data is transferred as 128 bits of input data din from the preceding apparatus, stored in the data register 1, and decrypted by the AddRoundKey block 4 and the AES decryption algorithm mounted block 8 Is done. At this time, the same common key as that used for encryption is used, and the same key expansion sequence is specified in the key expansion block 5 by the signal key_info being fetched by the host CPU, so that each 128-bit unit data is decrypted. The same extended key is used for encryption. In the decryption process, the order of the round keys generated in the AddRoundKey block 4 is reversed from the case of the encryption.

なお、復号化では、暗号文データの先頭の128ビットの単位データのAddRoundKeyブロック4への取り込みタイミングと鍵拡張ブロック5からの拡張鍵のAddRoundKeyブロック4への供給タイミングを揃える必要があるが、これは、暗号文データの先頭に鍵拡張ブロック5での鍵拡張シーケンスの演算の開始タイミングを表すエンジンスタート信号を、前記信号key_infoと共に送付することで解決できる。   In the decryption, it is necessary to align the timing of fetching the first 128-bit unit data of the ciphertext data into the AddRoundKey block 4 and the timing of supplying the extended key from the key expansion block 5 to the AddRoundKey block 4. Can be solved by sending an engine start signal indicating the start timing of the calculation of the key expansion sequence in the key expansion block 5 together with the signal key_info at the head of the ciphertext data.

以上説明した実施例では、鍵拡張ブロック5で指定される拡張シーケンスが、図2の「000」、「001」、・・・、「101」のいずれかである場合、つまり図2の縦方向のシーケンスの演算のいずれかである場合について説明したが、図2の横方向のシーケンスの演算を指定することもできる。この場合は、「a」、「b」、・・・、「f」のいずれかの拡張シーケンスを指定して、図4に示す順序の演算で拡張鍵を生成すればよい。   In the embodiment described above, the extension sequence specified by the key extension block 5 is any one of “000”, “001”,..., “101” in FIG. Although the description has been given of the case where any one of the sequence operations is performed, the sequence operation in the horizontal direction in FIG. 2 may be designated. In this case, any one of “a”, “b”,..., “F” may be specified, and an extended key may be generated by calculation in the order shown in FIG.

また、以上説明した実施例では、拡張シーケンスを多数内蔵させておき、外部のホストのCPUから指定することにより鍵拡張ブロック5で使用される拡張シーケンス、つまり演算の種類が決定されるようにしているが、暗号化/復号化装置内に所定の拡張シーケンスを予め設定しておくこともできる。この場合は、ホストのCPUが信号key_infoを監視する必要がなく、また決定した拡張シーケンスを信号key_infoとして出力する必要もなく、転送する暗号文データのビット幅を増やす必要がなくなる。   In the embodiment described above, a large number of extension sequences are built in, and the extension sequence used in the key extension block 5, that is, the type of calculation is determined by designation from the CPU of the external host. However, a predetermined extension sequence can be set in advance in the encryption / decryption device. In this case, it is not necessary for the host CPU to monitor the signal key_info, and it is not necessary to output the determined extension sequence as the signal key_info, and it is not necessary to increase the bit width of the ciphertext data to be transferred.

本発明の実施例の暗号化/復号化装置の構成を示すブロック図である。It is a block diagram which shows the structure of the encryption / decryption apparatus of the Example of this invention. 鍵拡張ブロックで使用する鍵拡張シーケンスの説明図である。It is explanatory drawing of the key expansion sequence used by a key expansion block. 鍵拡張シーケンス「000」、「001」、・・・、「101」を使用するときの拡張鍵変化順の説明図である。It is explanatory drawing of an extended key change order when using the key expansion sequence "000", "001", ..., "101". 鍵拡張シーケンス「a」、「b」、・・・、「f」を使用するときの拡張鍵変化順の説明図である。It is explanatory drawing of the extended key change order when using the key expansion sequence "a", "b", ..., "f".

符号の説明Explanation of symbols

1:データレジスタ、2:セレクタ、3:共通鍵レジスタ、4:AddRoundKeyブロック、5:鍵拡張ブロック、6:セレクタ、7:AES暗号化アルゴリズム搭載ブロック、8:AES復号化アルゴリズム搭載ブロック。   1: Data register, 2: Selector, 3: Common key register, 4: AddRoundKey block, 5: Key expansion block, 6: Selector, 7: AES encryption algorithm mounted block, 8: AES decryption algorithm mounted block.

Claims (6)

入力された平文データから所定のデータ長を有する単位データを順次生成する単位データ生成ブロックと、共通鍵を元にして複数の拡張鍵を生成しその内から1個の拡張鍵を前記単位データの生成毎に所定の順番で供給する鍵供給ブロックと、該鍵供給ブロックから供給される拡張鍵を元に生成される複数のラウンド鍵を使用して前記単位データ生成ブロックから供給された単位データを暗号化する暗号化ブロックとを有し、前記平文データを暗号文データに暗号化して出力することを特徴とする暗号化装置。   A unit data generation block that sequentially generates unit data having a predetermined data length from the input plaintext data, and a plurality of extension keys based on a common key, and one extension key is used as the extension data of the unit data Unit data supplied from the unit data generation block using a key supply block supplied in a predetermined order for each generation and a plurality of round keys generated based on the extended key supplied from the key supply block An encryption block for encrypting, and encrypting the plaintext data into ciphertext data and outputting the encrypted data. 前記暗号化ブロックがRijndael方式の暗号化アルゴリズムを搭載し、前記単位データが該暗号化アルゴリズムにおいて暗号化処理の単位となる固定長データであることを特徴とする請求項1に記載の暗号化装置。   2. The encryption apparatus according to claim 1, wherein the encryption block includes a Rijndael encryption algorithm, and the unit data is fixed-length data that is a unit of encryption processing in the encryption algorithm. . 前記鍵供給ブロックが、共通鍵を記憶する共通鍵レジスタと、該共通鍵レジスタから取り出した該共通鍵に所定の演算を行って前記拡張鍵を前記所定の順番で出力する鍵拡張ブロックとを有することを特徴とする請求項1または2に記載の暗号化装置。   The key supply block includes a common key register that stores a common key, and a key expansion block that performs a predetermined operation on the common key extracted from the common key register and outputs the extended keys in the predetermined order. The encryption apparatus according to claim 1 or 2, wherein 前記鍵拡張ブロックが、前記演算の種類を多数備え、外部から受け取った命令により前記演算の種類を決定することを特徴とする請求項3に記載の暗号化装置。   4. The encryption apparatus according to claim 3, wherein the key expansion block includes a large number of types of operations, and determines the types of operations based on instructions received from outside. 前記暗号化ブロックが前記暗号文データを出力するとき、前記所定の順番を示すデータを出力することを特徴とする請求項1ないし4のいずれか1つに記載の暗号化装置。   5. The encryption device according to claim 1, wherein when the encrypted block outputs the ciphertext data, data indicating the predetermined order is output. 6. 平文データを所定のデータ長を有する単位データ毎に分割し、共通鍵を元にして生成された複数の拡張鍵から前記単位データの生成毎に所定の順番で選択される1個の拡張鍵を元にして複数のラウンド鍵を生成し、該複数のラウンド鍵を使用して前記単位データを暗号化することにより前記平文データを暗号化した暗号文データを、前記平文データに復号化する復号化装置において、
入力された前記暗号文データから前記単位データを順次生成する単位データ生成ブロックと、共通鍵を元にして複数の前記拡張鍵を生成しその内から1個の拡張鍵を前記単位データの生成毎に前記所定の順番で供給する鍵供給ブロックと、該鍵供給ブロックから供給される拡張鍵を元に生成される複数のラウンド鍵を使用して前記単位データ生成ブロックから供給された単位データを復号化する複合化ブロックと、を有することを特徴とする復号化装置。
The plaintext data is divided into unit data having a predetermined data length, and one extended key selected in a predetermined order every time the unit data is generated from a plurality of extended keys generated based on a common key. Decryption that generates a plurality of round keys based on the original data and decrypts the ciphertext data obtained by encrypting the plaintext data by encrypting the unit data using the plurality of round keys. In the device
A unit data generation block that sequentially generates the unit data from the input ciphertext data, and a plurality of the extension keys based on a common key, and one extension key is generated from among the plurality of extension keys. The unit data supplied from the unit data generation block is decrypted using a key supply block supplied in the predetermined order and a plurality of round keys generated based on the extended key supplied from the key supply block. And a decoding block comprising: a decoding block.
JP2008030876A 2008-02-12 2008-02-12 Encryption device and decryption device Expired - Fee Related JP5020115B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008030876A JP5020115B2 (en) 2008-02-12 2008-02-12 Encryption device and decryption device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008030876A JP5020115B2 (en) 2008-02-12 2008-02-12 Encryption device and decryption device

Publications (2)

Publication Number Publication Date
JP2009192630A true JP2009192630A (en) 2009-08-27
JP5020115B2 JP5020115B2 (en) 2012-09-05

Family

ID=41074726

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008030876A Expired - Fee Related JP5020115B2 (en) 2008-02-12 2008-02-12 Encryption device and decryption device

Country Status (1)

Country Link
JP (1) JP5020115B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0983814A (en) * 1995-09-19 1997-03-28 Mita Ind Co Ltd Terminal equipment for ciphering communication
JP2000092044A (en) * 1998-09-14 2000-03-31 Toshiba Corp Communication system
JP2003015522A (en) * 2001-06-28 2003-01-17 Fujitsu Ltd Ciphering circuit
JP2003288009A (en) * 2002-03-28 2003-10-10 Seiko Epson Corp Cryptograph system and data transfer controller
JP2007173999A (en) * 2005-12-19 2007-07-05 Sony Computer Entertainment Inc Authentication system and device to be authenticated
JP2007295342A (en) * 2006-04-26 2007-11-08 Sharp Corp Cipher communication system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0983814A (en) * 1995-09-19 1997-03-28 Mita Ind Co Ltd Terminal equipment for ciphering communication
JP2000092044A (en) * 1998-09-14 2000-03-31 Toshiba Corp Communication system
JP2003015522A (en) * 2001-06-28 2003-01-17 Fujitsu Ltd Ciphering circuit
JP2003288009A (en) * 2002-03-28 2003-10-10 Seiko Epson Corp Cryptograph system and data transfer controller
JP2007173999A (en) * 2005-12-19 2007-07-05 Sony Computer Entertainment Inc Authentication system and device to be authenticated
JP2007295342A (en) * 2006-04-26 2007-11-08 Sharp Corp Cipher communication system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11838402B2 (en) 2019-03-13 2023-12-05 The Research Foundation For The State University Of New York Ultra low power core for lightweight encryption

Also Published As

Publication number Publication date
JP5020115B2 (en) 2012-09-05

Similar Documents

Publication Publication Date Title
US8416947B2 (en) Block cipher using multiplication over a finite field of even characteristic
KR101068367B1 (en) Method and apparatus for optimizing advanced encryption standard aes encryption and decryption in parallel modes of operation
US20210021405A1 (en) Key sequence generation for cryptographic operations
JP5184489B2 (en) Method and apparatus for instruction level software encryption
JP2010140026A (en) Method and device for encryption chained mode
US8724804B2 (en) Encryption processing apparatus
JP2009211071A (en) Combining instruction including instruction that performs sequence of transformation to isolate one transformation
JP2006527865A (en) Line doll block encryption apparatus and encryption and decryption method thereof
GB2426673A (en) Forming a ciphertext sequence using a plurality of initialisation values
JP5020115B2 (en) Encryption device and decryption device
JP2008252349A (en) Communication method and communication system
KR20100029871A (en) Apparatus and method for improving rate encryption/decryption using aes rijndael algorithm
JP2014240921A (en) Encryption device, encryption processing method and encryption processing program
JP5182295B2 (en) Encryption apparatus and encryption processing method
JP4466641B2 (en) Cryptographic processing device
JP4287397B2 (en) Ciphertext generation apparatus, ciphertext decryption apparatus, ciphertext generation program, and ciphertext decryption program
KR100710455B1 (en) Apparatus for rijndael block cipher and encryption/decryption method thereof
KR101662291B1 (en) Device for encryption and decryption based on Lightweight encryption algorithm LEA
JP2002510058A (en) Method for cryptographic conversion of binary data blocks
JP2001177518A (en) Enciphering method, and decoding method and device
JP2009098321A (en) Information processor
Islam et al. Data encryption standard
JP6070408B2 (en) ENCRYPTION DEVICE, DECRYPTION DEVICE, ENCRYPTION METHOD, DECRYPTION METHOD, AND PROGRAM
JP4708914B2 (en) Decryption method
KR100546777B1 (en) Apparatus and method for SEED Encryption/Decryption, and F function processor therefor

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20101206

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120604

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: 20120612

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20120612

R150 Certificate of patent or registration of utility model

Ref document number: 5020115

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20150622

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees