JP2000075785A - High-speed cipher processing circuit and processing method - Google Patents

High-speed cipher processing circuit and processing method

Info

Publication number
JP2000075785A
JP2000075785A JP10240844A JP24084498A JP2000075785A JP 2000075785 A JP2000075785 A JP 2000075785A JP 10240844 A JP10240844 A JP 10240844A JP 24084498 A JP24084498 A JP 24084498A JP 2000075785 A JP2000075785 A JP 2000075785A
Authority
JP
Japan
Prior art keywords
processing
encryption
block
mode
function
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.)
Withdrawn
Application number
JP10240844A
Other languages
Japanese (ja)
Inventor
Takayuki Hasebe
高行 長谷部
Soichi Okada
壮一 岡田
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP10240844A priority Critical patent/JP2000075785A/en
Publication of JP2000075785A publication Critical patent/JP2000075785A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To execute both cipher block chaining(CBC) mode and cipher feedback(CFB) mode by executing a function processing used within a block encipherment processing, and executing the processing corresponding to the operation mode of the block encipherment processing. SOLUTION: A data storing means 1 stores an initial vector used for block encipherment processing, a processing intermediate value or a processing final result, and it consists of, for example, a resistor. A function processing device 2 executes a block encipherment processing, for example, a plurality of steps of conversion using f-function as a function processing used in data encryption standard(DES) processing. A mode processing means 3 is provided between the data storing means 1 and the function processing means 2 and executes the processing corresponding to the operation mode of the block encipherment, for example, CBC mode or CFB mode, by use of the data stored in the data storing means 1.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はディジタルデータの
暗号化方式に関し、更に詳しくは代表的なブロック暗号
としてのDES暗号のCBCモードとCFBモードの処
理を実行する高速暗号処理回路に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a digital data encryption system, and more particularly, to a high-speed encryption processing circuit for executing CBC mode and CFB mode processing of DES encryption as a typical block encryption.

【0002】[0002]

【従来の技術】近年ディジタルデータの暗号化処理が注
目されており、暗号化処理の対象となるデータも増加し
ている。例えば動画像データの暗号化処理や、サーバに
おけるトランザクション処理の要求が出てきており、暗
号化処理自体にも高速化が求められている。
2. Description of the Related Art In recent years, digital data encryption processing has attracted attention, and data to be encrypted has been increasing. For example, requests for encryption processing of moving image data and transaction processing in a server have been issued, and the encryption processing itself has been required to be faster.

【0003】ディジタルデータの暗号化方式としては、
例えば64ビットを1つのブロックとしてブロック毎に
暗号化を行うブロック暗号方式と、例えば1ビットずつ
逐次的に暗号化を行うストリーム暗号方式とがある。
[0003] Digital data encryption methods include:
For example, there are a block cipher system in which encryption is performed for each block with 64 bits as one block, and a stream cipher system in which, for example, one bit is sequentially encrypted.

【0004】本発明が対象とする暗号化方式はブロック
暗号であり、その中でも最も代表的なDES暗号であ
る。DES(データ エンクリプション スタンダー
ド)は1977年1月にアメリカ商務省標準局によって定め
られたデータ暗号標準であり、現在最も広範に用いられ
ている暗号アルゴリズムである。
[0004] The encryption system to which the present invention is applied is a block cipher, which is the most typical DES cipher. DES (Data Encryption Standard) is a data encryption standard established by the U.S. Department of Commerce Standards Bureau in January 1977, and is currently the most widely used encryption algorithm.

【0005】DES暗号に対しては、操作モードとして
4つのモードが定められている。そのモードはECB
(エレクトロニック コード ブロック),CBC(サ
イファブロック チェイニング),CFB(サイファ
フィードバック)およびOFB(アウトプット フィー
ド バック)の4つである。
[0005] For the DES encryption, four modes are defined as operation modes. The mode is ECB
(Electronic code block), CBC (cipher block chaining), CFB (cipher block)
Feedback) and OFB (output feedback).

【0006】これらの4つのモードのうち、本発明に直
接関連があるのはCBC、およびCFBの2つのモード
であるため、これらの2つの操作モードにおける暗号化
および復号の処理について、図24〜図27を用いて説
明する。
[0006] Of these four modes, the two modes directly related to the present invention are CBC and CFB. Therefore, encryption and decryption processing in these two operation modes will be described with reference to FIGS. This will be described with reference to FIG.

【0007】図24はCBCモードにおける暗号化およ
び復号の基本説明図である。このモードでは64ビット
に分割された平文系列M1 ,M2 ,M3 ,・・・が入力
されるが、まず最初の64ビットとしてのM1 に対して
は初期ベクトルIVとの排他的論理和51がとられ、そ
の結果に対して暗号化処理E52が実行されて暗号文系
列C1 ,C2 ,C3 ,・・・のうちの最初の64ビット
としてのC1 が得られる。ここで暗号化処理としてのE
52は初期転置IP,f関数を用いた同一構造の16段
の変換、左右32ビットの入替え、および逆転置IP-1
を含むものである。
FIG. 24 is a basic explanatory diagram of encryption and decryption in the CBC mode. Plaintext sequence M 1 that is divided into 64 bits in this mode, M 2, M 3, but ... is input, first for the M 1 as the first 64-bit exclusive of the initial vector IV sum 51 is taken, the results encryption E52 is performed on to the ciphertext sequence C 1, C 2, C 3 , C 1 as the first 64 bits of ... is obtained. Here, E as encryption processing
Reference numeral 52 denotes a 16-stage conversion of the same structure using the initial transposed IP and f function, left and right 32-bit exchange, and inverse transposed IP −1.
Is included.

【0008】次の64ビットとしてのM2 の入力に対し
ては、暗号文の最初の64ビットとしてのC1 との排他
的論理和56がとられ、その結果に対して暗号化処理E
57が行われ、暗号文の次の64ビットとしてのC2
られる。以下同様にして暗号文が64ビットずつ作成さ
れる。
For the next input of M 2 as 64 bits, an exclusive OR 56 with C 1 as the first 64 bits of the cipher text is obtained, and the result is subjected to encryption processing E.
57 is performed, it is reluctant C 2 as the next 64 bits of ciphertext. In the same manner, a ciphertext is created 64 bits at a time.

【0009】復号処理においては、暗号文の最初の64
ビットとしてのC1 の入力に対して復号処理D53が実
行される。この処理は暗号化処理E52と同様に初期転
置IP,f関数を用いた16段の変換、左右32ビット
の入替え、および逆転置IP -1を含むものであるが、暗
号化処理と異なって16段の変換においてキー系列が逆
の順序で用いられる。復号処理D53の結果に対して、
初期ベクトルIVとの排他的論理和54がとられ、平文
の最初の64ビットとしてのM1 が得られる。
In the decryption process, the first 64 ciphertexts are used.
C as a bit1Decryption processing D53
Is performed. This process is the same as the encryption process E52.
16-stage conversion using IP function and f function, left and right 32 bits
Permutation and reverse transposition IP -1Containing
Key sequence is reversed in 16-stage conversion unlike encryption
Are used in this order. For the result of the decryption process D53,
An exclusive OR 54 with the initial vector IV is obtained, and a plaintext
M as the first 64 bits of1Is obtained.

【0010】暗号文の次の64ビットとしてのC2 の入
力に対して復号処理D58が行われた後に、その結果に
対して暗号文の最初の64ビットとしてのC1 との排他
的論理和59がとられ、平文の次の64ビットとしての
2 が得られる。以下同様にして復号結果としての平文
が作成される。
[0010] XOR of after decoding D58 to the input of C 2 as the next 64-bit ciphertext is performed, a C 1 as the first 64 bits of the ciphertext on the result 59 is taken, and M 2 is obtained as the next 64 bits of the plaintext. Hereinafter, a plaintext as a decryption result is created in the same manner.

【0011】図25はCFBモードの動作の基本説明図
である。CFBモードは乱数発生動作を行うものであ
り、平文は1以上64以下であるkビットずつに分割さ
れ、その系列は図24におけると同様にM1 ,M2 ,M
3 ,・・・とされる。
FIG. 25 is a basic explanatory diagram of the operation in the CFB mode. The CFB mode performs a random number generation operation. The plaintext is divided into k bits of 1 or more and 64 or less, and the sequence is M 1 , M 2 , M 2 as in FIG.
3 , ...

【0012】平文の、例えば最初の8ビットとしてのM
1 の入力に対応して、レジスタ66に格納されている初
期ベクトルIVの暗号化処理E67が行われる。この暗
号化処理そのものは図24のCBCモードにおけると同
じである。暗号化処理の結果の64ビットのうち左側の
8ビットだけが取り出され、M1 との排他的論理和68
がとれら、暗号文の最初の8ビットC1 が出力されると
共に、その暗号文としての8ビットC1 はレジスタ66
の最も右側に格納される。すなわちレジスタ66に格納
されていた初期ベクトルIVは8ビット左シフトされ
て、左側の8ビットが捨てられ、最も右側にC1 が格納
されることになる。
M in plaintext, eg, as the first 8 bits
In response to the input of 1 , encryption processing E67 of the initial vector IV stored in the register 66 is performed. This encryption processing itself is the same as in the CBC mode in FIG. Of the 64 bits resulting from the encryption processing, only the left 8 bits are extracted, and an exclusive OR 68 with M 1 is obtained.
Then, the first 8 bits C 1 of the cipher text are output, and the 8 bits C 1 as the cipher text are stored in the register 66.
Is stored on the rightmost side of That is, the initial vector IV stored in the register 66 is shifted left by 8 bits, the left 8 bits are discarded, and C 1 is stored at the rightmost.

【0013】平文の次の8ビットM2 の入力に対応し
て、レジスタ66の格納内容に対する暗号化処理E67
が行われ、その結果の64ビットのうちの左8ビットと
2 との排他的論理和68がとれら、暗号文の次の8ビ
ットC2 として出力されると共に、その8ビットはレジ
スタ66の最も右側に格納される。すなわちレジスタ6
6の格納内容は8ビット左シフトされ、初期ベクトルI
Vのうち更に8ビットが捨てられて、レジスタ66の最
も右側にC2 が格納されることになる。暗号文系列の次
の8ビットC3 以下については全く同様の動作が行われ
る。
In response to the input of the next 8-bit M 2 of the plaintext, an encryption process E67 for the contents stored in the register 66 is performed.
And the exclusive OR 68 of the left 8 bits of the resulting 64 bits and M 2 is obtained and output as the next 8 bits C 2 of the ciphertext, and the 8 bits are stored in the register 66. Is stored on the rightmost side of That is, register 6
6 is shifted 8 bits to the left, and the initial vector I
Another 8 bits of V are discarded, and C 2 is stored at the rightmost side of the register 66. Following exactly the same operation for the 8-bit C 3 following ciphertext sequence is performed.

【0014】CFBモードの復号処理においては、まず
暗号文の最初の8ビットC1 の入力に対応して、レジス
タ70に格納されていた初期ベクトルIVの暗号化処理
E71が行われる。図24のCBCモードと異なり、復
号処理においても処理Dではなく、処理Eが用いられ
る。この処理の結果の64ビットのうち左8ビットが取
り出され、暗号文のC1 との排他的論理和72がとら
れ、平文の最初の8ビットM1 が出力される。それと同
時に暗号化処理におけると同様に、レジスタ70の内容
は8ビット左シフトされ、最も右側に暗号文の8ビット
1 が格納される。
[0014] In the decoding process of the CFB mode, first corresponds to the first input of the 8-bit C 1 ciphertext, encryption E71 initial vector IV which has been stored in the register 70 is performed. Unlike the CBC mode of FIG. 24, the decoding process uses the process E instead of the process D. Left 8 bits of the 64-bit result of this process is extracted, the exclusive OR 72 and C 1 ciphertext is taken, the first 8-bit M 1 of the plaintext is output. Same as well as at the same time definitive for encryption processing, the contents of register 70 are 8-bit left shift, 8-bit C 1 ciphertext is stored in the rightmost.

