JP4939305B2 - Encryption / decryption device - Google Patents

Encryption / decryption device Download PDF

Info

Publication number
JP4939305B2
JP4939305B2 JP2007139011A JP2007139011A JP4939305B2 JP 4939305 B2 JP4939305 B2 JP 4939305B2 JP 2007139011 A JP2007139011 A JP 2007139011A JP 2007139011 A JP2007139011 A JP 2007139011A JP 4939305 B2 JP4939305 B2 JP 4939305B2
Authority
JP
Japan
Prior art keywords
key
encryption
decryption
bit length
bits
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.)
Expired - Fee Related
Application number
JP2007139011A
Other languages
Japanese (ja)
Other versions
JP2008294810A (en
Inventor
和生 朝見
敦男 山口
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2007139011A priority Critical patent/JP4939305B2/en
Publication of JP2008294810A publication Critical patent/JP2008294810A/en
Application granted granted Critical
Publication of JP4939305B2 publication Critical patent/JP4939305B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、暗号/復号装置に関し、特に、回路規模を縮小するための技術に関する。   The present invention relates to an encryption / decryption device, and more particularly to a technique for reducing a circuit scale.

従来から、暗号/復号装置においては、共通鍵暗号方式であるAES(Advanced Encryption Standard)方式が採用されている(例えば、非特許文献1参照)。   Conventionally, in an encryption / decryption device, an AES (Advanced Encryption Standard) method, which is a common key encryption method, has been adopted (see, for example, Non-Patent Document 1).

AES方式を採用した暗号/復号装置においては、暗号化演算を行うための暗号鍵と復号化演算を行うための復号鍵とがそれぞれレジスタ等に保持されて用いられる。   In an encryption / decryption device adopting the AES method, an encryption key for performing an encryption operation and a decryption key for performing a decryption operation are respectively held in a register or the like.

すなわち、まず、メモリ等から読み込まれた暗号鍵が、暗号鍵用レジスタに保持される。次に、この暗号鍵に対して、鍵スケジュール演算を実行することにより復号鍵が生成され、生成された復号鍵が復号鍵用レジスタに保持される。そして、暗号化演算時には暗号鍵用レジスタから暗号鍵が読み出され、復号化演算時には復号鍵用レジスタから復号鍵が読み出され、それぞれ使用される。   That is, first, the encryption key read from the memory or the like is held in the encryption key register. Next, a decryption key is generated by executing a key schedule operation on the encryption key, and the generated decryption key is held in the decryption key register. The encryption key is read from the encryption key register during the encryption operation, and the decryption key is read from the decryption key register during the decryption operation and used.

"Announcing the ADVANCED ENCRYPTION STANDARD (AES)"、[online]、米国国立標準・技術院(NIST)、[平成19年5月1日検索]、インターネット<URL: http://csrc.nist.gov/publications/fips/fips197/fips-197.pdf>"Announcing the ADVANCED ENCRYPTION STANDARD (AES)", [online], National Institute of Standards and Technology (NIST), [Search May 1, 2007], Internet <URL: http://csrc.nist.gov/ publications / fips / fips197 / fips-197.pdf>

AES方式においては、鍵として、最大でビット長が256ビットのものが使用される。従って、鍵用レジスタとしては、暗号鍵および復号鍵にそれぞれ対応して、256ビット×2=512ビット長からなるレジスタを設ける必要がある。そのため、回路規模が大きくなってしまうという問題点があった。   In the AES system, a key having a maximum bit length of 256 bits is used. Therefore, it is necessary to provide a register having a length of 256 bits × 2 = 512 bits corresponding to the encryption key and the decryption key as the key register. Therefore, there is a problem that the circuit scale becomes large.

本発明は上記の問題点を解決するためになされたものであり、回路規模を縮小できる暗号/復号装置を提供することを目的とする。   The present invention has been made to solve the above problems, and an object thereof is to provide an encryption / decryption device capable of reducing the circuit scale.

本発明の一実施の形態において、暗号/復号演算回路は、所定のデータを所定のビット長からなる暗号鍵を用いてAES方式に基づき暗号化演算する暗号演算回路、および前記暗号演算回路で暗号化演算された前記所定のデータを暗号鍵と同一のビット長からなる復号鍵を用いてAES方式に基づき復号化演算する復号演算回路の両方の回路機能を有している。鍵スケジュール演算回路は、暗号鍵および復号鍵のいずれか一方から他方を生成する処理すなわち鍵スケジュール演算処理を行うためのものである。鍵記憶装置は、256ビット長以上且つ392ビット長未満からなり、所定のビット長が196ビット長または256ビット長である場合には、暗号鍵および復号鍵を交互に記憶する動作を行い、所定のビット長が128ビット長である場合には、暗号鍵および復号鍵を同時に記憶する動作を行う。 In one embodiment of the present invention, the encryption / decryption operation circuit encrypts predetermined data based on an AES method using an encryption key having a predetermined bit length, and the encryption operation circuit encrypts the predetermined data. Both of the circuit functions of a decryption operation circuit that decrypts the predetermined data obtained by the conversion operation based on the AES method using a decryption key having the same bit length as the encryption key. The key schedule calculation circuit is for performing a process for generating the other from one of the encryption key and the decryption key, that is, a key schedule calculation process. Key storage device consists of less than 256 bits long and no more than 392 bits long, when a predetermined bit length is 196 bits long or 256 bits long, have the line operations for alternately stored in the encryption key and a decryption key, If the predetermined bit length is 128 bits long, it intends row operations simultaneously storing an encryption key and a decryption key.

本発明においては、一の鍵記憶装置へ二の鍵を交互に記憶させるので、二の鍵記憶装置を用いる場合に比較して、回路規模を縮小できる。   In the present invention, since the two keys are alternately stored in one key storage device, the circuit scale can be reduced as compared with the case where two key storage devices are used.

<実施の形態1>
図1は、実施の形態1に係る暗号/復号装置の構成を模式的に示すブロック図である。
<Embodiment 1>
FIG. 1 is a block diagram schematically showing the configuration of the encryption / decryption device according to the first embodiment.

図1に示されるように、本実施の形態に係る暗号/復号装置は、暗号/復号演算回路100と鍵スケジュール演算回路200と暗号/復号鍵用レジスタ300とを含んで構成されており、AES方式に基づき暗号化演算および復号化演算を行うものである。   As shown in FIG. 1, the encryption / decryption device according to the present embodiment includes an encryption / decryption operation circuit 100, a key schedule operation circuit 200, and an encryption / decryption key register 300. The encryption operation and the decryption operation are performed based on the method.

暗号/復号演算回路100は、所定のデータを所定のビット長(AES方式においては128ビット、192ビット、または256ビット)からなる暗号鍵を用いてAES方式に基づき暗号化演算する暗号演算回路、および前記暗号演算回路で暗号化演算された前記所定のデータを暗号鍵と同一のビット長からなる復号鍵を用いてAES方式に基づき復号化演算する復号演算回路の両方の回路機能を有している。   The encryption / decryption operation circuit 100 performs encryption operation on predetermined data based on the AES method using an encryption key having a predetermined bit length (128 bits, 192 bits, or 256 bits in the AES method), And a circuit function of a decryption operation circuit that decrypts the predetermined data encrypted by the encryption operation circuit based on an AES method using a decryption key having the same bit length as the encryption key. Yes.

鍵スケジュール演算回路200は、暗号鍵および復号鍵のいずれか一方から他方を生成する処理すなわち鍵スケジュール演算処理を行うためのものである。   The key schedule calculation circuit 200 is for performing a process for generating the other from one of the encryption key and the decryption key, that is, a key schedule calculation process.

暗号/復号鍵用レジスタ300は、暗号鍵および復号鍵を交互に記憶する動作を行う鍵記憶装置である。   The encryption / decryption key register 300 is a key storage device that performs an operation of alternately storing an encryption key and a decryption key.

図2は、比較用に、暗号鍵を記憶する鍵記憶装置(暗号鍵用レジスタ301)と復号鍵を記憶する鍵記憶装置(復号鍵用レジスタ302)とを個別に設け、これらを鍵選択回路400で選択する暗号/復号装置を示している。   In FIG. 2, a key storage device (encryption key register 301) for storing an encryption key and a key storage device (decryption key register 302) for storing a decryption key are separately provided for comparison, and these are provided as a key selection circuit. 400 shows an encryption / decryption device to be selected.

図2においては、まず、外部から入力された暗号鍵は、暗号鍵用レジスタ301へ記憶される。次に、鍵スケジュール演算回路200により、暗号鍵用レジスタ301へ記憶された暗号鍵から、復号鍵が生成され、復号鍵用レジスタ302へ記憶される。そして、暗号/復号演算回路100は、暗号化演算を実行するときには暗号鍵用レジスタ301へ記憶された暗号鍵を、復号化演算を実行するときには復号鍵用レジスタ302へ記憶された復号鍵を、それぞれ鍵選択回路400を介し取得して、演算を実行する。   In FIG. 2, first, the encryption key input from the outside is stored in the encryption key register 301. Next, the key schedule calculation circuit 200 generates a decryption key from the encryption key stored in the encryption key register 301 and stores it in the decryption key register 302. Then, the encryption / decryption operation circuit 100 executes the encryption key stored in the encryption key register 301 when executing the encryption operation, and the decryption key stored in the decryption key register 302 when executing the decryption operation. Each is obtained via the key selection circuit 400 and the calculation is executed.

このような場合には、例えば、暗号鍵および復号鍵がそれぞれ256ビット長からなる場合には、鍵記憶装置の合計のビット長は256ビット×2=512ビットとなるので、回路規模が大きくなってしまうという問題点がある。   In such a case, for example, when the encryption key and the decryption key each have a 256-bit length, the total bit length of the key storage device is 256 bits × 2 = 512 bits, so that the circuit scale increases. There is a problem that.

一方、本実施の形態に係る図1の暗号/復号装置においては、暗号/復号鍵用レジスタ300は、暗号鍵および復号鍵のいずれか一方の鍵のみを記憶しておき、必要に応じて、一方の鍵から他方の鍵を鍵スケジュール演算回路200にて生成し、生成された他方の鍵を暗号/復号鍵用レジスタ300へ上書きする。これにより、鍵記憶装置の合計のビット長すなわち暗号/復号鍵用レジスタ300のビット長を256ビットに抑えつつ、必要な暗号化演算および復号化演算を行うことが可能となる。   On the other hand, in the encryption / decryption device of FIG. 1 according to the present embodiment, the encryption / decryption key register 300 stores only one of the encryption key and the decryption key, and if necessary, The key schedule calculation circuit 200 generates one key from the other key, and overwrites the generated key to the encryption / decryption key register 300. This makes it possible to perform necessary encryption and decryption operations while suppressing the total bit length of the key storage device, that is, the bit length of the encryption / decryption key register 300 to 256 bits.

すなわち、本実施の形態に係る図1の暗号/復号装置は、暗号/復号演算回路100においては暗号鍵および復号鍵が同時に用いられることがないことに着目し、いずれか一方の鍵のみを記憶できる必要最小限の鍵記憶装置を設けることを特徴とするものである。従って、図2に比較して、一方の鍵から他方の鍵を鍵スケジュール演算回路200により生成するための処理時間が余分に必要となるものの、回路規模を縮小できる。   That is, the encryption / decryption device of FIG. 1 according to the present embodiment pays attention to the fact that the encryption / decryption operation circuit 100 does not use the encryption key and the decryption key at the same time, and stores only one of the keys. The minimum necessary key storage device is provided. Therefore, as compared with FIG. 2, although the processing time for generating the other key from one key by the key schedule calculation circuit 200 is required, the circuit scale can be reduced.

なお、図1では、鍵スケジュール演算回路200により一方の鍵から他方の鍵を生成し暗号/復号鍵用レジスタ300へ上書きする動作は、演算の種別が一方(例えば暗号化演算)から他方(例えば復号化演算)へ遷移した場合にのみ行われる。   In FIG. 1, the operation of generating the other key from one key by the key schedule calculation circuit 200 and overwriting it on the encryption / decryption key register 300 is different from the operation type (for example, encryption operation) to the other (for example, encryption operation). This is performed only when a transition is made to a decoding operation.

すなわち、暗号化演算の後に復号化演算を行う場合には、暗号/復号鍵用レジスタ300に記憶されている暗号鍵へ復号鍵が上書きされ、復号化演算の後に暗号化演算を行う場合には、暗号/復号鍵用レジスタ300に記憶されている復号鍵へ暗号鍵が上書きされる。一方、暗号化演算の後に引き続き暗号化演算を行う場合や、復号化演算の後に引き続き復号化演算を行う場合には、暗号/復号鍵用レジスタ300への鍵の上書きは行われない。   That is, when the decryption operation is performed after the encryption operation, the decryption key is overwritten on the encryption key stored in the encryption / decryption key register 300, and when the encryption operation is performed after the decryption operation. The encryption key is overwritten on the decryption key stored in the encryption / decryption key register 300. On the other hand, when the encryption operation is continued after the encryption operation, or when the decryption operation is continued after the decryption operation, the key is not overwritten on the encryption / decryption key register 300.

この上書きを適切に行うためには、暗号/復号装置は、次に行われる演算の種別が暗号化/復号化のいずれであるか、および暗号/復号鍵用レジスタ300に現在記憶されている鍵の種別が暗号鍵/復号鍵のいずれであるかを、検知している必要がある。   In order to appropriately perform this overwriting, the encryption / decryption device determines whether the type of operation to be performed next is encryption / decryption, and the key currently stored in the encryption / decryption key register 300. It is necessary to detect which type of encryption key / decryption key.

上記の演算の種別の検知は、動作命令が入力される都度その動作命令を解析することにより行ってもよく、あるいは、一連の動作命令が記述されたプログラムを予め取得し解析しておくことにより行ってもよい。   The detection of the type of operation described above may be performed by analyzing the operation command every time an operation command is input, or by acquiring and analyzing a program in which a series of operation commands are described in advance. You may go.

また、上記の鍵の種別の検知は、演算の都度、暗号/復号鍵用レジスタ300から鍵を読み出すことにより行ってもよく、あるいは、図3に示されるように、暗号/復号鍵用レジスタ300に記憶されている鍵の種別を内蔵ビットに記憶する(例えば、暗号鍵であれば”1”を記憶し、復号鍵であれば”0”を記憶する)暗号/復号鍵判別回路310を設けることにより行ってもよい。そして、この内蔵ビットを、鍵が書き換えられるタイミングで反転させればよい。   Further, the detection of the key type may be performed by reading the key from the encryption / decryption key register 300 for each calculation, or, as shown in FIG. 3, the encryption / decryption key register 300. An encryption / decryption key discriminating circuit 310 is provided for storing the type of key stored in the internal bit (for example, “1” is stored for an encryption key and “0” is stored for a decryption key). It may be done by. Then, this built-in bit may be inverted at the timing when the key is rewritten.

また、あるいは、図4に示されるように、暗号/復号鍵判別回路310に加えて、暗号/復号鍵生成自動回路320を設けてもよい。この暗号/復号鍵生成自動回路320は、外部から暗号/復号装置へ入力される動作命令に応答して、暗号/復号鍵用レジスタ300に記憶されている鍵の種別を暗号/復号鍵判別回路310により判別し、必要に応じて、鍵スケジュール演算回路200により鍵を生成し、書き換えを行う。これにより、鍵の書き換えを、外部から入力される動作命令に応答して行うことが可能となる。   Alternatively, as shown in FIG. 4, an encryption / decryption key generation automatic circuit 320 may be provided in addition to the encryption / decryption key determination circuit 310. The encryption / decryption key generation automatic circuit 320 responds to an operation command input from the outside to the encryption / decryption device, and determines the type of the key stored in the encryption / decryption key register 300 as an encryption / decryption key determination circuit. The key schedule calculation circuit 200 generates a key and rewrites it as necessary. As a result, the key can be rewritten in response to an operation command input from the outside.

このように、本実施の形態に係る暗号/復号装置は、暗号/復号鍵用レジスタ300からなる一の鍵記憶装置へ、二の鍵すなわち暗号鍵と復号鍵とを、交互に記憶させる動作を行う。従って、図2のように暗号鍵用レジスタ301と復号鍵用レジスタ302とからなる二の鍵記憶装置を備える場合に比較して、回路規模を縮小できる。   As described above, the encryption / decryption device according to the present embodiment performs an operation of alternately storing the second key, that is, the encryption key and the decryption key, in one key storage device including the encryption / decryption key register 300. Do. Therefore, the circuit scale can be reduced as compared with the case where two key storage devices each including the encryption key register 301 and the decryption key register 302 are provided as shown in FIG.

なお、上述においては、暗号/復号鍵用レジスタ300のビット長が、暗号鍵および復号鍵のビット長と同一である(256ビット)場合について説明したが、必ずしも同一である必要はなく、暗号/復号鍵用レジスタ300のビット長が暗号鍵および復号鍵のビット長以上かつその2倍未満(512ビット未満)であれば、図2の場合に比較して、回路規模を縮小することが可能である。   In the above description, the case where the bit length of the encryption / decryption key register 300 is the same as that of the encryption key and the decryption key (256 bits) has been described. If the bit length of the decryption key register 300 is equal to or larger than the bit length of the encryption key and the decryption key and less than twice (less than 512 bits), the circuit scale can be reduced compared to the case of FIG. is there.

<実施の形態2>
実施の形態1においては、一方の鍵から他方の鍵を生成するために単独で鍵スケジュール演算処理を実行する場合について説明した。しかし、AES方式では、暗号鍵は暗号化演算を行うことにより復号鍵へ遷移し、復号鍵は復号化演算を行うことにより暗号鍵へ遷移する。従って、これを利用することにより、重複して実行される鍵スケジュール演算処理を省くことが可能となる。
<Embodiment 2>
In the first embodiment, the case where the key schedule calculation process is executed alone to generate the other key from one key has been described. However, in the AES scheme, the encryption key transitions to a decryption key by performing an encryption operation, and the decryption key transitions to an encryption key by performing a decryption operation. Therefore, by using this, it is possible to omit the key schedule calculation process that is executed redundantly.

図5は、実施の形態2に係る暗号/復号装置の構成を模式的に示すブロック図である。図5は、図1において、暗号/復号演算回路100における演算処理により生成された復号鍵または暗号鍵を暗号/復号鍵用レジスタ300へ上書きするようにしたものである。これにより、鍵スケジュール演算処理の実行回数を減らし、処理時間を短縮することが可能となる。   FIG. 5 is a block diagram schematically showing the configuration of the encryption / decryption device according to the second embodiment. FIG. 5 shows the encryption / decryption key register 300 overwritten with the decryption key or the encryption key generated by the arithmetic processing in the encryption / decryption arithmetic circuit 100 in FIG. As a result, the number of executions of the key schedule calculation process can be reduced, and the processing time can be shortened.

図6〜7は、非特許文献1の第35〜38頁に対応しており、128ビット長からなる暗号鍵/復号鍵が、暗号化/復号化演算を行うことにより、128ビット長の復号鍵/暗号鍵として生成される遷移を示している。なお、図6が暗号化演算に、図7が復号化演算に、それぞれ対応している。   6 to 7 correspond to pages 35 to 38 of Non-Patent Document 1, and an encryption key / decryption key having a 128-bit length performs an encryption / decryption operation so that a 128-bit length is decrypted. A transition generated as a key / encryption key is shown. 6 corresponds to the encryption operation, and FIG. 7 corresponds to the decryption operation.

図6においては、暗号化演算前の暗号鍵round[ 0].k_schと暗号化演算後の暗号鍵round[10].k_schとが示されている。また、図7においては、復号化演算前の復号鍵round[ 0].ik_schと復号化演算後の復号鍵round[10].ik_schとが示されている。なお、round[ n](0<n<10)は、演算の途中すなわち遷移中の鍵に対応している。   FIG. 6 shows an encryption key round [0] .k_sch before the encryption operation and an encryption key round [10] .k_sch after the encryption operation. Further, FIG. 7 shows a decryption key round [0] .ik_sch before the decryption operation and a decryption key round [10] .ik_sch after the decryption operation. Note that round [n] (0 <n <10) corresponds to a key in the middle of an operation, that is, a transitioning key.

図6〜7に示されるように、暗号化演算後の暗号鍵round[10].k_schは復号化演算前の復号鍵round[ 0].ik_schに等しく、復号化演算後の復号鍵round[10].ik_schは暗号化演算前の暗号鍵round[ 0].k_schに等しい。すなわち、暗号化演算により、暗号鍵は復号鍵へ遷移し、復号化演算により、復号鍵は暗号鍵へ遷移している。   As shown in FIGS. 6 to 7, the encryption key round [10] .k_sch after the encryption operation is equal to the decryption key round [0] .ik_sch before the decryption operation, and the decryption key round [10] after the decryption operation ] .Ik_sch is equal to the encryption key round [0] .k_sch before the encryption operation. That is, the encryption key is changed to the decryption key by the encryption operation, and the decryption key is changed to the encryption key by the decryption operation.

