+

JP2825205B2 - Encryption device - Google Patents

Encryption device

Info

Publication number
JP2825205B2
JP2825205B2 JP1340384A JP34038489A JP2825205B2 JP 2825205 B2 JP2825205 B2 JP 2825205B2 JP 1340384 A JP1340384 A JP 1340384A JP 34038489 A JP34038489 A JP 34038489A JP 2825205 B2 JP2825205 B2 JP 2825205B2
Authority
JP
Japan
Prior art keywords
data
stage
processing
key
diffusion
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
JP1340384A
Other languages
Japanese (ja)
Other versions
JPH03129384A (en
Inventor
庄司 宮口
雅彦 岩田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP1340384A priority Critical patent/JP2825205B2/en
Publication of JPH03129384A publication Critical patent/JPH03129384A/en
Application granted granted Critical
Publication of JP2825205B2 publication Critical patent/JP2825205B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 「産業上の利用分野」 この発明は、暗号鍵をパラメータとして、平文から暗
号文を得、及び、暗号文から平文を得る暗号装置に関す
るものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encryption device that obtains a ciphertext from plaintext and obtains a plaintext from ciphertext using an encryption key as a parameter.

「従来の技術」 従来の暗号装置は、例えば特願昭62−308463号「暗号
装置」に示されており、暗号処理部と、鍵処理部とより
なる。第11図に示すように、その暗号処理部において
は、平文(または暗号文)が入力データとして入力さ
れ、鍵処理部で処理された暗号鍵(中間キー)がパラメ
ータとして入力され、8段継続的に設けられた拡散処理
段を経て、暗号文(または平文)を出力する。暗号処理
部に対応する鍵処理部は、第12図に示すように、暗号鍵
が入力データとして入力され、8段継続的に設けられた
拡散処理段を経て、中間キーを出力する。
"Prior Art" A conventional encryption device is disclosed in, for example, Japanese Patent Application No. 62-308463 "Encryption Device", and includes an encryption processing unit and a key processing unit. As shown in FIG. 11, plaintext (or ciphertext) is input as input data to the encryption processing unit, and an encryption key (intermediate key) processed by the key processing unit is input as a parameter. The ciphertext (or plaintext) is output through a diffusion processing stage provided in a specific manner. As shown in FIG. 12, the key processing unit corresponding to the encryption processing unit receives the encryption key as input data, and outputs an intermediate key through eight consecutive diffusion processing stages.

暗号処理部の拡散処理段が例えば4段の暗号装置で
は、拡散処理段が8段の暗号装置と比較して、暗号文を
作るまでの暗号化時間や暗号文から元の平文を作るまで
の復号化時間が短縮する。即ち暗号化速度と復号化速度
が増加する。逆に、拡散処理段が例えば16段の暗号装置
では、拡散処理段が8段の暗号装置と比較して暗号化速
度及び復号化速度が低下する。一般に、拡散処理段の段
数を増すほど暗号の強度が増加することが経験上知られ
ているので、暗号強度を重視する立場からは処理段数を
増やす方が良いと言える。一方、暗号の強度はそれほど
必要としないが、暗号化及び復号化の速度を向上させた
い暗号装置の利用方法があり、例えば暗号装置でデータ
圧縮を行いデータに改ざんが行われているか否かを判定
するために用いる技法がある。この技法は「データ完全
性」と言われており、例えば国際標準のISO9797(デー
タ完全性)に示される。ここでは暗号文生成におけるデ
ータランダム化機能のみを使うので暗号の強度は重視し
ない。
For example, in an encryption device having four encryption stages in the encryption processing unit, compared to an encryption device having eight diffusion stages, the encryption time required to create a ciphertext and the encryption time required to create an original plaintext from a ciphertext are compared. The decoding time is reduced. That is, the encryption speed and the decryption speed increase. Conversely, in an encryption device having 16 diffusion processing stages, for example, the encryption speed and the decryption speed are lower than in an encryption device having 8 diffusion processing stages. Generally, it is known from experience that the encryption strength increases as the number of diffusion processing stages increases, so it can be said that it is better to increase the number of processing stages from the standpoint of emphasizing encryption strength. On the other hand, there is a method of using an encryption device that does not require much encryption strength, but wants to improve the speed of encryption and decryption.For example, it is necessary to check whether data has been falsified by performing data compression in the encryption device. There are techniques used to make decisions. This technique is called "data integrity" and is shown, for example, in the international standard ISO9797 (data integrity). Since only the data randomization function in ciphertext generation is used here, the strength of encryption is not emphasized.

従来の暗号装置においては、暗号処理部の拡散処理段
の継続回数が固定していることが特徴である。従って、
暗号装置の拡散処理段の段数を大きくして、暗号強度を
大きくして使いたい用途と、拡散処理段の段数を少なく
して高速にして使いたい他の用途との両方の利用目的に
使うことができず、柔軟に利用目的ごとの要求に対応す
ることができないという問題点がある。
The conventional encryption device is characterized in that the number of continuations of the diffusion processing stage of the encryption processing unit is fixed. Therefore,
Use for both applications where you want to increase the number of diffusion processing stages in the encryption device and increase the encryption strength, and for other applications where you want to reduce the number of diffusion processing stages and use them faster. And there is a problem that it is not possible to flexibly respond to requests for each purpose of use.

「課題を解決するための手段」 この発明によれば、拡散処理段回数制御部を設けるこ
とにより、暗号装置の暗号処理部の拡散処理段数を可変
とし、設定した繰り返し回数に応じて鍵処理部の拡散処
理段数を決定することにより、暗号装置の利用環境ごと
に要求される性能(暗号化速度及び復号化速度)に対応
できる。
[Means for Solving the Problems] According to the present invention, by providing the number-of-spreading-processing-stages control unit, the number of spreading processing stages of the encryption processing unit of the encryption device is made variable, and the key processing unit is set according to the set number of repetitions. , The performance (encryption speed and decryption speed) required for each use environment of the encryption device can be handled.

「実施例1」 第1図に示すように、暗号処理部においては、平文ま
たは暗号文が入力データとして入力され、鍵処理部で処
理された暗号鍵(中間キー)がパラメータとして入力さ
れる。段数制御データNは、拡散処理段回数制御部300
に入力し、拡散処理段回数制御部300から暗号処理部段
数制御信号310と、鍵処理部段数制御信号311とが出力さ
れる。暗号処理部段数制御信号310は拡散処理段68に入
力し、拡散処理段68をN回繰り返すための制御信号とし
て働く。更に、鍵処理部段数制御信号311は、鍵処理部
の拡散処理段76に入力し、拡散処理段76を((N/2)+
4)回繰り返すための制御信号として働く。
Embodiment 1 As shown in FIG. 1, in the encryption processing unit, plaintext or ciphertext is input as input data, and the encryption key (intermediate key) processed by the key processing unit is input as a parameter. The stage number control data N is stored in the diffusion process stage number controller 300.
, And the number-of-spread-processing-stages control unit 300 outputs a control signal 310 for controlling the number of encryption processing stages and a control signal 311 for controlling the number of key processing units. The encryption processing stage number control signal 310 is input to the spread processing stage 68 and serves as a control signal for repeating the spread processing stage 68 N times. Further, the key processing unit stage number control signal 311 is input to the spreading processing stage 76 of the key processing unit, and the spreading processing stage 76 is set to ((N / 2) +
4) Acts as a control signal for repeating it many times.

暗号処理部は、64ビットの入力データ(平文または暗
号文)が、排他的論理和回路(以下XOR回路と記す)66
で、64ビットのパラメータデータ(中間キー)PN,PN+1,
PN+2,PN+3と排他的論理和演算され、その出力はデータ
拡散部89に入力されて、分割手段67で32ビットずつの左
データ及び右データに分割される。ここでNは、前述し
た段数制御データである。その左データはそのまま拡散
手段68の初段へ左データとして入力され、かつその左デ
ータと右データとがXOR回路69で排他的論理和演算がな
され、そのXOR回路69の出力は右データとして拡散処理
手段68の初段へ供給される。
The encryption processing unit converts the 64-bit input data (plaintext or ciphertext) into an exclusive OR circuit (hereinafter referred to as an XOR circuit) 66
And the 64-bit parameter data (intermediate key) P N , P N + 1 ,
An exclusive OR operation is performed on P N + 2 and P N + 3, and the output is input to a data spreading unit 89, where the data is divided into 32-bit left data and right data by a dividing unit 67. Here, N is the stage number control data described above. The left data is directly input to the first stage of the spreading means 68 as left data, and the left data and the right data are subjected to an exclusive OR operation in the XOR circuit 69, and the output of the XOR circuit 69 is subjected to diffusion processing as right data. It is supplied to the first stage of the means 68.

各拡散処理段68では入力された右データはそのまま次
段の拡散処理段68に対する左データとして出力すると共
に、データ拡散手段71に入力されて16ビットのパラメー
タデータ(中間キー)によりデータ拡散され、その拡散
されたデータは左データとXOR回路72で排他的論理和演
算が行われ、XOR回路72の出力は次段の拡散処理段68へ
右データとして出力される。この拡散処理段68の機能が
N回繰り返して用いられ、各拡散処理段68で同様の処理
が行われる。
In each diffusion processing stage 68, the input right data is output as it is as left data to the next diffusion processing stage 68, and is also input to the data diffusion means 71 and data is spread by 16-bit parameter data (intermediate key). The spread data is subjected to an exclusive OR operation with the left data in the XOR circuit 72, and the output of the XOR circuit 72 is output to the next spreading processing stage 68 as right data. The function of this diffusion processing stage 68 is used N times repeatedly, and similar processing is performed in each diffusion processing stage 68.

終段の拡散処理段68の出力の右データは、交差手段99
を経由して結合手段73の左データとして供給されると共
に、終段の拡散処理段68の出力の左データとXOR回路74
で排他的論理和演算がなされ、そのXOR回路74の出力は
右データとして結合手段73へ供給され、結合手段73では
その両左データ及び右データが64ビットのデータとして
結合される。その結合された64ビットのデータは64ビッ
トのパラメータデータ(中間キー)PN+4,PN+5,PN+6,P
N+7とXOR回路75で排他的論理和演算が行われて拡散出力
データ、つまり暗号文(または復号文)として出力され
る。
The right data of the output of the final diffusion processing stage 68 is
Is supplied as the left data of the combining means 73, and the left data of the output of the final diffusion processing stage 68 and the XOR circuit 74
, An exclusive OR operation is performed, and the output of the XOR circuit 74 is supplied to the combining means 73 as right data. The combining means 73 combines the left data and the right data as 64-bit data. The combined 64-bit data is 64-bit parameter data (intermediate key) P N + 4 , P N + 5 , P N + 6 , P
The exclusive OR operation is performed by the N + 7 and the XOR circuit 75, and the result is output as spread output data, that is, cipher text (or decrypted text).

次に、第1図に示した暗号処理部と対応する鍵処理部
を第2図に示す。64ビット長の入力データつまり暗号鍵
は、最初にパリティ検査回路65により、8ビット単位に
分割されてパリティ検査を受ける。但しパリティ検査回
路65は省いてもよい。パリティ検査回路65の出力の64ビ
ット長の暗号鍵は、32ビットずつの左データ及び右デー
タに分割手段67で分割されて、複数の拡散処理段76の縦
続配列の初段に入力される。各拡散処理段76では右デー
タはそのまま左データとして次段の拡散処理段へ出力す
ると共にXOR回路77へ供給される。XOR回路77の出力をパ
ラメータとしてデータ拡散手段78で左データをデータ拡
散処理し、そのデータ拡散手段78の出力を右データとし
て次段の拡散処理段76へ出力する。XOR回路77は、初段
の拡散処理段76では適当な定数D0を入力し、その他の拡
散処理段では前段の左データを入力する。各拡散処理段
76のデータ拡散手段78の32ビット出力データが中間キー
として出力される。この拡散処理段76は鍵処理部段数制
御信号311の制御を受け、((N/2)+4)回繰り返し用
いられ、各拡散処理段76で同様の処理が行われる。この
結果、64ビットの入力データ(暗号鍵)をデータ拡散す
ると共に、(16×(N+8))ビット長にデータを長く
した中間キーP0〜PN+7を得る。即ち、拡散処理段76の初
段から順次得られる各32ビットを、16ビットずつP0,P1,
P2,P3,…,PN+4,PN+5,PN+6,PN+7とする。この中間キー
P0,P1,P2,P3,…,PN-2,PN-1をそれぞれ第1図中の拡散処
理段68の初段より順にパラメータとして与え、中間キー
PN,PN+1,PN+2,PN+3,をパラメータデータとしてXOR回路6
6へ供給し、中間キーPN+4,PN+5,PN+6,PN+7をパラメータ
データとしてXOR回路75へ供給し、XOR回路66に平文を入
力するとXOR回路75に暗号文が得られる。復号の際は、
暗号文をXOR回路66に入力し、中間キーPN-1,PN-2PN-3,P
N-4,…,P1,P0をそれぞれ第1図中の拡散処理段68の初段
より順にパラメータデータとして与え、かつXOR回路66
に中間キーPN+4,PN+5,PN+6,PN+7を、XOR回路75に中間キ
ーPN,PN+1,PN+2,PN+3を入力するように入れ替えるとXOR
回路75から平文(復号文)が得られる。以上述べた暗号
化の場合と復号のパラメータの順序変更は、暗号化/復
号切り替え制御信号79の指定に従い、パラメータ順序変
更部80が行う。
Next, FIG. 2 shows a key processing unit corresponding to the encryption processing unit shown in FIG. First, the input data having a length of 64 bits, that is, the encryption key, is divided into 8-bit units by the parity check circuit 65 and subjected to a parity check. However, the parity check circuit 65 may be omitted. The 64-bit encryption key output from the parity check circuit 65 is divided into 32-bit left data and right data by the dividing means 67, and is input to the first stage of the cascade arrangement of the plurality of spreading processing stages. In each diffusion processing stage 76, the right data is output as it is as left data to the next diffusion processing stage and is also supplied to the XOR circuit 77. Using the output of the XOR circuit 77 as a parameter, the data spreading means 78 performs data spreading processing on the left data, and outputs the output of the data spreading means 78 as right data to the next spreading processing stage 76. XOR circuit 77 receives the appropriate constant D 0 In the first stage of the diffusion process stage 76, the other diffusion processing stage to enter the front of the left data. Each diffusion processing stage
The 32-bit output data of the data spreading means 78 is output as an intermediate key. This spreading processing stage 76 is controlled by the key processing unit stage number control signal 311 and is used repeatedly ((N / 2) +4) times, and the same processing is performed in each spreading processing stage 76. As a result, 64-bit input data (encryption key) is data-spread, and intermediate keys P 0 to P N + 7 are obtained by lengthening the data to (16 × (N + 8)) bits. That is, each of the 32 bits sequentially obtained from the first stage of the diffusion processing stage 76 is converted into 16 bits P 0 , P 1 ,
P 2, P 3, ..., and P N + 4, P N + 5, P N + 6, P N + 7. This intermediate key
P 0 , P 1 , P 2 , P 3 ,..., P N-2 , P N-1 are respectively given as parameters from the first stage of the diffusion processing stage 68 in FIG.
XOR circuit 6 using P N , P N + 1 , P N + 2 , P N + 3 , as parameter data
6 and the intermediate keys P N + 4 , P N + 5 , P N + 6 , and P N + 7 are supplied as parameter data to the XOR circuit 75, and when plain text is input to the XOR circuit 66, it is encrypted by the XOR circuit 75. The sentence is obtained. When decrypting,
The cipher text is input to the XOR circuit 66, and the intermediate keys P N-1 , P N-2 P N-3 , P
N-4 ,..., P 1 , P 0 are respectively given as parameter data in order from the first stage of the diffusion processing stage 68 in FIG.
Input the intermediate keys P N + 4 , P N + 5 , P N + 6 , P N + 7 to the XOR circuit 75 and the intermediate keys P N , P N + 1 , P N + 2 , P N + 3 to the XOR circuit 75 XOR
A plain text (decrypted text) is obtained from the circuit 75. The order of the parameters for encryption and decryption described above is changed by the parameter order changing unit 80 in accordance with the designation of the encryption / decryption switching control signal 79.

(暗号処理部の拡散処理段) 暗号処理部の拡散処理段について第3図を用いて補足
説明する。
(Diffusion processing stage of encryption processing unit) The diffusion processing stage of the encryption processing unit will be supplementarily described with reference to FIG.

第3図は、第1図中の1つの拡散処理段68に対してセ
レクタ100−1と100−2、及び遅延手段として用いるレ
ジスタ101−1と101−2とを追加してある。レジスタ10
1−1とレジスタ102−2とは、それぞれ拡散処理段68の
出力となる左データと右データとを蓄積する機能を持
つ。各レジスタ101−1,101−2から出力する左データ出
力及び右データ出力とは、次の繰り返し処理でそれぞれ
セレクタ100−1と100−2とを経由してそれぞれ左デー
タ入力及び右データ入力となる。拡散処理段68を第1回
目(即ち最初)に用いるときは、各セレクタ100−1と1
00−2とは分割手段67の左データ及びXOR回路69の出力
を入力し、拡散処理段68を繰り返し用いるときはその左
データ出力と右データ出力とをそれぞれ再入力する。繰
り返し処理の最後に拡散処理段68の出力は、交差手段99
を経由して右データが結合手段73へ、左データがXOR回
路74へ出力される。
In FIG. 3, selectors 100-1 and 100-2 and registers 101-1 and 101-2 used as delay means are added to one diffusion processing stage 68 in FIG. Register 10
1-1 and the register 102-2 have a function of storing left data and right data, respectively, which are output from the diffusion processing stage 68. The left data output and the right data output output from each of the registers 101-1 and 101-2 become the left data input and the right data input, respectively, via the selectors 100-1 and 100-2 in the next repetition processing. When the diffusion processing stage 68 is used for the first time (that is, first), each selector 100-1 and 1
00-2 inputs the left data of the dividing means 67 and the output of the XOR circuit 69, and when the diffusion processing stage 68 is used repeatedly, the left data output and the right data output are input again. At the end of the iterative process, the output of the diffusion stage 68 is
The right data is output to the combining means 73 and the left data is output to the XOR circuit 74 via.

暗号処理部段数制御信号310は拡散処理段68の処理を
N回繰り返す。
The encryption processing stage number control signal 310 repeats the process of the spreading stage 68 N times.

(鍵処理部の拡散処理段) 鍵処理部の拡散処理段について第4図を用いて補足説
明する。
(Diffusion Processing Stage of Key Processing Unit) The diffusion processing stage of the key processing unit will be supplementarily described with reference to FIG.

第4図は第2図中の1つの拡散処理段76に対してセレ
クタ103−1と103−2、及び遅延手段として用いるレジ
スタ104−1、104−2、105とを追加してある。レジス
タ104−1と104−2とは、それぞれ拡散処理段76の出力
となる左データと右データとを蓄積する機能を持つ。拡
散処理段76を第1回目(即ち最初)に用いる直前にレジ
スタ105は定数D0を入力しておく。拡散処理段76を第i
回目(i=1,2,…,N/2+4)に用いるときは、まずレジ
スタ105の出力をXOR回路77へ入力し、次にセレクタ103
−1の出力をレジスタ105に蓄積する(両データを分離
させて、混乱を生じないように制御する)。各レジスタ
104−2と104−1とに蓄えられた左データ出力及び右デ
ータ出力は、拡散処理段76の次の処理で、左データ入力
及び右データ入力としてそれぞれセレクタ103−1と103
−2とに入力される。拡散処理段76を第1回目に用いる
ときは、セレクタ103−1と103−2は分割手段67の左デ
ータ出力と右データ出力とをそれぞれ入力する。鍵処理
部段数制御信号311は拡散処理段76を((N/2)+4)回
繰り返す。
FIG. 4 adds selectors 103-1 and 103-2 and registers 104-1, 104-2 and 105 used as delay means to one spreading processing stage 76 in FIG. 2. The registers 104-1 and 104-2 have a function of storing left data and right data output from the diffusion processing stage 76, respectively. Register 105 just before the use of diffusion treatment stage 76 to the first time (i.e., initially) is left to input constants D 0. The diffusion processing stage 76
When using for the first time (i = 1, 2,..., N / 2 + 4), first, the output of the register 105 is input to the XOR circuit 77, and then the selector 103
The output of -1 is stored in the register 105 (the data is separated so as not to cause confusion). Each register
The left data output and the right data output stored in 104-2 and 104-1 are used as selectors 103-1 and 103-1, respectively, as a left data input and a right data input in the next processing of the diffusion processing stage 76.
-2. When the spreading processing stage 76 is used for the first time, the selectors 103-1 and 103-2 receive the left data output and the right data output of the dividing means 67, respectively. The key processing unit stage number control signal 311 repeats the diffusion processing stage 76 ((N / 2) +4) times.

(データ拡散手段71) データ拡散手段は、その入力データのどの1ビットが
変化してもその出力の半数程度のビットが平均して変化
する性質をもつ。第5図はデータ拡散手段71を説明する
ための図であって、32ビットの入力データから32ビット
の拡散した出力データを得るデータ拡散手段の概略を示
している。ここでパラメータは、16ビットである。第5
図において、32ビットの入力データRは8ビットのデー
タR0,R1,R2,R3に分けられる。Pn−L,Pn−Rは、それぞ
れパラメータPnの左半分と右半分であり、共に8ビット
である。は、ビット対応の排他的論理和であり、各1
バイト(8ビット)の2つを入力し演算する。ここで回
路40のSδ(δは0又は1)は、その2つの入力をa、
bとしたとき、w=a+b+δmod256として得たwを、
2ビット左循環シフトして8ビットデータを得ることを
表す。以上述べた回路40の処理結果をS(a,b,δ)で示
す。
(Data Spreading Means 71) The data spreading means has a property that even if any one bit of the input data changes, about half of the output bits change on average. FIG. 5 is a diagram for explaining the data spreading means 71, and schematically shows a data spreading means for obtaining 32-bit spread output data from 32-bit input data. Here, the parameter is 16 bits. Fifth
In the figure, 32-bit input data R is divided into 8-bit data R0, R1, R2, R3. Pn-L and Pn-R are the left half and the right half of the parameter Pn, respectively, and are both 8 bits. Is an exclusive OR corresponding to bits, and
Input and calculate two bytes (8 bits). Here, Sδ (δ is 0 or 1) of the circuit 40 is obtained by inputting its two inputs to a,
Assuming that b, w obtained as w = a + b + δmod256,
This means that 8-bit data is obtained by performing a 2-bit leftward cyclic shift. The processing result of the circuit 40 described above is indicated by S (a, b, δ).

まず、32ビットの入力データRは、各1バイトのデー
タR0,R1,R2,R3にわけられる。各処理ブロックは、以下
に示す処理手順に従って順に処理され、最後に32ビット
の出力とされる。以下の式中の記号←は、右辺を演算後
新しく左辺のデータとすることを示す。
First, the 32-bit input data R is divided into 1-byte data R0, R1, R2, and R3. Each processing block is sequentially processed according to the processing procedure described below, and is finally output as 32 bits. The symbol ← in the following equation indicates that the right side is newly calculated as the left side data after the operation.

<処理手順> R1←R1Pn−LR0 R2←R2Pn−RR3 R1←S(R1,R2,1) R2←S(R2,R1,0) R0←S(R0,R1,0) R3←S(R3,R2,1) この様な構造になっているから、入力データRのどの
1ビットが変化しても、データ拡散手段71の4バイトの
出力のそれぞれ1バイト中のビットは必ず変化する。
<Processing procedure> R1 ← R1Pn−LR0 R2 ← R2Pn−RR3 R1 ← S (R1, R2,1) R2 ← S (R2, R1,0) R0 ← S (R0, R1,0) R3 ← S (R3, R3 R2,1) With such a structure, even if any one bit of the input data R changes, the bit in each one byte of the 4-byte output of the data spreading means 71 always changes.

(データ拡散手段78) 第6図は、データ拡散手段78を説明するための図であ
って、32ビットの入力データから32ビットのデータ拡散
した出力データを得るデータ拡散手段の概略を示してい
る。ここでパラメータは、32ビットである。第6図にお
いて、32ビットの入力データRは、8ビットのデータR
0,R1,R2,R3に分けられる。32ビットのパラメータPPn
は、8ビットずつに4等分し、左側から、PPn−0,PPn−
1,PPn−2,PPn−3で表す。ここで回路40のSδは、デー
タ拡散手段71に含まれるものと同一である。
(Data Spreading Means 78) FIG. 6 is a diagram for explaining the data spreading means 78, and schematically shows a data spreading means for obtaining 32-bit output data from 32-bit input data. . Here, the parameter is 32 bits. In FIG. 6, the 32-bit input data R is an 8-bit data R
It is divided into 0, R1, R2, and R3. 32-bit parameter PPn
Is divided into four equal parts of 8 bits each, and from the left, PPn-0, PPn-
1, represented by PPn-2 and PPn-3. Here, Sδ of the circuit 40 is the same as that included in the data spreading means 71.

まず、32ビットの入力データRは、各1バイトの処理
データR0,R1,R2,R3にわけられる。各処理データは、以
下に示す処理手順に従って順に処理され、最後に32ビッ
トの出力とされる。
First, the 32-bit input data R is divided into 1-byte processing data R0, R1, R2, and R3. Each piece of processing data is sequentially processed according to the processing procedure described below, and is finally output as 32 bits.

<処理手順> R1←R1R0 R2←R2R3 R1←S(R1,(R2PPn−0),1) R2←S(R2,(R1PPn−1),0) R0←S(R0,(R1PPn−2),0) R3←S(R3,(R2PPn−3),1) (数式を用いた実施例1の機能の補足説明) (記法) (1)ブロック:A,Ar…は、(複数バイトの)ブロック
を表す。
<Processing procedure> R1 ← R1R0 R2 ← R2R3 R1 ← S (R1, (R2PPn-0), 1) R2 ← S (R2, (R1PPn−1), 0) R0 ← S (R0, (R1PPn−2), 0) R3 ← S (R3, (R2PPn-3), 1) (Supplementary explanation of the function of the first embodiment using mathematical expressions) (Notation) (1) Block: A, Ar... Is a (multiple byte) block Represents

(2) バイト:Aj,Arjは、ブロックA、Ar内のj番目
(j=0,1,…)の1バイトを表す。
(2) Byte: Aj, Arj represents the j-th (j = 0, 1,...) 1 byte in block A, Ar.

(3) 連結:(A,B,……)は、この順序のデータの連
結を表す。
(3) Concatenation: (A, B,...) Represents concatenation of data in this order.

(4) :ABは、ブロックAとBのビット対応の
排他的論理和を表す。
(4): AB represents an exclusive OR corresponding to bits of blocks A and B.

(5) Φ :成分が零の4バイト長ブロックを表す。(5) Φ: represents a 4-byte block with zero components.

(6) 等号:右辺を左辺に代入することを表す。(6) Equal sign: Indicates that the right side is substituted for the left side.

(関数)説明で用いる関数をまず説明する。(Function) First, the function used in the description will be described.

関数S: Sδ(X1,X2,δ)=Rot2(W) W=X1+X2+δmod256 X1,X2は、1バイトブロックである。δは、0または
1の定数である。Wは、X1,X2を2進非負値整数とみな
して、X1+X2+δmod256の演算によって得られる1バイ
トブロックである。
Function S: Sδ (X1, X2, δ) = Rot2 (W) W = X1 + X2 + δmod256 X1 and X2 are 1-byte blocks. δ is a constant of 0 or 1. W is a one-byte block obtained by calculating X1 + X2 + δmod256 by regarding X1 and X2 as binary non-negative integers.

Rot2(W)は、1バイトブロックWを、2ビット左循
環シフト(左2ビット回転)して得られる1バイトブロ
ックである。
Rot2 (W) is a 1-byte block obtained by rotating the 1-byte block W left by 2 bits (rotating left by 2 bits).

例1: X1=00010011,X2=11110010,δ=1のとき、W=
00000110 例2: Rot2(11011100)=01110011 関数f Rを4等分し、左側からR0,R1,R2,R3で表し、Pnを2
等分し左側からPn−L、Pn−Rで表す。
Example 1: When X1 = 00010011, X2 = 11110010, δ = 1, W =
00000110 Example 2: Rot2 (11011100) = 01110011 The function f R is divided into four equal parts, and R0, R1, R2, and R3 are shown from the left, and Pn is 2
Equally divided and expressed by Pn-L and Pn-R from the left.

f(R,Pn)は、以下の順序により計算する。 f (R, Pn) is calculated in the following order.

R1←R1Pn−LR0 R2←R2Pn−RR3 R1←S(R1,R2,1) R2←S(R2,R1,0) R0←S(R0,R1,0) R3←S(R3,R2,1) 関数fは、第5図に示されるデータ拡散手段により実
現される。
R1 ← R1Pn−LR0 R2 ← R2Pn−RR3 R1 ← S (R1, R2,1) R2 ← S (R2, R1,0) R0 ← S (R0, R1,0) R3 ← S (R3, R2,1) The function f is realized by the data spreading means shown in FIG.

関数f Rを4等分し、左側からR0,R1,R2,R3で表し、PPnを4
等分し左側からPPn−0、PPn−1、PPn−2、PPn−3で
表す。fk(R,PPn)は、以下の順序により計算する。
The function f R is divided into four equal parts, represented by R0, R1, R2, R3 from the left, and PPn
Equally divided and represented by PPn-0, PPn-1, PPn-2, PPn-3 from the left. f k (R, PPn) is calculated in the following order.

R1←R1R0 R2←R2R3 R1←S(R1,(R2PPn−0),1) R2←S(R2,(R1PPn−1),0) R0←S(R0,(R1PPn−2),0) R3←S(R3,(R2PPn−3),1) 関数fkは、第6図に示されるデータ拡散手段により実
現される。
R1 ← R1R0 R2 ← R2R3 R1 ← S (R1, (R2PPn-0), 1) R2 ← S (R2, (R1PPn-1), 0) R0 ← S (R0, (R1PPn-2), 0) R3 ← S (R3, (R2PPn-3), 1) The function fk is realized by the data spreading means shown in FIG.

(鍵処理) 64ビットの暗号鍵から、中間キーPi(i=0〜(N+
7)、各2バイト)を定める計算を行う。暗号鍵にパリ
ティビットを含める場合は暗号鍵のビット位置の8×
n、1≦n≦8(但し、ビット位置は、暗号鍵の左から
右方向へ1,2,…と数える)にあるパリティ検査を1バイ
ト単位に行った後、これらパリティビットの値を零に変
える。
(Key processing) From a 64-bit encryption key, an intermediate key P i (i = 0 to (N +
7), calculation for each 2 bytes) is performed. When including a parity bit in the encryption key, 8 ×
n, where 1 ≦ n ≦ 8 (where the bit positions are counted from left to right of the encryption key as 1, 2,...) in units of 1 byte, and then the values of these parity bits are set to zero. Change to

暗号鍵の左右をA0とB0とする。最初に、D0=Φとす
る。続いて、r=1〜Nについて、Pi(i=0〜(N+
7))を定める。
Let A 0 and B 0 be the left and right sides of the encryption key. First, let D 0 = Φ. Subsequently, for r = 1 to N, P i (i = 0 to (N +
7)) is determined.

Dr=Ar-1 Ar=Br-1 Br=fk(Ar-1,Br-1,Dr-1) P2(r-1)=(Br0,Br1) P2(r-1)+1=(Br2,Br3) ただし、Ar,Br,Drは、補助変数である。Br0,Br1,Br2,
Br3は、4バイト長のBrを4等分し、その左からの各1
バイトを表す。鍵処理部は第2図に示す。
Dr = Ar-1 Ar = Br-1 Br = fk ( Ar-1 , Br-1 , Dr-1 ) P2 (r-1) = ( Br0 , Br1 ) P 2 (r-1) +1 = however (B r2, B r3), a r, B r, D r is an auxiliary variable. B r0 , B r1 , B r2 ,
B r3 divides a 4-byte length Br into four equal parts, and each 1 from the left
Represents a byte. The key processing unit is shown in FIG.

(暗号処理部による暗号化手続き) 平文ブロックの左右それぞれ4バイトのブロックを
L0,R0として、まず、 (L0,R0)=(L0,R0)(PN,PN+1,PN+2,PN+3,) (L0,R0)=(L0,R0)(Φ,L0) 続いて、r=1〜Nについて、RrとLrを逐次計算す
る。
(Encryption procedure by the cryptographic processing unit) A 4-byte block on each of the left and right sides of the plaintext block
As L 0 , R 0 , first, (L 0 , R 0 ) = (L 0 , R 0 ) (P N , P N + 1 , P N + 2 , P N + 3 ,) (L 0 , R 0 ) = (L 0 , R 0 ) (Φ, L 0 ) Then, for r = 1 to N, R r and L r are sequentially calculated.

Rr=Lr-1f(Rr-1,Pr-1) Lr=Rr-1 次に、RN,LNに対して、 (RN,LN)=(RN,LN)(Φ,RN) (RN,LN)=(RN,LN)(PN+4,PN+5,PN+6,PN+7) 暗号ブロックは(RN,LN)で得られる。R r = L r−1 f (R r−1 , P r−1 ) L r = R r−1 Next, for R N , L N , (R N , L N ) = (R N , L N ) (Φ, R N ) (R N , L N ) = (R N , L N ) (P N + 4 , P N + 5 , P N + 6 , P N + 7 ) The encryption block is (R N , L N ).

(暗号処理部による復号手続き) 暗号文ブロックの左右それぞれ4バイトのブロックを
RN,LNとして、まず、 (RN,LN)=(RN,LN)(PN+4,PN+5,PN+6,PN+7) (RN,LN)=(RN,LN)(Φ,RN) 続いて、r=N〜1について、Lr-1とRr-1を逐次計算
する。
(Decryption procedure by the cryptographic processing unit) A 4-byte block on each side of the ciphertext block
R N, as L N, first, (R N, L N) = (R N, L N) (P N + 4, P N + 5, P N + 6, P N + 7) (R N, L N ) = (R N , L N ) (Φ, R N ) Then, for r = N〜1, L r−1 and R r−1 are sequentially calculated.

Lr-1=Rrf(Lr,Pr-1) Rr-1=Lr 最後に、L0,R0に対して、 (L0,R0)=(L0,R0)(Φ,L0) (L0,R0)=(L0,R0)(PN,PN+1,PN+2,PN+3) 平文ブロックは(L0,R0)で得られる。L r-1 = R rf (L r , P r-1 ) R r-1 = L r Finally, for L 0 , R 0 , (L 0 , R 0 ) = (L 0 , R 0 ) (Φ, L 0 ) (L 0 , R 0 ) = (L 0 , R 0 ) (P N , P N + 1 , P N + 2 , P N + 3 ) The plain text block is (L 0 , R 0) ).