【0015】暗号文系列の次の8ビットC2 の入力に対
応する処理は全く同様である。すなわちレジスタ70の
内容に対して暗号化処理E71が行われ、その結果の6
4ビット中の左8ビットとC2 との排他的論理和72が
とられ、平文の次の8ビットM2 が得られると共に、レ
ジスタ70の内容は8ビット左シフトされ、暗号文の8
ビットC2 がレジスタ70の最も右側に格納される。以
下同様にして、暗号文系列C3 ,・・・の復号処理が実
行される。
The process corresponding to the next input of the 8-bit C 2 ciphertext sequence is exactly the same. That is, the encryption processing E71 is performed on the contents of the register 70, and the result 6
The exclusive OR 72 of the left 8 bits of the 4 bits and C 2 is obtained to obtain the next 8 bits M 2 of the plaintext, and the contents of the register 70 are shifted left by 8 bits to obtain the 8 bits of the ciphertext.
Bit C 2 is stored in the rightmost register 70. Similarly, the decryption process of the ciphertext series C 3 ,... Is executed.

【0016】図26はCBCモードの暗号処理回路の従
来例である。同図(a) は暗号化回路を示す。同図におい
て、図24におけると同様に平文の最初の8ビットM1
が入力されると、レジスタ75に格納されている初期ベ
クトルIVとの排他的論理和がEXOR回路76によっ
てとられ、その結果はf関数77に入力される。
FIG. 26 shows a conventional example of a CBC mode encryption processing circuit. FIG. 1A shows an encryption circuit. In the figure, as in FIG. 24, the first 8 bits M 1 of the plaintext
Is input, the exclusive OR with the initial vector IV stored in the register 75 is obtained by the EXOR circuit 76, and the result is input to the f-function 77.

【0017】f関数77としては、f関数を用いた16
段の変換を全て行うために16段の変換回路を備えても
よいが、例えばハードウェア量を減らすために、4段の
変換回路を備え、処理の中間結果をレジスタ75および
EXOR回路76を介して4回ループさせることによっ
て、16段の変換を実現することもできる。この場合、
そのループの処理の間は、EXOR回路76に対する入
力の値を64ビット全てに対して例えば“0”とするこ
とによって、レジスタ75の格納内容をそのままf関数
77に出力することができる。
As the f function 77, 16 using the f function is used.
A 16-stage conversion circuit may be provided to perform all the stage conversions. For example, in order to reduce the amount of hardware, a 4-stage conversion circuit is provided, and an intermediate result of the processing is transmitted via the register 75 and the EXOR circuit 76 By looping four times, a 16-stage conversion can be realized. in this case,
During the processing of the loop, by setting the value of the input to the EXOR circuit 76 to, for example, "0" for all 64 bits, the contents stored in the register 75 can be directly output to the f-function 77.

【0018】なおここでは簡単のためにf関数77のみ
を示したが、図24の暗号化処理E52に含まれる初期
転置IPは例えば第1段目のf関数の処理に含まれるも
のとし、また最後の左右32ビットの入替え、および逆
転置IP-1は16段目のf関数の処理に含まれるものと
考えることができる。
Although only the f-function 77 is shown here for the sake of simplicity, the initial transposed IP included in the encryption processing E52 in FIG. 24 is assumed to be included in the processing of the first-stage f-function, for example. The last 32 bits permutation and the inverse transpose IP −1 can be considered to be included in the processing of the f function in the 16th stage.

【0019】そして4回目のループの終了時点でf関数
77から出力され、レジスタ75に格納される64ビッ
トは、暗号文の最初のブロックC1 として出力されると
共に、入力平文の次のブロックM2 の入力時点でM2
排他的論理和をとるために用いられる。以下の処理は図
24に対する説明と同様であるので、その説明を省略す
る。
At the end of the fourth loop, 64 bits output from the f-function 77 and stored in the register 75 are output as the first block C 1 of the ciphertext, and the next block M of the input plaintext. It is used to take an exclusive OR with M 2 at the point of input of 2 . The following processing is the same as that described with reference to FIG. 24, and a description thereof will not be repeated.

【0020】図26(b) はCBC復号回路の従来例であ
る。同図において暗号文の最初のブロックC1 が入力さ
れると、その入力はセレクタ80を介してf関数81に
与えられる。
FIG. 26B shows a conventional example of a CBC decoding circuit. When the first block C 1 of the ciphertext is input in the figure, the input is provided to the f function 81 via the selector 80.

【0021】このf関数81は図24における復号処理
D53を実行するためのものであり、(a) と同様に4段
の変換回路を備えるものとすると、レジスタ82、セレ
クタ80を介する4回のループの動作の終了後に入力暗
号文ブロックC1 の復号結果をレジスタ82に出力する
ことになり、また第1段目の変換には初期転置IP、1
6段目の変換には左右32ビットの変換と逆転置IP-1
を含むものとする。
The f-function 81 is for executing the decoding process D53 in FIG. 24. If it is provided with a four-stage conversion circuit as in FIG. After the operation of the loop is completed, the decryption result of the input ciphertext block C 1 is output to the register 82, and the initial transposition IP, 1
The conversion of the 6th stage is left and right 32-bit conversion and inverse transposition IP -1
Shall be included.

【0022】レジスタ82に格納された暗号文の最初の
ブロックC1 の復号結果はEXOR回路84に入力さ
れ、レジスタ83に格納されていた初期ベクトルIVと
の排他的論理和がとられ、平文の最初のブロックM1
して出力される。この時次のブロックC2 の復号結果と
排他的論理和をとるために、入力暗号文の最初のブロッ
クC1 がレジスタ83に格納される。暗号文の次のブロ
ックC2 の入力に対する復号処理は図24におけると同
様に実行されるので、以下その説明を省略する。
The result of decryption of the first block C 1 of the ciphertext stored in the register 82 is input to an EXOR circuit 84, where the result is exclusive-ORed with the initial vector IV stored in the register 83, and the plaintext of the plaintext is obtained. It is output as the first block M 1. This time to take the exclusive OR decoding result of the next block C 2, the first block C 1 of the input ciphertext is stored in the register 83. Since the decoding processing for the next input block C 2 of the ciphertext is performed as in the FIG. 24, description thereof is omitted below.

【0023】図27はCFBモードの暗号処理回路の従
来例である。同図(a) は暗号化回路、(b) は復号回路を
示す。図27(a) において平文の最初の8ビットM1
入力に対応して、まずレジスタ86に格納されている初
期ベクトルIVの値がf関数87に出力される。
FIG. 27 shows a conventional example of a CFB mode encryption processing circuit. FIG. 1A shows an encryption circuit, and FIG. 1B shows a decryption circuit. In response to the first input of the 8-bit M 1 plaintext in FIG. 27 (a), the value of the initial vector IV is output to the f function 87 that is first stored in the register 86.

【0024】f関数87は図25における暗号化処理E
67、すなわち図24における暗号化処理E52と同様
の処理を行うものであり、図26におけると同様に例え
ば4段の変換回路が備えられる。セレクタ90およびレ
ジスタ86を介する4回のループの処理による16段の
変換(図26におけると同様に初期転置、左右32ビッ
トの入替え、および逆転置を含む)の処理結果としての
64ビットのうち、左8ビットのみがEXOR回路91
に出力され、入力平文の8ビットM1 と排他的論理和が
とれら、暗号文の最初のブロックC1 として出力され
る。
The f-function 87 corresponds to the encryption processing E in FIG.
67, that is, a process similar to the encryption process E52 in FIG. 24, and includes, for example, a four-stage conversion circuit as in FIG. Of the 64 bits as the processing result of the 16-stage conversion (including the initial transposition, the transposition of the left and right 32 bits, and the reverse transposition as in FIG. 26) by the processing of the four loops through the selector 90 and the register 86, Only the left 8 bits are EXOR circuit 91
Is output to the exclusive OR between 8 bits M 1 of the input plaintext is output tolerant, as the first block C 1 of the ciphertext.

【0025】前述のように、レジスタ86に格納されて
いた初期ベクトルIVはM1 の入力に対応してf関数8
7に出力されるが、この時その内容は8ビット左にシフ
トされ、すなわち左の8ビットが捨てられて、レジスタ
88に格納される。そのビット数は56ビットである。
f関数87の4回目のループの後の出力のうち、最も左
側の8ビットのみがEXOR回路89に入力され、入力
1 との排他的論理和がとられ、その結果の8ビットが
最も右側に、レジスタ88に格納されている56ビット
が左側に配置される形式で、セレクタ90を介してレジ
スタ86に64ビットのデータとして格納される。この
64ビットは、平文の次のブロックM2の入力に対応し
て、図25の暗号化処理E67に出力されることにな
る。M2 以下のブロックに対する動作は同様であるの
で、以下の説明を省略する。
[0025] As described above, the initial vector stored in the register 86 IV is f function 8 in response to the input of M 1
7, the contents of which are shifted 8 bits to the left, ie, the left 8 bits are discarded and stored in register 88. The number of bits is 56 bits.
of the output after the fourth loop of f functions 87, most only 8 bits left is input to the EXOR circuit 89, taken exclusive OR of the input M 1 is, as a result of the 8-bit rightmost The 56 bits stored in the register 88 are stored as 64-bit data in the register 86 via the selector 90 in a format arranged on the left side. This 64-bit, in response to the next input block M 2 of the plaintext, and is output to the encryption process E67 in FIG. 25. Since the operation for M 2 The following blocks are the same, it is omitted from the following description.

【0026】図27(b) において、暗号文の最初の8ビ
ットC1 の入力時点で、レジスタ93に格納されている
初期ベクトルIVがf関数94に与えられ、前述と同様
にセレクタ95、レジスタ93を介する4回のループの
処理によって16段のf関数を用いる変換などが行わ
れ、図25の暗号化処理E71の出力としての64ビッ
トのうち左8ビットがEXOR回路97に出力され、入
力暗号文ブロックC1 との排他的論理和がとられ、平文
1 が出力される。
[0026] In FIG. 27 (b), the input time of the first 8-bit C 1 ciphertext, the initial vector IV is given in the f function 94 stored in the register 93, similarly to the above selector 95, a register Conversion using a 16-stage f-function is performed by the processing of four loops through 93, and the left 8 bits out of the 64 bits as the output of the encryption processing E71 in FIG. exclusive OR of the ciphertext block C 1 is taken, the plaintext M 1 is outputted.

【0027】レジスタ93の内容としての初期ベクトル
IVの値がf関数94に出力される時点で、同時にその
内容は8ビット左シフトされ、56ビットがレジスタ9
6に格納される。そして4回目のループの終了時点でそ
の56ビットが左側、入力暗号文8ビットC1 が右側に
配置される形式で、セレクタ95を介してレジスタ93
に64ビットのデータが格納される。このデータは、次
の暗号文ブロックC2の入力に対応して、f関数94に
与えられるものである。暗号文ブロックC2 以下に対す
る復号処理については同様であるので、その説明を省略
する。
When the value of the initial vector IV as the content of the register 93 is output to the f-function 94, the content is simultaneously shifted left by 8 bits, and 56 bits are stored in the register 9
6 is stored. Then the 56 bit left at the end of the fourth loop, in input format ciphertext 8-bit C 1 is disposed on the right side, through the selector 95 register 93
Stores 64-bit data. This data corresponds to the next input ciphertext block C 2, those given in the f function 94. Since the decoding processing for the ciphertext block C 2 or less are the same, description thereof is omitted.

【0028】[0028]