このように、本実施の形態に係る暗号/復号装置においては、暗号/復号演算回路100は、暗号化演算に伴い暗号鍵から生成された復号鍵または復号化演算に伴い前記復号鍵から生成された暗号鍵を、それぞれ、暗号/復号鍵用レジスタ300へ書き込む動作を行う。従って、実施の形態1の効果に加えて、鍵スケジュール演算処理の実行回数を減らし、処理時間を短縮できるという効果を奏する。   As described above, in the encryption / decryption device according to the present embodiment, the encryption / decryption operation circuit 100 is generated from the decryption key generated from the encryption key accompanying the encryption operation or from the decryption key accompanying the decryption operation. Each encryption key is written into the encryption / decryption key register 300. Therefore, in addition to the effect of the first embodiment, the number of executions of the key schedule calculation process can be reduced and the processing time can be shortened.

なお、本実施の形態は、鍵が書き換えられるタイミングが予め検知されている場合に特に有効である。従って、例えば、鍵が書き換えられるタイミングが予め検知されている場合には、上述したような暗号/復号演算回路100を用いた(すなわち鍵スケジュール演算回路200を単独で用いるのではなく、暗号/復号演算回路100と同時に用いた)鍵生成を行い、鍵が書き換えられるタイミングが予め検知されていない場合には、図1のように鍵スケジュール演算回路200を単独で用いた鍵の生成を行うようにすればよい。   This embodiment is particularly effective when the timing at which the key is rewritten is detected in advance. Therefore, for example, when the timing at which the key is rewritten is detected in advance, the encryption / decryption operation circuit 100 as described above is used (that is, the key schedule operation circuit 200 is not used alone, but encryption / decryption is used. When the key generation (used at the same time as the arithmetic circuit 100) is performed and the timing at which the key is rewritten is not detected in advance, the key is generated using the key schedule arithmetic circuit 200 alone as shown in FIG. do it.

<実施の形態3>
実施の形態1においては、暗号/復号鍵用レジスタ300のビット長が暗号鍵および復号鍵のビット長の2倍未満である場合(言い換えれば、暗号鍵および復号鍵のビット長が暗号/復号鍵用レジスタ300のビット長の半分より大きい場合)に、暗号/復号鍵用レジスタ300へ暗号鍵および復号鍵を交互に記憶する動作について説明した。
<Embodiment 3>
In the first embodiment, when the bit length of the encryption / decryption key register 300 is less than twice the bit length of the encryption key and the decryption key (in other words, the bit length of the encryption key and the decryption key is the encryption / decryption key). The operation of alternately storing the encryption key and the decryption key in the encryption / decryption key register 300 when the bit length of the register 300 is larger than half the bit length) has been described.