(発明の効果) このように、暗号処理部の拡散処理段数Nを可変のパ
ラメータとして与えることにより、暗号処理部と鍵処理
部のそれぞれの拡散処理段の段数を可変とし、高速な処
理が要求される場合においてはNを小さく設定し(例え
ばN=4)、安全性が重視される場合においてはNを大
きく設定する(例えばN=16)ことが可能となる。
(Effect of the Invention) As described above, by giving the number N of diffusion processing stages of the encryption processing unit as a variable parameter, the number of diffusion processing stages of the encryption processing unit and the key processing unit is made variable, and high-speed processing is required. In this case, it is possible to set N to a small value (for example, N = 4), and to set N to a large value (for example, N = 16) when safety is emphasized.

「実施例2」 第7図により説明する。暗号処理部200において、平
文(または暗号文)を入力データとして入力し、鍵処理
部210で処理された暗号鍵(中間キー)をパラメータと
して入力する。段数制御データNは、拡散処理段回数制
御部400に入力し、拡散処理段回数制御部400から暗号処
理部段数制御信号410と、鍵処理部段数制御信号411とが
出力される。暗号処理部段数制御信号410は、暗号処理
部200の拡散処理段202に入力し、拡散処理段202の処理
をN回繰り返すための制御信号として働く。更に、鍵処
理部段数制御信号411は、鍵処理部210の拡散処理段212
に入力し、拡散処理段212をN回繰り返すための制御信
号として働く。暗号処理部200への入力データは、前処
理部201を経て、拡散処理段202に入力し、ここでN回の
繰り返し処理を受け、次に後処理部203を経由して出力
される。鍵処理部210においては暗号鍵が入力され、鍵
前処理部211で処理された後、拡散処理段212でN回の繰
り返し処理を受ける。このとき鍵処理部210の拡散処理
段212のi回目の出力パラメータPPiが出力され、このパ
ラメータPPiが暗号処理部200のi回目の拡散処理段202
に入力される。ここで、i=1,2,…,Nである。
Example 2 This will be described with reference to FIG. In the encryption processing unit 200, a plaintext (or an encrypted text) is input as input data, and the encryption key (intermediate key) processed by the key processing unit 210 is input as a parameter. The stage number control data N is input to the spreading stage number control unit 400, and the spreading stage number control unit 400 outputs an encryption stage number control signal 410 and a key processing unit stage number control signal 411. The encryption processing unit stage number control signal 410 is input to the diffusion processing stage 202 of the encryption processing unit 200 and functions as a control signal for repeating the processing of the diffusion processing stage 202 N times. Further, the key processing section number control signal 411 is transmitted to the diffusion processing section 212 of the key processing section 210.
And serves as a control signal for repeating the diffusion processing stage 212 N times. The input data to the encryption processing unit 200 is input to the diffusion processing stage 202 via the pre-processing unit 201, where the data is subjected to N-times repetition processing, and then output via the post-processing unit 203. In the key processing unit 210, the encryption key is input and processed by the key preprocessing unit 211, and then subjected to N times of repetition processing in the diffusion processing stage 212. At this time, the i-th output parameter PP i of the diffusion processing stage 212 of the key processing unit 210 is output, and this parameter PP i is output to the i-th diffusion processing stage 202 of the encryption processing unit 200.
Is input to Here, i = 1, 2,..., N.

