JP2006171598A - Parallel encrypting and decoding device for aes - Google Patents

Parallel encrypting and decoding device for aes Download PDF

Info

Publication number
JP2006171598A
JP2006171598A JP2004367181A JP2004367181A JP2006171598A JP 2006171598 A JP2006171598 A JP 2006171598A JP 2004367181 A JP2004367181 A JP 2004367181A JP 2004367181 A JP2004367181 A JP 2004367181A JP 2006171598 A JP2006171598 A JP 2006171598A
Authority
JP
Japan
Prior art keywords
data
key
calculation
encryption
flag
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.)
Pending
Application number
JP2004367181A
Other languages
Japanese (ja)
Inventor
Toru Iwata
徹 岩田
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004367181A priority Critical patent/JP2006171598A/en
Publication of JP2006171598A publication Critical patent/JP2006171598A/en
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To provide a parallel encrypting and decoding device which can make encrypting and decoding at the same time at high speed by using the AES system. <P>SOLUTION: This encrypting and decoding device has an operation data storage 501 for holding the operation data; a key data storage 502 to store the key data constructed to attach a flag to the common key when encrypting, and to the last of the expansion key when decoding; and as many input controllers 600 as the operation channels to control the data input. Further, it has an input channel selector 511 to choose the channel to perform operations; a flag judging section 521 to perform flag judging of the key data; an operation section 531 to perform the AES operation; a flag attaching section 551 to attach a flag to the key data; an operation control unit 611 to issue instructions to the operation section 531; an output channel selector 541 to chooses the channel to output the data, and a channel controller 601 to issue instructions of the selected channel. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、現在の米国標準であるDESにかわり、次世代の共通鍵暗号として選定されたAES暗号方式を用いて、複数のストリームに対して時分割で暗号または復号の処理を行う暗復号処理装置に関する。   The present invention is an encryption / decryption process for performing encryption or decryption processing on a plurality of streams in a time-sharing manner using an AES encryption method selected as a next-generation common key encryption instead of the current US standard DES. Relates to the device.

近年、TV放送のデジタル化や、CDやDVD等の蓄積メディアやネットワークを用いたコンテンツの提供などが急速に普及してきたが、提供されるコンテンツの著作権保護の観点から、データの機密性を確保するためのデータ暗号方式が要求されている。   In recent years, the digitization of TV broadcasts and the provision of content using storage media such as CDs and DVDs and networks have rapidly spread. However, from the viewpoint of protecting the copyright of the provided content, the confidentiality of data has been reduced. There is a demand for a data encryption method for securing the data.

また、暗号方式の実現においては、安全性のみならず暗号処理の高速性や実装の簡便性も要求される。   In addition, in order to realize an encryption method, not only security but also high speed encryption processing and simple implementation are required.

このような暗号方式の一般的構成では、暗号化の対象となるデータは、固定サイズのブロックに分割され、各ブロックが所定の暗号鍵に基づいてデータ撹乱処理されて、暗号文が生成される。   In a general configuration of such an encryption method, data to be encrypted is divided into fixed-size blocks, and each block is subjected to data disturbance processing based on a predetermined encryption key to generate a ciphertext. .

このような暗号方式の1つに米国の次世代標準暗号として制定されたあるAES(Advanced Encryption Standard)暗号がある。   One such encryption method is an AES (Advanced Encryption Standard) cipher established as the next generation standard cipher in the United States.

AESは一演算単位が128ビットのブロック暗号であり、図9にその暗号化アルゴリズムを示す。   AES is a block cipher in which one operation unit is 128 bits. FIG. 9 shows the encryption algorithm.

図9のように、AESの暗号化アルゴリズムはラウンド演算001やEXOR002を繰り返し行う000の部分と、拡大鍵スケジュール100を行う部分から構成される。   As shown in FIG. 9, the AES encryption algorithm is composed of a part 000 for repeatedly performing round operations 001 and EXOR002 and a part for performing the extended key schedule 100.

Nr回行うラウンド演算001では、データのランダム化処理がなされ、ラウンド演算001の前後にNr+1回行うEXOR002では、拡大鍵スケジュール100で作成された拡大鍵とのEXOR処理がなされる。   In round operation 001 performed Nr times, data randomization processing is performed. In EXOR002 performed Nr + 1 times before and after round operation 001, EXOR processing with the expanded key created in expanded key schedule 100 is performed.

拡大鍵スケジュール100では、共通鍵をもとにW(0)〜W(4×Nr+3)の拡大鍵を作成する。   In the extended key schedule 100, extended keys W (0) to W (4 × Nr + 3) are created based on the common key.

拡大鍵はそれぞれ32ビットずつで、W(0)〜W(Nk−1)は共通鍵を32ビットずつ区切ったものとし、W(Nk)以降は順番に演算して求めていく。   Each extended key is 32 bits, W (0) to W (Nk-1) are obtained by dividing the common key by 32 bits, and W (Nk) and thereafter are calculated in order.

例えばW(x+Nk)を求めるときには、W(x+Nk−1)とW(x)を用いて演算を行う(図11を参照)。   For example, when obtaining W (x + Nk), calculation is performed using W (x + Nk-1) and W (x) (see FIG. 11).

また、拡大鍵は逆方向に演算をすることもできて、例えばW(x−Nk)は、W(x)とW(x−1)を用いて演算を行うことで求められる(図12を参照)。   Further, the expanded key can be operated in the reverse direction. For example, W (x−Nk) is obtained by performing an operation using W (x) and W (x−1) (see FIG. 12). reference).

図10にNrとNkの値を示す。   FIG. 10 shows the values of Nr and Nk.

例えばW(x+1)〜W(x+Nk)の連続したNk個の拡大鍵が分かれば、W(x+Nk+1)以降は、W(x+1)とW(x+Nk)からW(x+Nk+1)を求め、W(x+2)とW(x+Nk+1)からW(x+Nk+2)を求め、という具合に順番に求めることができる。   For example, if Nk extended keys from W (x + 1) to W (x + Nk) are known, after W (x + Nk + 1), W (x + Nk + 1) is obtained from W (x + 1) and W (x + Nk), and W (x + 2) And W (x + Nk + 1) is obtained from W (x + Nk + 1), and so on.

一方、W(x)より前は、W(x+Nk−1)とW(x+Nk)からW(x)を求め、W(x+Nk−2)とW(x+Nk−1)からW(x−1)を求め、という具合に求めることができる。   On the other hand, before W (x), W (x) is obtained from W (x + Nk-1) and W (x + Nk), and W (x-1) is obtained from W (x + Nk-2) and W (x + Nk-1). You can ask for it.

以上のことから、連続したNk個の拡大鍵があれば、それらの拡大鍵から全ての拡大鍵を求めることができる。   From the above, if there are Nk consecutive extended keys, all the extended keys can be obtained from those extended keys.

図12のように、拡大鍵の後ろからNk個を合わせたものを復号鍵と呼ぶことにする。   As shown in FIG. 12, a combination of Nk from the back of the expanded key is called a decryption key.

復号鍵のビット数は共通鍵と必ず同じである。   The number of bits of the decryption key is always the same as that of the common key.

図13はAESの暗復号を行う暗号回路の一例を示すブロック図である(例えば、特許文献1参照)。   FIG. 13 is a block diagram illustrating an example of an encryption circuit that performs AES encryption / decryption (see, for example, Patent Document 1).

図13において、暗号回路はラウンド演算やEXORを行う200のブロックと、拡大鍵スケジュールを行う300のブロックと制御部400から構成される。   In FIG. 13, the encryption circuit includes 200 blocks that perform round operation and EXOR, 300 blocks that perform an extended key schedule, and a control unit 400.

200のブロックでは以下の処理が行われる。   In the block of 200, the following processing is performed.

はじめに、演算データをセレクタ部201で選択して、EXOR部202で拡大鍵との1回目のEXORを行い中間値保持部203に保持する。   First, the operation data is selected by the selector unit 201, and the EXOR unit 202 performs the first EXOR with the expanded key and holds it in the intermediate value holding unit 203.