すなわち、暗号鍵および復号鍵のビット長が暗号/復号鍵用レジスタ300のビット長の半分より大きい場合には、暗号鍵および復号鍵を同時に暗号/復号鍵用レジスタ300へ記憶させることができないので、交互に記憶させる必要があるが、暗号鍵および復号鍵のビット長が暗号/復号鍵用レジスタ300のビット長の半分以下である場合には、暗号鍵および復号鍵を同時に暗号/復号鍵用レジスタ300へ記憶させることが可能である。   That is, when the bit length of the encryption key and the decryption key is larger than half the bit length of the encryption / decryption key register 300, the encryption key and the decryption key cannot be stored in the encryption / decryption key register 300 at the same time. However, if the bit length of the encryption key and the decryption key is less than half the bit length of the encryption / decryption key register 300, the encryption key and the decryption key are simultaneously used for the encryption / decryption key. It can be stored in the register 300.

実施の形態3に係る暗号/復号装置は、複数組の暗号鍵および復号鍵を用いる場合に、それらのビット長に応じて、暗号/復号鍵用レジスタ300への記憶動作を異ならせることを特徴とするものである。   The encryption / decryption device according to the third embodiment is characterized in that, when a plurality of sets of encryption keys and decryption keys are used, the storage operation in the encryption / decryption key register 300 varies depending on the bit lengths. It is what.