【発明が解決しようとする課題】このようなDES暗号
化処理を高速化するために、従来は特にf関数を用いた
16段の変換処理の高速化を目的として、f関数の変換
回路をできるだけ段数多く接続してループ損を削減した
り、f関数を含む変換の処理手順を変更して1回のルー
プに対する遅延を削減したり、例えばCBC暗号化処理
において操作モードに対応するモード処理を暗号化の処
理サイクル、すなわちループの中に入れて処理に必要な
クロック数を減らすというような方式が用いられてい
た。これらの方式に関しては、次の米国特許に開示され
ている。
In order to speed up such a DES encryption process, conventionally, in order to speed up a 16-stage conversion process using an f-function, a conversion circuit of the f-function is required as much as possible. A large number of stages are connected to reduce a loop loss, a processing procedure of a conversion including an f function is changed to reduce a delay for one loop, and, for example, a mode processing corresponding to an operation mode is encrypted in CBC encryption processing. For example, a method of reducing the number of clocks required for processing by putting it in a loop, ie, a loop, has been used. These systems are disclosed in the following US patents:

【0029】U.S.Patent 5,381,480, Butter et a
l. "System for Translating Encrypted Data" しかしながらf関数を用いる変換をできるだけ段数多く
接続するとしても、段数を多くすればするほどハードウ
ェア量が増大し、コストが大きくなるために、あまり段
数を多くすることもできないという問題点があった。
U. S. Patent 5,381,480, Butter et a
l. "System for Translating Encrypted Data" However, even if the conversion using the f-function is connected as many stages as possible, the greater the number of stages, the larger the amount of hardware and the higher the cost. There was a problem that it could not be done.

【0030】次にDESブロック暗号の操作モードとし
ては前述のようにECB,CBC,CFB,OFBの4
つの操作モードが存在する。ECBモードはDES暗号
化処理と復号処理とを組み合わせるだけであり、操作モ
ードのための特別なモード処理回路は不必要である。O
FBモードにおいては、DES暗号化の処理ループ内で
は、前のブロックに対する処理結果を用いてそのまま次
のブロックに対する処理を行うことができ、モードに対
応する特別な処理としてはDESの最終処理結果と入力
ブロックデータとの間で排他的論理和をとるだけでよ
く、処理ループに対しては遅延の発生を考慮しなくてよ
い。
Next, as described above, the operation modes of the DES block cipher are ECB, CBC, CFB and OFB.
There are two operation modes. The ECB mode only combines the DES encryption process and the decryption process, and does not require a special mode processing circuit for the operation mode. O
In the FB mode, the processing for the next block can be performed as it is using the processing result for the previous block in the processing loop of the DES encryption, and the special processing corresponding to the mode includes the final processing result of the DES. It is only necessary to take an exclusive OR with the input block data, and it is not necessary to consider the occurrence of delay in the processing loop.

【0031】これに対してCBCモードでは、例えば初
期ベクトルIVの値と入力ブロックとの排他的論理和を
とり、この値に対してDES処理を行う必要がある。ま
たCFBモードでは、暗号化処理において初期ベクトル
IVを格納していたレジスタの内容更新時において、初
期ベクトルの値の左シフトを行い、右側にDES処理の
処理結果の一部と入力ブロックとの排他的論理和の値を
設定する必要がある。
On the other hand, in the CBC mode, for example, it is necessary to take the exclusive OR of the value of the initial vector IV and the input block, and perform DES processing on this value. In the CFB mode, when updating the contents of the register storing the initial vector IV in the encryption process, the value of the initial vector is shifted to the left, and a part of the processing result of the DES process and the exclusion of the input block to the right. It is necessary to set the value of the logical OR.

【0032】すなわちCBCに対するモード処理はDE
S処理の最初で、またCFBに対するモード処理は最後
で行われるという違いがある。これらの処理は共にDE
S処理のループの中に含まれている。
That is, the mode processing for the CBC is
The difference is that the mode processing for the CFB is performed at the beginning of the S processing and at the end of the processing for the CFB. Both of these processes are DE
It is included in the loop of S processing.

【0033】DES暗号化の処理を行う処理回路として
は、これらの4つの操作モードの全てを実行できる回路
を構成することが望ましいが、従来においては特にCB
CモードとCFBモードとに共通に用いられる処理回路
を構成することが困難であるという問題点があった。こ
れはこれらの2つのモードに対応するモード処理が一方
はDES処理の処理ループの最初、他方は最後に入って
いることに起因する。
As a processing circuit for performing the DES encryption processing, it is desirable to configure a circuit capable of executing all of these four operation modes.
There is a problem that it is difficult to configure a processing circuit commonly used for the C mode and the CFB mode. This is because one of the mode processes corresponding to these two modes is at the beginning of the processing loop of the DES process and the other is at the end.

【0034】本発明は特にCBCモードとCFBモード
の両方を実行できる暗号処理回路を提供することと、そ
の回路における処理遅延をできるだけ削減することを目
的とする。
It is an object of the present invention to provide a cryptographic processing circuit capable of executing both the CBC mode and the CFB mode, and to reduce the processing delay in the circuit as much as possible.

【0035】[0035]

【課題を解決するための手段】図1は本発明の第1の実
施形態に対応する原理構成ブロック図である。同図は、
例えば操作モードとしてCBCモードと、CFBモード
との両方のDES暗号化処理を実行できる、ブロック暗
号化の処理を行う高速暗号処理回路の構成ブロック図で
ある。
FIG. 1 is a block diagram showing the basic configuration corresponding to a first embodiment of the present invention. The figure shows
For example, it is a configuration block diagram of a high-speed encryption processing circuit that performs block encryption processing that can execute both DES encryption processing in the CBC mode and the CFB mode as operation modes.

【0036】図1において、データ格納手段1はブロッ
ク暗号化処理に用いられる初期ベクトル、処理中間値、
または処理最終結果を格納するものであり、例えばレジ
スタである。
In FIG. 1, data storage means 1 includes an initial vector, a processing intermediate value,
Alternatively, it stores the final processing result, and is, for example, a register.

【0037】関数処理手段2はブロック暗号化処理、例
えばDES処理内で用いられる関数処理としてのf関数
を用いる複数段の変換を実行するものである。モード処
理手段3はデータ格納手段1と関数処理手段2との間に
備えられ、データ格納手段1に格納されているデータを
用いてブロック暗号化の操作モード、例えばCBCモー
ドまたはCFBモードに対応する処理を実行するもので
ある。
The function processing means 2 executes a block encryption process, for example, a multistage conversion using an f-function as a function process used in the DES process. The mode processing unit 3 is provided between the data storage unit 1 and the function processing unit 2, and uses a data stored in the data storage unit 1 to correspond to an operation mode of block encryption, for example, a CBC mode or a CFB mode. The processing is executed.

【0038】CFBモードの処理において、関数処理手
段2によって、DES暗号への入力ブロックデータの暗
号化における前述の関数処理としての非線形関数を用い
る16段の変換が複数回、例えば4回に分けて実行され
る。その場合には1回の関数処理においては、非線形関
数を用いる4段の変換が実行される。
In the processing in the CFB mode, the function processing means 2 performs 16-stage conversion using the nonlinear function as the above-described function processing in the encryption of the input block data into the DES encryption a plurality of times, for example, four times. Be executed. In that case, in one function process, four-stage conversion using a non-linear function is executed.

【0039】この複数回の処理の最後の1回を除く毎回
の実行結果は、関数処理手段2によってデータ格納手段
1に格納される。そしてこの最後の1回の処理結果を用
いて入力ブロックデータに対する暗号化ブロックデータ
を出力するために、暗号化データ出力手段が更に備えら
れる。
The execution result of each of the plurality of processes except the last one is stored in the data storage unit 1 by the function processing unit 2. Further, an encrypted data output unit is further provided to output the encrypted block data for the input block data using the result of the last one processing.

【0040】またこの複数回の処理の最初の回の実行の
前に、モード処理手段3によってモード処理が実行さ
れ、その実行結果が関数処理手段2に出力されると共
に、モード処理の実行結果の一部が格納されるモード処
理結果格納手段が更に備えられる。そして関数処理手段
2による複数回の処理の最後の回の実行時に、モード処
理結果格納手段によって前述のモード処理の実行結果の
一部がデータ格納手段1に出力されると共に、関数処理
手段2によって実行結果の一部がデータ格納手段1に出
力される。
Before the first execution of the plurality of processes, mode processing is executed by the mode processing means 3, and the execution result is output to the function processing means 2. Further provided is a mode processing result storage means in which a part is stored. When the function processing unit 2 executes the last of a plurality of processes, a part of the execution result of the mode processing is output to the data storage unit 1 by the mode processing result storage unit, and the function processing unit 2 A part of the execution result is output to the data storage unit 1.

【0041】CBCモードの暗号化処理の実行時におい
ては、CFBモードにおけると同様に、前述のDES暗
号へのブロックデータの暗号化における関数処理として
の非線形関数を用いる16段の変換が、複数回に分けて
実行される。そしてこの複数回の処理の毎回の実行結果
は、関数処理手段2によってデータ格納手段1に格納さ
れる。
At the time of executing the encryption process in the CBC mode, similarly to the CFB mode, the 16-stage conversion using the nonlinear function as the function process in the encryption of the block data into the DES encryption is performed a plurality of times. It is executed separately. The result of each execution of the plurality of processes is stored in the data storage unit 1 by the function processing unit 2.

【0042】また関数処理手段2による複数回の処理の
最初の回の実行の前に、モード処理手段3によって入力
されるブロックデータとデータ格納手段に格納されてい
るデータとを用いたモード処理が実行され、そのモード
処理の結果が関数処理手段2に出力される。
Before the first execution of the plurality of processes by the function processing means 2, mode processing using the block data input by the mode processing means 3 and the data stored in the data storage means is performed. It is executed, and the result of the mode processing is output to the function processing means 2.

【0043】図2は本発明の第2の実施形態に対応する
原理構成ブロック図である。同図においては図1のモー
ド処理手段3に対応する第1のモード処理手段4に加え
て、関数処理手段2とデータ格納手段1との間に備えら
れ、ブロック暗号化の操作モードに対応する第2の処理
を実行する第2のモード処理手段5が追加される。
FIG. 2 is a block diagram showing the basic configuration corresponding to the second embodiment of the present invention. In the figure, in addition to the first mode processing means 4 corresponding to the mode processing means 3 of FIG. 1, the apparatus is provided between the function processing means 2 and the data storage means 1 and corresponds to the operation mode of block encryption. Second mode processing means 5 for executing the second processing is added.

【0044】本発明の第2の実施形態においては、第1
の実施形態におけると同様に、暗号処理回路はCFBモ
ードとCBCモードとの両方の操作モードを実行できる
ものであるが、CBCモードにおけるモード処理の基本
的な部分を実行するのは第1のモード処理手段4である
のに対して、CFBモードにおける基本的なモード処理
は第2のモード処理手段5によって実行される。
In the second embodiment of the present invention, the first
As in the embodiment, the cryptographic processing circuit can execute both the operation modes of the CFB mode and the CBC mode, but the basic mode of the mode processing in the CBC mode is executed in the first mode. The basic mode processing in the CFB mode is executed by the second mode processing unit 5 in contrast to the processing unit 4.

【0045】CFBモードにおいて、関数処理手段2に
よる非線形関数を用いる16段の変換は、第1の実施形
態におけると同様に複数回に分けて実行されるが、その
最初の回においてデータ格納手段1に格納されているデ
ータは、第1のモード処理手段3による特別な処理が行
われることなく、そのまま関数処理手段2に与えられ
る。関数処理手段2による複数回の処理の最後の回を除
く毎回の処理結果はデータ格納手段1に格納される。
In the CFB mode, the 16-stage conversion using the non-linear function by the function processing means 2 is executed in a plurality of times as in the first embodiment. Is given to the function processing means 2 without any special processing by the first mode processing means 3. The processing result of each of the function processing means 2 except for the last one of the plurality of processings is stored in the data storage means 1.