第1図と第2図及び第8図を用いて補足説明する。第
1図においてXOR回路66を削除し、入力データは分割手
段67へ直接入力する。同様にXOR回路75を削除し、結合
手段73の出力を直接出力データとする。データ拡散手段
71の代わりに第8図に示すデータ拡散手段71−1を用い
る。データ拡散手段71−1は長さ32ビットのパラメータ
PPi(i=1,2,…,N)を入力する点がデータ拡散手段71
と異なる特徴である。前処理部201は、分割手段67とXOR
回路69とを含めたものに対応する。拡散処理段202は、
拡散処理段68に対応する。後処理部203は、交差手段99
とXOR回路74、及び結合手段73とを含めたものに対応す
る。鍵前処理部211は、第2図に示すパリティ検査回路6
5と分割手段67とを合わせた回路に対応する。拡散処理
段212は、第2図の拡散処理段76とパラメータ順序変更
部80とを含めたものに対応する。但し、拡散処理段76を
N回用いる。拡散処理段212は、一段の処理で32ビット
のパラメータPPi(i=1,2,…,N)を出力する。
A supplementary explanation will be given with reference to FIGS. 1, 2 and 8. In FIG. 1, the XOR circuit 66 is deleted, and the input data is directly input to the dividing means 67. Similarly, the XOR circuit 75 is deleted, and the output of the combining means 73 is directly used as output data. Data diffusion means
Instead of 71, a data spreading means 71-1 shown in FIG. 8 is used. Data spreading means 71-1 is a 32-bit length parameter
The point at which PP i (i = 1, 2,..., N) is input is the data diffusion means 71.
This is a different feature. The pre-processing unit 201 includes the dividing unit 67 and the XOR
This corresponds to the one including the circuit 69. The diffusion processing stage 202
Corresponds to the diffusion stage 68. The post-processing unit 203 includes the intersection unit 99
And the XOR circuit 74 and the coupling means 73. The key preprocessing unit 211 includes a parity check circuit 6 shown in FIG.
This corresponds to a circuit in which 5 and the dividing means 67 are combined. The diffusion processing stage 212 corresponds to the one including the diffusion processing stage 76 and the parameter order changing unit 80 in FIG. However, the diffusion processing stage 76 is used N times. The diffusion processing stage 212 outputs a 32-bit parameter PP i (i = 1, 2,..., N) in one stage of processing.