図8は、本実施の形態に係る暗号/復号装置の構成を模式的に示すブロック図である。図8において、暗号/復号装置は、256ビット長からなる暗号/復号鍵用レジスタ300aを備えており、暗号/復号鍵用レジスタ300aは、128ビット長からなる鍵記憶領域303,304を有している。   FIG. 8 is a block diagram schematically showing the configuration of the encryption / decryption device according to the present embodiment. 8, the encryption / decryption device includes an encryption / decryption key register 300a having a 256-bit length, and the encryption / decryption key register 300a has key storage areas 303 and 304 having a 128-bit length. ing.

暗号/復号鍵用レジスタ300aは、暗号鍵および復号鍵のビット長が128ビット以下である場合には、図8に示されるように、これらを同時に記憶する図2と同様の動作を行い、暗号鍵および復号鍵のビット長が128ビットより大きい場合には、実施の形態1と同様に、これらを交互に記憶する動作を行う。   When the bit length of the encryption key and the decryption key is 128 bits or less, the encryption / decryption key register 300a performs the same operation as FIG. When the bit length of the key and the decryption key is larger than 128 bits, the operation of alternately storing them is performed as in the first embodiment.

このように、本実施の形態に係る暗号/復号装置は、128×2=256ビット長以上且つ196×2=392ビット長未満からなる暗号/復号鍵用レジスタ300aを備え、暗号鍵および復号鍵のビット長が128ビットより大きい場合(具体的には、192ビットまたは256ビットである場合)には、これらを交互に記憶する動作を行い、暗号鍵および復号鍵のビット長が128ビット以下である場合(具体的には、128ビットである場合)には、これらを同時に記憶する動作を行う。従って、実施の形態1の効果に加えて、暗号鍵および復号鍵のビット長が128ビットである場合における処理時間を短縮できるという効果を奏する。   As described above, the encryption / decryption device according to the present embodiment includes the encryption / decryption key register 300a having a length of 128 × 2 = 256 bits or more and less than 196 × 2 = 392 bits, and includes an encryption key and a decryption key. If the bit length of the key is greater than 128 bits (specifically, 192 bits or 256 bits), these are alternately stored, and the bit length of the encryption key and the decryption key is 128 bits or less. In some cases (specifically, in the case of 128 bits), an operation of storing these simultaneously is performed. Therefore, in addition to the effect of the first embodiment, the processing time can be shortened when the bit length of the encryption key and the decryption key is 128 bits.