【0046】関数処理手段2による最終回の処理結果を
用いて、入力ブロックデータに対する暗号化ブロックデ
ータが第1の実施形態におけると同様に出力されると共
に、その処理結果の一部と入力データブロックを用いて
第2のモード処理手段によって第2のモード処理が実行
され、その結果と、複数回の最初の回の実行の前にデー
タ格納手段1に格納されていたデータの一部とがデータ
格納手段1に格納され、次のブロックデータの暗号化処
理のために用いられる。
Using the processing result of the last round by the function processing means 2, the encrypted block data for the input block data is output in the same manner as in the first embodiment, and a part of the processing result and the input data block The second mode processing is executed by the second mode processing means by using the result, and the result and a part of the data stored in the data storage means 1 before the first execution of the plurality of times are stored in the data. It is stored in the storage means 1 and is used for the encryption processing of the next block data.

【0047】CBCモードにおいては、第1のモード処
理手段4によって第1の実施形態に対するモード処理手
段3によると同様の処理が実行され、第2のモード処理
手段は実質的に何らの作用を行うこともなく、結果的に
第1の実施形態におけると同様の処理が実行される。
In the CBC mode, the first mode processing means 4 executes the same processing as the mode processing means 3 for the first embodiment, and the second mode processing means performs substantially no function. As a result, the same processing as in the first embodiment is executed as a result.

【0048】本発明の暗号処理方法においては、例えば
DESブロック暗号化の処理を行う暗号処理方法におい
て、1つのブロックデータの暗号化処理の終了時点で処
理結果が出力されると共に、初期ベクトルが格納されて
いたレジスタにその暗号化処理における処理中間値、ま
たは処理最終結果が格納される。
In the encryption processing method of the present invention, for example, in the encryption processing method of performing DES block encryption processing, the processing result is output at the end of the encryption processing of one block data, and the initial vector is stored. The processed intermediate value in the encryption process or the final result of the process is stored in the registered register.

【0049】そしてレジスタに格納されたデータとその
1つのブロックデータ、またはその1つのブロックに続
く次のブロックデータとの間で、そのブロック暗号化の
操作モードに対応する演算が実行される。更にその演算
結果が、その1つのブロックに続く次のブロックデータ
に対する暗号化処理における初期ベクトルに相当する値
として用いられ、次のブロックデータに対する暗号化処
理が行われる。
An operation corresponding to the operation mode of the block encryption is executed between the data stored in the register and the one block data or the next block data following the one block. Further, the calculation result is used as a value corresponding to an initial vector in the encryption processing for the next block data following the one block, and the encryption processing for the next block data is performed.

【0050】本発明の暗号化処理方法においては、前述
のレジスタに最初に初期ベクトルが格納されており、ま
ずその初期ベクトルに対しては例えばCBCモードでは
入力ブロックデータとの間で操作モードに対応する演算
が実行された後に、CFBモードでは操作モードに対応
する特別な演算は実質的に実行されることなく、演算結
果に対応して非線形関数を用いる16段の変換が複数回
に分けて実行される。この暗号化処理の方法は、前述の
第1の実施形態において用いられるものである。
In the encryption processing method of the present invention, an initial vector is first stored in the above-described register, and the initial vector corresponds to the operation mode between input block data in the CBC mode, for example. In the CFB mode, a special operation corresponding to the operation mode is not substantially executed, and a 16-stage conversion using a nonlinear function corresponding to the operation result is executed in a plurality of times in the CFB mode. Is done. This encryption method is used in the first embodiment.

【0051】以上説明したように、本発明によればCB
CモードとCFBモードとの両方を実行する暗号処理回
路を実現することができる。また第1の実施形態におい
ては2つのモードに対応するモード処理手段を共通化す
ることが可能になる。
As described above, according to the present invention, CB
An encryption processing circuit that executes both the C mode and the CFB mode can be realized. In the first embodiment, the mode processing means corresponding to the two modes can be shared.

【0052】[0052]

【発明の実施の形態】図3は本発明の第1の実施形態に
おいて用いられるCFBモードの暗号化回路の構成を示
す。同図は図27(a) に示した従来例に対応するもので
あるが、CBCモードの暗号化回路と組み合わせて使用
するために図27(a) において用いられていたEXOR
回路89が省略され、その代わりにレジスタ11の出力
側にEXOR回路12が用いられている。
FIG. 3 shows the configuration of a CFB mode encryption circuit used in the first embodiment of the present invention. This figure corresponds to the conventional example shown in FIG. 27 (a). However, the EXOR used in FIG. 27 (a) is used in combination with a CBC mode encryption circuit.
The circuit 89 is omitted, and an EXOR circuit 12 is used at the output side of the register 11 instead.

【0053】図3において初期ベクトルIVはレジスタ
11に格納されている。平文の最初の8ビットM1 の入
力時点で、レジスタ11から初期ベクトルIVの値がf
関数(処理回路)13に与えられる。この時EXOR回
路12に対してレジスタ14から、例えば“0”が出力
されることにより、レジスタ11に格納されていた初期
ベクトルIVの値はそのままf関数13に与えられる。
In FIG. 3, the initial vector IV is stored in the register 11. An input time of the first 8-bit M 1 plaintext, the value of the initial vector IV from the register 11 is f
The function (processing circuit) 13 is provided. At this time, for example, “0” is output from the register 14 to the EXOR circuit 12, so that the value of the initial vector IV stored in the register 11 is directly provided to the f function 13.

【0054】f関数13は、図27(a) におけると同様
に例えば4段のf関数を用いる変換回路からなり、セレ
クタ15、レジスタ11を介する4回のループの処理に
よってf関数を用いた16段の変換が行われるものとす
る。また前述のように初期転置IP、第16段目の結果
に対する左右32ビットの入替え、逆転置IP-1を含む
ものとする。
The f-function 13 comprises a conversion circuit using, for example, four stages of f-functions as in FIG. 27A, and uses the f-function by processing four loops through the selector 15 and the register 11. It is assumed that stage conversion is performed. Further, as described above, the initial transposition IP, the transposition of left and right 32 bits with respect to the result of the 16th stage, and the reverse transposition IP- 1 are included.

【0055】4回のループの後のf関数13の出力のう
ち左8ビットはEXOR回路18に与えられ、入力平文
ブロックM1 との排他的論理和がとられ、最初の暗号文
ブロックC1 として出力される。
The left 8 bits of the output of the f-function 13 after the four loops are supplied to the EXOR circuit 18 and exclusive-ORed with the input plaintext block M 1 to obtain the first ciphertext block C 1. Is output as

【0056】ブロックM1 の入力に対応してレジスタ1
1から初期ベクトルIVが出力される時点で、その内容
のうち、左側56ビットはそのままレジスタ11から、
また右側8ビットはEXOR回路12を介して与えられ
る形式でレジスタ17側に出力されるが、その64ビッ
トは8ビットシフトされて最も左側の8ビットが捨てら
れた後、レジスタ17に格納される。そして4回のルー
プの終了時点でその内容の56ビットが左側に、f関数
13の出力のうちの左8ビットが右側に格納される形式
で、セレクタ15を介してレジスタ11に64ビットの
データが格納される。またこの時点でレジスタ14には
入力ブロックM1 8ビットが格納される。ここでレジス
タ11に格納されている64ビットは、そのままでは次
の入力ブロックM2 の入力時点でf関数13に対してD
ES暗号化処理の対象として用いることはできない。
[0056] In response to the input of the block M 1 register 1
When the initial vector IV is output from 1, the left 56 bits of the contents are left as they are from the register 11.
The right 8 bits are output to the register 17 in a format given through the EXOR circuit 12, and the 64 bits are shifted by 8 bits, the leftmost 8 bits are discarded, and then stored in the register 17. . At the end of the four loops, 64 bits of data are stored in the register 11 via the selector 15 in such a format that 56 bits of the content are stored on the left and 8 bits of the left of the output of the f-function 13 are stored on the right. Is stored. At this time, the register 14 stores 8 bits of the input block M 1 . Here 64-bit stored in the register 11, D for f function 13 at the input point of the next input block M 2 is intact
It cannot be used as a target of ES encryption processing.

【0057】ブロックM2 の入力時点で、レジスタ11
の格納内容のうち右側8ビットはEXOR回路12に出
力され、レジスタ14に格納されている最初のブロック
1の8ビットとの排他的論理和がとられ、レジスタ1
1からそのまま出力される左側56ビットと共にf関数
13に入力される。この時実質的にf関数13への入力
となる64ビットは、前述と同様にして左に8ビットシ
フトされ、56ビットがレジスタ17に格納される。こ
れは次のブロックM3 の入力時点におけるf関数13へ
の入力データ作成のためである。
[0057] at the point of input of the block M 2, register 11
Right 8 bits of storage contents of the output to the EXOR circuit 12, the exclusive OR of the first eight bits of the block M 1 stored in the register 14 is taken, the register 1
It is input to the f-function 13 together with the left 56 bits output directly from 1. At this time, 64 bits that are substantially input to the f-function 13 are shifted left by 8 bits in the same manner as described above, and 56 bits are stored in the register 17. This is because the input data creation to the f function 13 at the input time point of the next block M 3.

【0058】f関数13、セレクタ15、レジスタ11
を介する4回のループの終了時点で、f関数13の出力
のうち左8ビットと入力M2 8ビットとの排他的論理和
がEXOR回路18によってとられ、暗号文系列の次の
ブロックC2 として出力される。この4回のループ処理
の間はレジスタ14の格納内容は出力されず、EXOR
回路12には例えば“0”が与えられるものとする。以
下同様の処理が行われるため、その説明を省略する。
F function 13, selector 15, register 11
At the end of the four loops through the EXOR circuit 18, the exclusive OR of the left 8 bits of the output of the f function 13 and the input M 2 8 bits is obtained by the EXOR circuit 18, and the next block C 2 of the ciphertext sequence Is output as During the four loop processes, the contents stored in the register 14 are not output, and the EXOR
It is assumed that “0” is given to the circuit 12, for example. Hereinafter, the same processing is performed, and the description thereof will be omitted.

【0059】図4は本発明の第1の実施形態としての暗
号処理回路の構成ブロック図である。同図はCFBモー
ドとCBCモードとの両方のモードの処理を実行する暗
号処理回路の構成ブロック図である。この回路を用いた
CFBモード暗号化動作について、図5〜図9を用いて
説明する。
FIG. 4 is a block diagram showing the configuration of the cryptographic processing circuit according to the first embodiment of the present invention. FIG. 1 is a block diagram showing the configuration of a cryptographic processing circuit that executes processing in both the CFB mode and the CBC mode. The CFB mode encryption operation using this circuit will be described with reference to FIGS.

【0060】図5はCFBモード暗号化動作(その1)
の説明図である。ここで使用される回路の結線部分につ
いては実線で、また使用されない部分については破線で
示してある。まず最初の平文ブロックM1 の入力(か
ら)に対応して、レジスタ21に格納されている初期ベ
クトルIVがセレクタ22,23、EXOR回路24,
25を介してf関数26に与えらる。この時セレクタ2
2,23はレジスタ21からの出力を選択し、またEX
OR回路24,25に対してはセレクタ31,32を介
して56ビットと8ビットの“0”のデータが入力され
ている。このためレジスタ21に格納されていた初期ベ
クトルIVの値はそのままf関数26に与えられる。ま
たレジスタ21に格納されていたIVの値は8ビットシ
フトされるだけで、実質的にそのままレジスタ28に格
納される。そしてf関数26に含まれる4段の変換回路
の処理結果はセレクタ27を介してレジスタ21に格納
される。
FIG. 5 shows the CFB mode encryption operation (1).
FIG. The connection portions of the circuits used here are shown by solid lines, and the unused portions are shown by broken lines. First in response to the first input of the plaintext blocks M 1 (from) the initial stored in the register 21 vector IV selectors 22, 23, EXOR circuit 24,
25 to the f-function 26. At this time, selector 2
2, 23 select the output from register 21 and
56-bit and 8-bit “0” data are input to the OR circuits 24 and 25 via the selectors 31 and 32. Therefore, the value of the initial vector IV stored in the register 21 is given to the f-function 26 as it is. Further, the value of IV stored in the register 21 is stored in the register 28 substantially as it is by shifting only 8 bits. The processing results of the four-stage conversion circuit included in the f-function 26 are stored in the register 21 via the selector 27.