(発明の効果) このような構造になっているから、拡散処理段回数制
御部から出力される制御信号により、暗号処理部と鍵処
理部のそれぞれの拡散処理段がN回使われて暗号化処理
と復号化処理が可能であり、暗号装置の利用環境ごとに
要求される性能(暗号化速度及び復号化速度)に対応で
きる。
(Effect of the Invention) With such a structure, each of the diffusion processing stages of the encryption processing unit and the key processing unit is used N times by the control signal output from the diffusion processing stage number control unit to perform encryption. Processing and decryption processing are possible, and the performance (encryption speed and decryption speed) required for each use environment of the encryption device can be handled.

「実施例3」 第9図により説明する。ICカード10に暗号装置13を組
み込んだ例である。暗号装置13は、暗号処理部14と鍵処
理部15と拡散処理段回数制御部16とからなる。データ入
出力装置11から、段数制御信号Nが拡散処理段回数制御
部16へ供給される。鍵処理部15には、暗号鍵保持手段12
により保持された暗号鍵、及び、拡散処理段回数制御部
16から入力された鍵処理部15の拡散処理段制御信号デー
タが入力され、Nに応じた回数だけ拡散処理段が繰り返
され、中間キーが出力される。暗号処理部14には、鍵処
理部15の出力である中間キー、及び、拡散処理段回数制
御部16から入力された暗号処理部14の拡散処理段制御信
号データと平文(または暗号文)が入力され、拡散処理
をN回繰り返して暗号文(または平文)をデータ入出力
装置11へ出力する。
Example 3 This will be described with reference to FIG. This is an example in which an encryption device 13 is incorporated in an IC card 10. The encryption device 13 includes an encryption processing unit 14, a key processing unit 15, and a diffusion processing stage number control unit 16. The stage number control signal N is supplied from the data input / output device 11 to the diffusion stage number control unit 16. The key processing unit 15 includes an encryption key holding unit 12
Key and the number of diffusion processing stages
The diffusion processing stage control signal data of the key processing unit 15 input from 16 is input, and the diffusion processing stages are repeated a number of times corresponding to N, and an intermediate key is output. The encryption processing unit 14 receives the intermediate key output from the key processing unit 15, the diffusion processing stage control signal data of the encryption processing unit 14 input from the diffusion processing stage number control unit 16, and the plaintext (or ciphertext). It receives the input and repeats the diffusion process N times to output the ciphertext (or plaintext) to the data input / output device 11.