なお、上述においては、256ビット長からなる暗号/復号鍵用レジスタ300aに、128ビット長からなる暗号鍵および復号鍵を同時に記憶させる場合について説明したが、同時に記憶される二の鍵の種別は、同一であってもよい。すなわち、図9に示されるように、鍵記憶領域303,304には、128ビット長からなる第一暗号鍵および第二暗号鍵を、それぞれ、同時に記憶させてもよい。なお、第一暗号鍵と第二暗号鍵とは、ビット長が同じで値が異なる二種類の鍵を構成するものとする。   In the above description, the case where the encryption / decryption key register 300a having a 256-bit length simultaneously stores the encryption key and the decryption key having a 128-bit length has been described. , May be the same. That is, as shown in FIG. 9, the key storage areas 303 and 304 may simultaneously store a first encryption key and a second encryption key each having a 128-bit length. Note that the first encryption key and the second encryption key constitute two types of keys having the same bit length and different values.

図9の暗号/復号装置は、第一暗号鍵のビット長が128ビットである場合には、第一暗号鍵および第二復号鍵を同時に記憶する動作と第一復号鍵(第一暗号鍵に対応)および第二復号鍵(第二暗号鍵に対応)を同時に記憶する動作とを交互に行う。また、第一暗号鍵のビット長が192ビットまたは256ビットである場合には、第一暗号鍵および第一復号鍵を交互に記憶する動作を行う。すなわち、第一暗号鍵のビット長が128ビットである場合には、二種類の鍵を使用することが可能となる。   When the bit length of the first encryption key is 128 bits, the encryption / decryption device of FIG. 9 stores the operation of storing the first encryption key and the second decryption key at the same time and the first decryption key (the first encryption key). And the operation of simultaneously storing the second decryption key (corresponding to the second encryption key). Further, when the bit length of the first encryption key is 192 bits or 256 bits, an operation of alternately storing the first encryption key and the first decryption key is performed. That is, when the bit length of the first encryption key is 128 bits, two types of keys can be used.