【0061】図6はCFBモード暗号化動作(その2)
の説明図である。同図はf関数26、セレクタ27、レ
ジスタ21を介する4回のループのうち、第2回目と第
3回目のループにおける処理動作の説明図である。これ
らのループにおいてはセレクタ22,23はレジスタ2
1からの出力を選択し、またセレクタ31,32は56
ビットの“0”と8ビットの“0”をそれぞれEXOR
回路24,25に出力しているため、レジスタ21のデ
ータはそのままf関数26に与えられ、4段の処理結果
はセレクタ27を介してレジスタ21に格納される。
FIG. 6 shows CFB mode encryption operation (part 2).
FIG. FIG. 9 is an explanatory diagram of the processing operation in the second and third loops among the four loops via the f function 26, the selector 27, and the register 21. In these loops, the selectors 22 and 23 use the register 2
1 and the selectors 31 and 32 select 56 outputs.
EXOR each bit “0” and 8-bit “0”
Since the data is output to the circuits 24 and 25, the data of the register 21 is directly provided to the f-function 26, and the processing results of the four stages are stored in the register 21 via the selector 27.

【0062】図7はCFBモード暗号化動作(その3)
の説明図である。同図において、レジスタ21に格納さ
れている3回目のループの処理結果は、前述と同様にセ
レクタ22,23、EXOR回路24,25を介してそ
のままf関数26に与えられる。f関数26の出力は1
6段のf関数を用いた初期ベクトルIVの暗号化処理結
果であるため、その左8ビットが取り出され、入力に
与えられる平文の最初のブロックM1 の8ビットとの論
理和がEXOR回路30によってとられ、暗号文の最初
のブロックC1 として出力から出力される。また平文
ブロックM1 の8ビットはレジスタ33に格納される。
FIG. 7 shows the CFB mode encryption operation (part 3).
FIG. In the figure, the processing result of the third loop stored in the register 21 is directly provided to the f-function 26 via the selectors 22 and 23 and the EXOR circuits 24 and 25 as described above. The output of the f-function 26 is 1
Since an encryption processing result of the initial vector IV using f function of six stages, the left 8 bits are taken out, the logical sum EXOR circuit with the first 8 bits of the block M 1 of the plaintext applied to the input 30 taken by and outputted from the output as the first block C 1 of the ciphertext. The 8-bit plaintext blocks M 1 is stored in register 33.

【0063】同時にレジスタ28に格納されていた56
ビットが左側に、f関数26の出力のうち左8ビットが
右側に格納される形式で、セレクタ27を介してレジス
タ21に64ビットのデータが格納される。
The 56 stored in the register 28 at the same time
64-bit data is stored in the register 21 via the selector 27 in such a format that bits are stored on the left and eight bits of the output of the f-function 26 are stored on the right.

【0064】図8はCFBモード暗号化動作(その4)
の説明図である。ここでは入力の平文ブロックM2 に対
応する最初の処理が実行される。まずレジスタ21に
(その3)で格納された64ビットのデータが、セレク
タ22,23を介して2つのEXOR回路24,25に
与えられる。この時セレクタ31は56ビットの“0”
を、32はレジスタ33に格納されているデータ、すな
わち入力平文の最初のブロックM1 のデータを出力して
おり、EXOR回路24は64ビットのうち左側56ビ
ットをそのままf関数26に出力するが、回路25は右
側8ビットとM18ビットの排他的論理和を出力するこ
とになり、その結果の64ビットがブロックM2 の入力
に対応する4回のループの処理の最初にf関数26に与
えられる。また実質的にこの入力は8ビットシフトさ
れ、レジスタ28に格納される。そしてf関数26にお
ける4段の変換処理(初期転置を含む)の結果はセレク
タ27を介してレジスタ21に格納される。
FIG. 8 shows the CFB mode encryption operation (part 4).
FIG. Wherein the first process corresponding to the plaintext block M 2 input is performed. First, 64-bit data stored in the register 21 (part 3) is supplied to the two EXOR circuits 24 and 25 via the selectors 22 and 23. At this time, the selector 31 sets the 56-bit "0"
A data is stored in the register 33 32, that is, to output the first data block M 1 of the input plaintext, EXOR circuit 24 is output to the left 56 bits of the 64-bit as the f function 26 , The circuit 25 outputs the exclusive OR of the right 8 bits and M 1 8 bits, and the resulting 64 bits are the f function 26 at the beginning of the processing of the four loops corresponding to the input of the block M 2. Given to. In effect, this input is shifted by 8 bits and stored in the register 28. The result of the four-stage conversion process (including the initial transposition) in the f-function 26 is stored in the register 21 via the selector 27.

【0065】図9はCFBモード暗号化動作のタイミン
グチャートである。動作フローに対する数字は、図5〜
図8で説明した暗号化処理その1〜その4に対応する数
字である。平文の最初のブロックM1 の入力に対して
は、4つのクロックに対応してその1,その2,その
2,その3の処理が実行されて、出力の最初のブロック
1 が得られる。次の入力ブロックM2 以下に対して
は、4つのクロックに対応してその4、その2、その
2、その3の処理が実行され、出力ブロックC2 以下が
得られる。なお、例えば暗号文ブロックC1 は図7で説
明したように、4回目のループの最後にf関数26の出
力と平文ブロックM1 との排他的論理和の結果として短
時間出力されるが、図にはその出力期間を約1クロック
分示してある。出力端子の前にラッチ回路を設ければ
この期間を次の暗号文ブロック出力の前まで延長するこ
とも可能である。
FIG. 9 is a timing chart of the CFB mode encryption operation.
It is a chart. Figures for the operation flow are shown in FIGS.
Numbers corresponding to the encryption processes 1 to 4 described in FIG.
Character. First block M of plaintext1Input
Correspond to the four clocks, 1, 2,
2 and 3 are executed and the first block of output
C 1Is obtained. Next input block MTwoFor
Are four, two, four
2. The processing of the third step is executed, and the output block CTwoThe following
can get. Note that, for example, the ciphertext block C1Is explained in FIG.
As described above, at the end of the fourth loop, the f-function 26 is output.
Power and plaintext block M1Short as a result of exclusive OR with
The output time is shown in the figure.
Minutes are shown. If a latch circuit is provided before the output terminal
This period can be extended before the output of the next ciphertext block.
Both are possible.

【0066】図10はCFBモード復号動作(その1)
の説明図である。同図においては、暗号文の最初のブロ
ックC1 の入力に対応して、レジスタ21に格納されて
いる初期ベクトルIVの値がセレクタ22,23、EX
OR回路24,25を介してそのままf関数26に与え
られる。また初期ベクトルIVは8ビット左シフトされ
るだけでレジスタ28に格納される。そして初期転置を
含むf関数による4段の処理の終了後、その結果はセレ
クタ27を介してレジスタ21に格納される。
FIG. 10 is a CFB mode decoding operation (1).
FIG. In the figure, in response to the input of the first block C 1 of the ciphertext, the value selectors 22 and 23 of the initial vector IV which has been stored in the register 21, EX
The signal is directly supplied to the f-function 26 via the OR circuits 24 and 25. The initial vector IV is stored in the register 28 only by shifting left by 8 bits. After the completion of the four-stage processing by the f-function including the initial transposition, the result is stored in the register 21 via the selector 27.

【0067】図11はCFBモード復号動作(その2)
の説明図である。同図は、f関数を用いる処理としての
4回のループのうちの2回目のループと3回目のループ
の処理動作の説明図である。レジスタ21に格納されて
いる64ビットのデータはセレクタ22,23、EXO
R回路24,25を介してf関数26に与えられ、f関
数26の出力はセレクタ27を介してレジスタ21に格
納される。
FIG. 11 is a CFB mode decoding operation (2).
FIG. FIG. 11 is an explanatory diagram of the processing operation of the second loop and the third loop of the four loops as the processing using the f function. The 64-bit data stored in the register 21 is supplied to the selectors 22, 23, EXO
The f-function 26 is supplied to the f-function 26 via the R circuits 24 and 25, and the output of the f-function 26 is stored in the register 21 via the selector 27.

【0068】図12はCFBモード復号動作(その3)
の説明図である。同図はf関数を用いる4回目のループ
の処理動作を示す。レジスタ21に格納されている64
ビットのデータは、セレクタ22,23、EXOR回路
24,25を介してf関数26に与えられる。f関数を
用いる4段の変換、左右32ビットの入替え、および逆
転置IP-1の処理の後に、その処理結果としての64ビ
ットのうち左8ビットがEXOR回路30に与えられ、
入力から入力される最初の暗号文ブロックC 1 の8ビ
ットとの排他的論理和がとられ、その結果は出力から
平文の最初のブロックM1 として出力される。また同時
にレジスタ28に格納されている56ビットが左側に、
入力暗号文ブロックC1 の8ビットが右側に配置される
形式で、セレクタ27を介してレジスタ21に64ビッ
トのデータとして格納される。
FIG. 12 is a CFB mode decoding operation (3).
FIG. The figure shows the fourth loop using the f function.
Shows the processing operation. 64 stored in the register 21
The bit data is supplied to selectors 22 and 23 and an EXOR circuit.
24 and 25 to the f-function 26. f function
Four-stage conversion used, swap left and right 32 bits, and vice versa
Transpose IP-1After the processing of
The left 8 bits of the bit are given to the EXOR circuit 30,
First ciphertext block C input from input 18
XOR with the output and the result is
First block M of plaintext1Is output as Also at the same time
56 bits stored in the register 28 on the left side,
Input ciphertext block C18 bits are placed on the right
In the register 21 via the selector 27
This is stored as default data.

【0069】図13はCFBモード復号動作のタイミン
グチャートである。動作フローにおける数字は図10〜
図12としてのその1〜その3の処理を示す。入力暗号
文の最初のブロックC1 の入力に対しては、4つのクロ
ックにおいてその1,その2,その2,その3の処理が
実行され、出力平文の最初のブロックM1 が出力され
る。次の入力暗号文ブロックC2 以下の入力に対して
も、全く同様の動作が実行される。
FIG. 13 is a timing chart of the CFB mode decoding operation. Figures in the operation flow
FIG. 12 shows processes 1 to 3 of FIG. For the first input of the block C 1 of the input ciphertext, 1 in its four clock, Part 2, Part 2, the processing of the three runs, the first block M 1 output plaintext is output. Even for the next input ciphertext block C 2 following inputs, exactly the same operation is performed.

【0070】図14はCBCモード暗号化動作(その
1)の説明図である。CBCモードにおいては入力平文
ブロックは入力から入力され、出力暗号文ブロックは
出力から出力される。まず入力から入力された最初
の平文ブロックM1 64ビットは、そのうち左56ビッ
トがセレクタ31に、右8ビットが32に与えられる。
そしてセレクタ31はその56ビットをEXOR回路2
4に、32は8ビットを25に与える。
FIG. 14 is an explanatory diagram of the CBC mode encryption operation (1). In the CBC mode, an input plaintext block is input from an input, and an output ciphertext block is output from an output. First, in the first 64 bits of the plaintext block M 1 input from the input, the left 56 bits are supplied to the selector 31 and the right 8 bits are supplied to the 32.
Then, the selector 31 converts the 56 bits into the EXOR circuit 2
4 and 32 give 8 bits to 25.