このICカードを用いて、メッセージ認証(データ完全
性)と相手認証を行う場合を考える。メッセージ認証に
おいては、認証すべきメッセージが大きいと認証子の生
成に要する時間が大きくなるため、Nを小さくして(例
えばN=4)、処理速度の向上を図る。また、相手認証
においては、暗号強度を増加するためNを大きくする
(例えばN=8)。
Consider the case where message authentication (data integrity) and partner authentication are performed using this IC card. In message authentication, if the message to be authenticated is large, the time required to generate an authenticator increases, so N is reduced (for example, N = 4) to improve the processing speed. In the other party authentication, N is increased to increase the encryption strength (for example, N = 8).

「実施例4」 この実施例は、実施例1の鍵処理部のみを、第10図に
示す鍵処理に変更したものであり、第2図と対応する部
分には同一符号を付けてあり、128ビット長の暗号鍵を
入力することが実施例1と異なる。
Fourth Embodiment In this embodiment, only the key processing unit of the first embodiment is changed to the key processing shown in FIG. 10, and portions corresponding to those in FIG. The difference from the first embodiment is that a 128-bit encryption key is input.

入力した128ビット長の暗号鍵は、分割手段67−1で6
4ビットずつ左右に等分割され、暗号鍵の左半分(KLと
表す)が、パリティー検査回路65に、暗号鍵の右半分
(KRと表す)が、パリティー検査回路65−1に入力す
る。パリティー検査回路65−1の機能は、パリティー検
査回路65と同じであり、鍵のパリティーを1バイト毎に
検査する。パリティー検査回路65−1を通過した鍵のKR
は、分割手段67−2に入力する。パリティー検査回路65
を通過した鍵のKLは、実施例1の鍵処理部と同じく、分
割手段67に入力し以下実施例1と同様である。ただし、
各拡散処理段76のXOR回路77と直列にXOR回路77−2が挿
入され、XOR回路77−2に以下に述べるように信号が供
給される。なお、以上の説明でパリティー検査回路を省
いてよいことは、実施例1と同じである。
The input 128-bit encryption key is divided into 6 by the dividing means 67-1.
The left half of the encryption key (denoted by KL) is input to the parity check circuit 65, and the right half of the encryption key (denoted by KR) is input to the parity check circuit 65-1. The function of the parity check circuit 65-1 is the same as that of the parity check circuit 65, and checks the parity of the key every byte. KR of the key that passed the parity check circuit 65-1
Is input to the dividing means 67-2. Parity inspection circuit 65
Is input to the dividing means 67 in the same manner as in the key processing unit of the first embodiment, and the same as in the first embodiment. However,
An XOR circuit 77-2 is inserted in series with the XOR circuit 77 of each diffusion processing stage 76, and a signal is supplied to the XOR circuit 77-2 as described below. Note that the parity check circuit may be omitted in the above description, as in the first embodiment.