実施の形態1に係る暗号/復号装置の構成を模式的に示すブロック図である。1 is a block diagram schematically showing a configuration of an encryption / decryption device according to Embodiment 1. FIG. 比較用の暗号/復号装置の一の構成を模式的に示すブロック図である。It is a block diagram which shows typically one structure of the encryption / decryption apparatus for a comparison. 実施の形態1に係る暗号/復号装置の構成を模式的に示すブロック図である。1 is a block diagram schematically showing a configuration of an encryption / decryption device according to Embodiment 1. FIG. 実施の形態1に係る暗号/復号装置の構成を模式的に示すブロック図である。1 is a block diagram schematically showing a configuration of an encryption / decryption device according to Embodiment 1. FIG. 実施の形態2に係る暗号/復号装置の構成を模式的に示すブロック図である。6 is a block diagram schematically showing a configuration of an encryption / decryption device according to Embodiment 2. FIG. 実施の形態2に係る暗号/復号装置における暗号化演算を示す図である。FIG. 10 is a diagram illustrating an encryption operation in the encryption / decryption device according to the second embodiment. 実施の形態2に係る暗号/復号装置における復号化演算を示す図である。FIG. 10 is a diagram showing a decryption operation in the encryption / decryption device according to the second embodiment. 実施の形態3に係る暗号/復号装置の構成を模式的に示すブロック図である。FIG. 10 is a block diagram schematically showing a configuration of an encryption / decryption device according to a third embodiment. 実施の形態3に係る暗号/復号装置の構成を模式的に示すブロック図である。FIG. 10 is a block diagram schematically showing a configuration of an encryption / decryption device according to a third embodiment.