【0071】一方レジスタ21に格納されている初期ベ
クトルIVはセレクタ22,23を介してEXOR回路
24,25に与えられ、初期ベクトルIVと最初の平文
入力ブロックM1 との排他的論理和がとられ、その結果
はf関数26に与えられる。そして初期転置IPを含む
4段のf関数を用いる変換の結果は、セレクタ27を介
してレジスタ21に格納される。
[0071] On the other hand the initial vector IV which has been stored in the register 21 is supplied to the EXOR circuits 24 and 25 via the selector 22 and 23, exclusive of the initial vector IV and the first plaintext input block M 1 is bets And the result is given to the f-function 26. Then, the result of the conversion using the four-stage f-function including the initial transpose IP is stored in the register 21 via the selector 27.

【0072】図15はCBCモード暗号化動作(その
2)の説明図である。同図はf関数を用いる4回のルー
プのうち、2回目および3回目のループにおける動作の
説明図である。レジスタ21に格納されている64ビッ
トのデータは、セレクタ22,23を介して2つのEX
OR回路24,25に与えられる。この時セレクタ3
1,32はそれぞれ56ビットの“0”、8ビットの
“0”を出力しているため、その64ビットのデータは
そのままf関数26に与えられる。そしてf関数を用い
る4段の変換処理の結果は、セレクタ27を介してレジ
スタ21に格納される。
FIG. 15 is an explanatory diagram of the CBC mode encryption operation (2). FIG. 11 is an explanatory diagram of the operation in the second and third loops among the four loops using the f function. The 64-bit data stored in the register 21 is supplied to two EXs via selectors 22 and 23.
This is applied to OR circuits 24 and 25. At this time, selector 3
Since 1 and 32 output 56-bit “0” and 8-bit “0”, the 64-bit data is directly supplied to the f-function 26. The result of the four-stage conversion process using the f function is stored in the register 21 via the selector 27.

【0073】図16はCBCモード暗号化動作(その
3)の説明図である。同図はf関数を用いる4回目のル
ープの動作を説明するものである。レジスタ21に格納
されている64ビットのデータは、前述と同様にセレク
タ22,23、EXOR回路24,25を介して、その
ままf関数26に与えられる。f関数を用いる4段の変
換、左右32ビットの入れ替え、および逆転置IP-1
処理結果は、セレクタ27を介してレジスタ21に格納
される。レジスタ21に格納された64ビットのデータ
は、EXOR回路34を介してそのまま出力から出力
暗号文の最初のブロックC1 として出力さる。この時セ
レクタ35は64ビットの“0”をEXOR回路34に
出力している。またレジスタ21に格納された出力暗号
文の最初のブロックC1 は、次の平文ブロックM2 の入
力時点で暗号化動作(その1)によって入力ブロックM
2 と、前述と同様にして、排他的論理和がとられること
になる。
FIG. 16 is an explanatory diagram of the CBC mode encryption operation (3). FIG. 11 illustrates the operation of the fourth loop using the f function. The 64-bit data stored in the register 21 is directly supplied to the f-function 26 via the selectors 22 and 23 and the EXOR circuits 24 and 25 as described above. The processing results of the four-stage conversion using the f-function, the swapping of left and right 32 bits, and the inverse transposition IP −1 are stored in the register 21 via the selector 27. 64-bit data is stored in the register 21, the output monkey as it is from the output through the EXOR circuit 34 as a first block C 1 of the output ciphertext. At this time, the selector 35 outputs “0” of 64 bits to the EXOR circuit 34. The first block C 1 of the output ciphertext stored in the register 21, input block M at the input point of the next plaintext block M 2 by the encryption operation (Part 1)
Exclusive OR is performed with 2 in the same manner as described above.

【0074】図17はCBCモード暗号化動作のタイミ
ングチャートである。入力平文ブロックM1 の入力に対
応して、4つのクロックにおいてその1、その2、その
2、その3の動作が実行され、出力暗号文の最初のブロ
ックC1 が出力される。平文ブロックM2 以下の入力に
対する動作は全く同様である。
FIG. 17 is a timing chart of the CBC mode encryption operation. In response to the input of the input plaintext block M 1, Part 1 in four clocks, Part 2, Part 2, Part 3 of the operation is performed, the first block C 1 of the output ciphertext is output. Operation for the plaintext block M 2 following input is exactly the same.

【0075】図18はCBCモード復号動作(その1)
の説明図である。CBCモード復号動作では、初期ベク
トルIVはレジスタ37に格納されている。最初の暗号
文ブロックC1 が入力から入力されると、セレクタ3
1ではその左側56ビット、32では右側8ビットが選
択されて、2つのEXOR回路24,25に与えられ
る。この時セレクタ22,23は共に56ビットの
“0”、8ビットの“0”を出力しており、このため入
力暗号文ブロックC1 の64ビットはそのままf関数2
6に与えられる。そして初期転置IPを含む、f関数を
用いる4段の処理結果は、セレクタ27を介してレジス
タ21に格納される。
FIG. 18 is a CBC mode decoding operation (1).
FIG. In the CBC mode decoding operation, the initial vector IV is stored in the register 37. When the first ciphertext block C 1 is input from the input selector 3
In the case of 1, the left 56 bits are selected, and in the case of 32, the right 8 bits are selected and supplied to the two EXOR circuits 24 and 25. "0" at this time the selector 22 and 23 are both 56 bits, and outputs "0" of 8 bits, thus 64 bits of the input ciphertext block C 1 is as f function 2
6 given. Then, the processing results of the four stages using the f function, including the initial transposition IP, are stored in the register 21 via the selector 27.

【0076】図19はCBCモード復号動作(その2)
の説明図である。同図はf関数を用いる4回のループの
うち2回目、3回目のループにおける動作説明図であ
る。同図においてレジスタ21に格納されている64ビ
ットのデータは、セレクタ22,23、EXOR回路2
4,25を介してそのままf関数26に与えられ、f関
数を用いる4段の変換の処理結果はセレクタ27を介し
てレジスタ21に格納される。またレジスタ37に格納
されている初期ベクトルIVは例えば3回目(2回目で
もよい)のループの処理時にレジスタ36に格納され
る。
FIG. 19 shows a CBC mode decoding operation (2).
FIG. FIG. 9 is an explanatory diagram of the operation in the second and third loops among the four loops using the f function. In the figure, 64-bit data stored in the register 21 is transmitted to the selectors 22 and 23 and the EXOR circuit 2.
The processing result of the four-stage conversion using the f-function is directly stored in the register 21 via the selector 27. The initial vector IV stored in the register 37 is stored in the register 36 at the time of, for example, the third (or second) loop processing.

【0077】図20はCBCモード復号動作(その3)
の説明図である。同図において4回目のループとして、
レジスタ21に格納されている64ビットのデータはそ
のままf関数26に与えられ、f関数を用いる4段の変
換、左右32ビットの入れ替え、および逆転置IP-1
処理結果がセレクタ27を介してレジスタ21に与えら
れる。レジスタ21に格納された64ビットのデータは
EXOR回路34に与えられ、レジスタ36に格納され
ている初期ベクトルIVとの排他的論理和がとられ、出
力から出力平文の最初のブロックM1 として出力され
る。またこの時次の暗号文ブロックC2 に対する(その
3)の動作においてEXOR回路34に出力するための
データとして、入力暗号文の最初のブロックC1 がレジ
スタ37に格納される。
FIG. 20 shows a CBC mode decoding operation (3).
FIG. As the fourth loop in FIG.
The 64-bit data stored in the register 21 is directly provided to the f-function 26, and the processing results of the four-stage conversion using the f-function, exchanging the left and right 32 bits, and the inverse transposition IP −1 are passed through the selector 27. It is provided to a register 21. 64-bit data stored in the register 21 is supplied to the EXOR circuit 34, the exclusive OR of the initial vector IV is taken, which is stored in the register 36, output as the first block M 1 outputs the plain text from the output Is done. As data to be output to the EXOR circuit 34 in the operation of (3) this time for the next ciphertext block C 2, the first block C 1 of the input ciphertext is stored in the register 37.

【0078】図21はCBCモード復号動作のタイミン
グチャートである。同図において暗号文の最初のブロッ
クC1 の入力に対しては、4つのクロックにおいてその
1、その2、その2、その3の動作が行われ、平文の最
初のブロックM1 が出力される。以下暗号文の次のブロ
ックC2 ・・・の入力に対する動作は全く同様である。
FIG. 21 is a timing chart of the CBC mode decoding operation. For the first input of the block C 1 of the ciphertext in the figure, the 1 in four clocks, Part 2, Part 2, Part 3 of the operation is performed, the first block M 1 of the plaintext is output . The operation for the input of the next block C 2 ... Of the cipher text is exactly the same.

【0079】図22は本発明の第2の実施形態としての
CFBモードとCBCモードの2つの動作を実行する暗
号処理回路の構成ブロック図である。図4の第1の実施
形態においては、2つのEXOR回路24,25がCB
Cモードだけでなく、CFBモードの暗号化動作におい
ても、f関数26に与えるべき64ビットのデータのう
ちで左側8ビットに対する排他的論理和をとるために用
いられていたが、図22においてはこの排他的論理和が
EXOR回路45によってとられる点に基本的な相違が
ある。このため図4のセレクタ22,23は1つのセレ
クタ41、EXOR回路24,25は1つのEXOR回
路42、セレクタ31,32は1つのセレクタ43によ
って実現されている。
FIG. 22 is a block diagram showing a configuration of a cryptographic processing circuit for executing two operations of the CFB mode and the CBC mode according to the second embodiment of the present invention. In the first embodiment of FIG. 4, two EXOR circuits 24 and 25 are CB
In the encryption operation not only in the C mode but also in the CFB mode, the data is used to perform an exclusive OR operation on the left 8 bits of the 64-bit data to be given to the f-function 26, but in FIG. There is a fundamental difference in that the exclusive OR is taken by the EXOR circuit 45. Therefore, the selectors 22 and 23 of FIG. 4 are realized by one selector 41, the EXOR circuits 24 and 25 are realized by one EXOR circuit 42, and the selectors 31 and 32 are realized by one selector 43.

【0080】図22の第2の実施形態と図4の第1の実
施形態との相違は基本的にCFBモード暗号化動作にあ
るため、その動作を中心に図22について説明する。図
22では、前述のCFBモード暗号化動作(その1)に
対応して、レジスタ21に格納されている初期ベクトル
IVはセレクタ41、EXOR回路42を介してそのま
まf関数26に与えられ、その処理結果はセレクタ46
を介してレジスタ21に格納される。暗号化動作(その
2)における動作も同様である。
The difference between the second embodiment shown in FIG. 22 and the first embodiment shown in FIG. 4 resides in the CFB mode encryption operation. Therefore, FIG. 22 will be described focusing on the operation. In FIG. 22, the initial vector IV stored in the register 21 is directly supplied to the f-function 26 via the selector 41 and the EXOR circuit 42 in correspondence with the above-described CFB mode encryption operation (part 1). The result is selector 46
Is stored in the register 21 via the. The same applies to the operation in the encryption operation (2).

【0081】暗号化動作(その3)に相当して、4回目
のループとしてのf関数26の出力のうち左8ビット
が、入力から入力される最初の平文ブロックM1 とE
XOR回路30によって排他的論理和がとられ、出力
から最初の暗号文ブロックC1として出力される。また
同時にレジスタ44に格納されている56ビットが左側
に、f関数26の出力のうち左8ビットと入力ブロック
1 8ビットとの排他的論理和がEXOR回路45によ
ってとられた結果が右側に配置される形式で、セレクタ
46を介して64ビットのデータがレジスタ21に格納
される。このレジスタ21に格納されたデータのうち右
8ビットはすでに入力との排他的論理和がとられたもの
であり、次の平文ブロックM2 の入力に対応してセレク
タ41、EXOR回路42を介してそのままf関数26
に与えられることになる。
Equivalent to the encryption operation (No. 3), the left 8 bits of the output of the f function 26 as the fourth loop are the first plaintext blocks M 1 and E
XOR is taken by the XOR circuit 30 is output first as the ciphertext block C 1 from the output. At the same time, 56 bits stored in the register 44 are on the left, and the exclusive OR of the left 8 bits of the output of the f-function 26 and the input block M 1 8 bits by the EXOR circuit 45 is on the right. In the arrangement format, 64-bit data is stored in the register 21 via the selector 46. Right 8 bits of data stored in the register 21 are those already exclusive OR of the input taken via a selector 41, EXOR circuit 42 in response to the input of the next plaintext block M 2 F function 26
Will be given to

【0082】CFBモード復号、CBCモード暗号化、
およびCBCモード復号の動作は第1の実施形態におけ
ると実質的に同じであるため、その説明を省略する。図
23は、第1の実施形態と第2の実施形態とにおいて、
1つのクロックに含まれる処理の説明図である。図4に
示した第1の実施形態および図22に示した第2の実施
形態のそれぞれにおいて、f関数26を用いた16段の
変換は4段ずつ4つのクロックに分けて行われ、1つの
ブロックデータに対する暗号化処理のために4つのクロ
ックを必要とする点は、いずれの実施形態においても同
様である。しかしながら第1の実施形態においては、1
つのクロック内で行われる処理の遅延時間の合計が第2
の実施形態におけるよりも短くなり、結果的にクロック
の速度を上げることが可能となり、暗号化処理を高速化
することができる。
CFB mode decryption, CBC mode encryption,
Since the operation of CBC mode decoding is substantially the same as that of the first embodiment, description thereof will be omitted. FIG. 23 shows the first embodiment and the second embodiment.
FIG. 4 is an explanatory diagram of a process included in one clock. In each of the first embodiment shown in FIG. 4 and the second embodiment shown in FIG. 22, 16-stage conversion using the f-function 26 is performed by dividing four clocks into four stages, and one The point that four clocks are required for the encryption processing on the block data is the same in any of the embodiments. However, in the first embodiment, 1
The total delay time of the processing performed within one clock is the second
As a result, the clock speed can be increased, and the encryption process can be sped up.

【0083】図23のf関数による1〜4段目の変換を
含む1回目のループにおいて、下段の第1の実施形態に
対応する図4ではレジスタ21からの出力による遅延、
セレクタ22,23による遅延、EXOR回路24,2
5による処理の遅延、4段のf関数を用いる変換(初期
転置を含む)の遅延、セレクタ27による遅延に加え
て、レジスタ21におけるデータのセットアップによる
遅延が1つのクロック内に含まれることになる。
In the first loop including the conversion of the first to fourth stages by the f function in FIG. 23, the delay caused by the output from the register 21 in FIG.
Delay by selectors 22 and 23, EXOR circuits 24 and 2
In addition to the processing delay by 5, the delay of the conversion (including the initial transposition) using the four-stage f-function, and the delay by the selector 27, the delay due to the setup of the data in the register 21 is included in one clock. .

【0084】それに対して上段の第2の実施形態に対応
する図22の回路においては、レジスタ21によるデー
タ出力の遅延、セレクタ41による遅延、EXOR回路
42による遅延、f関数を用いる4段の変換による遅延
の後に、EXOR回路45による遅延、セレクタ27に
よる遅延、レジスタ21のデータセットアップによる遅
延が含まれる。すなわち第1の実施形態に比べてEXO
R回路45による遅延が余計に含まれ、第2の実施形態
においてはその分だけ第1の実施形態に比べてクロック
の周期が長くなり、高速化の面では第1の実施形態より
劣ることになる。しかしながらこの点を除けば、第2の
実施形態においてもCFBモードとCBCモードとの両
方の操作モードを実行する暗号処理回路が実現される。
On the other hand, in the circuit shown in FIG. 22 corresponding to the second embodiment in the upper stage, the delay of the data output by the register 21, the delay by the selector 41, the delay by the EXOR circuit 42, and the four-stage conversion using the f function , A delay due to the EXOR circuit 45, a delay due to the selector 27, and a delay due to data setup of the register 21 are included. That is, EXO is different from that of the first embodiment.
The delay due to the R circuit 45 is additionally included, and the clock cycle is longer in the second embodiment than in the first embodiment, which is inferior to the first embodiment in terms of speeding up. Become. However, except for this point, also in the second embodiment, a cryptographic processing circuit that executes both operation modes of the CFB mode and the CBC mode is realized.

【0085】[0085]

【発明の効果】以上詳細に説明したように、本発明によ
ればDES暗号のCBCモードとCFBモードとの両方
の操作モードを実行できる暗号処理回路を実現すること
が可能となる。また第1の実施形態においては、CFB
モードにおけるモード処理を次のブロックデータに対す
る処理の最初に移動することによって、CBCモードの
処理を実行する部分と共通の部分を使用することが可能
となり、処理ループの最大遅延を短縮することができ、
高速処理が可能となる。また同時に排他的論理和の回路
の削減も可能となり、ハードウェア量を減少することが
でき、暗号処理方式の実用性向上に寄与するところが大
きい。
As described above in detail, according to the present invention, it is possible to realize a cryptographic processing circuit capable of executing both the CBC mode and the CFB mode of the DES encryption. In the first embodiment, CFB
By moving the mode processing in the mode to the beginning of the processing for the next block data, it is possible to use the same part as the part that executes the processing in the CBC mode, and it is possible to reduce the maximum delay of the processing loop. ,
High-speed processing becomes possible. At the same time, the number of exclusive OR circuits can be reduced, and the amount of hardware can be reduced, which greatly contributes to improving the practicality of the encryption processing method.

【図面の簡単な説明】[Brief description of the drawings]

【図1】第1の実施形態に対応する原理構成ブロック図
である。
FIG. 1 is a principle configuration block diagram corresponding to a first embodiment.

【図2】第2の実施形態に対応する原理構成ブロック図
である。
FIG. 2 is a principle configuration block diagram corresponding to a second embodiment.

【図3】本発明の第1の実施形態において使用されるC
FBモード暗号化回路の構成を示すブロック図である。
FIG. 3 shows C used in the first embodiment of the present invention.
FIG. 3 is a block diagram illustrating a configuration of an FB mode encryption circuit.

【図4】本発明の第1の実施形態としての暗号処理回路
の構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of a cryptographic processing circuit according to the first embodiment of the present invention.

【図5】第1の実施形態におけるCFBモード暗号化動
作(その1)の説明図である。
FIG. 5 is an explanatory diagram of a CFB mode encryption operation (1) in the first embodiment.

【図6】第1の実施形態におけるCFBモード暗号化動
作(その2)の説明図である。
FIG. 6 is an explanatory diagram of a CFB mode encryption operation (2) in the first embodiment.

【図7】第1の実施形態におけるCFBモード暗号化動
作(その3)の説明図である。
FIG. 7 is an explanatory diagram of a CFB mode encryption operation (3) in the first embodiment.

【図8】第1の実施形態におけるCFBモード暗号化動
作(その4)の説明図である。
FIG. 8 is an explanatory diagram of a CFB mode encryption operation (part 4) in the first embodiment.

【図9】CFBモード暗号化動作のタイミングチャート
である。
FIG. 9 is a timing chart of a CFB mode encryption operation.

【図10】第1の実施形態におけるCFBモード復号動
作(その1)の説明図である。
FIG. 10 is an explanatory diagram of a CFB mode decoding operation (part 1) in the first embodiment.

【図11】第1の実施形態におけるCFBモード復号動
作(その2)の説明図である。
FIG. 11 is an explanatory diagram of a CFB mode decoding operation (2) in the first embodiment.

【図12】第1の実施形態におけるCFBモード復号動
作(その3)の説明図である。
FIG. 12 is an explanatory diagram of a CFB mode decoding operation (part 3) in the first embodiment.

【図13】CFBモード復号動作のタイミングチャート
である。
FIG. 13 is a timing chart of a CFB mode decoding operation.

【図14】第1の実施形態におけるCBCモード暗号化
動作(その1)の説明図である。
FIG. 14 is an explanatory diagram of a CBC mode encryption operation (part 1) in the first embodiment.

【図15】第1の実施形態におけるCBCモード暗号化
動作(その2)の説明図である。
FIG. 15 is an explanatory diagram of a CBC mode encryption operation (part 2) in the first embodiment.

【図16】第1の実施形態におけるCBCモード暗号化
動作(その3)の説明図である。
FIG. 16 is an explanatory diagram of a CBC mode encryption operation (3) in the first embodiment.

【図17】CBCモード暗号化動作のタイミングチャー
トである。
FIG. 17 is a timing chart of the CBC mode encryption operation.

【図18】第1の実施形態におけるCBCモード復号動
作(その1)の説明図である。
FIG. 18 is an explanatory diagram of a CBC mode decoding operation (part 1) in the first embodiment.

【図19】第1の実施形態におけるCBCモード復号動
作(その2)の説明図である。
FIG. 19 is an explanatory diagram of a CBC mode decoding operation (2) in the first embodiment.

【図20】第1の実施形態におけるCBCモード復号動
作(その3)の説明図である。
FIG. 20 is an explanatory diagram of a CBC mode decoding operation (3) in the first embodiment.

【図21】CBCモード復号動作のタイミングチャート
である。
FIG. 21 is a timing chart of a CBC mode decoding operation.

【図22】本発明の第2の実施形態としての暗号処理回
路の構成を示すブロック図である。
FIG. 22 is a block diagram illustrating a configuration of a cryptographic processing circuit according to a second embodiment of the present invention.

【図23】第1の実施形態と第2の実施形態における1
つのクロック内で行われる処理の比較を示す図である。
FIG. 23 illustrates a first embodiment and a second embodiment.
FIG. 7 is a diagram illustrating a comparison of processes performed in one clock.

【図24】CBCモードにおける暗号化処理の基本説明
図である。
FIG. 24 is a basic explanatory diagram of an encryption process in a CBC mode.

【図25】CFBモードの暗号化処理の基本説明図であ
る。
FIG. 25 is a basic explanatory diagram of an encryption process in a CFB mode.

【図26】CBCモードの暗号処理回路の従来例を示す
図である。
FIG. 26 is a diagram illustrating a conventional example of a CBC mode encryption processing circuit.

【図27】CFBモードの暗号処理回路の従来例を示す
図である。
FIG. 27 is a diagram showing a conventional example of a CFB mode encryption processing circuit.

【符号の説明】[Explanation of symbols]

1 データ格納手段 2 関数処理手段 3 モード処理手段 4 第1のモード処理手段 5 第2のモード処理手段 21,28,33,36,37,44 レジスタ 22,23,27,31,32,35,41,46 セ
レクタ 24,25,30,34,42,45 EXOR回路 26 f関数(処理回路)
DESCRIPTION OF SYMBOLS 1 Data storage means 2 Function processing means 3 Mode processing means 4 First mode processing means 5 Second mode processing means 21, 28, 33, 36, 37, 44 Registers 22, 23, 27, 31, 32, 35, 41, 46 selector 24, 25, 30, 34, 42, 45 EXOR circuit 26 f function (processing circuit)

Claims (15)