次に、中間値保持部203に保持された値をラウンド演算部205でラウンド演算して、セレクタ部201で選択して、EXOR部202で拡大鍵とのEXORを行い、再び中間値保持部203に保持するという処理をNr回繰り返す。   Next, the value held in the intermediate value holding unit 203 is rounded by the round calculating unit 205, selected by the selector unit 201, EXORed with the expanded key by the EXOR unit 202, and again the intermediate value holding unit 203. Is held Nr times.

最後に、中間値保持部203に保持している演算結果を出力データとして出力する。   Finally, the calculation result held in the intermediate value holding unit 203 is output as output data.

前記の200のブロックの処理と平行して、300のブロックで拡大鍵スケジュールをおこなう。   In parallel with the processing of 200 blocks, the extended key schedule is performed with 300 blocks.

拡大鍵は鍵長が256ビットのときは60個、128ビットのときでも48個必要となり、これを全て保持すると回路規模が大きくなってしまう。   60 extended keys are required when the key length is 256 bits and 48 even when the key length is 128 bits. If all of these keys are held, the circuit scale becomes large.

そこで、一度に保持する拡大鍵はNk個だけにして、EXOR部202に必要となる拡大鍵を順番に演算していく。   Therefore, only Nk extended keys are held at one time, and the extended keys necessary for the EXOR unit 202 are calculated in order.

暗号時には、300のブロックでは以下の処理が行われる。   At the time of encryption, the following processing is performed in 300 blocks.

はじめに、共通鍵をセレクタ部301で選択して、拡大鍵保持部303に保持する。   First, a common key is selected by the selector unit 301 and held in the extended key holding unit 303.

次に、200のブロックで必要となる拡大鍵を作成するために、必要に応じて、拡大鍵保持部303に保持された値を拡大鍵演算部305で演算して、セレクタ部301で選択して、再び拡大鍵保持部303に保持する。   Next, in order to create an extended key necessary for the 200 blocks, the value held in the extended key holding unit 303 is calculated by the extended key calculating unit 305 and selected by the selector unit 301 as necessary. Then, it is held in the expanded key holding unit 303 again.

復号時には、基本的には暗号時と同様の処理を行うが、最初に共通鍵から復号鍵を演算する必要がある。   At the time of decryption, basically the same processing as at the time of encryption is performed, but first, it is necessary to calculate the decryption key from the common key.

それは、暗号時には最初にW(0)〜W(3)を、次にW(4)〜W(7)を、という順番で拡大鍵を使用するのに対して、復号時には最初にW(4×Nr)〜W(4×Nr+3)を、次にW(4×Nr−4)〜W(4×Nr−1)を、という暗号とは逆の順番で拡大鍵を使用するためである。   It uses the expanded keys in the order of W (0) to W (3) and then W (4) to W (7) at the time of encryption, whereas W (4 This is because the expanded keys are used in the reverse order of the ciphers of × Nr) to W (4 × Nr + 3) and then W (4 × Nr−4) to W (4 × Nr−1).

復号時には、はじめに、共通鍵をセレクタ部301で選択して、拡大鍵保持部303に保持する。   At the time of decryption, first, a common key is selected by the selector unit 301 and held in the extended key holding unit 303.

次に、拡大鍵保持部303に保持された値を拡大鍵演算部305で演算して、セレクタ部301で選択して、再び拡大鍵保持部303に保持するという処理を繰り返し、最後まで拡大鍵を演算し復号鍵を求める。   Next, the process of calculating the value held in the extended key holding unit 303 by the extended key calculating unit 305, selecting it by the selector unit 301, and holding it again in the extended key holding unit 303 is repeated until the extended key is reached. To obtain a decryption key.

演算で求められた復号鍵は、復号鍵保持部304に保持して、次の演算からは最初に復号鍵保持部304に保持した値を拡大鍵保持部303にロードする。これによって、演算の最初に、共通鍵から復号鍵を演算する処理は省くことが出来る。   The decryption key obtained by the calculation is held in the decryption key holding unit 304, and the value held in the decryption key holding unit 304 first is loaded into the extended key holding unit 303 from the next calculation. Thereby, the process of calculating the decryption key from the common key at the beginning of the calculation can be omitted.

復号鍵を拡大鍵保持部303に保持した後は、暗号時と同様に、必要に応じて、拡大鍵保持部303に保持された値を拡大鍵演算部305で演算して、セレクタ部301で選択して、再び拡大鍵保持部303に保持するという処理を行う。ただし、拡大鍵演算部305での演算は暗号時とは逆向きになる。   After the decryption key is held in the extended key holding unit 303, as in the case of encryption, the value held in the extended key holding unit 303 is calculated by the extended key calculation unit 305 as necessary, and the selector unit 301 A process of selecting and holding the expanded key holding unit 303 again is performed. However, the calculation in the expanded key calculation unit 305 is reverse to the encryption.

制御部400では、暗号モード指示信号をもとに暗号または復号のいずれかの判断を行い、また演算指令信号を受け演算を開始して200と300のブロックに制御信号を送る。   The control unit 400 determines whether to perform encryption or decryption based on the encryption mode instruction signal, receives an operation command signal, starts operation, and sends a control signal to the 200 and 300 blocks.

特許文献1では、回路規模を小さくするために、ラウンド演算部205と拡大鍵演算部305は32ビットずつ演算をしていたり、また、ラウンド演算部205の演算は2サイクルに分けて行っていたりしている。   In Patent Document 1, in order to reduce the circuit scale, the round calculation unit 205 and the extended key calculation unit 305 perform calculations by 32 bits, or the calculation of the round calculation unit 205 is performed in two cycles. is doing.

特許文献1では、128ビットの演算にかかるサイクル数は図14のようになっている。
特開2003−15522号公報
In Patent Document 1, the number of cycles for a 128-bit operation is as shown in FIG.
JP 2003-15522 A

しかしながら、従来は複数のストリームに対して、時分割にAES暗復号処理を行うような装置はなかった。   However, conventionally, there has been no apparatus that performs AES encryption / decryption processing in a time division manner on a plurality of streams.

時分割に暗復号を行わなくても、図13の暗号回路をストリームの数だけ置くことで、複数のストリームの暗復号を行うことができるが、それでは回路規模が大きくなりすぎてしまう。   Even if encryption / decryption is not performed in a time-sharing manner, it is possible to perform encryption / decryption of a plurality of streams by placing the encryption circuit of FIG. 13 as many as the number of streams, but this increases the circuit scale too much.

回路規模を抑えるためには、ひとつの暗号回路を使用して時分割に複数のストリームに対して暗復号を行う必要があり、そのために暗復号を行うストリームをスムーズに切り替えるしくみが必要となる。   In order to reduce the circuit scale, it is necessary to perform encryption / decryption on a plurality of streams in a time-sharing manner using a single encryption circuit. For this reason, a mechanism for smoothly switching between streams for encryption / decryption is required.

また、図13の暗号回路では、復号時には共通鍵が変わるたびに復号鍵の演算を行わなければならない。そのため、演算するストリームを時分割で頻繁に切り替える場合は、頻繁に復号鍵の演算を行わなければならなくなるため、演算性能が大きく低下してしまうという課題がある(暗号のみを行う場合は除く)。   In the encryption circuit of FIG. 13, the decryption key must be calculated every time the common key is changed during decryption. For this reason, when the stream to be operated is frequently switched in a time division manner, the decryption key must be frequently calculated, so that there is a problem that the calculation performance is greatly reduced (except when only encryption is performed). .

前記課題を解決するため、本発明の暗復号処理装置は、N個のストリームに対して、時分割に暗号または復号の処理を行うために、N個のストリームに対応したch0〜chN−1のN個のチャネルを持ち、一演算単位ずつ入力される前記ストリームのデータである演算データを保持する演算データ保持部と、前記ストリームの暗号または復号を行うために設定される鍵データを保持する鍵データ保持部と、前記演算データ保持部と鍵データ保持部へのデータ入力を各チャネル毎に制御するための入力制御部と、前記演算データ保持部に保持された演算データと前記鍵データ保持部に保持された鍵データの中から、暗復号処理を行うストリームに対応したチャネルのデータを選択する入力チャネル選択部と、前記入力チャネル選択部で選択された鍵データに含まれるフラグ情報の判定を行うフラグ判定部と、前記入力チャネル選択部で選択された演算データと、前記フラグ判定部で判定を行った結果を用いて、暗号または復号の処理を行う演算部と、前記演算部から出力された出力鍵データに、前記フラグ判定部で判定を行った結果を用いてフラグの付与を行うフラグ付与部と、前記演算部で演算終了時に出力される出力データと、前記フラグ付与部から出力されるフラグが付与された出力鍵データを、前記入力チャネル選択部で選択したチャネルと同じチャネルを選択して出力を行う出力チャネル選択部と、前記入力チャネル選択部と出力チャネル選択部に選択チャネルの指示を送るチャネル制御部とを、備える。   In order to solve the above problems, the encryption / decryption processing device of the present invention performs ch0 to chN-1 corresponding to N streams in order to perform encryption or decryption processing on N streams in a time-sharing manner. A calculation data holding unit that holds calculation data that is data of the stream that has N channels and is input for each calculation unit, and a key that holds key data set to perform encryption or decryption of the stream A data holding unit, an input control unit for controlling data input to the calculation data holding unit and the key data holding unit for each channel, the calculation data held in the calculation data holding unit, and the key data holding unit The input channel selection unit that selects the channel data corresponding to the stream to be encrypted / decrypted from the key data held in the The encryption / decryption process is performed using the flag determination unit that determines the flag information included in the key data, the calculation data selected by the input channel selection unit, and the determination result of the flag determination unit. A calculation unit to perform, a flag adding unit for adding a flag to the output key data output from the calculation unit, using a result of determination by the flag determination unit, and output at the end of the calculation by the calculation unit An output channel selection unit that outputs the output data and the output key data to which the flag output from the flag addition unit is assigned by selecting the same channel as the channel selected by the input channel selection unit; and the input channel A channel control unit that sends an instruction of the selected channel to the selection unit and the output channel selection unit.

前記鍵データ保持部に保持する鍵データは、暗号を行うときは共通鍵に、暗号処理を示すフラグを付与したものとし、復号を行うときは復号鍵(共通鍵から作成される拡大鍵の後ろからNk個を復号鍵と定義する。Nkの値は共通鍵と復号鍵のビット数が同じになるように決める)に、復号処理を示すためのフラグを付与したものとする。   The key data held in the key data holding unit is assumed to have a flag indicating encryption processing added to a common key when performing encryption, and a decryption key (after the extended key created from the common key) when performing decryption. Nk is defined as a decryption key (the value of Nk is determined so that the number of bits of the common key and the decryption key is the same) and a flag for indicating the decryption process is given.

前記演算部では、鍵データ内のフラグを判定した結果と、フラグを除いたデータ、すなわち暗号のときは共通鍵を、復号のときは復号鍵を使って暗号または復号を行う。   The calculation unit performs encryption or decryption using the result of determining the flag in the key data and the data excluding the flag, that is, the common key for encryption and the decryption key for decryption.

以上のように本発明によれば、1つの暗号回路を使い複数のストリームに対して時分割で暗号または復号の処理を行うことができる。   As described above, according to the present invention, encryption or decryption processing can be performed on a plurality of streams in a time division manner using a single encryption circuit.

また、復号時には復号鍵が暗号回路に与えられるので、復号鍵演算のために演算性能が低下することはなく、図13のように復号鍵保持部304を持って暗号回路内で復号鍵を保持する必要もないため、そのぶんだけ回路規模を小さくすることができる。   Further, since the decryption key is given to the encryption circuit at the time of decryption, the computation performance is not deteriorated for the decryption key computation, and the decryption key is held in the encryption circuit with the decryption key holding unit 304 as shown in FIG. Therefore, the circuit scale can be reduced by that much.

(実施の形態1)
図1は、本発明の実施の形態1における暗復号処理装置のブロック図である。
(Embodiment 1)
FIG. 1 is a block diagram of an encryption / decryption processing apparatus according to Embodiment 1 of the present invention.

また、図2は図1に示す暗復号処理装置を使った構成例である。   FIG. 2 is a configuration example using the encryption / decryption processing apparatus shown in FIG.

まず、図2を参照して暗復号処理装置をどのように使うのか説明する。   First, how to use the encryption / decryption processing apparatus will be described with reference to FIG.

図2では、暗復号処理を行うストリームは、通信制御装置30を通ってネットワーク経由で与えられたり、HDD50から与えられたりする。   In FIG. 2, the stream for performing the encryption / decryption process is given via the network through the communication control device 30 or given from the HDD 50.

これらのストリームは一度バッファ10に置かれ、128ビットずつ順番に暗復号処理装置02に入力される。   These streams are once placed in the buffer 10 and input to the encryption / decryption processing device 02 in order of 128 bits.

暗復号処理装置02で暗号または復号の処理を行ったデータは、再度バッファ10に置かれる。   Data that has been encrypted or decrypted by the encryption / decryption processing device 02 is placed in the buffer 10 again.

バッファ10に置かれた暗復号処理済みのストリームデータは、デコーダ60を通してTV70へ出力されたり、HDD50に出力されたり、通信制御装置30を通ってネットワーク上に送信されたりする。   The encrypted / decrypted stream data placed in the buffer 10 is output to the TV 70 through the decoder 60, output to the HDD 50, or transmitted to the network through the communication control device 30.

プロセッサ20は、内部バス01上で転送されるデータの制御や、暗復号処理装置02の制御(鍵の設定などの処理)を行う。   The processor 20 performs control of data transferred on the internal bus 01 and control of the encryption / decryption processing device 02 (processing such as key setting).

図2の構成では、例えばネットワーク経由で送信されたコンテンツと、HDDに蓄積されたコンテンツ(ともにAES暗号で暗号されている)の同時再生を行うときに、暗復号処理装置02で2つのストリームに対して時分割に復号を行う。   In the configuration of FIG. 2, for example, when the content transmitted via the network and the content stored in the HDD (both encrypted with the AES cipher) are simultaneously reproduced, the encryption / decryption processing device 02 generates two streams. On the other hand, decoding is performed in a time division manner.

次に、図1を参照して暗復号処理装置02の詳細を説明する。   Next, details of the encryption / decryption processing device 02 will be described with reference to FIG.

暗復号処理装置02は、入力制御部600、チャネル制御部601、演算制御部611、入力チャネル選択部511、フラグ判定部521、演算部531、フラグ付与部551、出力チャネル選択部541の8つから構成される。   The encryption / decryption processing device 02 includes eight units: an input control unit 600, a channel control unit 601, an operation control unit 611, an input channel selection unit 511, a flag determination unit 521, an operation unit 531, a flag assignment unit 551, and an output channel selection unit 541. Consists of

暗復号処理装置02では、暗復号に用いる鍵は図3のように、暗号時には共通鍵に、復号時には復号鍵に、暗復号どちらを行うか示すフラグを付与したものを用いる。   In the encryption / decryption processing device 02, as shown in FIG. 3, a key used for encryption / decryption is assigned a common key for encryption and a decryption key with a flag indicating whether encryption / decryption is performed.

そこで、下記のような鍵の運用を行う。   Therefore, the following key operations are performed.

背景技術の項で説明したように、暗号処理中に全ての拡大鍵は1度は求められる。   As explained in the background section, all the expanded keys are obtained once during the encryption process.

そのため、共通鍵を用いて暗号処理を行う途中で復号鍵を、復号鍵を用いて復号処理を行う途中で共通鍵を求めることができる。   Therefore, a decryption key can be obtained in the middle of performing the encryption process using the common key, and a common key can be obtained in the middle of performing the decryption process using the decryption key.

これを利用して、暗号文にはその暗号処理を行うときに求められた復号鍵に復号を示すフラグを付与した鍵を持たせ、逆に暗号されていない平文には共通鍵に暗号を示すフラグを付与した鍵を持たせるという運用を行う。   Utilizing this, the ciphertext has a key with a decryption flag added to the decryption key obtained when performing the encryption processing, and conversely, the plaintext that is not encrypted indicates the cipher in the common key An operation is performed in which a key with a flag is given.

入力制御部600は、演算データを保持する演算データ保持部501と、鍵データを保持する鍵データ保持部502を持ち、同じものがN個存在する(Nは、暗復号処理装置02が時分割に暗復号処理を行えるストリーム数の上限で、2以上の整数)。   The input control unit 600 has a calculation data holding unit 501 that holds calculation data and a key data holding unit 502 that holds key data, and there are N same ones (N is the time-division processing by the encryption / decryption processing device 02). The upper limit of the number of streams that can perform encryption / decryption processing is an integer of 2 or more.

図1では、ch0の入力制御部を600a、ch1の入力制御部を600bとしているが、これらは同じものである。   In FIG. 1, the input controller for ch0 is 600a and the input controller for ch1 is 600b, which are the same.

ここで、演算データとはストリームを暗復号単位である128ビットずつ分割したデータのことで、暗復号処理を行うたびに順次設定される。   Here, the operation data is data obtained by dividing the stream by 128 bits, which is an encryption / decryption unit, and is sequentially set every time encryption / decryption processing is performed.

また、鍵データとは図3のように、暗号時には共通鍵に、復号時には復号鍵に、暗復号どちらを行うか示すフラグを付与したものである。   Further, as shown in FIG. 3, the key data is obtained by adding a flag indicating which encryption / decryption is performed to the common key during encryption and to the decryption key during decryption.

この鍵データは暗復号処理を行う前に一度だけ設定し(図2の例ならプロセッサが設定)、以後ストリームの暗復号が終わるまで鍵データ保持部502に保持し続ける。   This key data is set only once before performing the encryption / decryption processing (set by the processor in the example of FIG. 2), and thereafter held in the key data holding unit 502 until the encryption / decryption of the stream is completed.

入力制御部600は、チャネル制御部601と信号のやりとりを行う。   The input control unit 600 exchanges signals with the channel control unit 601.

入力制御部600から出力する信号は演算要求信号で、この信号は演算データと鍵データの両方が設定されていて演算の準備が出来ているときに出力する。   The signal output from the input control unit 600 is an operation request signal, and this signal is output when both operation data and key data are set and the operation is ready.

チャネル制御部601から出力する信号はデータ使用信号で、この信号は演算データが使用されたとき(演算部531に演算データが入力されたとき)、演算データを使用したチャネルの入力制御部600に出力される。   The signal output from the channel control unit 601 is a data use signal. This signal is used when the calculation data is used (when calculation data is input to the calculation unit 531), to the input control unit 600 of the channel using the calculation data. Is output.

チャネル制御部601は、暗復号処理を行うチャネルを制御する。   The channel control unit 601 controls a channel for performing encryption / decryption processing.

そのために、入力チャネル選択部511と出力チャネル選択部541に演算チャネルを選択するための選択信号を出力する。   For this purpose, a selection signal for selecting a computation channel is output to the input channel selection unit 511 and the output channel selection unit 541.

また、演算可能なチャネルがあるときは演算制御部611に演算要求信号を出力し、演算制御部611からは演算部531で演算が開始したときと終了したときにそれぞれ演算開始信号と演算終了信号を受け取る。   In addition, when there is a channel that can be calculated, a calculation request signal is output to the calculation control unit 611, and the calculation control unit 611 outputs a calculation start signal and a calculation end signal, respectively, when the calculation starts and ends at the calculation unit 531. Receive.

入力チャネル選択部511は、入力制御部600から出力される各チャネルの演算データと鍵データの中から、選択信号を用いて特定のチャネルの演算データと鍵データを選択して、演算データは演算部531に、鍵データはフラグ判定部521に出力する。   The input channel selection unit 511 selects calculation data and key data of a specific channel from the calculation data and key data of each channel output from the input control unit 600, and the calculation data is calculated. The key data is output to the flag determination unit 521 in the unit 531.

フラグ判定部521は、鍵データ内のフラグの値から暗号を行うのか復号を行うのかを判断し、演算部531に暗号か復号かを指示するための暗号モード指示信号を出力する。   The flag determination unit 521 determines whether to perform encryption or decryption from the flag value in the key data, and outputs an encryption mode instruction signal for instructing the arithmetic unit 531 to perform encryption or decryption.

また、フラグを除いた鍵データを演算部531に出力する。   Further, the key data excluding the flag is output to the calculation unit 531.

演算制御部611は、チャネル制御部601から演算要求信号を受けて、演算部531に演算指令信号を出して演算の指示を行う。   The calculation control unit 611 receives the calculation request signal from the channel control unit 601, issues a calculation command signal to the calculation unit 531, and instructs the calculation.

演算部531は、暗復号処理を実行し、その結果を出力データとして出力チャネル選択部541に出力する。   The arithmetic unit 531 executes the encryption / decryption process, and outputs the result to the output channel selection unit 541 as output data.

図4は演算部531を示すブロック図である。   FIG. 4 is a block diagram showing the calculation unit 531.

図13とほぼ同じ構成をしているが、大きな違いは図13の復号鍵保持部304がないことと、300のブロックに入力される鍵データが復号時は復号鍵であることである。   Although the configuration is almost the same as that in FIG. 13, the major difference is that there is no decryption key holding unit 304 in FIG. 13 and that the key data input to the block 300 is a decryption key at the time of decryption.

図4では、暗号回路はラウンド演算やEXORを行う200のブロックと、拡大鍵スケジュールを行う300のブロックと制御部500から構成される。   In FIG. 4, the encryption circuit includes 200 blocks that perform round operation and EXOR, 300 blocks that perform an extended key schedule, and a control unit 500.

200のブロックでは以下の処理が行われる。   In the block of 200, the following processing is performed.

はじめに、演算データをセレクタ部201で選択して、EXOR部202で拡大鍵との1回目のEXORを行い中間値保持部203に保持する。   First, the operation data is selected by the selector unit 201, and the EXOR unit 202 performs the first EXOR with the expanded key and holds it in the intermediate value holding unit 203.

次に、中間値保持部203に保持された値をラウンド演算部205でラウンド演算して、セレクタ部201で選択して、EXOR部202で拡大鍵とのEXORを行い、再び中間値保持部203に保持するという処理をNr回繰り返す。   Next, the value held in the intermediate value holding unit 203 is rounded by the round calculating unit 205, selected by the selector unit 201, EXORed with the expanded key by the EXOR unit 202, and again the intermediate value holding unit 203. Is held Nr times.

最後に、中間値保持部203に保持している演算結果を出力データとして出力する。   Finally, the calculation result held in the intermediate value holding unit 203 is output as output data.

300のブロックでは以下の処理が行われる。   In the block of 300, the following processing is performed.

はじめに、鍵データをセレクタ部301で選択して、拡大鍵保持部303に保持する。   First, key data is selected by the selector unit 301 and held in the expanded key holding unit 303.

次に、200のブロックで必要となる拡大鍵を作成するために、必要に応じて、拡大鍵保持部303に保持された値を拡大鍵演算部305で演算して、セレクタ部301で選択して、再び拡大鍵保持部303に保持する。   Next, in order to create an extended key necessary for the 200 blocks, the value held in the extended key holding unit 303 is calculated by the extended key calculating unit 305 and selected by the selector unit 301 as necessary. Then, it is held in the expanded key holding unit 303 again.

制御部500では、暗号モード指示信号をもとに暗号または復号のいずれかの判断を行い、また演算指令信号を受け演算を開始して200と300のブロックに制御信号を送る。   The control unit 500 determines whether to perform encryption or decryption based on the encryption mode instruction signal, receives an operation command signal, starts operation, and sends a control signal to the blocks 200 and 300.

200と300のブロックでは、暗号時も復号時も同様の処理が行われるが、ラウンド演算部205と拡大鍵演算部305での演算は逆向きになる。   In the blocks 200 and 300, the same processing is performed during encryption and decryption, but the calculations in the round calculation unit 205 and the extended key calculation unit 305 are reversed.

暗号時は、拡大鍵保持部303に最初は共通鍵が保持され、順番に拡大鍵演算を実行し、最後には復号鍵が保持される。   At the time of encryption, the common key is first held in the extended key holding unit 303, the extended key calculation is executed in order, and finally the decryption key is held.

復号時は、逆に最後には共通鍵が保持される。   At the time of decryption, the common key is held last.

このデータを出力鍵データとして出力データとともに出力する。   This data is output together with the output data as output key data.

フラグ付与部551は、演算部531から出力鍵データを受け取り、これにフラグを付与する。   The flag assigning unit 551 receives the output key data from the computing unit 531 and assigns a flag thereto.

このとき、暗復号モード指示信号が暗号の場合は、出力鍵データとして復号鍵を受け取るので復号を示すフラグを、暗復号モード指示信号が復号の場合は、暗号を示すフラグを付与する。   At this time, if the encryption / decryption mode instruction signal is encryption, a decryption key is received as output key data, so that a flag indicating decryption is given. If the encryption / decryption mode instruction signal is decryption, a flag indicating encryption is assigned.

フラグを付与した出力鍵データは出力チャネル選択部541に出力される。   The output key data to which the flag is added is output to the output channel selection unit 541.

出力チャネル選択部541は、選択信号を用いて出力データと出力鍵データを特定のチャネルから出力する。   The output channel selection unit 541 outputs output data and output key data from a specific channel using the selection signal.

本発明の実施の形態1では、ストリームの暗復号処理は以下のような流れで行われる。   In the first embodiment of the present invention, the encryption / decryption processing of the stream is performed in the following flow.

最初に、暗復号処理を行うチャネルの入力制御部600に鍵を設定する。   First, a key is set in the input control unit 600 of the channel that performs encryption / decryption processing.

次に、処理をするストリームの演算データを先頭から128ビットずつ、暗復号処理を行うチャネルの入力制御部600に入力する。   Next, the operation data of the stream to be processed is input 128 bits at a time from the head to the input control unit 600 of the channel that performs the encryption / decryption process.

入力制御部600に入力した演算データが、演算部531で暗復号処理に使用されると、チャネル制御部601からデータ使用信号が送られてくるので、その信号を受けたら再び128ビットの演算データを入力制御部600に入力する。   When the calculation data input to the input control unit 600 is used for the encryption / decryption processing by the calculation unit 531, a data use signal is sent from the channel control unit 601, and when the signal is received, 128-bit calculation data is again received. Is input to the input control unit 600.

この処理は演算するデータがなくなるまで繰り返す。   This process is repeated until there is no more data to calculate.

入力制御部600に入力された演算データと鍵データは、入力チャネル選択部511で選択され、それぞれ演算部531とフラグ判定部521に送られる。   The calculation data and key data input to the input control unit 600 are selected by the input channel selection unit 511 and sent to the calculation unit 531 and the flag determination unit 521, respectively.

フラグ判定部521では、鍵データ内のフラグから暗号モード指示信号を生成し演算部531に送る。   The flag determination unit 521 generates an encryption mode instruction signal from the flag in the key data and sends it to the calculation unit 531.

また、フラグを除いた鍵データも演算部531に送る。   Further, the key data excluding the flag is also sent to the calculation unit 531.

演算部531では、演算制御部611から演算指令信号を受けると、送られてきた演算データと暗号モード指示信号と鍵データ(フラグを除く)を使い演算を実行して、その結果を出力データとして出力チャネル選択部541に送る。   Upon receiving the calculation command signal from the calculation control unit 611, the calculation unit 531 performs a calculation using the sent calculation data, encryption mode instruction signal, and key data (except for the flag), and uses the result as output data. The data is sent to the output channel selection unit 541.

また、演算部531は出力データとともに出力鍵データも出力する。   The computing unit 531 also outputs output key data together with the output data.

出力鍵データはフラグ付与部551でフラグを付与され、出力チャネル選択部541に送られる。   The output key data is given a flag by the flag assigning unit 551 and sent to the output channel selecting unit 541.

出力チャネル選択部541では、チャネル制御部601から送られる選択信号をもとに、入力チャネル選択部511で選択したチャネルから出力データと出力鍵データを出力する。   The output channel selection unit 541 outputs output data and output key data from the channel selected by the input channel selection unit 511 based on the selection signal sent from the channel control unit 601.

なお、出力鍵データは毎回同じデータになるので、暗復号処理の最初や最後などに1回受け取ればよい。   Since the output key data is the same data every time, it may be received once at the beginning or end of the encryption / decryption process.

本発明の実施の形態1では暗復号処理は、入力制御部600とチャネル制御部601と演算制御部611で制御される。図5〜7に、それぞれの制御部のフローチャートを示す。   In the first embodiment of the present invention, the encryption / decryption process is controlled by the input control unit 600, the channel control unit 601, and the arithmetic control unit 611. 5 to 7 show flowcharts of the respective control units.

図5は入力制御部600で行われる処理のフローチャートを示したものである。   FIG. 5 shows a flowchart of processing performed by the input control unit 600.

入力制御部600はチャネルごとにあって、それぞれが独立に以下の処理を行う。   The input control unit 600 is provided for each channel, and each performs the following processing independently.

まず、ステップS100に示すように、プロセッサなどにより鍵データ保持部502に鍵が設定されるのを待つ。   First, as shown in step S100, the process waits for a key to be set in the key data holding unit 502 by a processor or the like.

次に、ステップS110に示すように、演算データ保持部501に演算データが入力されるのを待つ。   Next, as shown in step S <b> 110, the process waits for calculation data to be input to the calculation data holding unit 501.

演算データが入力されたら、ステップS120とステップS130に示す処理を行う。   When the calculation data is input, the processes shown in step S120 and step S130 are performed.

すなわち、次の演算データの入力の禁止処理を行い、チャネル制御部601に演算要求信号を送る。   That is, the next computation data input prohibition process is performed, and a computation request signal is sent to the channel controller 601.

そして、ステップS140に示すように、チャネル制御部601からデータ使用信号が送られてくるのを待つ。   Then, as shown in step S140, it waits for a data use signal to be sent from the channel controller 601.

データ使用信号が送られてきたら、ステップS150に示すように、演算データの入力禁止の解除を行い、ステップS160に示すように、暗復号処理を行う演算データが残っていなければ処理を終了し、残っていればステップS110に戻り前記の処理を繰り返す。   When the data use signal is sent, as shown in step S150, the input prohibition of the operation data is canceled, and as shown in step S160, if there is no operation data for performing the encryption / decryption process, the process is terminated. If it remains, it returns to step S110 and repeats the said process.

図6はチャネル制御部601で行われる処理のフローチャートを示したものである。   FIG. 6 shows a flowchart of processing performed by the channel control unit 601.

まず、ステップS200に示すように、いずれかのチャネルの入力制御部600から演算要求信号が出されるのを待つ。   First, as shown in step S200, it waits for an operation request signal to be issued from the input control unit 600 of any channel.

次に、ステップS210に示すように、演算要求信号が出されているチャネルが複数であるか判定して、複数ならば、ステップS220の優先度判定処理で、演算要求信号が出されているチャネルの中で最も優先度が高いチャネルを判定する。   Next, as shown in step S210, it is determined whether there are a plurality of channels for which calculation request signals are output. If there are a plurality of channels, the channels for which calculation request signals are output in the priority determination processing in step S220. The channel with the highest priority is determined.

優先度の決め方は、例えばより早く演算要求信号が送られてきたチャネルほど高くするといった方法で行う。   The priority is determined by, for example, a method of increasing the channel for which the calculation request signal has been sent earlier.

次に、ステップS230に示すように、演算要求信号が出されているチャネル(複数あるときにはステップS220で判定されたチャネル)を選択するように、入力チャネル選択部511と出力チャネル選択部541に選択信号を出す。   Next, as shown in step S230, the input channel selection unit 511 and the output channel selection unit 541 are selected so as to select the channel (the channel determined in step S220 when there are multiple channels) from which the calculation request signal is issued. Give a signal.

次に、演算要求信号を演算制御部611に出すステップS240の処理を行い、ステップS250に示すように、演算制御部611から演算開始信号が送られてくるのを待つ。   Next, the process of step S240 for outputting the calculation request signal to the calculation control unit 611 is performed, and the process waits for a calculation start signal sent from the calculation control unit 611 as shown in step S250.

次に、ステップS230で選択したチャネルの入力制御部600に、データ使用信号を出すステップS260の処理を行い、演算制御部611から演算終了信号が送られてくるのを待つ。   Next, the process of step S260 for outputting a data use signal is performed to the input control unit 600 of the channel selected in step S230, and the process waits for an operation end signal to be sent from the operation control unit 611.

演算終了信号が送られてきたら、ステップS200に戻り前記の処理を繰り返す。   When the calculation end signal is sent, the process returns to step S200 and the above processing is repeated.

図7は演算制御部611で行われる処理のフローチャートを示したものである。   FIG. 7 shows a flowchart of processing performed by the arithmetic control unit 611.

まず、ステップS300に示すように、チャネル制御部601から演算要求信号が出されるのを待つ。   First, as shown in step S300, it waits for an operation request signal to be issued from the channel control unit 601.

次に、ステップS310とステップS320に示す処理を行う。   Next, the processes shown in step S310 and step S320 are performed.

すなわち、演算部531に演算指令信号を送り、チャネル制御部601に演算開始信号を送る。   That is, a calculation command signal is sent to the calculation unit 531 and a calculation start signal is sent to the channel control unit 601.

次に、ステップS330に示すように、演算部531の演算サイクルだけ待ち、ステップS340のチャネル制御部601に演算終了信号を送る処理をする。   Next, as shown in step S330, the process waits for the calculation cycle of the calculation unit 531 and performs a process of sending a calculation end signal to the channel control unit 601 in step S340.

そして、ステップ300に戻り前記の処理を繰り返す。   Then, the process returns to step 300 and the above processing is repeated.

図8は上述した各制御部における制御の一例を示したものである。   FIG. 8 shows an example of control in each control unit described above.

図8では、ch0とch1の2つのチャネルで暗復号処理を行っており、900のタイミングでch0に、901のタイミングでch1に、演算データが入力されている。   In FIG. 8, encryption / decryption processing is performed on two channels, ch0 and ch1, and operation data is input to ch0 at timing 900 and to ch1 at timing 901.

図8に示されている制御の流れを以下に示す。   The control flow shown in FIG. 8 is shown below.

まず、900でch0に演算データが入力される。   First, at 900, operation data is input to ch0.

900での演算データ入力を受けて、ch0の入力制御部600aは、チャネル制御部601に演算要求信号を送る(図5のステップS130)。   Upon receiving the operation data input at 900, the ch0 input control unit 600a sends an operation request signal to the channel control unit 601 (step S130 in FIG. 5).

910で演算要求信号を受けたチャネル制御部601は、演算制御部611に演算要求信号を送る(図6のステップS240)。   Upon receiving the calculation request signal in 910, the channel control unit 601 sends the calculation request signal to the calculation control unit 611 (step S240 in FIG. 6).

920で演算要求信号を受けた演算制御部611は、演算部531に演算指令信号を、チャネル制御部601に演算開始信号を送り、演算部531の演算サイクルが終わるまで待つ(図7のステップS310、320)。   Upon receiving the calculation request signal in 920, the calculation control unit 611 sends a calculation command signal to the calculation unit 531 and a calculation start signal to the channel control unit 601, and waits until the calculation cycle of the calculation unit 531 ends (step S310 in FIG. 7). 320).

930で演算指令信号を受けた演算部531は、ch0の演算を開始する。   Receiving the calculation command signal in 930, the calculation unit 531 starts calculation of ch0.

また、940で演算開始信号を受けたチャネル制御部601は、ch0の入力制御部600aにデータ使用信号を送る(図6のステップS260)。   Further, the channel control unit 601 that has received the calculation start signal in 940 sends a data use signal to the input control unit 600a of ch0 (step S260 in FIG. 6).

950でデータ使用信号を受けたch0の入力制御部600aは、再び演算データ入力待ちの状態に戻る(図5のステップS110)。   Receiving the data use signal at 950, the ch0 input control unit 600a returns to the state of waiting for the calculation data input again (step S110 in FIG. 5).

960で演算サイクル待ちの処理が終わった演算制御部611は、チャネル制御部601に演算終了信号を送る(図7のステップS340)。   The computation control unit 611 that has completed the computation cycle waiting process in 960 sends a computation end signal to the channel control unit 601 (step S340 in FIG. 7).

970で演算が終了した演算部531は、出力データを出力する。   The computing unit 531 that has finished computation in 970 outputs output data.

以上で、900でch0に入力されたデータに対する処理は終了する。   This completes the processing for the data input to ch0 in 900.

図8では、901でch1へも演算データが入力される。   In FIG. 8, operation data is also input to ch1 in 901.

901での演算データ入力を受けて、ch1の入力制御部600bは、チャネル制御部601に演算要求信号を送る(図5のステップS130)。   In response to the calculation data input in 901, the ch1 input control unit 600b sends a calculation request signal to the channel control unit 601 (step S130 in FIG. 5).

980で演算要求信号を受けたチャネル制御部601は、演算制御部611から演算終了信号が送られているのを待っている状態なので、990で演算終了信号を受けるまで待ってから、演算制御部611に演算要求信号を送る(図6のステップS240)。   The channel control unit 601 that has received the calculation request signal in 980 is in a state of waiting for the calculation end signal being sent from the calculation control unit 611. Therefore, after waiting for the calculation end signal in 990, the calculation control unit An operation request signal is sent to 611 (step S240 in FIG. 6).

それ以降はch0と同様にch1の演算に対する制御を行う。   After that, the control for the calculation of ch1 is performed in the same manner as ch0.

以上のように、実施の形態1における暗復号処理装置は、入力制御部600とチャネル制御部601と演算制御部611を用いて、複数チャネルのストリームの暗号または復号を時分割で行う。   As described above, the encryption / decryption processing apparatus according to Embodiment 1 uses the input control unit 600, the channel control unit 601, and the calculation control unit 611 to perform encryption or decryption of a stream of a plurality of channels in a time division manner.

また、暗号文には復号鍵+復号を示すフラグを、暗号されていない平文には共通鍵+暗号を示すフラグを持たせるような鍵の運用を行い、鍵のフラグを値から暗号モードを判定するフラグ判定部521と、暗号時には共通鍵を復号時には復号鍵を鍵に用いる演算部531を持つことにより、暗号または復号を行うチャネルが頻繁に変わる場合も性能を低下させずに処理を行うことが可能となる。   Also, operate the key so that the ciphertext has a decryption key + decryption flag, and the unencrypted plaintext has a common key + encryption flag, and determine the encryption mode from the key flag value. By having a flag determination unit 521 for performing encryption and a calculation unit 531 that uses a common key for encryption and a decryption key for decryption, processing can be performed without degrading performance even when a channel for encryption or decryption frequently changes. Is possible.

本発明の暗復号処理装置によれば、複数ストリームに対し、同時にかつ高速に暗号または復号を行うことができる。   According to the encryption / decryption processing apparatus of the present invention, encryption or decryption can be performed simultaneously and at high speed on a plurality of streams.

AES暗号方式は、今後普及が見込まれている暗号方式であり、AESで暗復号されたデータの再生や録画、HDDや光ディスクやその他のスマートメディアとの転送、ネットワーク経由の受送信などの処理を同時に行うときに本発明は有用である。   The AES encryption method is an encryption method that is expected to become popular in the future, and performs processing such as playback and recording of data encrypted / decrypted with AES, transfer to HDDs, optical discs and other smart media, and transmission / reception via a network. The present invention is useful when done simultaneously.

本発明の実施の形態1における暗復号処理装置のブロック図The block diagram of the encryption / decryption processing apparatus in Embodiment 1 of this invention 本発明の実施の形態1における暗復号処理装置を用いた構成図の一例を示す図The figure which shows an example of the block diagram using the encryption / decryption processing apparatus in Embodiment 1 of this invention. 本発明の実施の形態1における鍵データの構造を示す図The figure which shows the structure of the key data in Embodiment 1 of this invention 本発明の実施の形態1における演算部のブロック図The block diagram of the calculating part in Embodiment 1 of this invention 本発明の実施の形態1における入力制御部のフローチャートThe flowchart of the input control part in Embodiment 1 of this invention 本発明の実施の形態1におけるチャネル制御部のフローチャートFlowchart of channel control unit in Embodiment 1 of the present invention 本発明の実施の形態1における演算制御部のフローチャートFlowchart of calculation control unit in Embodiment 1 of the present invention 本発明の実施の形態1における各制御部の制御の一例を示す図The figure which shows an example of control of each control part in Embodiment 1 of this invention AES暗号方式のアルゴリズムを示す図Diagram showing AES encryption algorithm AES暗号方式におけるNrとNkの値を示す図The figure which shows the value of Nr and Nk in an AES encryption system 拡大鍵の求める方法を示す図Diagram showing how to obtain an expanded key 拡大鍵を逆順で求める方法を示す図Diagram showing how to find extended keys in reverse order 従来のAES暗号回路を示す図The figure which shows the conventional AES encryption circuit 特許文献1の演算サイクルを示す図The figure which shows the calculation cycle of patent document 1

符号の説明Explanation of symbols

201 セレクタ部
202 EXOR部
203 中間値保持部
205 ラウンド演算部
301 セレクタ部
303 拡大鍵保持部
304 復号鍵保持部
305 拡大鍵演算部
400 制御部
501a 演算データ保持部(ch0)
502a 鍵データ保持部(ch0)
511 入力チャネル選択部
521 フラグ判定部
531 演算部
541 出力チャネル選択部
551 フラグ付与部
600a 入力制御部(ch0)
600b 入力制御部(ch1)
600c 入力制御部(ch2)
601 チャネル制御部
611 演算制御部
DESCRIPTION OF SYMBOLS 201 Selector part 202 EXOR part 203 Intermediate value holding | maintenance part 205 Round calculating part 301 Selector part 303 Extended key holding part 304 Decryption key holding part 305 Extended key calculating part 400 Control part 501a Calculation data holding part (ch0)
502a Key data holding unit (ch0)
511 Input channel selection unit 521 Flag determination unit 531 Operation unit 541 Output channel selection unit 551 Flag assignment unit 600a Input control unit (ch0)
600b Input control unit (ch1)
600c Input control unit (ch2)
601 Channel control unit 611 Operation control unit

Claims (9)

N個(Nは2以上の任意の整数)のストリームに対して、時分割に暗号または復号の処理を行う暗復号処理装置であって、
N個のストリームに対応したch0〜chN−1のN個のチャネルを持ち、
一演算単位ずつ入力される前記ストリームのデータである演算データを保持する演算データ保持部と、
前記ストリームの暗号または復号を行うために設定される鍵データを保持する鍵データ保持部と、
前記演算データ保持部と鍵データ保持部へのデータ入力を各チャネル毎に制御するための入力制御部と、
前記演算データ保持部に保持された演算データと前記鍵データ保持部に保持された鍵データの中から、暗復号処理を行うストリームに対応したチャネルのデータを選択する入力チャネル選択部と、
前記入力チャネル選択部で選択された鍵データに含まれるフラグ情報の判定を行うフラグ判定部と、
前記入力チャネル選択部で選択された演算データと、前記フラグ判定部で判定を行った結果を用いて、暗号または復号の処理を行う演算部と、
前記演算部から出力された出力鍵データに、前記フラグ判定部で判定を行った結果を用いてフラグの付与を行うフラグ付与部と、
前記演算部で演算終了時に出力される出力データと、前記フラグ付与部から出力されるフラグが付与された出力鍵データを、前記入力チャネル選択部で選択したチャネルと同じチャネルを選択して出力を行う出力チャネル選択部と、
前記入力チャネル選択部と出力チャネル選択部に選択チャネルの指示を送るチャネル制御部とを、
備えたことを特徴とする暗復号処理装置。
An encryption / decryption processing device that performs encryption or decryption processing in a time-sharing manner on N (N is an arbitrary integer greater than or equal to 2) streams,
It has N channels of ch0 to chN-1 corresponding to N streams,
A calculation data holding unit that holds calculation data that is data of the stream input by one calculation unit;
A key data holding unit that holds key data set to perform encryption or decryption of the stream;
An input control unit for controlling data input to the calculation data holding unit and the key data holding unit for each channel;
An input channel selection unit that selects data of a channel corresponding to a stream to be encrypted / decrypted from among the calculation data held in the calculation data holding unit and the key data held in the key data holding unit;
A flag determination unit for determining flag information included in the key data selected by the input channel selection unit;
A calculation unit that performs encryption or decryption using the calculation data selected by the input channel selection unit and the result of determination by the flag determination unit;
A flag assigning unit that assigns a flag to the output key data output from the arithmetic unit using a result of the determination performed by the flag determining unit;
Select the same channel as the channel selected by the input channel selection unit and output the output data output at the end of the calculation by the calculation unit and the output key data to which the flag output from the flag addition unit is output. An output channel selector to perform,
A channel controller that sends an instruction of a selected channel to the input channel selector and the output channel selector;
An encryption / decryption processing apparatus comprising:
前記入力制御部は、更に、
前記演算データ保持部に演算データが保持され、前記鍵データ保持部に鍵データが設定されている演算可能な状態であるか識別する演算状態識別手段と、
前記演算データ保持部に演算データを入力可能な状態であるか判断する演算データ入力判断手段とを備えたことを特徴とする請求項1に記載の暗復号処理装置。
The input control unit further includes:
Calculation state identifying means for identifying whether the calculation data is held in the calculation data holding unit and the key data is set in the key data holding unit and is in an operable state;
2. The encryption / decryption processing apparatus according to claim 1, further comprising calculation data input determination means for determining whether calculation data can be input to the calculation data holding unit.
前記チャネル制御部は、更に、
各チャネルの優先順位を決定するチャネル優先順位決定手段と、
前記演算部での演算処理が1回終了するごとに、前記チャネル優先順位決定手段を用いて次に演算を行うチャネルを選択するチャネル選択手段とを備えたことを特徴とする請求項1又は請求項2に記載の暗復号処理装置。
The channel control unit further includes:
Channel priority determining means for determining the priority of each channel;
2. A channel selection unit that selects a channel to perform a next calculation using the channel priority determination unit each time the calculation process in the calculation unit is completed once. Item 3. The encryption / decryption processing device according to Item 2.
共通鍵から作成される拡大鍵の後ろからNk個(Nkは共通鍵と同じビット数)を復号鍵と定義するとき、
前記鍵データ保持部に保持する鍵データは、
暗号を行うときは共通鍵に、暗号処理を示すフラグを付与したものとし、
復号を行うときは復号鍵に、
復号処理を示すフラグを付与したものとすることを特徴とする請求項1〜請求項3のいずれか1項に記載の暗復号処理装置。
When Nk pieces (Nk is the same number of bits as the common key) from the back of the extended key created from the common key are defined as decryption keys,
The key data held in the key data holding unit is
When performing encryption, it is assumed that a flag indicating encryption processing is added to the common key,
When decrypting, use the decryption key
The encryption / decryption processing apparatus according to any one of claims 1 to 3, wherein a flag indicating a decoding process is added.
前記鍵データから、
フラグと共通鍵または復号鍵とを分割する鍵データ分割手段と、
前記鍵データ分割手段により分割されたフラグより暗号または復号のどちらを行うか判定するフラグ判定手段とを、
さらに備えたことを特徴とする請求項4に記載の暗復号処理装置。
From the key data,
Key data dividing means for dividing the flag and the common key or the decryption key;
Flag determining means for determining whether to perform encryption or decryption from the flag divided by the key data dividing means;
The encryption / decryption processing apparatus according to claim 4, further comprising:
前記演算部は、
前記フラグ判定手段で判定した情報をもとに、
前記鍵データ分割手段により分割された共通鍵または復号鍵を用いて暗号または復号の演算を行い、
共通鍵を使い暗号を行ったときには復号鍵を、
復号鍵を使い復号を行ったときには暗号鍵を
演算結果とともに出力することを特徴とする請求項5に記載の暗復号処理装置。
The computing unit is
Based on the information determined by the flag determination means,
Performing encryption or decryption using the common key or decryption key divided by the key data dividing means,
When performing encryption using a common key,
6. The encryption / decryption processing apparatus according to claim 5, wherein when the decryption is performed using the decryption key, the encryption key is output together with the operation result.
前記ストリームの暗復号方式は、
鍵長が128ビット又は192ビット又は256ビットのAES暗号であることを特徴とする請求項5に記載の暗復号処理装置。
The encryption / decryption method of the stream is:
6. The encryption / decryption processing apparatus according to claim 5, wherein the key length is 128 bits, 192 bits, or 256 bits of AES encryption.
N個(Nは2以上の任意の整数)のストリームに対して、時分割に暗号または復号の処理を行う暗復号処理方法であって、
N個のストリームに対応したch0〜chN−1のN個のチャネルを持ち、
一演算単位ずつ入力される前記ストリームのデータである演算データを保持する演算データ保持ステップと、
前記ストリームの暗号または復号を行うために設定される鍵データを保持する鍵データ保持ステップと、
前記演算データ保持ステップで保持された演算データと前記鍵データ保持ステップで保持された鍵データの中から、暗復号処理を行うストリームに対応したチャネルのデータを選択する入力チャネル選択ステップと、
前記入力チャネル選択ステップで選択された鍵データに含まれるフラグ情報の判定を行うフラグ判定ステップと、
前記入力チャネル選択ステップで選択された演算データと、前記フラグ判定ステップで判定を行った結果を用いて、暗号または復号の処理を行う演算ステップと、
前記演算ステップで作成された出力鍵データに、前記フラグ判定ステップで判定を行った結果を用いてフラグの付与を行うフラグ付与ステップと、
前記演算ステップで演算終了時に作成される出力データと、前記フラグ付与ステップから作成されるフラグが付与された出力鍵データを、前記入力チャネル選択ステップで選択したチャネルと同じチャネルを選択して出力を行う出力チャネル選択ステップ
とからなる暗復号処理方法。
An encryption / decryption processing method for performing encryption or decryption processing in a time-sharing manner on N (N is an arbitrary integer greater than or equal to 2) streams,
It has N channels of ch0 to chN-1 corresponding to N streams,
A calculation data holding step for holding calculation data that is data of the stream input by one calculation unit;
A key data holding step for holding key data set to perform encryption or decryption of the stream;
An input channel selection step of selecting data of a channel corresponding to a stream to be encrypted / decrypted from among the calculation data held in the calculation data holding step and the key data held in the key data holding step;
A flag determination step for determining flag information included in the key data selected in the input channel selection step;
A calculation step of performing encryption or decryption using the calculation data selected in the input channel selection step and the result of determination in the flag determination step;
A flag granting step for giving a flag to the output key data created in the calculation step using the result of the judgment in the flag judgment step;
The output data created at the end of the computation in the computation step and the output key data with the flag created from the flag assignment step are selected by selecting the same channel as the channel selected in the input channel selection step. An encryption / decryption processing method comprising: an output channel selection step to perform.
N個(Nは2以上の任意の整数)のストリームに対して、時分割に暗号または復号の処理をコンピュータに実行させるためのプログラムであって、
N個のストリームに対応したch0〜chN−1のN個のチャネルを持ち、
一演算単位ずつ入力される前記ストリームのデータである演算データを保持する演算データ保持手順と、
前記ストリームの暗号または復号を行うために設定される鍵データを保持する鍵データ保持手順と、
前記演算データ保持手順で保持された演算データと前記鍵データ保持手順で保持された鍵データの中から、暗復号処理を行うストリームに対応したチャネルのデータを選択する入力チャネル選択手順と、
前記入力チャネル選択手順で選択された鍵データに含まれるフラグ情報の判定を行うフラグ判定手順と、
前記入力チャネル選択手順で選択された演算データと、前記フラグ判定手順で判定を行った結果を用いて、暗号または復号の処理を行う演算手順と、
前記演算手順で作成された出力鍵データに、前記フラグ判定手順で判定を行った結果を用いてフラグの付与を行うフラグ付与手順と、
前記演算手順で演算終了時に作成される出力データと、前記フラグ付与手順から作成されるフラグが付与された出力鍵データを、前記入力チャネル選択手順で選択したチャネルと同じチャネルを選択して出力を行う出力チャネル選択手順と、
を有する暗復号処理プログラム。
A program for causing a computer to execute encryption or decryption processing in a time-sharing manner for N (N is an arbitrary integer of 2 or more) streams,
It has N channels of ch0 to chN-1 corresponding to N streams,
A calculation data holding procedure for holding calculation data that is data of the stream input by one calculation unit;
A key data holding procedure for holding key data set to perform encryption or decryption of the stream;
An input channel selection procedure for selecting data of a channel corresponding to a stream on which encryption / decryption processing is performed, from among the computation data retained in the computation data retention procedure and the key data retained in the key data retention procedure;
A flag determination procedure for determining flag information included in the key data selected in the input channel selection procedure;
A calculation procedure for performing encryption or decryption using the calculation data selected in the input channel selection procedure and the result of determination in the flag determination procedure;
A flag assignment procedure for assigning a flag to the output key data created by the calculation procedure using the result of the determination in the flag determination procedure;
Select the output channel created at the end of computation in the computation procedure and the output key data attached with the flag created from the flag assignment procedure by selecting the same channel as the channel selected in the input channel selection procedure. The output channel selection procedure to be performed,
An encryption / decryption processing program.
JP2004367181A 2004-12-20 2004-12-20 Parallel encrypting and decoding device for aes Pending JP2006171598A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004367181A JP2006171598A (en) 2004-12-20 2004-12-20 Parallel encrypting and decoding device for aes

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004367181A JP2006171598A (en) 2004-12-20 2004-12-20 Parallel encrypting and decoding device for aes

Publications (1)

Publication Number Publication Date
JP2006171598A true JP2006171598A (en) 2006-06-29

Family

ID=36672408

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004367181A Pending JP2006171598A (en) 2004-12-20 2004-12-20 Parallel encrypting and decoding device for aes

Country Status (1)

Country Link
JP (1) JP2006171598A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008294810A (en) * 2007-05-25 2008-12-04 Renesas Technology Corp Encryption/decryption device
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008294810A (en) * 2007-05-25 2008-12-04 Renesas Technology Corp Encryption/decryption device
JP2010185982A (en) * 2009-02-10 2010-08-26 Toshiba Storage Device Corp Encryption device, decryption device, and storage device

Similar Documents

Publication Publication Date Title
US7885404B2 (en) Cryptographic systems and methods supporting multiple modes
US8634550B2 (en) Architecture and instruction set for implementing advanced encryption standard (AES)
US9003202B2 (en) Memory control device, semiconductor memory device, memory system, and memory control method
US20080170686A1 (en) Confidential information processing apparatus, confidential information processing device, and confidential information processing method
US8391475B2 (en) Method and apparatus for advanced encryption standard (AES) block cipher
US8577022B2 (en) Data processing apparatus
JP2008292852A (en) Disk array controller, disk array control method and storage system
JP2010185982A (en) Encryption device, decryption device, and storage device
US20100061550A1 (en) Data processing apparatus
JP2007114404A (en) Data processing device and method
JP3769804B2 (en) Decoding method and electronic device
JP2008199572A (en) Confidential information processing apparatus, confidential information processing device, and confidential information processing method
US7257229B1 (en) Apparatus and method for key scheduling
JP2006171598A (en) Parallel encrypting and decoding device for aes
US8064596B2 (en) Stream control device, stream encryption/decryption device, and stream encryption/decryption method
KR100845835B1 (en) Multi level scramble and descramble system
JP2009044677A (en) Secret information processor, processing apparatus, and processing method
US20100002869A1 (en) Encryption circuit and decryption circuit
KR100967880B1 (en) M6 Block Cipher system
JP4708914B2 (en) Decryption method
JP4671034B2 (en) DMA transfer circuit and DMA controller
KR102117758B1 (en) Lightweight Cryptographic Accelerated Operation Processing Method In Power Platform Server EnvironmentEnvironment
JP2003169092A (en) Encryption device and decryption device
JP2006292958A (en) Encryption device and decryption device
KR20190069763A (en) Lightweight encryption algorithm security apparatus based on hardware authentication chip