符号の説明Explanation of symbols

100 暗号/復号演算回路、200 鍵スケジュール演算回路、300,300a 暗号/復号鍵用レジスタ、301 暗号鍵用レジスタ、302 復号鍵用レジスタ、303,304 鍵記憶領域、310 暗号/復号鍵判別回路、320 暗号/復号鍵生成自動回路、400 鍵選択回路。   100 Encryption / Decryption Operation Circuit, 200 Key Schedule Operation Circuit, 300, 300a Encryption / Decryption Key Register, 301 Encryption Key Register, 302 Decryption Key Register, 303, 304 Key Storage Area, 310 Encryption / Decryption Key Discrimination Circuit, 320 encryption / decryption key generation automatic circuit, 400 key selection circuit.

Claims (2)

所定のデータを所定のビット長からなる暗号鍵を用いてAES方式に基づき暗号化演算する暗号演算回路、および前記暗号演算回路で暗号化演算された前記所定のデータを前記所定のビット長からなる復号鍵を用いてAES方式に基づき復号化演算する復号演算回路を有する暗号/復号演算回路と、
前記暗号鍵および前記復号鍵のいずれか一方から他方を生成可能な鍵スケジュール演算回路と、
256ビット長以上且つ392ビット長未満からなる鍵記憶装置と
を備え、
前記鍵記憶装置は、
前記所定のビット長が196ビット長または256ビット長である場合には、前記暗号鍵および前記復号鍵を交互に記憶する動作を行い、
前記所定のビット長が128ビット長である場合には、前記暗号鍵および前記復号鍵を同時に記憶する動作を行
暗号/復号装置。
A cryptographic operation circuit that performs an encryption operation based on an AES method using an encryption key having a predetermined bit length, and the predetermined data encrypted by the encryption operation circuit has the predetermined bit length An encryption / decryption operation circuit having a decryption operation circuit that performs a decryption operation based on the AES method using a decryption key;
A key schedule calculation circuit capable of generating the other from either one of the encryption key and the decryption key;
A key storage device having a length of 256 bits or more and less than 392 bits ,
The key storage device
It said predetermined when the bit length is 196 bits long or 256 bits long, have the line the operation of storing the encryption key and the decryption key alternately,
Said predetermined when the bit length is 128 bits long, the encryption key and the decryption key at the same time line cormorants encryption / decryption device operates to store.
所定のデータを所定のビット長からなる第一暗号鍵または前記所定のビット長からなる第二暗号鍵を用いてAES方式に基づき暗号化演算する暗号演算回路、および前記暗号演算回路で暗号化演算された前記所定のデータを前記所定のビット長からなる第一復号鍵または前記所定のビット長からなる第二復号鍵を用いてAES方式に基づき復号化演算する復号演算回路を有する暗号/復号演算回路と、
前記暗号鍵および前記復号鍵のいずれか一方から他方を生成可能な鍵スケジュール演算回路と、
256ビット長以上且つ392ビット長未満からなる鍵記憶装置と
を備え、
前記鍵記憶装置は、
前記所定のビット長が196ビット長または256ビット長である場合には、前記第一暗号鍵および前記第一復号鍵を交互に記憶する動作を行い、
前記所定のビット長が128ビット長である場合には、前記第一暗号鍵および前記第二暗号鍵を同時に記憶する動作と前記第一復号鍵および前記第二復号鍵を同時に記憶する動作とを交互に行う
暗号/復号装置。
Cryptographic operation circuit for performing encryption operation based on AES method using first encryption key having predetermined bit length or second encryption key having predetermined bit length, and encryption operation by the encryption operation circuit Encryption / decryption operation having a decryption operation circuit for performing the decryption operation based on the AES method using the first decryption key having the predetermined bit length or the second decryption key having the predetermined bit length Circuit,
A key schedule calculation circuit capable of generating the other from either one of the encryption key and the decryption key;
A key storage device having a length of 256 bits or more and less than 392 bits;
With
The key storage device
When the predetermined bit length is 196 bits length or 256 bits length, an operation of alternately storing the first encryption key and the first decryption key is performed,
When the predetermined bit length is 128 bits, an operation for simultaneously storing the first encryption key and the second encryption key and an operation for simultaneously storing the first decryption key and the second decryption key Alternate encryption / decryption device.
JP2007139011A 2007-05-25 2007-05-25 Encryption / decryption device Expired - Fee Related JP4939305B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2007139011A JP4939305B2 (en) 2007-05-25 2007-05-25 Encryption / decryption device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2007139011A JP4939305B2 (en) 2007-05-25 2007-05-25 Encryption / decryption device