【特許請求の範囲】[Claims] 【請求項1】 ブロック暗号化の処理を行う暗号処理回
路において、 ブロック暗号化処理に用いられる初期ベクトル、処理中
間値、または処理最終結果を格納するデータ格納手段
と、 ブロック暗号化処理内で用いられる関数処理を実行する
関数処理手段と、 該データ格納手段と関数処理手段との間に備えられ、ブ
ロック暗号化の操作モードに対応する処理を実行するモ
ード処理手段とを備えることを特徴とする高速暗号処理
回路。
1. An encryption processing circuit for performing a block encryption process, comprising: a data storage means for storing an initial vector, a processing intermediate value, or a final processing result used for the block encryption process; Function processing means for executing a function processing to be performed, and mode processing means provided between the data storage means and the function processing means for executing processing corresponding to an operation mode of block encryption. High-speed encryption processing circuit.
【請求項2】 前記モード処理手段が排他的論理和回路
によって構成されることを特徴とする請求項1記載の高
速暗号処理回路。
2. The high-speed encryption processing circuit according to claim 1, wherein said mode processing means comprises an exclusive OR circuit.
【請求項3】 前記ブロック暗号がDES暗号であり、
前記操作モードがCFBモードであることを特徴とする
請求項1、または2記載の高速暗号処理回路。
3. The block cipher is a DES cipher,
3. The high-speed encryption processing circuit according to claim 1, wherein the operation mode is a CFB mode.
【請求項4】 前記関数処理手段が、前記DES暗号へ
のブロックデータの暗号化における前記関数処理として
の非線形関数を用いる16段の変換を複数回に分けて実
行することを特徴とする請求項3記載の高速暗号処理回
路。
4. The function processing means executes a 16-stage conversion using a non-linear function as the function processing in the block data encryption to the DES encryption in a plurality of times. 3. The high-speed encryption processing circuit according to 3.
【請求項5】 前記関数処理手段が、前記複数回の最後
の1回を除く毎回の実行結果を前記データ格納手段に出
力することを特徴とする請求項4記載の高速暗号処理回
路。
5. The high-speed encryption processing circuit according to claim 4, wherein said function processing means outputs an execution result of each time except for the last one of said plurality of times to said data storage means.
【請求項6】 前記関数処理手段による、前記複数回の
最終回の処理結果を用いて、入力ブロックデータに対す
る暗号化ブロックデータを出力する暗号化データ出力手
段を更に備えることを特徴とする請求項4記載の高速暗
号処理回路。
6. The apparatus according to claim 1, further comprising an encrypted data output unit that outputs encrypted block data corresponding to input block data by using a result of the plurality of final processes performed by the function processing unit. 4. The high-speed encryption processing circuit according to 4.
【請求項7】 前記関数処理手段による、前記複数回の
最初の回の実行の前に、前記モード処理手段がモード処
理を実行し、該実行結果を該関数処理手段に出力すると
共に、 該モード処理の実行結果の一部を格納するモード処理結
果格納手段を更に備えることを特徴とする請求項4記載
の高速暗号処理回路。
7. The mode processing means executes mode processing before the first execution of the plurality of times by the function processing means, and outputs the execution result to the function processing means. 5. The high-speed encryption processing circuit according to claim 4, further comprising mode processing result storage means for storing a part of the processing execution result.
【請求項8】 前記関数処理手段による、前記複数回の
最後の回の実行時に、前記モード処理結果格納手段が保
持しているデータを前記データ格納手段に出力すると共
に、該関数処理手段が該実行結果の一部を該データ格納
手段に出力することを特徴とする請求項7記載の高速暗
号処理回路。
8. When the function processing unit executes the last of the plurality of times, the data stored in the mode processing result storage unit is output to the data storage unit, and the function processing unit is configured to output the data. 8. The high-speed encryption processing circuit according to claim 7, wherein a part of the execution result is output to said data storage means.
【請求項9】 前記ブロック暗号がDES暗号であり、
前記操作モードがCBCモードであることを特徴とする
請求項1、または2記載の高速暗号処理回路。
9. The block cipher is a DES cipher,
3. The high-speed encryption processing circuit according to claim 1, wherein the operation mode is a CBC mode.
【請求項10】 前記関数処理手段が、前記DES暗号
へのブロックデータの暗号化における前記関数処理とし
ての非線形関数を用いる16段の変換を複数回に分けて
実行することを特徴とする請求項9記載の高速暗号処理
回路。
10. The function processing means executes a 16-stage conversion using a non-linear function as the function processing in the encryption of the block data into the DES encryption in a plurality of times. 9. The high-speed encryption processing circuit according to 9.
【請求項11】 前記関数処理手段が、前記複数回の毎
回の実行結果を前記データ格納手段に出力することを特
徴とする請求項9記載の高速暗号処理回路。
11. The high-speed encryption processing circuit according to claim 9, wherein said function processing means outputs a result of said plurality of executions to said data storage means.
【請求項12】 前記関数処理手段による前記複数回の
最初の回の実行の前に、前記モード処理手段が入力され
るブロックデータと前記格納手段に格納されているデー
タとを用いてモード処理を実行し、該モード処理の結果
を該関数処理手段に出力することを特徴とする請求項9
記載の高速暗号処理回路。
12. The mode processing means performs a mode process using the input block data and the data stored in the storage means before the first execution of the plurality of times by the function processing means. Executing the mode processing and outputting a result of the mode processing to the function processing means.
A high-speed cryptographic processing circuit as described.
【請求項13】 ブロック暗号化の処理を行う暗号処理
回路において、 ブロック暗号化処理に用いられる初期ベクトル、処理中
間値、または処理最終結果を格納するデータ格納手段
と、 ブロック暗号化処理内で用いられる関数処理を実行する
関数処理手段と、 該データ格納手段と関数処理との間に備えられ、ブロッ
ク暗号化の操作モードに対応する第1の処理を実行する
第1のモード処理手段と、 該関数処理手段とデータ格納手段との間に備えられ、ブ
ロック暗号化の操作モードに対応する第2の処理を実行
する第2のモード処理手段とを備えることを特徴とする
高速暗号処理回路。
13. A cryptographic processing circuit for performing a block encryption process, comprising: a data storage means for storing an initial vector, a process intermediate value, or a process final result used in the block encryption process; Function processing means for executing a function processing to be performed; first mode processing means provided between the data storage means and the function processing for executing a first processing corresponding to an operation mode of block encryption; A high-speed cryptographic processing circuit comprising: a second mode processing unit that is provided between the function processing unit and the data storage unit and that executes a second process corresponding to an operation mode of block encryption.
【請求項14】 ブロック暗号化の処理を行う暗号処理
方法において、 1つのブロックデータの暗号化処理の終了時点で処理結
果を出力すると共に、初期ベクトルを格納していたレジ
スタに該暗号化処理における処理中間値、または処理最
終結果を格納し、 該1つのブロックデータ、または該1つのブロックに続
く次のブロックのデータとレジスタに格納されたデータ
との間で該ブロック暗号化の操作モードに対応する演算
を実行し、 該演算結果を、該1つのブロックに続く次のブロックデ
ータに対する暗号化処理における前記初期ベクトルに相
当する値として用いて、該次のブロックデータに対する
暗号化処理を行うことを特徴とする暗号処理方法。
14. An encryption processing method for performing block encryption processing, comprising: outputting a processing result at the end of encryption processing of one block data; and storing the processing result in a register storing an initial vector. A processing intermediate value or a processing final result is stored, and the one block data or the data of the next block following the one block and the data stored in the register correspond to the operation mode of the block encryption. And performing the encryption process on the next block data by using the calculation result as a value corresponding to the initial vector in the encryption process on the next block data following the one block. Characteristic cryptographic processing method.
【請求項15】 前記ブロック暗号がDES暗号であ
り、前記操作モードがCFBモード、たまはCBCモー
ドであることを特徴とする請求項14記載の暗号処理方
法。
15. The cryptographic processing method according to claim 14, wherein the block cipher is a DES cipher, and the operation mode is a CFB mode or a CBC mode.
JP10240844A 1998-08-26 1998-08-26 High-speed cipher processing circuit and processing method Withdrawn JP2000075785A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10240844A JP2000075785A (en) 1998-08-26 1998-08-26 High-speed cipher processing circuit and processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10240844A JP2000075785A (en) 1998-08-26 1998-08-26 High-speed cipher processing circuit and processing method

Publications (1)

Publication Number Publication Date
JP2000075785A true JP2000075785A (en) 2000-03-14

Family

ID=17065555

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10240844A Withdrawn JP2000075785A (en) 1998-08-26 1998-08-26 High-speed cipher processing circuit and processing method

Country Status (1)

Country Link
JP (1) JP2000075785A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002058037A1 (en) * 2001-01-22 2002-07-25 Fujitsu Limited Cipher circuit
KR100390821B1 (en) * 2000-05-31 2003-07-12 주식회사 하이닉스반도체 Encryption device using data encryption standard algorithm
WO2004015916A1 (en) * 2002-08-08 2004-02-19 Matsushita Electric Industrial Co., Ltd. Encrypting/decrypting device and method, encrypting device and method, decrypting device and method, and transmitting/receiving device
JP2004226966A (en) * 2003-01-24 2004-08-12 Samsung Electronics Co Ltd Cryptographic apparatus for supporting multiple modes
KR100749414B1 (en) 2005-12-10 2007-08-14 한국전자통신연구원 Apparatus and method of encryption, and apparatus and method of decryption of mobile internet system
JP2010109639A (en) * 2008-10-30 2010-05-13 Fujitsu Microelectronics Ltd Swap circuit in common key block cipher, and encryption/decryption circuit including the same
JP4745598B2 (en) * 2001-01-22 2011-08-10 富士通株式会社 Cryptographic circuit

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100390821B1 (en) * 2000-05-31 2003-07-12 주식회사 하이닉스반도체 Encryption device using data encryption standard algorithm
WO2002058037A1 (en) * 2001-01-22 2002-07-25 Fujitsu Limited Cipher circuit
JP4745598B2 (en) * 2001-01-22 2011-08-10 富士通株式会社 Cryptographic circuit
WO2004015916A1 (en) * 2002-08-08 2004-02-19 Matsushita Electric Industrial Co., Ltd. Encrypting/decrypting device and method, encrypting device and method, decrypting device and method, and transmitting/receiving device
US7532726B2 (en) * 2002-08-08 2009-05-12 Panasonic Corporation Encryption/decryption device and method, encryption device and method, decryption device and method, and transmission/reception apparatus
JP2004226966A (en) * 2003-01-24 2004-08-12 Samsung Electronics Co Ltd Cryptographic apparatus for supporting multiple modes
JP4684550B2 (en) * 2003-01-24 2011-05-18 三星電子株式会社 Cryptographic device that supports multiple modes of operation
KR100749414B1 (en) 2005-12-10 2007-08-14 한국전자통신연구원 Apparatus and method of encryption, and apparatus and method of decryption of mobile internet system
JP2010109639A (en) * 2008-10-30 2010-05-13 Fujitsu Microelectronics Ltd Swap circuit in common key block cipher, and encryption/decryption circuit including the same

Similar Documents

Publication Publication Date Title
JP4127472B2 (en) Data conversion apparatus, data conversion method and program for data conversion apparatus, and computer-readable recording medium
Andem A cryptanalysis of the tiny encryption algorithm
KR20020006475A (en) Encryption device, decryption device, expanded key generating device, expanded key generating method and recording medium
US20030103626A1 (en) Programmable data encryption engine
JP2007041620A5 (en)
US6732271B1 (en) Method of deciphering ciphered data and apparatus for same
Masoodi et al. Symmetric Algorithms I
CN111934850A (en) Encryption and decryption method for class AES
US7257229B1 (en) Apparatus and method for key scheduling
JP2000075785A (en) High-speed cipher processing circuit and processing method
Patel et al. Hybrid security algorithms for data transmission using AES-DES
JP3547474B2 (en) Cryptographic operation circuit
US20240097880A1 (en) High-speed circuit combining aes and sm4 encryption and decryption
JP2825205B2 (en) Encryption device
JPH09269727A (en) Ciphering method and ciphering device
JPH09251267A (en) Encryption device and encryption method
JPH10153954A (en) Ciphering device
TWI776474B (en) Circuit module of single round advanced encryption standard
KR100377173B1 (en) Encryption device using data encryption standard algorithm
JPH10153955A (en) Ciphering device
KR20030087893A (en) Modular AES Rijndael Round Key Scheduler with On-the-Fly Computation Scheme of Round Key
JP4745598B2 (en) Cryptographic circuit
Tolba et al. A Novel 256-Bit Block Cipher
KR20020003579A (en) Method and apparatus of multi-cycle non-parallel data encryption
JPH10123949A (en) Common key cipher method and system

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20051101