鍵のKRは、分割手段67−2で、更に32ビットずつの左
半分(KR−Lと表す)と、右半分(KR−Rと表す)に等
分割されてそれぞれ信号線331と332とへ供給される。ま
たKR−LとKR−Rは、XOR回路77−1に入力し、信号線3
30上にKR−LKR−Rが供給される。信号線330上のKR
−LKR−Rは、拡散処理段76の1+3×i段目、但し
i=0,1,2,…、のXOR回路77−2に入力し、信号線331上
のKR−Lは、拡散処理段76の2+3×i段目、但しi=
0,1,2,…、のXOR回路77−2に入力し、信号線332上のKR
−Rは、拡散処理段76の3+3×i段目、但しi=0,1,
2,…、のXOR回路77−2にそれぞれ入力する点が、実施
例1と異なっている。このような構造になっているか
ら、鍵のKLとKRとも複数の拡散処理段においてそれらの
値が混ぜ合わせられ、即ち、128ビットの暗号鍵は混ぜ
合わせられ、鍵処理部段数制御信号311の制御に従っ
て、(N/2)+4回の制御を受け、中間キーP0〜PN+7
なる。
The KR of the key is further equally divided into a left half (represented as KR-L) and a right half (represented as KR-R) of 32 bits each by a dividing means 67-2, and is divided into signal lines 331 and 332, respectively. Supplied. KR-L and KR-R are input to the XOR circuit 77-1 and the signal line 3
KR-LKR-R is supplied on 30. KR on signal line 330
-LKR-R is input to the 1 + 3.times.i-th stage of the spreading processing stage 76, where i = 0, 1, 2,..., XOR circuit 77-2, and KR-L on the signal line 331 is subjected to the spreading process. The 2 + 3 × i-th stage of the stage 76, where i =
, 0, 1, 2,...
−R is the 3 + 3 × i-th stage of the diffusion processing stage 76, where i = 0, 1,
2 and... Are different from the first embodiment in that they are respectively input to the XOR circuits 77-2. With such a structure, the values of both the key KL and the key KR are mixed in a plurality of diffusion processing stages, that is, the 128-bit encryption key is mixed, and the key processing stage number control signal 311 According to the control, (N / 2) +4 times of control is performed, and the intermediate keys P 0 to P N + 7 are obtained.

このようにして、段数制御データNをパラメータとし
て入力する、暗号鍵の長さが128ビットの暗号装置、即
ち、暗号処理部と鍵処理部のそれぞれの拡散処理段の段
数を可変にした暗号装置が実現できる。
In this way, the encryption device having the encryption key length of 128 bits, which inputs the stage number control data N as a parameter, that is, an encryption device in which the number of stages of the respective diffusion processing stages of the encryption processing unit and the key processing unit is made variable Can be realized.

数式を用いた実施例4の機能の補足説明 実施例1と異なるのは、鍵処理部の動作のみであり、
以下に補足説明する。ここで、関数fkの機能は、実施例
と同じである。
Supplementary explanation of the function of the fourth embodiment using mathematical formulas The only difference from the first embodiment is the operation of the key processing unit.
A supplementary explanation is given below. Here, the function of the function fk is the same as in the embodiment.

(鍵処理) 128ビットの暗号鍵から、中間キーPi(i=0〜(N
+7))を定める計算を行う。
(Key processing) From a 128-bit encryption key, an intermediate key P i (i = 0 to (N
+7)) is calculated.

暗号鍵にパリティビットを含める場合は、暗号鍵のビ
ット位置の8×n、1≦n≦16にあるパリティビットを
1バイト単位に検査した後、これらパリティビットの値
を零に変える。
When a parity bit is included in the encryption key, the parity bits at 8 × n, 1 ≦ n ≦ 16 at the bit position of the encryption key are checked in byte units, and the values of these parity bits are changed to zero.

128ビット長の暗号鍵の左半分をKL、右半分をKRで表
す。KRの左半分をKR−L、KRの右半分をKR−Rで表す。
The left half of the 128-bit encryption key is represented by KL, and the right half by KR. The left half of KR is represented by KR-L, and the right half of KR is represented by KR-R.

最初に、 r=1+3×i,i=0,1,…のとき、Qr=KR−LKR−
Rとし、 r=2+3×i,i=0,1,…のとき、Qr=KR−Lとし、 r=3+3×i,i=0,1,…のとき、Qr=KR−Rとす
る。
First, when r = 1 + 3 × i, i = 0,1,..., Q r = KR−LKR−
R, when r = 2 + 3 × i, i = 0,1,..., Qr = KR−L; When r = 3 + 3 × i, i = 0,1,..., Qr = KR−R I do.

次式により、KLとKRとから、中間鍵Pi、(i=1,2,3,
…,各2バイト)を定める。鍵KLの左右を、A0とB0とす
る。最初に、D0=φとする。続いて、r=1,2,3,……、
(N/2)+4について、Pi(i=0〜(N+7))を求
める。
From the following equation, the intermediate key P i , (i = 1,2,3,
..., 2 bytes each). Let A 0 and B 0 be the left and right sides of the key KL. First, let D 0 = φ. Then, r = 1,2,3, ...,
For (N / 2) +4, P i (i = 0 to (N + 7)) is obtained.

Dr=Ar-1 Ar=Br-1 Br=fk(Ar-1,Br-1Dr-1Qr) P2(r-1)=(Br0,Br1) P2(r-1)+1=(Br2,Br3) Ar,Br,Drは補助変数である。D r = A r -1 A r = B r -1 B r = f k (A r -1 , B r -1 D r -1 Q r ) P 2 (r -1) = (B r0 , B r1 ) P 2 (r-1) +1 = (B r2, B r3) a r, B r, is D r is an auxiliary variable.

「発明の効果」 以上述べたように、この発明によれば暗号処理部の拡
散処理段数Nを可変とすることにより、1つの暗号装置
を実装するだけで、その利用目的に応じて最適なNの値
を指定し、用途ごとに効率よい暗号処理が可能となる。
[Effects of the Invention] As described above, according to the present invention, by making the number N of diffusion processing stages of the encryption processing unit variable, only one encryption device is mounted, and the optimum N is determined according to the purpose of use. , And efficient encryption processing can be performed for each application.

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

第1図は実施例1の暗号処理部を示すブロック図、第2
図は実施例1の鍵処理部を示すブロック図、第3図は暗
号処理部内の拡散処理段を示すブロック図、第4図は鍵
処理部内の拡散処理段を示すブロック図、第5図は暗号
処理部内のデータ拡散手段を示すブロック図、第6図は
鍵処理部内のデータ拡散手段を示すブロック図、第7図
は実施例2の暗号装置を示すブロック図、第8図は実施
例2を用いる暗号処理部内のデータ拡散手段を示すブロ
ック図、第9図は実施例3の暗号装置を示すブロック
図、第10図は実施例4の鍵処理部を示すブロック図、第
11図は従来の暗号装置の暗号処理部を示すブロック図、
第12図は従来の暗号装置の鍵処理部を示すブロック図で
ある。
FIG. 1 is a block diagram showing an encryption processing unit according to the first embodiment.
FIG. 3 is a block diagram showing a key processing unit according to the first embodiment, FIG. 3 is a block diagram showing a diffusion processing stage in the encryption processing unit, FIG. 4 is a block diagram showing a diffusion processing stage in the key processing unit, and FIG. FIG. 6 is a block diagram showing the data spreading means in the key processing unit, FIG. 7 is a block diagram showing the encryption device of the second embodiment, and FIG. 8 is a block diagram showing the second embodiment. FIG. 9 is a block diagram showing a cryptographic device of the third embodiment, FIG. 10 is a block diagram showing a key processing unit of the fourth embodiment, FIG.
FIG. 11 is a block diagram showing an encryption processing unit of a conventional encryption device,
FIG. 12 is a block diagram showing a key processing unit of a conventional encryption device.

フロントページの続き (56)参考文献 Akihiro Shimizu,S hoji Miyaguchi, ”F ast Data Encipherm ent Algorithm FEA L” Lecture Notes i n Computer Scienc e,Vol.304,(1987),P.267− 278 秋山良太、八星禮剛「暗号処理ハード ウェア」情報処理,Vol.25,No. 6,(昭和59年),P.566−574 池野信一,小山謙二「現代暗号理論」 第3版,電子情報通信学会,(平成元年 5月),P.56〜58 D.Chanm,J−H.Evert se,”Cryptanalysis of DES with a redu ced number of roun ds Sequences of li near factors in bl ock Ciphers”,Lectu re Notes in Comput er Science,Vol.218, (1986),p.192−211 (58)調査した分野(Int.Cl.6,DB名) H04K 1/00 - 3/00 H04L 9/00 - 9/38 G09C 1/00 - 5/00 JICSTファイル(JOIS) INSPEC(DIALOG)Continuation of the front page (56) References Akihiro Shimizu, Shoji Miyaguchi, "Fast Data Enrichment Algorithm FEA L", Lecture Notes Computer, 304, (1987), p. 267- 278 Ryota Akiyama, Reigo Hachiboshi "Cryptographic Processing Hardware" Information Processing, Vol. 25, No. 6, (1984); 566-574 Shinichi Ikeno, Kenji Koyama "Modern Cryptography Theory" 3rd edition, The Institute of Electronics, Information and Communication Engineers, (May 1989), p. 56-58 D.C. Chanm, JH. Everse, "Cryptanalysis of DES with a reduced number of rounds Sequences of linear factors in blackrock Ciphers". 218, (1986), p. 192-211 (58) Fields surveyed (Int. Cl. 6 , DB name) H04K 1/00-3/00 H04L 9/00-9/38 G09C 1/00-5/00 JICST file (JOIS) INSPEC ( DIALOG)

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】平文又は暗号文が入力され、中間鍵により
データ拡散処理されて暗号文又は平文を出力する暗号処
理部と、 暗号鍵が入力され、データ拡散処理により上記中間鍵を
生成する鍵処理部とよりなり、 上記暗号処理部は上記平文又は暗号文と上記中間鍵の一
部との排他的論理和をとる第1排他的論理和回路と、 その第1排他的論理和回路の出力が供給され、上記中間
鍵の他の一部によりデータ拡散処理が行われるデータ拡
散部と、 そのデータ拡散部の出力と上記中間鍵の残りとの排他的
論理和をとり上記暗号文又は平文を出力する第2排他的
論理和回路とよりなり、 上記データ拡散部は第1拡散処理段を複数回繰り返し処
理し、 その第1拡散処理段は、入力された右データがそのまま
次段の第1拡散処理段に対する左データとして出力され
ると共にデータ拡散手段に入力されて上記中間鍵の予め
決められたものでデータ拡散され、その拡散されたデー
タと左データとが排他的論理和演算され、その排他的論
理和演算結果を次段の第1拡散処理段へ右データとして
出力するものであり、 上記鍵処理部は第2拡散処理段を複数回繰り返し処理
し、 その第2拡散処理段はそれぞれ右データがそのまま左デ
ータとして次段の第2拡散処理段へ出力されると共に排
他的論理和回路へ供給され、その排他的論理和回路の他
の入力としてはその第2拡散処理段よりも前段の第2拡
散処理段の入力左データが入力され、その排他的論理和
回路の出力をパラメータデータとして、左データがデー
タ拡散手段で拡散処理され、その拡散処理されたデータ
を上記中間鍵として出力すると共に次段の第2拡散処理
段へ右データとして出力するものである暗号装置におい
て、 段数制御データが設定入力され、暗号処理部段数制御信
号と鍵処理部段数制御信号とを出力する拡散処理段回数
制御部と、 その暗号処理部段数制御信号により上記段数制御データ
が示す値Nだけ上記暗号処理部の第1拡散処理段に繰り
返し処理を行わせる手段と、 上記鍵処理部段数制御信号により(N/2)+4だけ上記
鍵処理部の第2拡散処理段に繰り返し処理を行わせる手
段と、 を有することを特徴とする暗号装置。
An encryption processing unit for receiving a plaintext or ciphertext and performing data diffusion processing with an intermediate key to output a ciphertext or plaintext, and a key for receiving an encryption key and generating the intermediate key by data diffusion processing A cryptographic processing unit comprising: a first exclusive-OR circuit that performs an exclusive-OR operation on the plaintext or ciphertext and a part of the intermediate key; and an output of the first exclusive-OR circuit. Is supplied, and a data diffusion unit in which data diffusion processing is performed by another part of the intermediate key, and an exclusive OR of an output of the data diffusion unit and the rest of the intermediate key is used to convert the ciphertext or plaintext. The data spreading section repeatedly processes the first spreading processing stage a plurality of times, and the first spreading processing stage receives the input right data as it is as the first first spreading processing stage. As left data for the diffusion stage And the data is input to the data spreading means and data is spread by a predetermined one of the intermediate keys, and the spread data and the left data are subjected to an exclusive OR operation, and the exclusive OR operation result is obtained. The key processing unit outputs the right data to the next first spreading processing stage as a right data. The key processing unit repeats the second spreading processing stage a plurality of times. The signal is output to the next second diffusion processing stage and supplied to the exclusive OR circuit. The other input of the exclusive OR circuit is the second diffusion processing stage preceding the second diffusion processing stage. Input left data is input, the output of the exclusive OR circuit is used as parameter data, the left data is spread by data spreading means, and the spread data is output as the intermediate key and A number-of-stages control data, wherein a stage number control data is set and input, and a number-of-stages control unit for outputting a number-of-stages-control signal and a key-processing-unit-number control signal is provided. Means for causing the first spreading processing stage of the encryption processing unit to repeat the process by the value N indicated by the stage number control data according to the encryption stage number control signal; and (N / 2 Means for causing the second diffusion processing stage of the key processing unit to repeat the processing by +4.
【請求項2】平文又は暗号文が入力され、中間鍵により
データ拡散処理されて暗号文又は平文を出力する暗号処
理部と、 暗号鍵が入力され、データ拡散処理により上記中間鍵を
生成する鍵処理部とよりなり、 上記暗号処理部は上記平文又は暗号文と上記中間鍵の一
部との排他的論理和をとる第1排他的論理和回路と、 その第1排他的論理和回路の出力が供給され、上記中間
鍵の他の一部によりデータ拡散処理が行われるデータ拡
散部と、 そのデータ拡散部の出力と上記中間鍵の残りとの排他的
論理和をとり上記暗号文又は平文を出力する第2排他的
論理和回路とよりなり、 上記データ拡散部は第1拡散処理段を複数回繰り返し処
理し、 その第1拡散処理段は、入力された右データがそのまま
次段の第1拡散処理段に対する左データとして出力され
ると共にデータ拡散手段に入力されて上記中間鍵の予め
決められたものでデータ拡散され、その拡散されたデー
タと左データとが排他的論理和演算され、その排他的論
理和演算結果を次段の第1拡散処理段へ右データとして
出力するものであり、 上記鍵処理部は、暗号鍵を2分割し、その分割された一
方に対し、第2拡散処理段を複数回繰り返し処理し、分
割された他方を更にKR−L、KR−Rに2分割され、これ
らKR−L、KR−Rが排他的論理和演算され、 上記暗号鍵の2分割の他方は第2拡散処理段を複数回繰
り返し処理し、 その第2拡散処理段は、それぞれ右データがそのまま左
データとして次段の第2拡散処理段へ出力されると共
に、排他的論理和回路へ供給され、その排他的論理和回
路にはその第2拡散処理段よりも前段の第2拡散処理段
の入力左データと、r段でデータQrとが入力され(デー
タQrはr=1+3×iでKR−LKR−R、r=2+3×
iでKR−L、r=3+3×iでKR−R、i=0,1,…)、
その排他的論理和回路の出力をパラメータデータとして
左データがデータ拡散手段で拡散処理され、その拡散処
理されたデータを上記中間鍵として出力すると共に次段
の第2拡散処理段へ右データとして出力するものである
暗号装置において、 段数制御データが設定入力され、暗号処理部段数制御信
号と鍵処理部段数制御信号とを出力する拡散処理段回数
制御部と、 その暗号処理部段数制御信号により上記段数制御データ
が示す値Nだけ上記暗号処理部の第1拡散処理段に繰り
返し処理を行わせる手段と、 上記鍵処理部段数制御信号により(N/2)+4だけ上記
鍵処理部の第2拡散処理段に繰り返し処理を行わせる手
段と、 を有することを特徴とする暗号装置。
2. A cryptographic processing unit for receiving plaintext or ciphertext and performing data diffusion processing with an intermediate key to output a ciphertext or plaintext, and a key for receiving an encryption key and generating the intermediate key by data diffusion processing. A cryptographic processing unit comprising: a first exclusive-OR circuit that performs an exclusive-OR operation on the plaintext or ciphertext and a part of the intermediate key; and an output of the first exclusive-OR circuit. Is supplied, and a data diffusion unit in which data diffusion processing is performed by another part of the intermediate key, and an exclusive OR of an output of the data diffusion unit and the rest of the intermediate key is used to convert the ciphertext or plaintext. The data spreading section repeatedly processes the first spreading processing stage a plurality of times, and the first spreading processing stage receives the input right data as it is as the first first spreading processing stage. As left data for the diffusion stage And the data is input to the data spreading means and data is spread by a predetermined one of the intermediate keys, and the spread data and the left data are subjected to an exclusive OR operation, and the exclusive OR operation result is obtained. The key processing unit divides the encryption key into two parts and outputs the divided data to one of the divided parts by repeating the second diffusion processing part a plurality of times. The other half is further divided into KR-L and KR-R, and these KR-L and KR-R are subjected to an exclusive OR operation. The second diffusion processing stage performs the repetition processing a plurality of times, and outputs the right data as it is as the left data to the next second diffusion processing stage, and supplies the right data to the exclusive OR circuit. The circuit has a first stage before the second diffusion stage. The input left data of the two diffusion processing stages and the data Qr are input at the r stage (the data Qr is KR-LRK-R at r = 1 + 3 × i, r = 2 + 3 ×
i = KR-L, r = 3 + 3 × i = KR-R, i = 0,1, ...),
Using the output of the exclusive OR circuit as parameter data, the left data is spread by the data spreading means, and the spread data is output as the intermediate key and output to the next second spreading processing stage as right data. In the encryption device, a stage number control data is set and input, and a spreading stage number control unit that outputs an encryption stage number control signal and a key stage number control signal, and the encryption stage number control signal Means for causing the first spreading processing stage of the cryptographic processing unit to repeat the process by the value N indicated by the stage number control data; and the second spreading of the key processing unit by (N / 2) +4 by the key processing unit stage number control signal. Means for causing the processing stage to perform repetitive processing.
JP1340384A 1989-07-20 1989-12-28 Encryption device Expired - Lifetime JP2825205B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1340384A JP2825205B2 (en) 1989-07-20 1989-12-28 Encryption device

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP1-189985 1989-07-20
JP18998589 1989-07-20
JP1340384A JP2825205B2 (en) 1989-07-20 1989-12-28 Encryption device

Publications (2)

Publication Number Publication Date
JPH03129384A JPH03129384A (en) 1991-06-03
JP2825205B2 true JP2825205B2 (en) 1998-11-18

Family

ID=26505798

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1340384A Expired - Lifetime JP2825205B2 (en) 1989-07-20 1989-12-28 Encryption device

Country Status (1)

Country Link
JP (1) JP2825205B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006022058A1 (en) * 2004-08-26 2006-03-02 Nec Corporation Text encrypting apparatus, and text decrypting apparatus
JP4796658B1 (en) * 2010-12-09 2011-10-19 セルジョ ギラルデッリ Encryption device
JP2012123363A (en) * 2011-07-29 2012-06-28 Sergio Ghirardelli Encryption program and decryption program

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE69635651T2 (en) 1995-09-05 2006-09-07 Mitsubishi Denki K.K. Device and method for data conversion
JP3088337B2 (en) 1997-05-30 2000-09-18 三菱電機株式会社 Cryptographic processing device, IC card and cryptographic processing method
US6088800A (en) * 1998-02-27 2000-07-11 Mosaid Technologies, Incorporated Encryption processor with shared memory interconnect
JP2007199156A (en) * 2006-01-24 2007-08-09 Sony Corp Encryption processing device, equipment and method for manufacturing encryption processing device, and computer program

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
Akihiro Shimizu,Shoji Miyaguchi, "Fast Data Encipherment Algorithm FEAL" Lecture Notes in Computer Science,Vol.304,(1987),P.267−278
D.Chanm,J−H.Evertse,"Cryptanalysis of DES with a reduced number of rounds Sequences of linear factors in block Ciphers",Lecture Notes in Computer Science,Vol.218,(1986),p.192−211
池野信一,小山謙二「現代暗号理論」第3版,電子情報通信学会,(平成元年5月),P.56〜58
秋山良太、八星禮剛「暗号処理ハードウェア」情報処理,Vol.25,No.6,(昭和59年),P.566−574

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006022058A1 (en) * 2004-08-26 2006-03-02 Nec Corporation Text encrypting apparatus, and text decrypting apparatus
JP4796658B1 (en) * 2010-12-09 2011-10-19 セルジョ ギラルデッリ Encryption device
JP2012123363A (en) * 2011-07-29 2012-06-28 Sergio Ghirardelli Encryption program and decryption program

Also Published As

Publication number Publication date
JPH03129384A (en) 1991-06-03

Similar Documents

Publication Publication Date Title
AU767323B2 (en) Block encryption device using auxiliary conversion
JP2760799B2 (en) Encryption method
KR100296958B1 (en) Apparatus for encoding block data
EP0221538B1 (en) Data randomization equipment and method
US8787563B2 (en) Data converter, data conversion method and program
EP0896452A2 (en) Data encrypting/decrypting conversion methods and apparatuses and data communication system adopting the same
JP2825205B2 (en) Encryption device
KR100434558B1 (en) A fast block encryption algorithm
JP2000075785A (en) High-speed encryption processing circuit and processing method
JP2927079B2 (en) Data encryption method and data encryption device
JP2834450B2 (en) Encryption device
JPH09269727A (en) Encryption method and encryption device
JPH10153954A (en) Ciphering device
JP2993487B2 (en) Information processing apparatus, IC card, and code generation method
JPH10153955A (en) Ciphering device
JPH088897A (en) Data encryption / decryption processing method and encryption device
JPH06102820A (en) Cyphering device
JPH10153953A (en) Ciphering device
JPH01147585A (en) Cryptographer
JPH06342258A (en) Block cipher generating device
JPH0496086A (en) Encoding device and decoding device

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20070911

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080911

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20080911

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090911

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20090911

Year of fee payment: 11

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

Free format text: PAYMENT UNTIL: 20100911

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100911

Year of fee payment: 12

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载