Publications (2)

Publication Number Publication Date
JP2008294810A JP2008294810A (en) 2008-12-04
JP4939305B2 true JP4939305B2 (en) 2012-05-23

Family

ID=40169082

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2007139011A Expired - Fee Related JP4939305B2 (en) 2007-05-25 2007-05-25 Encryption / decryption device

Country Status (1)

Country Link
JP (1) JP4939305B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0830195A (en) * 1994-07-20 1996-02-02 Nippon Telegr & Teleph Corp <Ntt> Formation of enlarging key of cipher, deciphering method and enlarging key forming device of cipher and deciphering device
JP3505482B2 (en) * 2000-07-12 2004-03-08 株式会社東芝 Encryption device, decryption device, extended key generation device, extended key generation method, and recording medium
JP3851115B2 (en) * 2001-06-28 2006-11-29 富士通株式会社 Cryptographic circuit
GB0214620D0 (en) * 2002-06-25 2002-08-07 Koninkl Philips Electronics Nv Round key generation for AES rijndael block cipher
ATE387773T1 (en) * 2003-05-23 2008-03-15 Nxp Bv METHOD AND APPARATUS FOR A LOW MEMORY HARDWARE IMPLEMENTATION OF THE KEY EXPANSION FUNCTION
WO2006022058A1 (en) * 2004-08-26 2006-03-02 Nec Corporation Text encrypting apparatus, and text decrypting apparatus
JP2006171598A (en) * 2004-12-20 2006-06-29 Matsushita Electric Ind Co Ltd Parallel encrypting and decoding device for aes

Also Published As

Publication number Publication date
JP2008294810A (en) 2008-12-04

Similar Documents

Publication Publication Date Title
JP4551802B2 (en) Processor, memory, computer system, and data transfer method
US10102390B2 (en) Memory authentication with redundant encryption
JP4865694B2 (en) Processor device
EP3190543A1 (en) Method of dynamically encrypting fingerprint data and related fingerprint sensor
US8428251B2 (en) System and method for stream/block cipher with internal random states
TWI496024B (en) An encryption calculation means, a memory means, and an encryption calculation method
US9288040B2 (en) Encryption device
JP2004265194A (en) Information processing apparatus and information processing method
JP2007096973A (en) Encrypting/decoding device
US20200313860A1 (en) A hardware multiple cipher engine
JP4758904B2 (en) Confidential information processing method
US11121867B2 (en) Encryption methods based on plaintext length
JP2009251794A (en) Information processing device, encryption method of instruction code, and decryption method of encrypted instruction code
US20100061551A1 (en) Encryption/decryption apparatus and method using aes rijndael algorithm
JP2007334016A (en) Data enciphering device and method
JP4939305B2 (en) Encryption / decryption device
US20080069339A1 (en) Dual mode AES implementation to support single and multiple AES operations
US9838199B2 (en) Initialization vectors generation from encryption/decryption
JP2008140104A (en) Memory system and memory access method
JP2002305515A5 (en)
JP2006254099A (en) Microprocessor
US11061996B2 (en) Intrinsic authentication of program code
JP7063628B2 (en) Cryptographic devices, encryption methods and programs
JP6012355B2 (en) Control device, control system, data storage method and program
JP2018078610A5 (en)

Legal Events

Date Code Title Description
RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20091028

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100212

A711 Notification of change in applicant

Free format text: JAPANESE INTERMEDIATE CODE: A712

Effective date: 20100524

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20111125

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20111206

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20120201

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

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

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

Free format text: PAYMENT UNTIL: 20150302

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees