JPH1145049A - Ciphering device - Google Patents

Ciphering device

Info

Publication number
JPH1145049A
JPH1145049A JP9198934A JP19893497A JPH1145049A JP H1145049 A JPH1145049 A JP H1145049A JP 9198934 A JP9198934 A JP 9198934A JP 19893497 A JP19893497 A JP 19893497A JP H1145049 A JPH1145049 A JP H1145049A
Authority
JP
Japan
Prior art keywords
arithmetic processing
data
circuit
transposition
encryption
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP9198934A
Other languages
Japanese (ja)
Inventor
Yuji Ando
裕治 安藤
Masakatsu Maruyama
征克 丸山
Hiroshi Kashiwa
浩 柏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP9198934A priority Critical patent/JPH1145049A/en
Publication of JPH1145049A publication Critical patent/JPH1145049A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To improve the reliability of a cipher with a small-scale circuit constitution, to shorten a development term, and to reduce costs, by making it possible to change from outside an arithmetic processing with a 2nd arithmetic processing circuit as a data processing means. SOLUTION: A 1st arithmetic processing circuit 105 operates an arithmetic processing of a selector output SIC based on a criptographic key SID outputted from a criptographic key control circuit 106. Here, criptographic keys peculiar and corresponding to 1st through, for example 16th respective arithmetic processings are used by the 1st arithmetic processing circuit 105. Next, a 2nd arithmetic processing circuit 107 processes 64-bit output data SIE from the 1st arithmetic processing circuit 105 by transposition. In this case, this transposition processing is controlled by the 2nd arithmetic processing control circuit 108. This 2nd arithmetic processing control circuit 108 outputs a selection control signal to the 2nd arithmetic processing circuit 107. Thus, it becomes possible to change from outside the arithmetic processing with the 2nd arithmetic processing circuit 107.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は暗号装置に関し、特
に大量なデータを安全に暗号化,復号化するための構成
に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an encryption device, and more particularly to a configuration for safely encrypting and decrypting a large amount of data.

【0002】[0002]

【従来の技術】従来からデータの暗号化方式として対称
暗号方式がある。対称暗号方式とは平文を暗号化するの
に用いられる暗号鍵と、その暗号文を復号するのに用い
られる復号鍵とが同じである暗号方式である。
2. Description of the Related Art Conventionally, there is a symmetric encryption method as a data encryption method. The symmetric encryption scheme is an encryption scheme in which an encryption key used to encrypt a plaintext and a decryption key used to decrypt the encrypted text are the same.

【0003】この対称暗号方式にはDES暗号方式があ
る。DES(data encryption standard)暗号方式はア
メリカ商務省標準局(NBS:National Bureau of Sta
ndard Technology,現NIST:National Institute o
f Standard Technology )が1977年1月15日に決
めた暗号標準であり、現在もっとも多く用いられている
暗号方式である。図26は、DES暗号方式による暗号
化処理を行うための回路構成を示す図であり、このDE
S暗号方式の処理では、64ビット平文入力が64ビッ
ト暗号文出力に変換される。なお、この処理では、暗号
鍵も平文入力と同様に64ビット構成であるが、そのう
ち8ビットをパリティに使っているので、実質暗号鍵は
56ビット構成となっている。
[0003] The symmetric encryption system includes a DES encryption system. DES (data encryption standard) encryption system is the National Bureau of Sta
ndard Technology, current NIST: National Institute o
f Standard Technology) is an encryption standard determined on January 15, 1977, and is currently the most frequently used encryption method. FIG. 26 is a diagram showing a circuit configuration for performing an encryption process according to the DES encryption method.
In the processing of the S encryption method, a 64-bit plaintext input is converted to a 64-bit ciphertext output. In this process, the encryption key has a 64-bit configuration as in the case of plaintext input, but since 8 bits are used for parity, the effective encryption key has a 56-bit configuration.

【0004】図において、10はDES方式により暗号
化処理を行う回路であり、64ビット平文入力Hinに対
して初期転置処理(IP処理)を施す初期転置処理部1
0aと、該初期転置処理部10aからの初期転置出力に
対して演算処理を施す演算処理部10bと、該演算処理
部10bからの演算出力に対して最終転置処理(IP-1
処理)を施して64ビット暗号文出力Aout を出力する
最終転置処理部10cとから構成されている。
In FIG. 1, reference numeral 10 denotes a circuit for performing an encryption process by the DES system, and an initial transposition processing unit 1 for performing an initial transposition process (IP process) on a 64-bit plaintext input Hin.
0a, an arithmetic processing unit 10b for performing arithmetic processing on the initial transposed output from the initial transposition processing unit 10a, and a final transposed processing (IP -1) for the arithmetic output from the arithmetic processing unit 10b.
Processing) and outputs a 64-bit ciphertext output Aout.

【0005】ここで、上記初期転置処理部10aは、6
4ビット平文入力Hinにおけるデータの配列を変える初
期転置処理を、図2(a) に示す転置データに基づいて行
う構成となっている。図2(a) は初期転置処理を行うた
めの転置データを表により示しており、この初期転置表
は、64ビット平文入力の各ビットのデータが、この平
文入力に初期転置処理を施した64ビット初期転置出力
の何ビット目のデータになるかを示している。
Here, the initial transposition processing unit 10a
An initial transposition process for changing the data arrangement in the 4-bit plaintext input Hin is performed based on the transposition data shown in FIG. FIG. 2A is a table showing transposition data for performing the initial transposition process. The initial transposition table is obtained by converting the data of each bit of the 64-bit plaintext input into the data obtained by performing the initial transposition process on the plaintext input. It shows what bit of the bit initial transposition output is to be used.

【0006】具体的には、図2(a) に示す初期転置表に
おける行は、64ビット平文入力のLSB(最小位ビッ
ト)から数えたバイト位置を示しており、列は、64ビ
ット平文入力のバイト内でのLSB(最小位ビット)か
ら数えたビット位置を示している。また、行及び列の交
差部に対応する数字が、初期転置処理部10aからの初
期転置出力におけるビット位置を示している。
More specifically, the row in the initial transposition table shown in FIG. 2A indicates the byte position counted from the LSB (least significant bit) of the 64-bit plaintext input, and the column is the 64-bit plaintext input. Indicates the bit position counted from the LSB (least significant bit) in the byte of (a). Also, the numbers corresponding to the intersections of the rows and columns indicate the bit positions in the initial transposition output from the initial transposition processing unit 10a.

【0007】例えば、入力信号のLSBの1ビット目
は、1バイト目の1ビット目であるので、上記初期転置
表における1行1列目の値の58より、出力信号の58
ビット目に変換される。また、入力信号の30ビット目
のデータは、4バイト目の6ビット目であるので、上記
初期転置表における4行6列目の値の24より、出力信
号の24ビット目に変換される。さらに、入力信号の6
4ビット目は8バイト目の8ビット目であるので、上記
初期転置表における8行8列目の値の7より、出力信号
の7ビット目に変換される。以上の変換を入力信号の6
4ビット全てに対して行うことにより出力信号の64ビ
ットのそれぞれに対応するビット位置が得られる。ま
た、上記演算処理部10bは、64ビット初期転置出力
の上位側32ビットを入力信号L0 として、その下位側
32ビットを入力信号R0 として受け、これらの入力信
号L0 ,R0 に対して演算処理を施す第1の演算器10
b1 と、その前段の演算器10b1 〜10b15の出力に
対して、演算処理を施す第2〜第16の演算器10b2
〜10b16とから構成されている。
For example, the first bit of the LSB of the input signal is the first bit of the first byte.
It is converted to the bit. Since the 30th bit data of the input signal is the 6th bit of the 4th byte, it is converted into the 24th bit of the output signal from the value of 24 in the 4th row and 6th column in the initial transposition table. Furthermore, 6 of the input signal
Since the fourth bit is the eighth bit of the eighth byte, it is converted to the seventh bit of the output signal from the value 7 in the eighth row and the eighth column in the initial transposition table. The above conversion is performed for the input signal 6
By performing the operation on all four bits, bit positions corresponding to each of the 64 bits of the output signal can be obtained. The arithmetic processing unit 10b receives the upper 32 bits of the 64-bit initial transposed output as the input signal L0 and receives the lower 32 bits as the input signal R0, and performs arithmetic processing on these input signals L0 and R0. First arithmetic unit 10 to be applied
b1 and second to sixteenth arithmetic units 10b2 for performing arithmetic processing on the outputs of the arithmetic units 10b1 to 10b15 at the preceding stage.
To 10b16.

【0008】ここで、上記第1の演算器10b1 は、上
記初期転置出力の下位側32ビットである入力信号R0
に対して暗号鍵K1 に基づく演算処理を施して関数演算
出力f(R0 ,K1 )を出力する関数演算回路11b1
と、該関数演算出力f(R0,K1 )と上記初期転置出
力の上位側32ビットである入力信号L0 との排他的論
理和を求める排他的論理和回路(ExOR回路)12b
1 とからなり、上記入力信号R0 を上位側32ビット信
号L1 として、上記該排他的論理和を下位側32ビット
信号R1 として後段の演算器10b2 へ出力する構成と
なっている。
Here, the first computing unit 10b1 receives the input signal R0 which is the lower 32 bits of the initial transposed output.
On the basis of the encryption key K1 to output a function operation output f (R0, K1).
And an exclusive OR circuit (ExOR circuit) 12b for obtaining an exclusive OR of the function operation output f (R0, K1) and the input signal L0 which is the upper 32 bits of the initial transposed output.
In this configuration, the input signal R0 is output as the upper 32-bit signal L1 and the exclusive OR is output as the lower 32-bit signal R1 to the arithmetic unit 10b2 at the subsequent stage.

【0009】上記第2〜第16の演算器10b2 〜10
b16はそれぞれ、関数演算回路11b2 〜11b16、及
び排他的論理和回路(ExOR回路)12b2 〜12b
16からなり、前段の演算器10b1 〜10b15からの下
位側32ビット信号R1 〜R15を上位側32ビット信号
L2 〜L16として、ExOR回路12b1 〜12b5の
出力を下位側32ビット信号R2 〜R16としてその後段
側に出力する構成となっている。該第2〜第16の演算
器10b2 〜10b16における関数演算回路11b2 〜
11b16は、前段の演算器10b1 〜10b15のExO
R回路12b1〜12b15からの32ビット出力に、暗
号鍵K2 〜K16に基づく演算処理を施して、関数演算出
力f(R1 ,K2 )〜f(R15,K16)を出力する構成
となっている。また、上記第2〜第16の演算器10b
2 〜10b16におけるExOR回路12b2 〜12b16
は、該関数演算出力f(R1 ,K2 )〜f(R15,K1
6)と、前段の演算器から出力される上位側32ビット
信号L1 〜L15との排他的論理和を求める構成となって
いる。
The second to sixteenth computing units 10b2 to 10b-10
b16 denotes function operation circuits 11b2 to 11b16 and exclusive OR circuits (ExOR circuits) 12b2 to 12b, respectively.
16 and the lower-order 32 bit signals R1 to R15 from the operation units 10b1 to 10b15 at the preceding stage are set as upper 32 bit signals L2 to L16, and the outputs of the ExOR circuits 12b1 to 12b5 are set as lower 32 bit signals R2 to R16. It is configured to output to the stage side. The function operation circuits 11b2 to 11b2 in the second to sixteenth operation units 10b2 to 10b16
11b16 is the ExO of the preceding operation units 10b1 to 10b15.
The 32-bit outputs from the R circuits 12b1 to 12b15 are subjected to arithmetic processing based on the encryption keys K2 to K16 to output function operation outputs f (R1, K2) to f (R15, K16). The second to sixteenth computing units 10b
ExOR circuits 12b2 to 12b16 in 2 to 10b16
Are the function operation outputs f (R1, K2) to f (R15, K1).
6) and the exclusive-OR of the upper 32-bit signals L1 to L15 output from the preceding arithmetic unit.

【0010】ここで、上記関数演算による変換処理を一
般的に示すと、第n番目の演算器における変換処理の対
象となる入力を(Ln-1 、Rn-1 )、この変換処理に用
いられる鍵入力をKnとすると、その演算処理結果(L
n、Rn)は Ln=Rn-1 Rn=Ln-1 eor f(Rn-1 ,Kn) で与えられる。ここでeorは排他的論理和を示してい
る。
Here, the conversion processing by the above-mentioned function operation is generally shown. Inputs to be converted in the n-th arithmetic unit are (Ln-1, Rn-1) and are used for this conversion processing. Assuming that the key input is Kn, the calculation processing result (L
n, Rn) is given by Ln = Rn-1 Rn = Ln-1 eorf (Rn-1, Kn). Here, eor indicates an exclusive OR.

【0011】また、f(R,K)は、48ビットの情報
Kに依存して32ビットの情報Rを変換した、32ビッ
トの変換結果を示している。この関数は、共立出版株式
会社出版、岡本栄司著「暗号理論入門」38頁〜41頁
記載の非線形関数である。
Further, f (R, K) indicates a 32-bit conversion result obtained by converting 32-bit information R depending on 48-bit information K. This function is a non-linear function described in "Introduction to Cryptography" by Eiji Okamoto, Kyoritsu Shuppan Co., Ltd., pp. 38-41.

【0012】さらに、上記最終転置処理部10cは、上
記演算器10b16からの上位側32ビット信号L16及び
下位側32ビット信号R16からなる、64ビット演算信
号におけるデータの配列を変える最終転置処理を、図2
(b) に示す転置データに基づいて行う構成となってい
る。
Further, the final transposition processing unit 10c performs a final transposition process for changing the arrangement of data in the 64-bit operation signal composed of the upper 32-bit signal L16 and the lower 32-bit signal R16 from the arithmetic unit 10b16. FIG.
The configuration is based on the transposition data shown in (b).

【0013】この最終転置処理IP-1は、図2(b) に示
す逆転置データに基づいて行われる。この逆転置データ
は、上記転置データと同様、64ビット信号の各ビット
のデータが、該信号に最終転置処理を施した64ビット
最終転置出力の何ビット目のデータになるかを示してい
る。なお、この最終転置表における行は、図2(a) に示
す初期転置表と同様、入力ビットのバイト位置を示して
おり、該最終転置表における列は、入力ビットのバイト
内でのビット位置を示している。
The final transposition process IP- 1 is performed based on the inverted transposition data shown in FIG. The inverted transposition data indicates, like the transposition data, the number of bits of the 64-bit signal obtained by subjecting each bit data of the 64-bit signal to the final transposition processing of the signal to be the 64-bit signal. The rows in the final transposition table indicate the byte positions of the input bits, as in the initial transposition table shown in FIG. 2A, and the columns in the final transposition table indicate the bit positions in the byte of the input bits. Is shown.

【0014】次に動作について説明する。DES暗号化
処理では、まず、暗号化回路10に64ビット平文Hin
が入力されると、初期転置処理部10aにてこの平文入
力に対して一定の初期転置処理IPが施される。この初
期転置処理を施した64ビット信号は、演算処理部10
bにおける16段の演算器10b1 〜10b16にて変換
処理が施される。
Next, the operation will be described. In the DES encryption processing, first, a 64-bit plaintext Hin is added to the encryption circuit 10.
Is input, the initial transposition processor 10a performs a predetermined initial transposition process IP on the plaintext input. The 64-bit signal that has been subjected to the initial transposition processing is output to the arithmetic processing unit 10
The conversion processing is performed by the 16-stage arithmetic units 10b1 to 10b16 in b.

【0015】すなわち、64ビットの初期転置信号が上
記演算処理部10bに入力されると、まず、第1の演算
器10b1 にて、その下位側32ビット信号R0 に対し
て、暗号鍵K1 を用いた関数演算処理が施され、さら
に、その演算出力f(R0 ,K1 )と、上記初期転置信
号の上位側32ビット信号L0 との排他的論理和がEx
OR回路12b1 にて求められ、該演算器10b1 から
は、排他的論理和が下位側32ビット信号R1 として、
上記下位側32ビット信号R0 が上位側32ビット信号
L1 として後段の第2の演算器10b2 へ出力される。
That is, when the 64-bit initial transposition signal is input to the arithmetic processing unit 10b, first, the first arithmetic unit 10b1 uses the encryption key K1 for the lower 32-bit signal R0. Then, the exclusive OR of the operation output f (R0, K1) and the upper 32-bit signal L0 of the initial transposition signal is expressed by Ex.
The exclusive OR is obtained as a lower-order 32-bit signal R1 from the arithmetic unit 10b1.
The lower-order 32-bit signal R0 is output as the upper-order 32-bit signal L1 to the second arithmetic unit 10b2 at the subsequent stage.

【0016】該第2の演算器10b2 では、上記下位側
32ビット信号R1 に対して、暗号鍵K2 を用いた関数
演算処理が施され、さらに、その演算出力f(R1 ,K
2 )と、上記上位側32ビット信号L1 との排他的論理
和がExOR回路12b2 にて求められ、該演算器10
b2 からは、排他的論理和が下位側32ビット信号R2
として、上記下位側32ビット信号R1 が上位側32ビ
ット信号L2 として後段の演算器へ出力される。
In the second arithmetic unit 10b2, a function operation process using the encryption key K2 is performed on the lower 32 bit signal R1, and the operation output f (R1, K
2) and the exclusive OR of the upper 32-bit signal L1 is obtained by an ExOR circuit 12b2.
b2, the exclusive OR is calculated from the lower 32-bit signal R2
The lower-order 32-bit signal R1 is output as a higher-order 32-bit signal L2 to a subsequent computing unit.

【0017】続いて、第2の演算器より後段の各演算器
10b3 〜10b16では、それぞれに入力される上位側
32ビット信号L2 〜L15及び下位側32ビット信号R
2 〜R15に対して、上記第2の演算器10b2 における
演算処理と同様な処理が、暗号鍵K3 〜K16を用いて行
われる。
Subsequently, in each of the arithmetic units 10b3 to 10b16 at a stage subsequent to the second arithmetic unit, the upper 32 bit signals L2 to L15 and the lower 32 bit signal R input thereto are respectively inputted.
The same processing as that in the second computing unit 10b2 is performed on 2 to R15 using the encryption keys K3 to K16.

【0018】そして、第16の演算器10b16からの上
位側32ビット信号L16が下位側32ビットとして、該
第16の演算器10b16からの下位側32ビット信号R
16が上位側32ビット信号として、最終転置処理部10
cに入力され、該最終転置処理部10cでは、初期転置
処理IPと同じく、64ビット信号のそれぞれのビット
について最終転置処理IP-1が施される。この最終転置
処理IP-1による変換により、上記64ビット平文Hin
に対する64ビット暗号文Aout が出力される。
The lower 32-bit signal R16 from the sixteenth arithmetic unit 10b16 is used as the lower 32-bit signal L16 from the sixteenth arithmetic unit 10b16.
16 as the upper 32-bit signal,
c, and the final transposition processing unit 10c performs the final transposition processing IP -1 on each bit of the 64-bit signal as in the initial transposition processing IP. By the conversion by the final transposition process IP- 1 , the above 64-bit plaintext Hin is obtained.
Is output.

【0019】また、上記DES暗号方式以外の対称暗号
方式として、FEAL(fast encryption algorithm )
がある。FEAL方式は、NTTが考案した暗号アルゴ
リズムであり、FEAL−NX,FEAL−Nからな
る。FEAL−NXは128ビットの鍵を用いて、64
ビット平文を暗号文に変換する暗号方式であり、FEA
L−Nは、FEAL−NXにおける128ビットの暗号
鍵の上位側64ビットをすべて0として暗号化を行う方
式、すなわちFEAL−NXにおける暗号鍵の下位側6
4ビットのみを用いる暗号方式である。ここでNは段
数、つまり暗号化処理における変換処理の回数を表わ
し、4、8、16、32・・・・という値をとる。
As a symmetric encryption method other than the DES encryption method, FEAL (fast encryption algorithm) is used.
There is. The FEAL scheme is an encryption algorithm devised by NTT, and includes FEAL-NX and FEAL-N. FEAL-NX uses a 128-bit key,
This is an encryption method that converts bit plaintext into ciphertext.
L-N is a method of performing encryption by setting all 64 high-order bits of a 128-bit encryption key in FEAL-NX to 0, that is, the lower 6 bits of the encryption key in FEAL-NX.
This is an encryption method using only 4 bits. Here, N represents the number of stages, that is, the number of conversion processes in the encryption process, and takes a value of 4, 8, 16, 32,.

【0020】図27は、共通鍵暗号方式として最もよく
用いられる、FEAL−8暗号方式の回路構成を説明す
るための図であり、図において、20は64ビット平文
HinをFEAL−8暗号方式により64ビット暗号文A
out に変換する暗号化回路である。この暗号化回路20
は、64ビット平文Hinに対して排他的論理和演算を施
す入力側ExOR演算部20aと、その出力に対して、
暗号鍵K0 〜K7 を用いた変換処理を行う変換処理部2
0bと、該変換処理部20bの出力に対して排他的論理
和演算を施す出力側ExOR演算部20cとを有してい
る。
FIG. 27 is a diagram for explaining the circuit configuration of the FEAL-8 encryption system, which is most often used as a common key encryption system. In FIG. 27, reference numeral 20 denotes a 64-bit plaintext Hin converted by the FEAL-8 encryption system. 64-bit ciphertext A
This is an encryption circuit for converting to out. This encryption circuit 20
Is an input-side ExOR operation unit 20a that performs an exclusive OR operation on a 64-bit plaintext Hin, and outputs
Conversion processing unit 2 for performing conversion processing using encryption keys K0 to K7
0b, and an output-side ExOR operation unit 20c that performs an exclusive OR operation on the output of the conversion processing unit 20b.

【0021】上記入力側ExOR演算部20aは、64
ビット平文Hinと64ビット暗号鍵との論理排他的論理
和をとり、64ビットの排他的論理和信号を出力する第
1の排他的論理和回路(ExOR回路)20a1 と、こ
の排他的論理和信号の上位側32ビット信号Lsとその
下位側32ビット信号Rsとの排他的論理和をとり、3
2ビット排他的論理和信号を出力する第2の排他的論理
和(ExOR回路)20a2 とを備え、上記上位側32
ビット信号Lsを変換処理部20bの32ビット上位側
入力L0 として、上記ExOR回路20a2 の出力を変
換処理部20bの32ビット下位側入力R0 として出力
する構成となっている。ここで、上記第1のExOR回
路20a1 では、64ビット暗号鍵として、それぞれ1
6ビットの暗号鍵を4つ、つまり暗号鍵K8 ,K9 ,K
A ,KB を用いている。
The input-side ExOR operation unit 20a has 64
A first exclusive OR circuit (ExOR circuit) 20a1 for taking a logical exclusive OR of the bit plaintext Hin and the 64-bit encryption key and outputting a 64-bit exclusive OR signal; The exclusive OR of the upper 32-bit signal Ls and the lower 32-bit signal Rs is calculated.
A second exclusive OR (ExOR circuit) 20a2 for outputting a 2-bit exclusive OR signal.
The bit signal Ls is output as the 32-bit upper input L0 of the conversion processor 20b, and the output of the ExOR circuit 20a2 is output as the 32-bit lower input R0 of the conversion processor 20b. Here, in the first ExOR circuit 20a1, 1-bit is used as a 64-bit encryption key.
Four 6-bit encryption keys, that is, encryption keys K 8 , K 9 , K
A, is used K B.

【0022】上記変換処理部20bは、上記ExOR演
算部20aからの32ビット上位側入力L0 及び32ビ
ット下位側入力R0 を受け、これらの入力信号L0 ,R
0 に対して演算処理を施す第1の演算器20b0 と、そ
の前段の演算器20b0 〜10b6 の出力に対して、演
算処理を施す第2〜第8の演算器10b1 〜10b7と
から構成されている。
The conversion processing unit 20b receives the 32-bit upper-side input L0 and the 32-bit lower-side input R0 from the ExOR operation unit 20a, and receives these input signals L0 and R0.
A first arithmetic unit 20b0 for performing arithmetic processing on 0, and second to eighth arithmetic units 10b1 to 10b7 for performing arithmetic processing on the outputs of the preceding arithmetic units 20b0 to 10b6. I have.

【0023】ここで、上記第1の演算器20b0 は、上
記入力側ExOR回路20aの下位側32ビットである
入力信号R0 に対して暗号鍵K0 に基づく演算処理を施
して関数演算出力f0 を出力する関数演算回路21b0
と、該関数演算出力f0 と上記入力側ExOR回路20
aの上位側32ビットである入力信号L0 との排他的論
理和を求める排他的論理和回路(ExOR回路)22b
0 とからなり、上記入力信号R0 を上位側32ビット信
号L1 として、上記該排他的論理和を下位側32ビット
信号R1 として後段の演算器20b1 へ出力する構成と
なっている。
Here, the first computing unit 20b0 performs a computing process based on the encryption key K0 on the lower 32 bits of the input signal R0 of the input-side ExOR circuit 20a to output a function computing output f0. Function operation circuit 21b0
And the function operation output f0 and the input-side ExOR circuit 20
Exclusive OR circuit (ExOR circuit) 22b for obtaining exclusive OR with input signal L0 which is the upper 32 bits of a
0, the input signal R0 is output as the upper 32-bit signal L1, and the exclusive OR is output as the lower 32-bit signal R1 to the subsequent computing unit 20b1.

【0024】また、上記第2〜第8の演算器20b1 〜
20b7 はそれぞれ、関数演算回路21b1 〜21b7
、及び排他的論理和回路(ExOR回路)22b1 〜
22b7 からなり、前段の演算器20b0 〜20b6 か
らの下位側32ビット信号R0〜R6 を上位側32ビッ
ト信号L1 〜L7 として、ExOR回路22b1 〜22
b7 の出力を下位側32ビット信号R1 〜R7 としてそ
の後段側に出力する構成となっている。該第2〜第8の
演算器における関数演算回路21b1 〜11b7は、前
段の演算器20b0 〜20b6 のExOR回路22b0
〜22b6 からの32ビット出力に、暗号鍵K1 〜K7
に基づく演算処理を施して、関数演算出力f1 〜f7 を
出力する構成となっている。また、上記第2〜第8の演
算器におけるExOR回路22b1 〜22b7 は、該関
数演算出力f1 〜f7 と、前段の演算器から出力される
上位側32ビット信号L1 〜L7 (R0 〜R6 )との排
他的論理和を求める構成となっている。
The second to eighth computing units 20b1 to 20b1 to 20b1
20b7 are function operation circuits 21b1 to 21b7, respectively.
, And an exclusive OR circuit (ExOR circuit) 22b1-
The ExOR circuits 22b1 to 22b are provided with lower-order 32-bit signals R0 to R6 from the preceding operation units 20b0 to 20b6 as upper-order 32-bit signals L1 to L7.
The output of b7 is output to the subsequent stage as lower 32-bit signals R1 to R7. The function operation circuits 21b1 to 11b7 in the second to eighth operation units are the ExOR circuits 22b0 of the preceding operation units 20b0 to 20b6.
To the 32-bit output from .about.22b6 to the encryption keys K1 to K7
, And outputs function operation outputs f1 to f7. The ExOR circuits 22b1 to 22b7 in the second to eighth arithmetic units output the function operation outputs f1 to f7 and the upper 32-bit signals L1 to L7 (R0 to R6) output from the preceding arithmetic unit. To obtain an exclusive OR of

【0025】上記出力側ExOR演算部20cは、上記
第8の演算器20b7 のExOR回路22b7 の出力L
E と、該ExOR回路22b7 の32ビット下位側入力
R7との排他的論理和をとり、32ビットの排他的論理
和信号RE を出力する第1の排他的論理和回路(ExO
R回路)20c1 と、上記排他的論理和信号RE 及びL
E による64ビット信号と、64ビット暗号鍵との排他
的論理和をとり、64ビット暗号文Aout を出力する第
2の排他的論理和(ExOR回路)20c2 とから構成
されている。ここで、上記第2のExOR回路20c2
では、64ビット暗号鍵として、それぞれ16ビットの
暗号鍵を4つ、つまり暗号鍵KC ,KD,KE ,KF
用いている。
The output-side ExOR operation unit 20c outputs the output L of the ExOR circuit 22b7 of the eighth operation unit 20b7.
A first exclusive OR circuit (ExO) which takes an exclusive OR of E and the 32-bit lower input R7 of the ExOR circuit 22b7 and outputs a 32-bit exclusive OR signal RE
R circuit) 20c1 and the exclusive OR signals RE and L
A second exclusive OR (ExOR circuit) 20c2 for taking an exclusive OR of a 64-bit signal by E and a 64-bit encryption key and outputting a 64-bit ciphertext Aout. Here, the second ExOR circuit 20c2
Uses four 16-bit encryption keys, that is, encryption keys K C , K D , K E , and K F , as 64-bit encryption keys.

【0026】次に動作について簡単に説明する。この暗
号化回路20に64ビット平文Hinが入力されると、こ
の平文入力と、暗号鍵K8 ,K9 ,KA ,KB からなる
64ビット信号との排他的論理和がExOR回路20a
1 にて求められる。さらにこの論理演算出力の上位側3
2ビット信号LS とその下位側32ビット信号RS との
排他的論理和がExOR回路20a2 にて求められる。
Next, the operation will be briefly described. When a 64-bit plaintext Hin is input to the encryption circuit 20, the exclusive OR of the plaintext input and a 64-bit signal composed of the encryption keys K 8 , K 9 , K A , and K B is calculated by an ExOR circuit 20a.
Required by 1. Furthermore, the upper 3 side of this logical operation output
The exclusive OR of the 2-bit signal L S and its lower 32-bit signal R S is obtained by the ExOR circuit 20a2.

【0027】そして、この排他的論理和が下位側32ビ
ット信号R0 として、上記上位側32ビット信号LS
上位側32ビット入力L0 として、演算処理部20bに
入力されると、該演算処理部20bにおける8段の演算
器20b0 〜20b7 にて変換処理が施される。
When the exclusive OR is input to the arithmetic processing unit 20b as the lower 32-bit signal R0 and the upper 32-bit signal L S is input to the arithmetic processing unit 20b as the upper 32-bit input L0, the arithmetic processing unit Conversion processing is performed by eight stages of arithmetic units 20b0 to 20b7 in 20b.

【0028】すなわち、第1の演算器10b1 にて、上
記下位側32ビット入力R0 に対して、暗号鍵K0 を用
いた変換処理が施され、さらに、その変換出力f0 と、
上記上位側32ビット入力L0 との排他的論理和がEx
OR回路22b0 にて求められ、該演算器20b0 から
は、上記排他的論理和が下位側32ビット信号R1 とし
て、上記下位側32ビット信号R0 が上位側32ビット
信号L1 として後段の第2の演算器20b1 へ出力され
る。
That is, the first arithmetic unit 10b1 performs a conversion process using the encryption key K0 on the lower 32-bit input R0, and further obtains a conversion output f0 and
Exclusive OR with the upper 32-bit input L0 is Ex
The exclusive OR is calculated as the lower 32-bit signal R1 and the lower 32-bit signal R0 is calculated as the upper 32-bit signal L1 from the arithmetic unit 20b0. Is output to the device 20b1.

【0029】続いて、第1の演算器20b0 より後段の
各演算器20b1 〜20b7 では、それぞれに入力され
る上位側32ビット信号L1 〜L7 及び下位側32ビッ
ト信号R1 〜R7 に対して、上記第1の演算器20b0
における演算処理と同様な処理が、暗号鍵K1 〜K7 を
用いて行われる。
Subsequently, in each of the arithmetic units 20b1 to 20b7 at a stage subsequent to the first arithmetic unit 20b0, the upper 32-bit signals L1 to L7 and the lower 32-bit signals R1 to R7, which are respectively input, are processed as described above. First computing unit 20b0
Are performed using the encryption keys K1 to K7.

【0030】そして上記出力側ExOR演算部20cの
第1のExOR回路20c1 では、上記第8の演算器2
0b7 のExOR回路22b7 の出力LE と、第8の演
算器20b7 の32ビット下位側入力R7 との排他的論
理和をとり、32ビットの排他的論理和信号RE が出力
され、さらに、第2のExOR回路20c2 では、上記
排他的論理和信号RE 及びLE による64ビット信号
と、4つの16ビット暗号鍵KC ,KD ,KE ,KF に
よる64ビット暗号鍵との排他的論理和が演算されて、
64ビット暗号文Aout が出力される。
In the first ExOR circuit 20c1 of the output side ExOR operation unit 20c, the eighth arithmetic unit 2
The exclusive-OR of the output LE of the ExOR circuit 22b7 of 0b7 and the lower 32-bit input R7 of the eighth computing unit 20b7 is obtained, and a 32-bit exclusive-OR signal RE is output. The ExOR circuit 20c2 calculates the exclusive OR of the 64-bit signal based on the exclusive-OR signals RE and LE and the 64-bit encryption key based on the four 16-bit encryption keys KC, KD, KE, and KF.
The 64-bit ciphertext Aout is output.

【0031】また、図28は、上記第1〜第8の演算器
20b0 〜20b7 における関数fによる演算処理を行
う演算処理回路21b0 〜21b7 の構成を説明するた
めの図である。図中、22は、16ビット暗号鍵入力K
と下位側32ビット入力Rとを受け、該入力Rの変換を
行って変換出力f(R,K)を出力する演算処理回路で
あり、該演算処理回路22は、上記下位側32ビット入
力Rを4分割して得られる4つの8ビット入力R0 〜R
3 のそれぞれに対して所定の変換処理を施し、さらに変
換処理を施した8ビット入力R0 〜R3 をまとめて32
ビット変換出力f(R,K)として出力する構成となっ
ている。ここでは、暗号鍵として、16ビット暗号鍵K
を2分割した2つの8ビット暗号鍵K0 ,K1 を用いる
ようにしている。
FIG. 28 is a diagram for explaining the configuration of arithmetic processing circuits 21b0 to 21b7 for performing arithmetic processing by the function f in the first to eighth arithmetic units 20b0 to 20b7. In the figure, 22 is a 16-bit encryption key input K
And a lower-order 32-bit input R, converts the input R, and outputs a converted output f (R, K). Are divided into four 8-bit inputs R 0 -R
3 are subjected to a predetermined conversion process, and the converted 8-bit inputs R 0 to R 3 are combined into 32
It is configured to output as a bit conversion output f (R, K). Here, a 16-bit encryption key K is used as the encryption key.
Are divided into two, and two 8-bit encryption keys K 0 and K 1 are used.

【0032】すなわち、この演算処理回路22は、上記
8ビット入力R1 と8ビット暗号鍵K0 との排他的論理
和を求めるExOR回路221aと、この排他的論理和
出力と上記8ビット入力R0 との排他的論理和を求める
ExOR回路221bと、上記8ビット入力R2 と8ビ
ット暗号鍵K1 との排他的論理和を求めるExOR回路
221cと、この排他的論理和出力と上記8ビット入力
3 との排他的論理和を求めるExOR回路221dと
を有している。
That is, the arithmetic processing circuit 22 includes an ExOR circuit 221a for obtaining an exclusive OR of the 8-bit input R 1 and the 8-bit encryption key K 0 , an exclusive-OR output and the 8-bit input R 0 exclusive OR Request ExOR circuit 221b of the ExOR circuit 221c for obtaining an exclusive OR between the 8-bit input R 2 and 8-bit cryptographic key K 1, the exclusive OR output and the 8-bit and a ExOR circuit 221d for obtaining the exclusive OR of the input R 3.

【0033】また上記演算処理回路22は、上記ExO
R回路221bの8ビット出力とExOR回路221d
の8ビット出力とを入力として、関数S1 による演算処
理を行う第1の変換回路222aと、この変換回路22
2aの出力と上記ExOR回路221dの出力とを入力
として、関数S0 による演算処理を行う第2の変換回路
222bと、上記変換回路222aの出力と上記8ビッ
ト入力R0 とを入力として、関数S0 による演算処理を
行う第3の変換回路222cと、上記変換回路222b
の出力と上記8ビット入力R3 とを入力として、関数S
1 による演算処理を行う第4の変換回路222dとを有
している。
The arithmetic processing circuit 22 is provided with the ExO
8-bit output of R circuit 221b and ExOR circuit 221d
As input and 8-bit output of the first conversion circuit 222a for performing arithmetic processing by the function S 1, the conversion circuit 22
And the output of 2a in output and the ExOR circuit 221d as an input, a second conversion circuit 222b for performing arithmetic processing by the function S 0, an output and the 8-bit input R 0 of the conversion circuit 222a as an input, a function A third conversion circuit 222c that performs arithmetic processing by S 0, and the conversion circuit 222b
And the 8-bit input R 3 as an input, the function S
And a fourth conversion circuit 222d for performing the arithmetic processing by 1 .

【0034】ここで、上記関数S0 ,S1 は、式(1)
により示す、変数x,yを入力とする一般的な関数Sj
のパラメータjを(j=0,1)としたものに相当す
る。
Here, the functions S 0 and S 1 are calculated by the following equations (1).
A general function S j with variables x and y as inputs
(J = 0, 1).

【0035】 Sj (x,y)=rot2(x+y+j(mod256)) ・・・(1) ここで、x,yは入力、jは0あるいは1のパラメー
タ、rot2は(x+y+j(mod256))のデー
タを2ビットだけ左へ巡回シフトする演算操作、(x+
y+j(mod256))は、x+y+jを256で割
り算した時の余りを示している。
S j (x, y) = rot 2 (x + y + j (mod 256)) (1) where x and y are inputs, j is a parameter of 0 or 1, and rot 2 is (x + y + j (mod 256)). An arithmetic operation that cyclically shifts data to the left by 2 bits, (x +
y + j (mod256)) indicates the remainder when x + y + j is divided by 256.

【0036】このような構成の変換回路22では、32
ビット入力R及び16ビット暗号鍵が入力されると、3
2ビットの入力Rは上位側あるいは下位側から8ビット
づつ4つのグループの信号,つまり8ビット入力R0
3 に分けられ、16ビット暗号鍵入力Kは上位側及び
下位側の2つのグループの信号K0 ,K1 に分けられ
る。そして、各ExOR回路221a〜221dにおけ
る論理演算及び変換回路222a〜222dでの関数演
算により、上記32ビット入力Rに対応した32ビット
変換出力f(R,K)が求められる。
In the conversion circuit 22 having such a configuration, 32
When the bit input R and the 16-bit encryption key are input, 3
The 2-bit input R is a signal of four groups of 8 bits each from the upper side or the lower side, that is, the 8-bit inputs R 0 to R 0 .
Divided into R 3, 16-bit encryption key input K is divided into upper side and the signal K of the two groups of lower 0, K 1. Then, a 32-bit conversion output f (R, K) corresponding to the 32-bit input R is obtained by a logical operation in each of the ExOR circuits 221a to 221d and a function operation in the conversion circuits 222a to 222d.

【0037】また、図29は、上記暗号化回路20で用
いる暗号鍵K0 〜K9 ,KA 〜KFを作成する暗号鍵作
成回路の構成を示している。図において、30は64ビ
ットの鍵情報に基づいて上記暗号鍵K0 〜K9 ,KA
F を作成する暗号鍵作成回路であり、8段の演算器3
0a0 〜30a7 から構成されている。
FIG. 29 shows the configuration of an encryption key creation circuit for creating encryption keys K 0 to K 9 and K A to K F used in the encryption circuit 20. In the figure, reference numeral 30 denotes the encryption keys K 0 to K 9 , K A to K based on 64-bit key information.
This is an encryption key generation circuit for generating K F , and is an eight-stage arithmetic unit 3
0a0 to 30a7.

【0038】第1段目の演算器30a0 は、64ビット
鍵情報を2分割して得られる2つの32ビット鍵情報を
それぞれ第1,第2入力として、関数fK に基づいた演
算により、16ビット暗号鍵K0 ,K1 を含む32ビッ
ト出力を発生する暗号鍵発生部31a0 から構成されて
おり、第2段目の演算器30a1 は、前段の暗号鍵発生
部31a0 の32ビット出力とその32ビット入力(上
記2つの32ビット鍵情報の一方)との排他的論理和を
求めるExOR回路32a1 と、該ExOR回路の出力
及び上記2つの32ビット鍵情報の他方とを第1,第2
の入力として、関数fK に基づいた演算により、16ビ
ット暗号鍵K1 ,K2 を含む32ビット暗号鍵出力を発
生する暗号鍵発生部31a1 とから構成されている。さ
らに、第3〜8段目の演算器30a2 〜30a7 は、前
段の暗号鍵発生部31a1 〜31a6 の32ビット出力
とその32ビット入力との排他的論理和を求めるExO
R回路32a2 〜32a7 と、該ExOR回路の出力及
び前々段の暗号鍵発生部31a0 〜31a5 の32ビッ
ト出力を第1,第2の入力として、関数fK に基づいた
演算により、16ビット暗号鍵(K2 ,K3 )〜(KE
,KF )を含む32ビット出力を発生する暗号鍵発生
部31a2 〜31a7 とから構成されている。
The first stage computing unit 30a0 uses two 32-bit key information obtained by dividing the 64-bit key information into two parts as first and second inputs, respectively, and performs an operation based on the function fK to generate a 16-bit key information. The second stage arithmetic unit 30a1 is composed of a 32-bit output of the preceding-stage encryption key generator 31a0 and a 32-bit input thereof, which comprises an encryption key generator 31a0 that generates a 32-bit output including the encryption keys K0 and K1. An ExOR circuit 32a1 for obtaining an exclusive OR with (one of the two 32-bit key information) and an output of the ExOR circuit and the other of the two 32-bit key information are referred to as a first and a second.
And an encryption key generator 31a1 that generates a 32-bit encryption key output including 16-bit encryption keys K1 and K2 by an operation based on the function fK. Further, the arithmetic units 30a2 to 30a7 at the third to eighth stages provide an exclusive OR of the 32-bit output of the encryption key generation units 31a1 to 31a6 at the preceding stage and the 32-bit input thereof.
Using the outputs of the R circuits 32a2 to 32a7 and the outputs of the ExOR circuits and the 32-bit outputs of the encryption key generators 31a0 to 31a5 at the two stages before and as the first and second inputs, a 16-bit encryption key is calculated based on the function fK. (K2, K3)-(KE
, KF), and an encryption key generator 31a2 to 31a7 for generating a 32-bit output.

【0039】また図30は、上記関数fK による演算を
行う、各段の暗号鍵発生部の構成を示している。図中、
31は、32ビットの第1入力Aと、32ビットの第2
入力Bとを受け、32ビット暗号鍵出力fK (A,B)
を発生する暗号鍵発生部であり、該暗号鍵発生部32
は、32ビットの第1入力Aを4分割して得られる4つ
の8ビット入力A0 〜A3 と、32ビットの第2入力B
を4分割して得られる4つの8ビット入力B0 〜B3
を用いて演算処理を行って、上記32ビット暗号鍵出力
fK (A,B)を作成する構成となっている。
FIG. 30 shows the configuration of an encryption key generation unit at each stage for performing an operation using the function fK. In the figure,
31 is a 32-bit first input A and a 32-bit second input A
Receives input B and outputs 32-bit encryption key fK (A, B)
And an encryption key generator 32 for generating
Are four 8-bit inputs A 0 to A 3 obtained by dividing the 32-bit first input A into four, and the 32-bit second input B
Is subjected to arithmetic processing using four 8-bit inputs B 0 to B 3 obtained by dividing the data into four parts to generate the 32-bit encryption key output fK (A, B).

【0040】この暗号鍵発生部32は、上記8ビット入
力A0 とA1 の排他的論理和を求める第1のExOR回
路311aと、上記8ビット入力A2 とA3 の排他的論
理和を求める第2のExOR回路311bと、この回路
311bの出力と上記8ビット入力B0 の排他的論理和
を求める第3のExOR回路311cとを有している。
また、上記暗号鍵発生部32は、第1,第3のExOR
回路311a及び311cの出力を第1,第2入力とし
て、関数S1 による演算処理を行う第1の変換回路31
2aと、該変換回路312aの出力と上記8ビット入力
1 との排他的論理和を求める第4のExOR回路31
1dと、第2,第4のExOR回路311b及び311
dの出力を第1,第2入力として、関数S0 による演算
処理を行う第2の変換回路312bとを有している。さ
らに上記暗号鍵発生部31は、該第1の変換回路312
aの出力と上記8ビット入力B3 との排他的論理和を求
める第5のExOR回路311eと、該第2の変換回路
312bの出力と上記8ビット入力B2 との排他的論理
和を求める第6のExOR回路311fと、第5のEx
OR回路311eの出力と8ビット入力A0 とを第1,
第2入力として、関数S0 による演算処理を行う第3の
変換回路312cと、第6のExOR回路311eの出
力と8ビット入力A3 とを第1,第2入力として、関数
1 による演算処理を行う第4の変換回路312dとを
有している。
The encryption key generating unit 32 calculates the exclusive OR of the 8-bit inputs A 0 and A 1 and the exclusive-OR of the 8-bit inputs A 2 and A 3. a second ExOR circuit 311b for obtaining, and a third ExOR circuit 311c for obtaining the exclusive OR of the output and the 8-bit input B 0 of the circuit 311b.
Further, the encryption key generation unit 32 includes first and third ExOR
The output of the circuit 311a and 311c as the first, second input, a first conversion circuit 31 for performing arithmetic processing by the function S 1
2a and, fourth ExOR circuit 31 for obtaining the exclusive OR of the output and the 8-bit input B 1 of the converter circuit 312a
1d, the second and fourth ExOR circuits 311b and 311
The output of the d as the first, second input, and a second conversion circuit 312b for performing arithmetic processing by the function S 0. Further, the encryption key generation unit 31 includes the first conversion circuit 312
obtaining the exclusive OR of the fifth ExOR circuit 311e for obtaining an exclusive OR, output and the 8-bit input B 2 of the second converter circuit 312b of the output and the 8-bit input B 3 of a A sixth ExOR circuit 311f and a fifth ExOR circuit 311f
The output of the OR circuit 311e and the 8-bit input A 0 are connected to the first,
As a second input, and a third conversion circuit 312c for performing arithmetic processing by the function S 0, an output and a 8-bit input A 3 of the sixth ExOR circuit 311e as a first, second input, operation by the function S 1 And a fourth conversion circuit 312d for performing processing.

【0041】[0041]

【発明が解決しようとする課題】ところで、暗号装置に
おいては、第三者によるデータの盗聴、偽造、改ざん等
の危険からデータを保護することが要求されているが、
最近では暗号装置としてのコンピュータの処理速度の向
上、さらには暗号解読方法の開発等により、暗号装置の
信頼性が低下してきている。
By the way, in the encryption device, it is required to protect the data from danger of eavesdropping, forgery, falsification, etc. of the data by a third party.
Recently, the reliability of the encryption device has been reduced due to the improvement of the processing speed of the computer as the encryption device and the development of the decryption method.

【0042】そこで、暗号解読方式に対抗する形で、色
々なアルゴリズムを採用した暗号装置が開発されてはい
るものの、暗号解読に対する信頼性の向上と引き換え
に、在来の暗号装置との間での互換性がなくなってしま
うという問題がある。言い換えると、在来の暗号装置と
の互換性を、改良型の暗号装置に持たせようとすると、
新しく回路を追加する必要があり、装置全体の回路規模
が大きくなり、開発期間やコストの増大を招いてしま
う。
Therefore, although encryption devices employing various algorithms have been developed to counter the decryption method, there is a trade-off between the encryption device and the conventional encryption device in exchange for improvement in the reliability of decryption. There is a problem that compatibility is lost. In other words, if you try to give the improved cryptographic device compatibility with conventional cryptographic devices,
It is necessary to add a new circuit, and the circuit scale of the entire device becomes large, which leads to an increase in development time and cost.

【0043】本発明は上記のような問題点に鑑みてなさ
れたもので、小規模の回路構成により暗号の信頼性を向
上するとともに、在来の暗号装置との間での互換性を保
持することができ、しかも開発期間の短縮及びコストの
低減を図ることができる暗号装置を得ることを目的とす
る。
The present invention has been made in view of the above-described problems, and improves the reliability of encryption by a small-scale circuit configuration and maintains compatibility with a conventional encryption device. It is an object of the present invention to obtain an encryption device capable of reducing the development period and the cost.

【0044】[0044]

【課題を解決するための手段】この発明(請求項1)に
係る暗号装置は、複数ビットの平文データを分割して得
られた個々の分割データを暗号化する暗号装置であっ
て、演算処理の内容が異なる複数の処理モードを有し、
選択制御信号により選択された処理モードでもって、上
記分割データを暗号化する演算処理を行うデータ処理手
段と、外部入力に基づいて、該データ処理手段に上記選
択制御信号を出力する演算処理制御手段とを備えたもの
である。
An encryption device according to the present invention (claim 1) is an encryption device for encrypting individual divided data obtained by dividing a plurality of bits of plaintext data, and comprising: Has multiple processing modes with different contents,
Data processing means for performing an arithmetic processing for encrypting the divided data in the processing mode selected by the selection control signal, and arithmetic processing control means for outputting the selection control signal to the data processing means based on an external input It is provided with.

【0045】この発明(請求項2)は、請求項1記載の
暗号装置において、上記データ処理手段を、外部から入
力された分割データをビット単位又はバイト単位で並び
替えて初期転置データを作成する初期転置手段と、所定
の関数データを有し、上記初期転置データ,あるいは該
初期転置データを演算処理した演算処理データに対し
て、所定ビットの暗号鍵を用いて、上記関数データに基
づいた転置処理及びデータ変更処理を含む第1の演算処
理を施す第1演算処理回路と、転置処理の内容が異なる
複数の転置処理モードを有し、選択された転置処理モー
ドでもって該第1演算処理回路の出力データに転置処理
を施す第2の演算処理を行う第2演算処理回路と、上記
第2演算処理回路の出力データ及び上記初期転置データ
のうちの一方をデータ選択信号に基づいて選択して上記
第1演算処理回路に出力するセレクタ手段と、上記初期
転置データに対して上記第1,第2の演算処理回路によ
る演算処理が繰り返し所定回数だけ連続して行われるよ
う上記セレクタ手段を上記データ選択信号により制御す
る演算処理回数制御回路と、上記第2の演算処理回路の
出力データに対して最終転置処理を施して最終演算処理
データを出力する最終転置処理手段とを備えた構成と
し、上記演算処理制御手段を、外部入力に基づいて、上
記第2演算処理回路における転置処理モードの選択を行
う転置処理制御回路を有する構成としたものである。
According to a second aspect of the present invention, in the encryption device according to the first aspect, the data processing means generates initial transposed data by rearranging the divided data input from the outside in a bit unit or a byte unit. An initial transposition means, and transposition based on the function data, which has predetermined function data, and which is performed on the initial transposition data or the operation processing data obtained by performing arithmetic processing on the initial transposition data, using an encryption key having predetermined bits. A first arithmetic processing circuit for performing a first arithmetic processing including processing and data change processing, and a plurality of transposition processing modes having different transposition processing contents, wherein the first arithmetic processing circuit has a selected transposition processing mode. A second arithmetic processing circuit for performing a second arithmetic processing for transposing the output data of the second arithmetic processing circuit and one of the output data of the second arithmetic processing circuit and the initial transposed data. A selector for selecting based on a selection signal and outputting the selected data to the first arithmetic processing circuit; and performing a predetermined number of continuous arithmetic processings on the initial transposed data by the first and second arithmetic processing circuits. A number-of-operations control circuit for controlling the selector means by the data selection signal; and a final transposition means for performing final transposition processing on output data of the second arithmetic processing circuit and outputting final operation processing data. And the arithmetic processing control means includes a transposition processing control circuit for selecting a transposition processing mode in the second arithmetic processing circuit based on an external input.

【0046】この発明(請求項3)は、請求項2記載の
暗号装置において、上記第1演算処理回路を、その入力
データに第1の演算処理を施してなる第1の出力データ
に再度第1の演算処理を施して第2の出力データを求め
たとき、上記入力データと第2の出力データとが同じ値
となるインボリューション演算モードを有する構成とし
たものである。
According to a third aspect of the present invention, in the encryption device according to the second aspect, the first arithmetic processing circuit is configured to apply the first arithmetic processing again to the first output data obtained by subjecting the input data to the first arithmetic processing. When the first output processing is performed to obtain the second output data, the input data and the second output data have the same value in the involution operation mode.

【0047】この発明(請求項4)は、請求項2記載の
暗号装置において、上記第1演算処理回路を、複数の関
数データを有し、外部からの制御信号により選択された
関数データに基づいて、その入力データに対する演算処
理を行うよう構成したものである。
According to a fourth aspect of the present invention, in the encryption device according to the second aspect, the first arithmetic processing circuit has a plurality of function data based on function data selected by an external control signal. Thus, arithmetic processing is performed on the input data.

【0048】この発明(請求項5)は、請求項2記載の
暗号装置において、上記第2演算処理回路を、その入力
データに対して第2の演算処理を施してなる第1の出力
データに再度第2の演算処理を施して第2の出力データ
を求めたとき、該入力データと第2の出力データとが同
じ値となるインボリューション演算モードを有する構成
としたものである。
According to a fifth aspect of the present invention, in the encryption device according to the second aspect, the second arithmetic processing circuit is configured to perform the second arithmetic processing on the input data to the first output data. When the second operation processing is performed again to obtain the second output data, the configuration has an involution operation mode in which the input data and the second output data have the same value.

【0049】この発明(請求項6)は、請求項5記載の
暗号装置において、nビットの外部入力と変更不可能な
nビットの初期設定値との排他的論理和を求める論理回
路を備え、上記転置処理制御回路を、該排他的論理和の
値のうちのmビット(m≦n)に基づいて上記第2演算
処理回路における転置処理モードを選択するよう構成し
たものである。
According to a sixth aspect of the present invention, in the encryption device according to the fifth aspect, there is provided a logic circuit for obtaining an exclusive OR of an external input of n bits and an initial value of n bits that cannot be changed. The transposition processing control circuit is configured to select a transposition processing mode in the second arithmetic processing circuit based on m bits (m ≦ n) of the value of the exclusive OR.

【0050】この発明(請求項7)は、請求項5記載の
暗号装置において、上記初期転置手段の出力である初期
転置データと、変更不可能なnビットの初期設定値との
排他的論理和を求める論理回路を備え、上記転置処理制
御回路を、該排他的論理和の値のうちのmビット(m≦
n)に基づいて上記第2演算処理回路における転置処理
モードを選択するよう構成したものである。
According to a seventh aspect of the present invention, in the encryption device according to the fifth aspect, an exclusive OR of the initial transposition data output from the initial transposition means and an unchangeable n-bit initial set value is provided. , And the transposition processing control circuit is configured to set the transposition processing control circuit to m bits (m ≦
The transposition processing mode in the second arithmetic processing circuit is selected based on n).

【0051】この発明(請求項8)は、請求項5記載の
暗号装置において、sビットの乱数を発生する乱数発生
手段と、該乱数の値と、変更不可能なsビットの初期設
定値との排他的論理和を求める論理回路とを備え、上記
転置処理制御回路を、該排他的論理和の値のうちのmビ
ット(m≦s)に基づいて上記第2演算処理回路におけ
る転置処理モードを選択するよう構成したものである。
According to the present invention (claim 8), in the cryptographic apparatus according to claim 5, a random number generating means for generating an s-bit random number, a value of the random number, an unchangeable s-bit initial setting value, A logic circuit for calculating an exclusive OR of the transposition processing control circuit in the second arithmetic processing circuit based on m bits (m ≦ s) of the value of the exclusive OR. Is selected.

【0052】この発明(請求項9)は、請求項3ないし
5のいずれかに記載の暗号装置において、上記第1演算
処理回路を、その出力データを入力データとする第1の
演算処理を所定回数行ったとき、最初の入力データと最
終の出力データとが同じ値となる複数回インボリューシ
ョン演算モードを有する構成としたものである。
According to a ninth aspect of the present invention, in the encryption device according to any one of the third to fifth aspects, the first arithmetic processing circuit performs a first arithmetic processing using output data thereof as input data. The configuration has a multiple involution operation mode in which the first input data and the final output data have the same value when performed a number of times.

【0053】この発明(請求項10)は、請求項6ない
し8のいずれかに記載の暗号装置において、上記第2演
算処理回路を、その出力データを入力データとする第2
の演算処理を所定回数行ったとき、最初の入力データと
最終の出力データとが同じ値となる複数回インボリュー
ション演算モードを有する構成としたものである。
According to a tenth aspect of the present invention, in the encryption device according to any one of the sixth to eighth aspects, the second arithmetic processing circuit uses the output data of the second arithmetic processing circuit as input data.
Is performed a predetermined number of times, the first input data and the final output data have the same value.

【0054】この発明(請求項11)は、請求項6ない
し9のいずれかに記載の暗号装置において、上記データ
処理手段を、上記第2演算処理回路への所定の外部信号
の入力により、強制的に、暗号化処理と復号化処理とで
同一の暗号鍵を用いる対象暗号方式でもってインボリュ
ーション暗号化処理が行われるよう構成し、該インボリ
ューション暗号化処理を、該暗号化処理における所定回
数の演算と復号化処理における所定回数の演算とによ
り、該暗号化処理における最初の演算処理が施される初
期入力データと、復号化処理における最終演算処理の結
果得られる最終出力データとが同じ値となる処理とした
ものである。
According to the present invention (claim 11), in the encryption device according to any one of claims 6 to 9, the data processing means is forcibly activated by inputting a predetermined external signal to the second arithmetic processing circuit. The involution encryption process is configured to be performed by a target encryption method using the same encryption key for the encryption process and the decryption process, and the involution encryption process is performed a predetermined number of times in the encryption process. And the predetermined number of operations in the decryption process, the initial input data subjected to the first operation process in the encryption process and the final output data obtained as a result of the final operation process in the decryption process have the same value. The processing is as follows.

【0055】この発明(請求項12)は、請求項11記
載の暗号装置において、上記第1演算処理回路における
第1の演算処理に用いられる関数を、出力データに基づ
いて対応する入力データを求める逆方向演算プロセスで
は、入力データに基づいて対応する出力データを求める
順方向演算プロセスに比べて多くの演算処理を必要とす
る一方向性関数としたものである。
According to a twelfth aspect of the present invention, in the cryptographic device according to the eleventh aspect, a function used in the first arithmetic processing in the first arithmetic processing circuit is used to determine corresponding input data based on output data. The backward operation process is a one-way function that requires more operation processing than the forward operation process in which corresponding output data is obtained based on input data.

【0056】この発明(請求項13)は、請求項11ま
たは12記載の暗号装置において、上記初期転置手段
を、その初期転置処理の内容が異なる複数の初期転置処
理モードを有し、装置外部あるいは装置内部にて発生さ
れたモード選択信号に基づいて選択された所要の初期転
置処理モードでもって、上記入力された分割データに初
期転置処理を施すよう構成したものである。
According to a thirteenth aspect of the present invention, in the encryption device according to the eleventh or twelfth aspect, the initial transposition means has a plurality of initial transposition processing modes in which the contents of the initial transposition processing are different from each other. An initial transposition process is performed on the input divided data in a required initial transposition mode selected based on a mode selection signal generated inside the apparatus.

【0057】この発明(請求項14)は、請求項11ま
たは12記載の暗号装置において、上記最終転置手段
を、その最終転置処理の内容が異なる複数の最終転置処
理モードを有し、装置外部あるいは装置内部にて発生さ
れたモード選択信号に基づいて選択された所要の最終転
置処理モードでもって、上記データ処理手段の出力デー
タに最終転置処理を施すよう構成したものである。
According to a fourteenth aspect of the present invention, in the encryption device according to the eleventh or twelfth aspect, the final transposition means has a plurality of final transposition processing modes in which the contents of the final transposition are different from each other. The output data of the data processing means is subjected to a final transposition in a required final transposition processing mode selected based on a mode selection signal generated inside the apparatus.

【0058】[0058]

【発明の実施の形態】以下、本発明の実施の形態につい
て説明する。 実施の形態1.図1は本発明の実施の形態1による暗号
装置の構成を示すブロック図であり、図において、10
0は本実施の形態1の暗号装置であり、入力データを保
持する入力データラッチ回路101と、該ラッチ回路1
01の出力に対して初期転置処理を施す初期転置回路1
02と、演算処理回数制御回路104から出力されるセ
レクト信号S1Bに基づいて、初期転置出力S1A及び
演算処理出力S1Gのうちの一方を選択するセレクタ1
03とを有している。また、上記暗号装置100は、該
セレクタの出力S1Cを暗号鍵制御回路106からの暗
号鍵S1Dに基づいて処理する第1演算処理回路105
と、第2演算処理制御回路108からの転置選択信号S
1Fをその制御端子Fe2に受け、この転置選択信号S
1Fに基づいて上記第1演算処理出力S1Eを処理する
第2演算処理回路107と、該第2演算処理出力S1G
に対して最終転置処理を施す最終転置回路109と、最
終転置回路109の出力をラッチする出力データラッチ
回路111とを有している。
Embodiments of the present invention will be described below. Embodiment 1 FIG. FIG. 1 is a block diagram showing the configuration of the encryption device according to the first embodiment of the present invention.
Reference numeral 0 denotes an encryption device according to the first embodiment, which includes an input data latch circuit 101 for holding input data,
Initial transposition circuit 1 that performs initial transposition processing on the output of No. 01
02, and a selector 1 that selects one of the initial transposition output S1A and the arithmetic processing output S1G based on the select signal S1B output from the arithmetic processing number control circuit 104.
03. Further, the cryptographic device 100 processes the output S1C of the selector based on the encryption key S1D from the encryption key control circuit 106.
And the transposition selection signal S from the second arithmetic processing control circuit 108
1F is received at its control terminal Fe2 and the transposition selection signal S
1F, a second arithmetic processing circuit 107 that processes the first arithmetic processing output S1E, and a second arithmetic processing output S1G.
, A final transposition circuit 109 for performing a final transposition process, and an output data latch circuit 111 for latching the output of the final transposition circuit 109.

【0059】また、この暗号装置100は、外部入力V
inと初期値V1との排他的論理和をとる排他的論理和
回路110を有し、その排他的論理和出力Aex1が上
記第2演算処理制御回路108に供給されるようになっ
ている。
Further, the encryption device 100 has the external input V
It has an exclusive OR circuit 110 for taking the exclusive OR of in and the initial value V1. The exclusive OR output Aex1 is supplied to the second arithmetic processing control circuit 108.

【0060】ここで、上記初期転置回路102は、図2
(a) に示す初期転置表の転置データに基づいて64ビッ
トの入力データに対する転置処理を行うようになってい
る。上記演算処理回数制御回路104は、図3に示すよ
うに、セレクタ出力S1Cが上記第1の演算処理回路に
て処理される度にカウント値がインクリメントし、かつ
該カウント値が16回になるとリセットされるカウンタ
ー回路104aと、演算処理回数を格納する演算処理回
数格納部104bと、該両回路の出力を比較し、その比
較結果に応じて上記セレクト信号S1Bを出力するコン
パレータ104cとから構成されている。
Here, the initial transposition circuit 102 corresponds to FIG.
The transposing process is performed on 64-bit input data based on the transposed data in the initial transposition table shown in FIG. As shown in FIG. 3, the arithmetic processing number control circuit 104 increments the count value each time the selector output S1C is processed by the first arithmetic processing circuit, and resets the count value when the count value reaches 16 times. And a comparator 104c that compares the outputs of the two circuits and outputs the select signal S1B according to the comparison result. I have.

【0061】上記第1演算処理回路105は、図4に示
すように、64ビットのセレクタ出力S1Cにおける下
位側32ビットの信号LSBに対して、暗号鍵制御回路
106からの暗号鍵S1Dに基づいて関数fにより関数
演算処理を施す関数演算回路105aと、この演算回路
105aの出力と、上記セレクタ出力S1Cにおける上
位側32ビットの信号MSBとの排他的論理和をとるX
OR回路105bとを有し、該XOR回路105bの3
2ビット出力と上記下位側32ビットの信号LSBとか
らなる64ビットの第1演算処理信号S1Eを出力する
構成となっている。ここで、上記関数fは、岡本栄治著
「暗号理論入門」38から39項に記載されている非線
形関数fと同じものである。
As shown in FIG. 4, the first arithmetic processing circuit 105 applies the lower 32-bit signal LSB of the 64-bit selector output S1C based on the encryption key S1D from the encryption key control circuit 106. A function operation circuit 105a for performing a function operation process using a function f, and X which is an exclusive OR of an output of the operation circuit 105a and a signal MSB of the upper 32 bits in the selector output S1C.
An OR circuit 105b, and 3 of the XOR circuit 105b.
It is configured to output a 64-bit first operation processing signal S1E including a 2-bit output and the lower 32 bits of the signal LSB. Here, the function f is the same as the nonlinear function f described in Eiji Okamoto, “Introduction to Cryptography Theory”, pp. 38-39.

【0062】上記暗号鍵処理制御回路106は、図5に
示すように、第1〜第16の暗号鍵のうちから所定の暗
号鍵を、上記初期転置データに対する第1演算処理の回
数に応じて選択し、選択した暗号鍵S1Dを上記第1演
算処理回路105へ出力するセレクタ回路106aを有
している。
As shown in FIG. 5, the encryption key processing control circuit 106 determines a predetermined encryption key from the first to sixteenth encryption keys in accordance with the number of times of the first arithmetic processing on the initial transposed data. It has a selector circuit 106a that selects and outputs the selected encryption key S1D to the first arithmetic processing circuit 105.

【0063】図6は、第2演算処理回路107の機能を
説明するための図であり、その64ビット入力データに
おける第1〜第8ビットまでの1バイトデータをB1、
第9〜第16までの1バイトデータをB2、第17〜第
24までの1バイトデータをB3、第25〜第32まで
の1バイトデータをB4、第33〜第40までの1バイ
トデータをB5、第41〜第48までの1バイトデータ
をB6、第49〜第56までの1バイトデータをB7、
第57〜第64までの1バイトデータをB8とした場合
における、モード1〜4のうちの各モードでの転置位置
を示す表である。例えば、入力データにおける1バイト
データB8及びB7は、モード0では、MSBから5バ
イト目及び6バイト目にそれぞれ転置されることを示し
ている。
FIG. 6 is a diagram for explaining the function of the second arithmetic processing circuit 107. One byte data of the first to eighth bits of the 64-bit input data is represented by B1,
The 9th to 16th 1-byte data is B2, the 17th to 24th 1-byte data is B3, the 25th to 32nd 1-byte data is B4, and the 33rd to 40th 1-byte data is B2. B5, the one-byte data from the 41st to the 48th is B6, the 1-byte data from the 49th to the 56th is B7,
40 is a table showing transposition positions in each of modes 1 to 4 when 1-byte data from 57th to 64th is B8. For example, in the mode 0, the 1-byte data B8 and B7 in the input data are transposed to the 5th and 6th bytes from the MSB, respectively.

【0064】図7は、この第2演算処理回路107の、
MSBからみて第8バイト目、第7バイト目に対応する
論理回路187,177(図(a) ,(b) )を示してい
る。なお、第2演算処理回路107における他のバイト
出力に対応する論理回路も、上記第8バイト目、第7バ
イト目に対応するものと同様な構成となっている。
FIG. 7 is a circuit diagram of the second arithmetic processing circuit 107.
The logic circuits 187 and 177 (FIGS. (A) and (b)) corresponding to the eighth and seventh bytes when viewed from the MSB are shown. The logic circuits corresponding to the other byte outputs in the second arithmetic processing circuit 107 have the same configuration as the logic circuits corresponding to the eighth and seventh bytes.

【0065】つまり、各バイト出力に対応する論理回路
187,177は、転置選択信号S1Fと外部制御信号
F2Cを入力とする論理積回路107bと、この論理積
回路107bの出力に基づいて、モード0〜モード4に
対応する5つのバイトのいずれかを選択するバイト選択
回路107aとからなる。ここでは、バイト選択回路に
セレクタを用いているが、これはマルチプレクサを用い
てもよい。
In other words, the logic circuits 187 and 177 corresponding to each byte output are provided with a logical product circuit 107b that receives the transposition selection signal S1F and the external control signal F2C as inputs, and a mode 0 based on the output of the logical product circuit 107b. To a byte selection circuit 107a for selecting any one of the five bytes corresponding to mode 4. Here, a selector is used for the byte selection circuit, but a multiplexer may be used for this.

【0066】上記第2演算処理制御回路108は、図8
に示すように64ビットのXOR出力Aex1を受け、
これに対応する6ビットの信号を出力する1ビット加算
回路108aと、該加算回路の出力を受け、これに対応
する3ビットの転置選択信号S1Fを出力するコンパレ
ータ108bとから構成されており、該転置選択信号S
1Fにより上記第2演算処理回路107での転置処理を
制御する構成となっている。
The second arithmetic processing control circuit 108 operates as shown in FIG.
Receives the 64-bit XOR output Aex1 as shown in
A 1-bit adder circuit 108a for outputting a corresponding 6-bit signal is provided, and a comparator 108b receiving the output of the adder circuit and outputting a corresponding 3-bit transpose selection signal S1F. Transposition selection signal S
1F controls the transposition processing in the second arithmetic processing circuit 107.

【0067】さらに、上記最終転置回路109は、図2
(b) に示す最終転置表の転置データに基づいて64ビッ
トの入力データに対する転置処理を行うようになってい
る。つまり、最終転置回路109は、初期転置回路10
2により転置処理が施された入力データを元に戻す転置
処理を行う。ここでは64ビットの入力データが、上記
図2(b) に示す最終転置表に基づいて64ビットの出力
データに変換されるようになっている。なお、上記図2
(b) に示す最終転置表は、図2(a) に示す初期転置表と
同じく、その行が入力ビットのLSBから数えて何バイ
ト目になるかを示しており、その列が入力ビットのバイ
ト内でのLSBから数えたビット位置を示しており、ま
たこの最終転置表は岡本栄治著「暗号理論入門」33項
から48項記載のDES装置におけるものと同じであ
る。
Further, the above-mentioned final transposition circuit 109 is constructed as shown in FIG.
The transposition process is performed on 64-bit input data based on the transposed data in the final transposed table shown in (b). That is, the final transposition circuit 109 is
2. A transposition process is performed to restore the input data subjected to the transposition process to 2. Here, 64-bit input data is converted into 64-bit output data based on the final transposition table shown in FIG. 2B. Note that FIG.
The final transposition table shown in (b) shows how many bytes the row counts from the LSB of the input bit, and the column shows the column of the input bit, as in the initial transposition table shown in FIG. 2 (a). It shows the bit position counted from the LSB in the byte, and this final transposition table is the same as that in the DES device described in Eiji Okamoto, “Introduction to Cryptography Theory”, paragraphs 33 to 48.

【0068】次に動作について説明する。以下、128
ビットの平文を暗号化する処理について説明する。12
8ビットの平文が、それぞれ64ビットの2つの平文ブ
ロック,つまり64ビットの第1の平文ブロックと64
ビットの第2の平文ブロックとに分割される。なお、平
文は64ビットに限定されるものではなく、また平文を
分割するビットサイズは64ビットに限定されるもので
はない。
Next, the operation will be described. Hereinafter, 128
A process of encrypting a plaintext of bits will be described. 12
An 8-bit plaintext is composed of two 64-bit plaintext blocks, ie, a 64-bit first plaintext block and a 64-bit plaintext block.
And a second plaintext block of bits. Note that the plaintext is not limited to 64 bits, and the bit size for dividing the plaintext is not limited to 64 bits.

【0069】そして、上記分割された各平文ブロックの
暗号化処理が本実施の形態1の暗号装置100により行
われる。すなわち、前記第1、第2の平文ブロックは、
入力データラッチ回路101に入力され、この回路10
1にてその平文ブロックの暗号化処理が終了するまで保
持される。入力データラッチ回路101の出力データ
は、初期転置回路102にて転置処理を施された後、セ
レクタ103に入力される。
Then, the encryption processing of each of the divided plaintext blocks is performed by the encryption device 100 of the first embodiment. That is, the first and second plaintext blocks are:
Input to the input data latch circuit 101, this circuit 10
At 1, the plaintext block is held until the encryption process is completed. The output data of the input data latch circuit 101 is input to a selector 103 after being subjected to a transposition process in an initial transposition circuit 102.

【0070】該セレクタ103は、暗号処理回数制御回
路104の演算処理回数格納部104bに格納されてい
るあらかじめ決められた暗号処理回数(16回)から最
初の1回を引いた15回に相当する信号S1Bを受け、
これに基づいて第2演算処理回路107の出力S1Gと
初期転置回路102の出力S1Aのうち出力S1Aを選
択し、これをセレクタ出力S1Cとして第1演算処理回
路105に出力する。
The selector 103 corresponds to 15 times obtained by subtracting the first one from the predetermined number of times of encryption (16 times) stored in the number-of-times-of-operations storage unit 104b of the number-of-times-of-encryption control circuit 104. Receiving the signal S1B,
Based on this, an output S1A is selected from the output S1G of the second arithmetic processing circuit 107 and the output S1A of the initial transposition circuit 102, and this is output to the first arithmetic processing circuit 105 as a selector output S1C.

【0071】このとき、上記第1演算処理回路105の
第1回目の入力は、入力データラッチ回路101の出力
が初期転置回路102で転置された値である。この第1
演算処理回路105では、暗号鍵制御回路106から出
力される暗号鍵S1Dに基づいて上記セレクタ出力S1
Cの演算処理が行なわれる。ここで、暗号鍵制御回路1
06には、暗号処理回数の16回分に相当する48ビッ
トの第1〜第16の暗号鍵が設定されており、第1演算
処理回路105での第1回目から第16回目までの処理
にそれぞれ対応した固有の暗号鍵が使用される。なお暗
号処理回数は16回に限定されるものではなく、暗号鍵
も48ビットに限定されるものではない。
At this time, the first input of the first arithmetic processing circuit 105 is a value obtained by transposing the output of the input data latch circuit 101 by the initial transposition circuit 102. This first
The arithmetic processing circuit 105 outputs the selector output S1 based on the encryption key S1D output from the encryption key control circuit 106.
The arithmetic processing of C is performed. Here, the encryption key control circuit 1
The first to sixteenth encryption keys of 48 bits corresponding to 16 times of the number of encryption processes are set in 06, and the first to sixteenth processes in the first arithmetic processing circuit 105 are respectively performed. The corresponding unique encryption key is used. The number of encryption processes is not limited to 16 and the encryption key is not limited to 48 bits.

【0072】次に、第2演算処理回路107では、第1
演算処理回路105の64ビットの出力データS1Eの
転置処理が行われる。この際、該転置処理は、第2演算
処理制御回路108によって制御される。具体的には、
このとき排他的論理和回路110では、64ビットの外
部入力Vinと64ビットの初期値V1 とを入力とし、
その排他的論理和である64ビット信号Aex1を上記
第2演算処理制御回路108に出力している。なお上記
外部入力は、64ビットに限定されるものではない。ま
た、初期値V1は、あらかじめ本暗号装置に格納してあ
る外部から変更不可能な値である。上記第2演算処理制
御回路108では、上記排他的論理和である64ビット
信号Aex1に基づいて、第2演算処理回路107の転
置処理を制御する3ビットの転置選択信号S1Fを上記
第2演算処理回路107に出力する。
Next, in the second arithmetic processing circuit 107, the first
The transposition processing of the 64-bit output data S1E of the arithmetic processing circuit 105 is performed. At this time, the transposition process is controlled by the second arithmetic processing control circuit 108. In particular,
At this time, the exclusive OR circuit 110 receives the 64-bit external input Vin and the 64-bit initial value V1 as inputs,
The 64-bit signal Aex1, which is the exclusive OR, is output to the second arithmetic processing control circuit 108. The external input is not limited to 64 bits. The initial value V1 is a value that is stored in advance in the present encryption device and cannot be changed from outside. The second arithmetic processing control circuit 108 generates a 3-bit transposition selection signal S1F for controlling the transposition processing of the second arithmetic processing circuit 107 based on the 64-bit signal Aex1 which is the exclusive OR. Output to the circuit 107.

【0073】また第2演算処理回路107では、その制
御端子Fe2に入力される外部制御信号F2CがLレベ
ルであるとき、第2演算処理回路107は強制的にモー
ド0のデータ配列でもって、上記第1演算処理回路出力
S1Fの各ビットのデータを転置して出力する。またこ
のとき、第2演算処理制御回路108では、信号Aex
1を構成する各ビットのうちその値が1になっているビ
ットの数が23以下の場合はモード1、1以上24個以
下の場合はモード2、25以上48以下の場合はモード
3、49以上64以下の場合はモード4を選択する転置
選択信号S1Fを上記第2演算処理回路107に出力す
るようになっている。なお、ここでは、上記各モード毎
に異なる転置処理が行われる。また上記選択条件では、
信号Aex1におけるその値が1となっているビットの
数が1以上23個以下の場合は、モード1とモード2の
両方が選択されることとなるので、このようにモードが
重なる場合には、より高いあるいはより低いモードを選
択するといった条件を付加しておく必要がある。
In the second arithmetic processing circuit 107, when the external control signal F2C input to the control terminal Fe2 is at the L level, the second arithmetic processing circuit 107 forcibly has the mode 0 data array. The data of each bit of the first arithmetic processing circuit output S1F is transposed and output. At this time, the second arithmetic processing control circuit 108 outputs the signal Aex
Mode 1 when the number of bits whose value is 1 among the bits constituting 1 is 23 or less, mode 2 when the number is 1 or more and 24 or less, and mode 3 or 49 when the number is 25 or more and 48 or less. When the number is 64 or less, the transposition selection signal S1F for selecting the mode 4 is output to the second arithmetic processing circuit 107. Here, a different transposition process is performed for each mode. In the above selection conditions,
When the number of bits whose value is 1 in the signal Aex1 is 1 or more and 23 or less, both the mode 1 and the mode 2 are selected. Thus, when the modes overlap each other, It is necessary to add a condition such as selecting a higher or lower mode.

【0074】図6には、入力に対してモード0〜モード
4での転置処理を行ったデータの位置を、入力における
データ位置に対応させて示しており、入力の各バイトB
1からB8までに対して、たとえば、モード0で転置し
た場合の出力における、LSBからみて第8バイト目
(B4)は入力の第4バイト目(B4)、この場合の出
力におけるLSBからみて第7バイト目(B3)は入力
の第3バイト目(B3)を示している。
FIG. 6 shows the positions of data obtained by transposing the input in mode 0 to mode 4 in correspondence with the data position in the input.
From 1 to B8, for example, the eighth byte (B4) in the output when transposed in mode 0 is the fourth byte (B4) of the input when viewed from the LSB, and the LSB in the output in this case is the fourth byte (B4). The seventh byte (B3) indicates the third byte (B3) of the input.

【0075】なお、上記モード4は複数インボリューシ
ョン機能を実現している。このモード4の場合は、第2
演算処理回路107で8の倍数回だけ演算処理を行うこ
とにより、最終演算出力が最初の入力の値と同じにな
る。
The mode 4 implements a multiple involution function. In this mode 4, the second
By performing the arithmetic processing by the arithmetic processing circuit 107 multiple times of 8, the final arithmetic output becomes the same as the value of the first input.

【0076】上記信号Aex1の値により上記モードの
選択を行う方法は、前記全ビットの1を数える方法以外
にも、しきい値に基づく方法、あるビットの値に基づく
方法、連続する複数ビットの値に基づく方法等が考えら
れる。
The method of selecting the mode based on the value of the signal Aex1 includes a method based on a threshold value, a method based on a certain bit value, and a method based on a plurality of consecutive bits, in addition to the method of counting 1 of all the bits. A method based on a value can be considered.

【0077】ここで、しきい値に基づく方法とは、Ae
x1信号のビット列における1の配列を2進数として見
たときの値から、ある設定値を基準にしてモード選択を
行うものである。また、あるビットの値に基づく方法と
は、Aex1信号を構成する64ビットすべての値に基
づいてモード選択を行うのではなく、上記Aex1信号
における所定のビット、例えば偶数ビット、あるいは
2,4,8,16,32,64といった特定のビットに
基づいてモード選択を行う方法である。さらに、連続す
る複数ビットの値に基づく方法とは、上位32ビットあ
るいは下位16ビットといった複数ビットにおける1の
数、または該複数ビットの2進数としての値から、設定
されたしきい値を基準にしてモード選択を行う方法であ
る。上記モード1〜4に対応する、第2演算処理回路1
07による転置処理は、図6に示す転置配列に限定され
るものではない。また、モードの数も4つに限定される
ものではない。
Here, the method based on the threshold value is Ae
The mode is selected based on a certain set value from a value when the arrangement of 1 in the bit string of the x1 signal is viewed as a binary number. Further, the method based on the value of a certain bit does not perform mode selection based on all 64 bits constituting the Aex1 signal, but uses a predetermined bit in the Aex1 signal, for example, an even bit, or 2,4,4. In this method, mode selection is performed based on specific bits such as 8, 16, 32, and 64. Further, the method based on the value of a plurality of consecutive bits is based on a set threshold value based on the number of 1s in a plurality of bits, such as upper 32 bits or lower 16 bits, or a binary value of the plurality of bits. Mode selection. Second arithmetic processing circuit 1 corresponding to modes 1 to 4
07 is not limited to the transposition arrangement shown in FIG. Further, the number of modes is not limited to four.

【0078】そして、暗号処理回数制御回路104に格
納されている暗号処理回数だけ、第1演算処理回路10
5及び第2演算処理回路107での処理を行った後に、
第2演算処理回路107の出力S1Gは、始めて最終転
置回路109にて最終転置処理が施されて、出力データ
ラッチ回路111に保持される。これと同時に、入力デ
ータラッチ回路101に、次の平文ブロックが保持さ
れ、前平文ブロックと同等の処理が行われる。
Then, the first arithmetic processing circuit 10 is operated by the number of encryption processings stored in the encryption processing number control circuit 104.
After performing the processing in the fifth and second arithmetic processing circuits 107,
The output S1G of the second arithmetic processing circuit 107 is subjected to final transposition processing by the final transposition circuit 109 for the first time, and is held in the output data latch circuit 111. At the same time, the next plaintext block is held in the input data latch circuit 101, and the same processing as that of the previous plaintext block is performed.

【0079】全平文ブロックの暗号化処理が完了する
と、平文の暗号化処理が終了する。例えば、上記外部制
御信号F2Cをある値にすることにより、モード0を選
択することが可能となり、実施の形態1の暗号装置10
0aはDES暗号装置と同等な機能を有することとな
る。
When the encryption processing of all the plaintext blocks is completed, the encryption processing of the plaintext ends. For example, by setting the external control signal F2C to a certain value, mode 0 can be selected, and the encryption device 10 according to the first embodiment can be selected.
0a has the same function as the DES encryption device.

【0080】このように本実施の形態1では、入力され
た平文データを所定の関数に基づいた演算処理により暗
号化する第1演算処理回路105と、転置処理の内容が
異なる複数の転置処理モードを有し、選択制御信号によ
り選択された転置処理モードでもって、該第1演算処理
回路105の出力に対して転置処理を行う第2演算処理
回路107と、外部入力Vinに基づいて、該第2演算
処理回路107に上記選択制御信号を出力する演算処理
制御回路108とを備えたので、上記第2演算処理回路
107での演算処理を外部から変更することが可能とな
る。つまり、インターネットのようなオープンネットワ
ークにおいてデータ転送する場合に、第三者による盗
聴、改竄の攻撃を回避するために暗号装置が一般に用い
られているが、このような暗号装置の暗号アルゴリズム
の解読をより一層困難なものとし、これにより転送され
るデータを、第三者によるデータの盗聴、改ざん、解読
等の攻撃から守り、万が一、暗号装置のアルゴリズムが
解読された場合でも、暗号装置の仕様変更を行うことな
く、暗号アルゴリズムの変更によりデータの安全性を保
つことができる。
As described above, in the first embodiment, the first arithmetic processing circuit 105 which encrypts the input plaintext data by the arithmetic processing based on the predetermined function, and the plurality of transposition processing modes having different transposition processing contents A second operation processing circuit 107 that performs transposition processing on the output of the first operation processing circuit 105 in the transposition processing mode selected by the selection control signal, and the second operation processing circuit 107 Since the second arithmetic processing circuit 107 is provided with the arithmetic processing control circuit 108 for outputting the selection control signal, the arithmetic processing in the second arithmetic processing circuit 107 can be externally changed. In other words, when data is transferred over an open network such as the Internet, cryptographic devices are generally used to avoid eavesdropping and tampering attacks by third parties. This makes it even more difficult to protect the transferred data from attacks such as eavesdropping, falsification, and decryption of data by a third party, and even if the algorithm of the cryptographic device is decrypted, the specification of the cryptographic device is changed. Without changing the encryption algorithm, data security can be maintained.

【0081】また、第2演算処理回路107を、その外
部制御信号F2CをLレベルとしたとき、強制的に0モ
ードの転置処理,つまり64ビットの入力の上位側32
ビットと下位側32ビットとを入れ換える転置処理を行
うよう構成したので、本実施の形態1の暗号装置100
aがその他のDES暗号装置との間でデータ転送可能で
あるという互換性を有することとなる。
When the external control signal F2C is set to the L level, the second arithmetic processing circuit 107 is forcibly transposed in the 0 mode, that is, the upper 32 bits of the 64-bit input.
Since the transposing process for exchanging bits and the lower 32 bits is performed, the encryption device 100 according to the first embodiment is configured.
a has data compatibility with other DES encryption devices.

【0082】また、外部制御信号F2Cの値によって
は、第2演算処理回路107における転置処理モードを
上記0モード以外のモードに設定することができ、この
ため本実施の形態の暗号装置を、DES暗号装置とは暗
号アルゴリズムの異なる暗号装置とすることができる。
Further, depending on the value of the external control signal F2C, the transposition processing mode in the second arithmetic processing circuit 107 can be set to a mode other than the above-described 0 mode. An encryption device having a different encryption algorithm from the encryption device can be used.

【0083】この結果、本実施の形態の暗号装置100
では、すでにハードディスク等の蓄積メディアに保持さ
れているDES暗号装置によって暗号化されたデータを
復号し、再び暗号アルゴリズムを変更して再び蓄積メデ
ィアに保存することも可能である。
As a result, the encryption device 100 of the present embodiment
Then, it is possible to decrypt the data encrypted by the DES encryption device already held in the storage medium such as the hard disk, change the encryption algorithm again, and save the data again in the storage medium.

【0084】さらに、第2演算処理回路107を制御す
る第2演算処理制御回路108を、外部入力Vinと初期
値V1との排他的論理和により制御可能としているた
め、第2演算処理回路107を外部から制御することが
可能となり、暗号回路のアルゴリズムが第三者によって
解読された場合でも装置仕様の変更を行うことなく、外
部から暗号アルゴリズムを変更することが可能となり、
再び解読を困難にすることができる。また、転送される
平文ブロックごとに外部入力Vinを変更することも可能
であり、これによりさらに暗号の安全性を増大できる。
Further, since the second arithmetic processing control circuit 108 for controlling the second arithmetic processing circuit 107 can be controlled by the exclusive OR of the external input Vin and the initial value V1, the second arithmetic processing circuit 107 can be controlled. It is possible to control from the outside, and even if the algorithm of the encryption circuit is decrypted by a third party, it is possible to change the encryption algorithm from the outside without changing the device specifications,
Again, decoding can be difficult. It is also possible to change the external input Vin for each plaintext block to be transferred, thereby further increasing the security of encryption.

【0085】また、本実施の形態1では、第1演算処理
回路105を、排他的論理和演算とデータの巡回シフト
処理からなる、関数fを用いた演算処理を、入力データ
に施して暗号化を行う構成とし、第2演算処理回路10
7を、入力データの転置処理により暗号化を行う構成し
ているので、暗号化処理がすべてインボリューション演
算のみにより実行されることとなる。このため本実施の
形態1の暗号装置は、容易に復号装置に転用可能であ
る。
Also, in the first embodiment, the first arithmetic processing circuit 105 performs an arithmetic operation using a function f including an exclusive OR operation and a cyclic shift operation on data on input data to encrypt the input data. And the second arithmetic processing circuit 10
7 is configured to perform the encryption by transposing the input data, so that all the encryption processing is executed only by the involution operation. For this reason, the encryption device according to the first embodiment can be easily converted to a decryption device.

【0086】しかも、本実施の形態1の暗号装置100
では、複数の転置処理モードを有する、暗号化処理とし
て転置処理のみを行う第2演算処理回路107を備え、
所定の転置処理モードを選択して暗号アルゴリズムを切
り換えるようにしているので、暗号アルゴリズムの切換
えを簡単に行うことができる暗号装置を、第2の演算処
理回路107におけるモード選択を選択する選択回路を
付加するのみで簡単に実現可能であり、暗号アルゴリズ
ムが可変な暗号装置の回路規模を、第1演算処理回路に
おける暗号アルゴリズムを可変としたものと比べて小さ
くできる。
In addition, the encryption device 100 of the first embodiment
Includes a second arithmetic processing circuit 107 having a plurality of transposition processing modes and performing only transposition processing as encryption processing;
Since the encryption algorithm is switched by selecting a predetermined transposition processing mode, an encryption device that can easily switch the encryption algorithm is provided by a selection circuit that selects the mode selection in the second arithmetic processing circuit 107. It can be easily realized only by adding, and the circuit scale of the encryption device in which the encryption algorithm is variable can be made smaller than that of the first arithmetic processing circuit in which the encryption algorithm is variable.

【0087】実施の形態2.図9は本発明の実施の形態
2による暗号装置の構成を示すブロック図であり、図に
おいて、200は本実施の形態2の暗号装置であり、入
力データを保持する入力データラッチ回路201と、該
ラッチ回路201の出力に初期転置処理を施す初期転置
回路202と、初期転置回路202からの転置データS
2Aと演算処理中のデータS2Gとを、暗号処理回数制
御回路204からのセレクト信号S2Bに基づいて切り
換えて出力するセレクタ203とを有している。
Embodiment 2 FIG. 9 is a block diagram showing a configuration of an encryption device according to the second embodiment of the present invention. In the figure, reference numeral 200 denotes an encryption device according to the second embodiment, and an input data latch circuit 201 for holding input data; An initial transposition circuit 202 for performing an initial transposition process on the output of the latch circuit 201, and transposition data S from the initial transposition circuit 202;
A selector 203 for switching and outputting 2A and the data S2G being processed based on the select signal S2B from the encryption processing number control circuit 204;

【0088】また、上記暗号装置200は、上記セレク
タ出力S2Cに対して、暗号鍵制御回路206からの暗
号鍵S2Dに基づいて第1の演算処理を施す第1演算処
理回路205と、第2演算処理制御回路208からの転
置選択信号S2Fを受け、この転置選択信号S2Fに基
づいて上記第1演算処理回路206の出力S2Eに対し
て第2の演算処理を施す第2演算処理回路207と、上
記第2の演算処理出力S2Gに対して最終転置処理を施
す最終転置回路210とを有し、該回路210からの最
終転置出力を出力データラッチ回路211によりラッチ
するようになっている。
Further, the encryption device 200 includes a first arithmetic processing circuit 205 for performing a first arithmetic processing on the selector output S2C based on the encryption key S2D from the encryption key control circuit 206, and a second arithmetic processing circuit. A second arithmetic processing circuit 207 which receives the transposition selection signal S2F from the processing control circuit 208, and performs a second arithmetic processing on the output S2E of the first arithmetic processing circuit 206 based on the transposition selection signal S2F; A final transposition circuit 210 that performs a final transposition process on the second arithmetic processing output S2G, and the final transposed output from the circuit 210 is latched by an output data latch circuit 211.

【0089】さらに、上記暗号装置200は、前回の初
期転置出力,つまり前回の暗号化処理の対象となった平
文ブロックに初期転置処理を施したデータをラッチする
前平文ラッチ回路213と、該ラッチ回路213の64
ビットのラッチ情報と64ビットの初期値V2との排他
的論理和を求め、これを上記第2演算処理制御回路20
8に出力する排他的論理和回路(XOR回路)212
と、前回の処理の対象となった平文データに対して初期
転置処理を施した信号をラッチする前平文ブロックラッ
チ回路213とを有している。
Further, the encryption device 200 includes a previous plaintext latch circuit 213 for latching the previous initial transposition output, that is, data obtained by subjecting the plaintext block subjected to the previous encryption process to the initial transposition process. 64 of circuit 213
The exclusive OR of the latch information of the bit and the initial value V2 of 64 bits is calculated, and this is calculated by the second arithmetic processing control circuit 20.
8 exclusive OR circuit (XOR circuit) 212
And a previous plaintext block latch circuit 213 that latches a signal obtained by subjecting the plaintext data subjected to the previous process to the initial transposition process.

【0090】以下、上記各回路について詳しく説明す
る。上記初期転置回路202は、図10(a) に示すよう
に、64ビットのラッチデータの上位側32ビットから
なる上位側データMSBと、その下位側32ビットから
なる下位側データLSBとの排他的論理和として32ビ
ットのXOR信号を出力するXOR回路202aを有
し、該XOR信号の各ビットと上位側データMSBの各
ビットからなる64ビットの信号を初期転置出力S2A
として出力する構成となっている。
Hereinafter, each of the above circuits will be described in detail. As shown in FIG. 10 (a), the initial transposition circuit 202 performs exclusive control of upper data MSB consisting of upper 32 bits of 64-bit latch data and lower data LSB consisting of lower 32 bits of the latch data. An XOR circuit 202a that outputs a 32-bit XOR signal as a logical sum is provided, and a 64-bit signal composed of each bit of the XOR signal and each bit of the higher-order data MSB is subjected to an initial transposition output S2A.
Is output.

【0091】上記暗号処理回数制御回路204は、図1
1に示すように、演算処理回数を格納した演算処理回数
格納部204bと、セレクタ出力S2Cが上記第1演算
処理回路にて処理される度にカウント値がインクリメン
トし、かつカウント値が16回になるとリセットされる
カウンタ204aと、上記数値格納部204bの格納値
である暗号処理回数と、該カウンタ204aのカウント
値とを比較してセレクト信号S2Bを上記セレクタ20
3に出力するコンパレータ204cとから構成されてい
る。
The above-mentioned encryption processing number control circuit 204 has a
As shown in FIG. 1, each time the selector output S2C is processed by the first arithmetic processing circuit, the count value is incremented, and the count value is increased to 16 times. Then, the counter 204a reset, the number of encryption processes stored in the numerical value storage unit 204b, and the count value of the counter 204a are compared, and the select signal S2B is set to the selector 20a.
3 and a comparator 204c that outputs the signal to the comparator 3c.

【0092】上記第1演算処理回路205は、図12に
示すように、64ビットのセレクタ出力S2Cの下位側
32ビットの信号LSBに対して、関数fに基づいた演
算処理を施して32ビットの演算処理信号を出力する関
数演算回路205aと、該32ビットの演算処理信号
と、上記64ビットのセレクタ出力S2Cの上位側32
ビットの信号MSBとの排他的論理和として、32ビッ
トのXORセレクタ信号を出力するXOR回路205b
とを有し、このXORセレクタ信号の各ビットと上記下
位側32ビットの信号LSBの各ビットとからなる64
ビットの信号を第1演算処理出力S2Eとして出力する
構成となっている。なお、ここで上記関数fは岡本栄治
著「暗号理論入門」51項に記載されている関数fと同
じものである。
As shown in FIG. 12, the first arithmetic processing circuit 205 performs arithmetic processing based on the function f on the lower 32-bit signal LSB of the 64-bit selector output S2C, and performs the 32-bit processing. A function operation circuit 205a that outputs an operation processing signal, the 32-bit operation processing signal, and the upper 32 bits of the 64-bit selector output S2C
XOR circuit 205b that outputs a 32-bit XOR selector signal as an exclusive OR with bit signal MSB
And 64 bits each consisting of each bit of the XOR selector signal and each bit of the lower 32 bits of the signal LSB.
It is configured to output a bit signal as a first operation processing output S2E. Here, the function f is the same as the function f described in Eiji Okamoto, “Introduction to Cryptography Theory,” Item 51.

【0093】上記暗号鍵制御回路206は、図13に示
すように、所定の制御信号に基づいて第1〜第16の暗
号鍵を選択して選択暗号鍵S2Dを出力するセレクタ回
路206aから構成されている。
As shown in FIG. 13, the encryption key control circuit 206 includes a selector circuit 206a that selects the first to sixteenth encryption keys based on a predetermined control signal and outputs a selected encryption key S2D. ing.

【0094】また、図14は上記第2演算処理回路20
7による転置処理を説明するための図であり、64ビッ
トの入力データにおけるデータ配列と、該転置処理を施
した入力データにおけるデータ配列とをバイト単位で示
している。つまり、第2演算処理回路に入力される64
ビットのデータ(第1演算処理出力)S2Eは、下位ビ
ット側から8ビット毎に区分されており、該演算処理出
力S2Eの第1〜8ビットまでをバイトデータB1、そ
の第9〜16ビットまでをバイトデータB2、その第1
7〜24ビットまでをバイトデータB3、その第25〜
32ビットまでをバイトデータB4、その第33〜40
ビットまでをバイトデータB5、その第41〜48ビッ
トまでをバイトデータB6、その第49〜56ビットま
でをバイトデータB7、その第57〜64ビットまでを
バイトデータB8としている。
FIG. 14 shows the second arithmetic processing circuit 20.
7 is a diagram for explaining the transposition process by No. 7 and shows, in units of bytes, a data array in input data of 64 bits and a data array in input data subjected to the transposition process. That is, 64 input to the second arithmetic processing circuit
The bit data (first operation processing output) S2E is divided into 8 bits from the lower bit side. The first to eighth bits of the operation processing output S2E are byte data B1, and the 9th to 16th bits are byte data B1. Is the byte data B2,
Up to 7 to 24 bits of byte data B3,
Up to 32 bits of byte data B4, 33 to 40
Bits up to bits are byte data B5, bits 41 to 48 are byte data B6, bits 49 to 56 are byte data B7, and bits 57 to 64 are byte data B8.

【0095】また、図14から分かるように、転置処理
はモード0〜モード4のそれぞれに対応する処理があ
る。例えば、図14では、第2演算処理回路207への
入力信号である第1演算処理出力S2Eにおけるバイト
データB8,B7は、モード0の転置処理後には、64
ビットの転置処理信号におけるMSBからみて5バイト
目、6バイト目に転置されることを示している。
Further, as can be seen from FIG. 14, the transposition processing includes processing corresponding to each of mode 0 to mode 4. For example, in FIG. 14, the byte data B8 and B7 in the first operation processing output S2E, which is an input signal to the second operation processing circuit 207, are 64 bytes after the transposition processing in mode 0.
This indicates that the bit is transposed at the fifth and sixth bytes from the MSB in the transposition signal.

【0096】図15(a) は、第2演算処理回路207
の、MSBからみて第8バイト目の論理回路、図15
(b) は、第2演算処理回路207の、MSBからみて第
7バイト目の論理回路を示している。他のバイトに対応
する論理回路も、図15に示すものと同様である。つま
り、各バイト出力に対応する論理回路287,277
は、3ビットの転置選択信号S2Fと外部制御信号F2
Cとを入力とする論理積回路207bと、この論理積回
路の出力に基づいて、上記転置モード0〜4に対応する
5つのバイトのいずれかを選択するバイト選択回路20
7aとからなる。ここでは、バイト選択回路にセレクタ
を用いているが、これはマルチプレクサを用いてもよ
い。
FIG. 15A shows the second operation processing circuit 207.
15th logical circuit of the 8th byte viewed from the MSB, FIG.
(b) shows the logic circuit of the seventh byte of the second arithmetic processing circuit 207 when viewed from the MSB. The logic circuits corresponding to the other bytes are the same as those shown in FIG. That is, the logic circuits 287 and 277 corresponding to each byte output
Is a 3-bit transpose selection signal S2F and an external control signal F2
AND circuit 207b having C as an input, and a byte selection circuit 20 for selecting any of the five bytes corresponding to the transposition modes 0 to 4 based on the output of the AND circuit.
7a. Here, a selector is used for the byte selection circuit, but a multiplexer may be used for this.

【0097】上記第2演算処理制御回路208は、図1
6に示すように、上記XOR回路212からの64ビッ
トのXOR信号Aer2を受けて、6ビットの信号を出
力する1ビットフルアダー208aと、その出力を受け
て3ビットの転置選択信号S2Fを出力するコンパレー
タ208bとからなる。
The second arithmetic processing control circuit 208 is the same as that shown in FIG.
As shown in FIG. 6, a 1-bit full adder 208a that outputs a 6-bit signal in response to the 64-bit XOR signal Aer2 from the XOR circuit 212 and outputs a 3-bit transposition selection signal S2F in response to the output And a comparator 208b.

【0098】上記最終転置回路210は、図10(b) に
示すように、64ビットの第2演算処理出力S2Gの上
位側32ビットの信号MSBと、その下位側32ビット
の信号LSBータとの排他的論理和として32ビットの
XOR信号を出力するXOR回路210aを有し、該X
OR信号の各ビットと上位側32ビットの信号MSBの
各ビットとからなる64ビットの信号を最終転置出力と
して出力データラッチ回路211に出力する構成となっ
ている。
As shown in FIG. 10 (b), the final transposition circuit 210 outputs a signal MSB of the upper 32 bits of the second arithmetic processing output S2G of 64 bits and a signal LSB of the lower 32 bits thereof. XOR circuit 210a that outputs a 32-bit XOR signal as an exclusive OR of
The configuration is such that a 64-bit signal composed of each bit of the OR signal and each bit of the high-order 32-bit signal MSB is output to the output data latch circuit 211 as the final transposed output.

【0099】次に動作について説明する。以下、128
ビットの平文を暗号化する処理について説明する。12
8ビットの平文は、それぞれ64ビットの第1,第2の
平文ブロックに分割され、それぞれの平文ブロックが本
実施の形態2の暗号装置200にて暗号化される。つま
り上記第1、第2の平文ブロックは、入力データラッチ
回路201に入力され、その平文ブロックの暗号化処理
が終了するまで該ラッチ回路201にて保持される。
Next, the operation will be described. Hereinafter, 128
A process of encrypting a plaintext of bits will be described. 12
The 8-bit plaintext is divided into 64-bit first and second plaintext blocks, and each plaintext block is encrypted by the encryption device 200 according to the second embodiment. That is, the first and second plaintext blocks are input to the input data latch circuit 201, and are held by the latch circuit 201 until the encryption processing of the plaintext block is completed.

【0100】入力データラッチ回路201の出力データ
は、初期転置回路202にて初期転置処理が施された
後、上記初期転置処理が施された平文ブロックは前平文
ブロックラッチ回路213にラッチされるとともに、セ
レクタ203に入力される。このとき、セレクタ203
には、第2演算処理回路207の第2演算出力S2Gも
入力されており、セレクタ203では暗号処理回数制御
回路204からのセレクト信号S2Bに基づいて、上記
初期転置データS2Aと第2演算出力S2Gの一方を選
択する。つまり、初期転置データに対して暗号化処理が
行われていない状態では、上記セレクタ203は初期転
置データS2Aを選択し、その後、上記セレクタ203
は、該初期転置データに対して、暗号処理回数(16
回)から最初の1回を差し引いた回数(15回)に渡っ
て、第2演算出力S2Gを選択して、第1の演算処理回
路205に出力する。
The output data of the input data latch circuit 201 is subjected to initial transposition processing by the initial transposition circuit 202, and the plaintext block subjected to the initial transposition processing is latched by the previous plaintext block latch circuit 213. , Are input to the selector 203. At this time, the selector 203
, The second operation output S2G of the second operation processing circuit 207 is also input, and the selector 203 receives the initial transposition data S2A and the second operation output S2G based on the select signal S2B from the encryption processing number control circuit 204. Select one of That is, in a state in which the encryption process is not performed on the initial transposed data, the selector 203 selects the initial transposed data S2A.
Indicates the number of encryption processes (16
The second arithmetic output S2G is selected and output to the first arithmetic processing circuit 205 over the number of times (15 times) obtained by subtracting the first time from the second time.

【0101】従って、この第1演算処理回路205に最
初に入力されるデータは、入力データラッチ回路201
の出力に初期転置回路202により転置処理を施したも
のであり、それ以降は、上記第2演算出力S2Gが第1
演算処理回路205に入力される。
Therefore, the data input first to the first arithmetic processing circuit 205 is the input data latch circuit 201
Are subjected to a transposition process by the initial transposition circuit 202, and thereafter, the second operation output S2G becomes the first
The data is input to the arithmetic processing circuit 205.

【0102】上記第1演算処理回路205では、暗号鍵
制御回路206から出力される暗号鍵S2Dに基づい
て、入力データに対する演算処理が行なわれる。暗号鍵
処理制御回路206では、暗号処理回数(16回)分に
対応した128ビットの暗号鍵が設定されており、第1
回目から第16回目までの処理にそれぞれ対応した固有
の暗号鍵S2Dが使用される。なお、ここで暗号処理回
数は16回に限定されるものではなく、暗号鍵S2Dも
128ビットに限定されるものではない。
The first arithmetic processing circuit 205 performs arithmetic processing on input data based on the encryption key S2D output from the encryption key control circuit 206. In the encryption key processing control circuit 206, a 128-bit encryption key corresponding to the number of encryption processes (16 times) is set.
A unique encryption key S2D corresponding to each of the processing from the first to the 16th processing is used. Here, the number of encryption processes is not limited to 16 and the encryption key S2D is not limited to 128 bits.

【0103】そして第2演算処理回路207では、第1
演算処理回路205からの第1演算出力S2Eに対して
転置処理が施され、この際、この転置処理は、第2演算
処理制御回路208によって制御される。
In the second arithmetic processing circuit 207, the first
The transposition processing is performed on the first operation output S2E from the operation processing circuit 205. At this time, the transposition processing is controlled by the second operation processing control circuit 208.

【0104】すなわち、この第2演算処理制御回路20
8では、前回平文ブロックラッチ回路213の64ビッ
ト出力の値と、あらかじめ暗号装置に格納してある外部
から変更不可能な64ビットの初期設定値V2との排他
的論理和に相当する64ビットの信号Aex2に基づい
て、第2演算処理回路207での転置処理を制御する3
ビットの転置選択信号S2Fを出力する。ここで、上記
第1番目の平文ブロックに対する暗号化処理では、Ae
x2信号としては初期値V2の値をそのまま用いる。な
お、上記初期値V2は64ビットに限定されるものでは
ない。また、ここでは、第2演算処理回路207に入力
される外部入力F2Cの値がある値、例えばLレベルに
固定された場合には、第2演算処理回路207では、強
制的にモード0の転置処理が行われる。
That is, the second arithmetic processing control circuit 20
8, a 64-bit value corresponding to an exclusive OR of the 64-bit output value of the previous plaintext block latch circuit 213 and a 64-bit initial setting value V2 which is stored in the encryption device in advance and cannot be changed from the outside. 3 for controlling the transposition processing in the second arithmetic processing circuit 207 based on the signal Aex2
A bit transposition selection signal S2F is output. Here, in the encryption processing for the first plaintext block, Ae
The value of the initial value V2 is used as it is as the x2 signal. Note that the initial value V2 is not limited to 64 bits. Here, if the value of the external input F2C input to the second arithmetic processing circuit 207 is fixed to a certain value, for example, L level, the second arithmetic processing circuit 207 forcibly transposes the mode 0. Processing is performed.

【0105】この時、上記第2演算処理制御回路208
では、実質的には、信号Aex2における第1,第9,
第17,及び第25ビットの各値の排他的論理和を上位
ビット、第33,第41,第49,及び第57ビットの
各値の排他的論理和を下位ビットとする2ビットの数
(以下、Mex信号という。)によって、第2演算処理
回路207の転置処理のモードを変更している。Mex
信号の2進数としての値が0又は1である場合は、転置
処理のモードはモード1となり、その値が2である場合
は転置処理モードはモード2となり、上記値が3である
場合は、転置処理モードはモード3となるよう、転置選
択信号S2Fを第2演算処理回路207に出力する。こ
こで、各モード毎に転置処理の内容は異なっている。
At this time, the second arithmetic processing control circuit 208
Then, substantially, the first, ninth,
A two-bit number (the exclusive OR of each of the 17th and 25th bits is an upper bit, and the exclusive OR of each of the 33rd, 41st, 49th, and 57th bits is a lower bit. The mode of the transposition process of the second arithmetic processing circuit 207 is changed according to the Mex signal. Mex
If the value of the signal as a binary number is 0 or 1, the transposition mode is mode 1, if the value is 2, the transposition mode is mode 2, and if the value is 3, A transposition selection signal S2F is output to the second arithmetic processing circuit 207 so that the transposition processing mode becomes mode 3. Here, the content of the transposition process differs for each mode.

【0106】なお、上記Mex信号が3ビットである場
合、Mex信号の値が4以上であるときモード4を選択
するようにしてもよい。このモード4の転置処理では、
複数インボリューション機能を実現している。転置処理
モードがモード4である場合は、第2演算処理回路20
7での16回の転置処理により、インボリューション機
能(複数回インボリューション機能)が実現される。
When the Mex signal has 3 bits, mode 4 may be selected when the value of the Mex signal is 4 or more. In this transposition process in mode 4,
It has multiple involution functions. When the transposition processing mode is mode 4, the second arithmetic processing circuit 20
The inversion function (multiple-time involution function) is realized by the 16 transpositions in step 7.

【0107】ここで、上記Aex2信号の値に基づいて
モードの選択を行う方法は、上記実施の形態1で説明し
たように、前記Aex2信号のあるビットの排他的論理
和を計算する方法以外にも、しきい値に基づく方法、あ
るビットの値に基づく方法、連続する複数ビットに基づ
く方法、各ビットの値である1の数に基づく方法等、さ
らにAex2信号の全ビット、又はその一部の数ビット
の値に基づく方法が考えられる。さらに、モード1から
モード4の各モードでの転置処理は、図14の転置表に
示されている転置配列に限定されるものではなく、また
転置処理モードの数も4つに限定されるものではない。
Here, the method of selecting a mode based on the value of the Aex2 signal is different from the method of calculating the exclusive OR of certain bits of the Aex2 signal as described in the first embodiment. Also, a method based on a threshold value, a method based on a certain bit value, a method based on a plurality of consecutive bits, a method based on the number of 1 that is the value of each bit, and all the bits of the Aex2 signal, or a part thereof Can be considered based on the value of several bits of. Further, the transposition processing in each mode from mode 1 to mode 4 is not limited to the transposition array shown in the transposition table of FIG. 14, and the number of transposition processing modes is also limited to four. is not.

【0108】そして、上記暗号処理回数制御回路204
に格納されている暗号処理回数だけ、第1演算処理回路
205及び第2演算処理回路207での演算処理が終了
したとき、第2演算処理回路207の出力S2Gは、始
めて最終転置回路209にて入力され、ここで最終転置
処理が施され、出力データラッチ回路211に保持され
る。この際同時に、入力データラッチ回路201に、次
の平文ブロックが保持され、前平文ブロックと同等の処
理が行われる。
Then, the encryption processing number control circuit 204
When the arithmetic processing in the first arithmetic processing circuit 205 and the second arithmetic processing circuit 207 is completed by the number of encryption processings stored in the second processing processing circuit 207, the output S2G of the second arithmetic processing circuit 207 is output by the final transposition circuit 209 for the first time. The data is input, subjected to final transposition processing, and held in the output data latch circuit 211. At the same time, the next plaintext block is held in the input data latch circuit 201, and the same processing as that of the previous plaintext block is performed.

【0109】なお、前平文ブロックラッチ回路213に
保持される平文データ(平文ブロック)は、以前の平文
データを保持するのであればよく、前回の平文データ以
外の平文データでもよい。例えば、セレクタ203の出
力,第1,第2演算処理回路205,207の出力であ
っても、初期設定値として予め設定された平文データを
前平文ブロックラッチ回路213に格納しておくように
してもよい。
The plaintext data (plaintext block) held in the preceding plaintext block latch circuit 213 may be any plaintext data other than the previous plaintext data, as long as it retains the previous plaintext data. For example, even in the case of the output of the selector 203 and the outputs of the first and second arithmetic processing circuits 205 and 207, plaintext data set in advance as initial setting values is stored in the previous plaintext block latch circuit 213. Is also good.

【0110】上記全平文ブロックが暗号化されると、平
文の暗号化が終了する。このような構成の実施の形態2
では、外部制御信号F2Cをある値(例えばLレベル)
にすることにより、第2演算処理回路207では、0モ
ードの転置処理,つまり64ビットの入力の上位側32
ビットと下位側32ビットとを入れ換える転置処理が選
択されるようにしたので、暗号装置200はFEAL暗
号装置と同等な機能を有することになる。言い換える
と、本実施の形態2の暗号装置200はほかのFEAL
暗号装置との間でデータ転送可能な互換性を有するもの
となる。
When all the plaintext blocks have been encrypted, the encryption of the plaintext ends. Embodiment 2 having such a configuration
Then, the external control signal F2C is set to a certain value (for example, L level).
Thus, the second arithmetic processing circuit 207 performs transposition processing in the 0 mode, that is, the upper 32 bits of the 64-bit input.
Since the transposition process for exchanging bits and the lower 32 bits is selected, the encryption device 200 has the same function as the FEAL encryption device. In other words, the encryption device 200 according to the second embodiment is different from the other FEAL
It is compatible with data transfer with the encryption device.

【0111】この結果、本実施の形態の暗号装置では、
すでにハードディスク等の蓄積メディアに保持されてい
るFEAL暗号装置によって暗号化されたデータの復号
を行い、アルゴリズムを変更して再び蓄積メディアに保
存することも可能である。
As a result, in the encryption device of the present embodiment,
It is also possible to decrypt data encrypted by the FEAL encryption device already held in a storage medium such as a hard disk, change the algorithm, and save the data again in the storage medium.

【0112】また、本実施の形態では、前回の暗号処理
の対象となった平文ブロックをラッチする前平文ブロッ
クラッチ回路213と、該ラッチ回路213の出力に応
じて第2演算処理制御回路208により第2演算処理回
路207での転置モードが選択されるようにしたので、
第2演算処理回路207における転置処理が、前回の暗
号処理の対象となった平文ブロックに応じて変化するこ
ととなり、このため第三者による解読が困難な情報の暗
号化処理を実現できる。
Further, in the present embodiment, the previous plaintext block latch circuit 213 that latches the plaintext block targeted for the previous encryption process, and the second arithmetic processing control circuit 208 in accordance with the output of the latch circuit 213 Since the transposition mode in the second arithmetic processing circuit 207 is selected,
The transposition processing in the second arithmetic processing circuit 207 changes according to the plaintext block subjected to the previous encryption processing, so that it is possible to realize information encryption processing that is difficult to be decrypted by a third party.

【0113】また、本実施の形態2では、上記実施の形
態1と同様、第2演算処理回路205及び第2演算処理
回路207を、該各回路での暗号化処理がすべてインボ
リューション演算のみにより実行されるよう構成してい
るので、本実施の形態2の暗号装置も、上記実施の形態
1のものと同様、容易に復号装置に転用することが可能
である。
Also, in the second embodiment, as in the first embodiment, the second arithmetic processing circuit 205 and the second arithmetic processing circuit 207 are configured such that the encryption processing in each circuit is performed only by the involution operation. Since the encryption device is configured to be executed, the encryption device of the second embodiment can be easily diverted to a decryption device as in the first embodiment.

【0114】しかも、本実施の形態2の暗号装置200
においても、暗号化アルゴリズムの切り換えを、暗号化
処理として転置処理のみを行う第2演算処理回路207
にて所定の転置処理モードを選択して行うようにしてい
るので、暗号アルゴリズムが可変な暗号装置の回路規模
を、第1演算処理回路における暗号アルゴリズムを可変
としたものと比べて小さくできる。
Moreover, the encryption device 200 according to the second embodiment
, The switching of the encryption algorithm is performed by the second arithmetic processing circuit 207 that performs only the transposition process as the encryption process.
, The predetermined transposition processing mode is selected and performed, so that the circuit scale of the encryption device in which the encryption algorithm is variable can be made smaller than that in which the encryption algorithm in the first arithmetic processing circuit is variable.

【0115】実施の形態3.図17は本発明の実施の形
態3による暗号装置の構成を示すブロック図であり、図
において、300は本実施の形態3の暗号装置であり、
この暗号装置300は、入力データを保持する入力デー
タラッチ回路301と、該ラッチ回路301の出力に対
して転置処理を施す初期転置回路302と、暗号処理回
数制御回路304からのセレクタ信号S3Bに基づい
て、初期転置出力S3A及び演算処理中の第2演算処理
出力S3Gの一方を選択して出力するセレクタ303と
を有している。
Embodiment 3 FIG. 17 is a block diagram illustrating a configuration of an encryption device according to Embodiment 3 of the present invention. In the figure, reference numeral 300 denotes an encryption device according to Embodiment 3;
This encryption device 300 is based on an input data latch circuit 301 that holds input data, an initial transposition circuit 302 that performs transposition processing on the output of the latch circuit 301, and a selector signal S3B from an encryption processing number control circuit 304. And a selector 303 for selecting and outputting one of the initial transposed output S3A and the second arithmetic processing output S3G during the arithmetic processing.

【0116】また、上記暗号装置300は、暗号鍵制御
回路306からの暗号鍵S3Dに基づいて、上記セレク
タ出力S3Cに対して暗号化のための演算処理を行う第
1演算処理回路305と、第2演算処理制御回路308
からの転置選択信号S3Fに基づいて、上記第1演算処
理回路305の出力S3Eに対して第2演算処理を施す
第2演算処理回路307とを有している。
Further, the encryption device 300 includes a first arithmetic processing circuit 305 for performing arithmetic processing for encryption on the selector output S3C based on the encryption key S3D from the encryption key control circuit 306; 2 arithmetic processing control circuit 308
And a second arithmetic processing circuit 307 that performs a second arithmetic processing on the output S3E of the first arithmetic processing circuit 305 based on the transposition selection signal S3F from

【0117】さらに上記暗号装置300は、シードに基
づいてsビットの乱数を発生する乱数発生回路311
と、乱数と初期値V3との排他的論理和として信号Ae
x3を発生する排他的論理和回路309と、上記第2演
算処理回路出力S3Gに対して最終転置処理を施す最終
転置回路310と、該最終転置出力をラッチする出力デ
ータラッチ回路312とを有している。
Further, the encryption device 300 includes a random number generation circuit 311 for generating an s-bit random number based on the seed.
And the signal Ae as the exclusive OR of the random number and the initial value V3
an exclusive OR circuit 309 for generating x3, a final transposition circuit 310 for performing a final transposition process on the output S3G of the second arithmetic processing circuit, and an output data latch circuit 312 for latching the final transposition output. ing.

【0118】以下上記各回路について詳述する。上記初
期転置回路302は、図18に示すように、ラッチデー
タR,つまり入力データラッチ回路301の出力に対し
て第1の初期転置処理を施す第1の初期転置手段302
aと、その転置出力S1MとラッチデータRとを受け、
2ビットの外部制御信号F1Cに基づいてその一方を選
択する第1セレクタ回路302bと、該セレクタ回路3
02bの出力に対して第2初期転置処理を施す第2の初
期転置手段302cと、該第2転置処理出力S2Mと、
上記第1転置処理出力S1Mとを受け、上記外部制御信
号F1Cに基づいてその一方を選択する第2セレクタ回
路302dとから構成されている。
Hereinafter, each of the above circuits will be described in detail. As shown in FIG. 18, the initial transposition circuit 302 performs a first initial transposition process on the latch data R, that is, the output of the input data latch circuit 301.
a, its transposed output S1M and latch data R,
A first selector circuit 302b for selecting one of them based on a 2-bit external control signal F1C;
A second initial transposition means 302c that performs a second initial transposition process on the output of the second transposition process 02b;
A second selector circuit 302d that receives the first transposition processing output S1M and selects one of them based on the external control signal F1C.

【0119】ここで、上記第1の転置処理手段302a
は、図2(a) に示す転置処理と同一の処理を行うもので
あり、また第2の転置処理手段302cは、図10(a)
に示す初期転置回路202と同一構成となっている。
Here, the first transposition processing means 302a
Performs the same processing as the transposition processing shown in FIG. 2A, and the second transposition processing means 302c performs the processing shown in FIG.
Has the same configuration as the initial transposition circuit 202 shown in FIG.

【0120】また、上記演算処理回数制御回路304
は、図19に示すように、演算処理回数を格納した演算
処理回数格納部304bと、セレクタ出力が上記第1演
算処理回路にて処理される度にカウント値をインクリメ
ントするカウンタ304aと、上記格納部304bの格
納値である演算処理回数と、該カウンタ304aのカウ
ント値とを比較し、その比較結果に基づいてセレクト信
号S3Bを上記セレクタ303に出力するコンパレータ
304cとから構成されている。
Also, the arithmetic processing number control circuit 304
19, as shown in FIG. 19, an arithmetic processing number storage section 304b storing the number of arithmetic processing, a counter 304a for incrementing a count value each time the selector output is processed by the first arithmetic processing circuit, It comprises a comparator 304c that compares the number of arithmetic processings, which is a stored value of the unit 304b, with the count value of the counter 304a, and outputs a select signal S3B to the selector 303 based on the comparison result.

【0121】上記第1演算処理回路305は、図20に
示すように、64ビットのセレクタ出力S3Cの下位側
32ビットの信号LSBに対して、関数f1に基づいた
演算処理を施して32ビットの演算処理信号Sf1を出力
する第1演算回路305bと、下位側32ビットの信号
LSBに対して、関数f2に基づいた演算処理を施して
32ビットの演算処理信号Sf2を出力する第2演算回路
305cと、該第1,第2演算処理回路305b,30
5cの出力を受け、外部制御信号F1Cに基づいてその
一方を選択するセレクタ回路305aと、該選択出力
と、上記64ビットのセレクタ出力S3Cの上位側32
ビットの信号MSBとの排他的論理和として、32ビッ
トのXORセレクタ信号を出力するXOR回路305d
とを有し、このXORセレクタ信号の各ビットと上記3
2ビット下位側の信号LSBの各ビットとからなる64
ビットの信号を第1演算処理出力S3Eとして出力する
構成となっている。ここで、関数f1は、岡村栄治著
「暗号理論入門」38項から39項に記載されているD
ES暗号の関数fであり、関数f2は岡本栄治著「暗号
理論入門」51項に記載されているFEAL暗号の関数
fである。
As shown in FIG. 20, the first arithmetic processing circuit 305 performs arithmetic processing based on the function f1 on the lower 32-bit signal LSB of the 64-bit selector output S3C, and performs the 32-bit processing. A first arithmetic circuit 305b that outputs an arithmetic processing signal Sf1, and a second arithmetic circuit 305c that performs an arithmetic processing based on the function f2 on the lower 32 bits of the signal LSB and outputs a 32-bit arithmetic processing signal Sf2 And the first and second arithmetic processing circuits 305b, 30
A selector circuit 305a that receives the output of the selector 5c and selects one of them based on the external control signal F1C, the selected output, and the upper 32 bits of the 64-bit selector output S3C
XOR circuit 305d that outputs a 32-bit XOR selector signal as an exclusive OR with bit signal MSB
And each bit of the XOR selector signal and 3
64 consisting of each bit of the signal LSB on the lower side of 2 bits
It is configured to output a bit signal as a first operation processing output S3E. Here, the function f1 is a function D1 described in Eiji Okamura, “Introduction to Cryptography Theory,” paragraphs 38 to 39.
The function f is the function f of the ES cipher, and the function f2 is the function f of the FEAL cipher described in Eiji Okamoto, “Introduction to Cryptography Theory,” paragraph 51.

【0122】上記暗号鍵制御回路306は、図21に示
すように、所定の制御信号に基づいて第1〜第16の暗
号鍵を選択して選択暗号鍵S3Dを出力するセレクタ回
路306aから構成されている。
As shown in FIG. 21, the encryption key control circuit 306 comprises a selector circuit 306a for selecting the first to sixteenth encryption keys based on a predetermined control signal and outputting the selected encryption key S3D. ing.

【0123】また、図22は上記第2演算処理回路30
7による転置処理を説明するための図であり、64ビッ
トの入力データにおけるデータ配列と、転置処理を施し
た入力データにおけるデータ配列とをバイト単位で示し
ている。
FIG. 22 shows the second arithmetic processing circuit 30.
7 is a diagram for explaining the transposition process by No. 7 and shows, in units of bytes, a data array of 64-bit input data and a data array of input data subjected to the transposition process.

【0124】つまり、第2演算処理回路307に入力さ
れる64ビットのデータ(第1演算処理出力S3E)
は、下位ビット側から8ビット毎に区分されており、該
演算処理出力S3Eの第1〜8ビットまでをバイトデー
タB1、その第9〜16ビットまでをバイトデータB
2、その第17〜24ビットまでをバイトデータB3、
その第25〜32ビットまでをバイトデータB4、その
第33〜40ビットまでをバイトデータB5、その第4
1〜48ビットまでをバイトデータB6、その第49〜
56ビットまでをバイトデータB7、その第57〜64
ビットまでをバイトデータB8としている。
That is, 64-bit data (first operation processing output S3E) input to the second operation processing circuit 307
Is divided into 8 bits from the lower bit side. The first to eighth bits of the operation processing output S3E are byte data B1, and the 9th to 16th bits are byte data B1.
2. The 17th to 24th bits are byte data B3,
The 25th to 32nd bits are byte data B4, and the 33rd to 40th bits are byte data B5.
Byte data B6 of the 1st to 48th bits,
Up to 56 bits of byte data B7, 57th to 64th
Up to bits are byte data B8.

【0125】また、図22から分かるように、転置処理
はモード0〜モード4のそれぞれに対応する処理があ
る。例えば、図22では、第2演算処理回路307への
入力信号である第1演算処理出力S3Eにおけるバイト
データB8,B7は、モード0の転置処理後には、64
ビットの転置処理信号におけるMSBからみて5バイト
目、6バイト目に転置されることを示している。
Further, as can be seen from FIG. 22, the transposition processing includes processing corresponding to each of mode 0 to mode 4. For example, in FIG. 22, the byte data B8 and B7 in the first arithmetic processing output S3E, which is an input signal to the second arithmetic processing circuit 307, are 64 bytes after the mode 0 transposition processing.
This indicates that the bit is transposed at the fifth and sixth bytes from the MSB in the transposition signal.

【0126】図23(a) は、第2演算処理回路307
の、MSBからみて第8バイト目の論理回路、図23
(b) は第2演算処理回路307の、MSBからみて第7
バイト目の論理回路を示している。他のバイトに対応す
る論理回路も上記のものと同様である。
FIG. 23 (a) shows the second arithmetic processing circuit 307
23, the logic circuit at the 8th byte as viewed from the MSB, FIG.
(b) shows the seventh of the second arithmetic processing circuit 307 viewed from the MSB.
The logic circuit at the byte is shown. The logic circuits corresponding to the other bytes are the same as those described above.

【0127】つまり、各バイト出力に対応する論理回路
387,377は、3ビットの転置選択信号S3Fと2
ビットの外部制御信号F2Cとを入力とする論理積回路
307bと、この論理積回路の出力に基づいて、5つの
バイトを選択するバイト選択回路307aとからなる。
ここでは、バイト選択回路にセレクタを用いているが、
これはマルチプレクサを用いてもよい。またこの第2演
算処理回路307はインボリューション演算機能,つま
り入力データに対して所定回数転置処理を施した処理デ
ータが、入力データと一致する演算機能を有する。
That is, the logic circuits 387 and 377 corresponding to each byte output output the 3-bit transposition selection signals S3F and 2
An AND circuit 307b that receives the external control signal F2C of a bit as an input, and a byte selection circuit 307a that selects five bytes based on the output of the AND circuit.
Here, a selector is used for the byte selection circuit.
This may use a multiplexer. The second arithmetic processing circuit 307 has an involution operation function, that is, an operation function in which processed data obtained by performing transposition processing on input data a predetermined number of times matches input data.

【0128】上記第2演算処理制御部308は、図24
に示すように、上記XOR回路309からの64ビット
のXOR信号を受けて、6ビットの信号を出力する排他
的論理和回路308aと、その出力を受けて3ビットの
転置選択信号S3Fを出力するコンパレータ308bと
からなる。
The second arithmetic processing control unit 308 operates as shown in FIG.
As shown in the figure, an exclusive-OR circuit 308a that receives a 64-bit XOR signal from the XOR circuit 309 and outputs a 6-bit signal, and outputs a 3-bit transposition selection signal S3F in response to the output. And a comparator 308b.

【0129】上記最終転置回路310は、図25に示す
ように、第2演算処理回路出力S3Gに対して第1最終
転置処理を行う第1の最終転置回路310aと、該転置
出力と第2演算処理回路出力S3Gとを受け、外部制御
信号F1Cに基づいてその一方を選択する第1セレクタ
回路310bと、該セレクタ回路310bの出力に対し
て第2最終転置処理を施す第2の最終転置手段310c
と、該第2最終転置処理出力と上記第1最終転置処理出
力とを受け、上記外部制御信号F1Cに基づいてその一
方を選択する第2セレクタ回路310dとから構成され
ている。
As shown in FIG. 25, the final transposition circuit 310 performs a first final transposition process on the output S3G of the second arithmetic processing circuit, a first final transposition circuit 310a, A first selector circuit 310b which receives the processing circuit output S3G and selects one of them based on an external control signal F1C, and a second final transposition means 310c which performs a second final transposition process on the output of the selector circuit 310b
And a second selector circuit 310d that receives the second final transposition processing output and the first final transposition processing output and selects one of them based on the external control signal F1C.

【0130】次に動作について説明する。以下、128
ビットの平文を暗号化する処理について説明する。12
8ビットの平文は、それぞれ64ビットの第1,第2の
平文ブロックに分割され、それぞれの平文ブロックが暗
号装置300にて暗号化される。つまり第1、第2の平
文ブロックは、入力データラッチ回路301に入力さ
れ、その平文ブロックの暗号化処理が終了するまで保持
される。
Next, the operation will be described. Hereinafter, 128
A process of encrypting a plaintext of bits will be described. 12
The 8-bit plaintext is divided into 64-bit first and second plaintext blocks, and each plaintext block is encrypted by the encryption device 300. That is, the first and second plaintext blocks are input to the input data latch circuit 301 and are held until the encryption processing of the plaintext block is completed.

【0131】入力データラッチ回路301の出力データ
は、初期転置回路302にて初期転置が施された後、セ
レクタ303に入力される。初期転置回路302は、上
記外部制御信号F1Cに基づいて第1初期転置手段30
2a及び第2初期転置手段302cの出力の一方または
両方を使用する。なお、この初期転置回路302は、上
記乱数発生回路311の値をもとに第1初期転置手段3
02a及び第2初期転置手段302cの出力の一方また
は両方をランダムに使用するようにしてもよい。
The output data of the input data latch circuit 301 is input to the selector 303 after being subjected to initial transposition by the initial transposition circuit 302. The initial transposition circuit 302 generates the first initial transposition means 30 based on the external control signal F1C.
One or both of the outputs of 2a and the second initial transposition means 302c are used. Note that the initial transposition circuit 302 uses the first initial transposition means 3 based on the value of the random number generation circuit 311.
02a and / or the output of the second initial transposition means 302c may be used randomly.

【0132】このときセレクタ303には、第2演算処
理回路307の第2演算処理回路出力S3Gも入力され
ており、セレクタ303では暗号処理回数制御回路30
4からのセレクト信号S3Bに基づいて、上記初期転置
データS3Aと第2演算処理回路出力S3Gの一方を選
択する。つまり、初期転置データに対して暗号化処理が
行われていない状態では、上記セレクタ303は初期転
置データS3Aを選択し、その後、上記セレクタ303
は、該初期転置データに対して暗号処理回数(16回)
から最初の1回を差し引いた回数(15回)に渡って、
第2演算処理回路出力S3Gを選択して、第1の演算処
理回路305に出力する。従って、この第1演算処理回
路305にはまず最初に、入力データラッチ回路301
の出力に対し初期転置回路302により転置処理を施し
たデータが入力され、それ以降は、第2演算処理回路出
力S3Gが入力される。
At this time, the output S3G of the second arithmetic processing circuit of the second arithmetic processing circuit 307 is also input to the selector 303.
4, one of the initial transposition data S3A and the second processing circuit output S3G is selected. In other words, when the encryption processing is not performed on the initial transposed data, the selector 303 selects the initial transposed data S3A.
Is the number of encryption processes (16 times) for the initial transposed data
Over the number of times (15 times) minus the first one from
The second arithmetic processing circuit output S3G is selected and output to the first arithmetic processing circuit 305. Therefore, the first arithmetic processing circuit 305 first has the input data latch circuit 301
, The data obtained by performing the transposition process by the initial transposition circuit 302 is input, and thereafter, the output S3G of the second arithmetic processing circuit is input.

【0133】暗号鍵処理制御回路306では、暗号処理
回数(16回)分に対応した128ビットの暗号鍵が設
定されており、第1演算処理回路305における第1回
目から第16回目までの処理にそれぞれ対応した固有の
暗号鍵S3Dが使用される。なお、ここで暗号処理回数
は16回に限定されるものではなく、暗号鍵S3Dも1
28ビットに限定されるものではない。
In the encryption key processing control circuit 306, a 128-bit encryption key corresponding to the number of times of encryption processing (16 times) is set, and the first arithmetic processing circuit 305 performs processing from the first time to the 16th time. Is used, a unique encryption key S3D corresponding to each is used. Here, the number of encryption processes is not limited to 16 and the encryption key S3D is also one.
It is not limited to 28 bits.

【0134】上記第1演算処理回路305では、第1演
算処理が外部からの2ビットの信号F1Cにより制御さ
れる。この信号F1Cの値が00の場合はf1関数によ
る演算処理出力、f2関数による演算処理出力はともに
セレクタ回路305aから出力されない。上記信号F1
Cの値が01の場合は、f1関数による演算処理出力S
f1とセレクタ出力S3Cの上位側32ビットの信号MS
Bとの排他的論理和が求められる。上記F1Cの値が1
0の場合は、f2関数による演算処理出力Sf2とセレク
タ出力S3Cの上位側32ビットの信号MSBとの排他
的論理和が求められる。さらに上記信号F1Cの値が1
1の場合は、f1関数による演算処理出力Sf1と上位側
32ビットの信号MSBとの排他的論理和、及びf2関
数による演算処理出力Sf2と上位側32ビットの信号M
SBと排他的論理和が、上記16回の第1演算処理にお
いて交互に求められる。
In the first arithmetic processing circuit 305, the first arithmetic processing is controlled by a 2-bit signal F1C from outside. When the value of the signal F1C is 00, neither the arithmetic processing output by the f1 function nor the arithmetic processing output by the f2 function is output from the selector circuit 305a. The above signal F1
If the value of C is 01, the operation processing output S by the f1 function
f1 and signal MS of upper 32 bits of selector output S3C
Exclusive OR with B is obtained. The value of F1C is 1
In the case of 0, the exclusive OR of the operation processing output Sf2 by the f2 function and the signal MSB of the upper 32 bits of the selector output S3C is obtained. Further, when the value of the signal F1C is 1
In the case of 1, the exclusive OR of the operation processing output Sf1 by the f1 function and the upper 32 bits signal MSB, and the operation processing output Sf2 by the f2 function and the upper 32 bits signal M
The SB and the exclusive OR are obtained alternately in the sixteenth first arithmetic processing.

【0135】そしてさらに、第2演算処理回路307で
は、第1演算処理回路305からの第1演算処理回路出
力S3Eに対して転置処理が施され、この際この転置処
理は、第2演算処理制御回路308によって制御され
る。この第2演算処理制御回路308では、64ビット
の乱数発生回路311の値と、あらかじめ暗号装置に格
納してある外部から変更不可能な64ビットの初期値V
3との排他的論理和に相当する64ビットの信号Aex
3に基づいて、第2演算処理回路307の転置処理を制
御する3ビットの転値選択信号S3Fを出力する。第1
番目の平文ブロックの処理では、上記信号Aex3とし
ては初期値V3の値をそのまま用いる。なお、上記初期
値V3は64ビットに限定されるものではない。また、
第2演算処理回路307に入力される外部入力F2Cが
Lレベルである場合、第2演算処理回路307では強制
的にモード0の転置処理が行われることとなる。
Further, in the second arithmetic processing circuit 307, transposition processing is performed on the first arithmetic processing circuit output S3E from the first arithmetic processing circuit 305. At this time, the transposition processing is performed by the second arithmetic processing control. Controlled by circuit 308. In the second arithmetic processing control circuit 308, the value of the 64-bit random number generation circuit 311 and the 64-bit initial value V which are stored in the encryption device in advance and which cannot be changed from the outside are used.
64-bit signal Aex corresponding to exclusive OR with
3, a 3-bit inverted value selection signal S3F for controlling the transposing process of the second arithmetic processing circuit 307 is output. First
In the processing of the plaintext block, the value of the initial value V3 is used as the signal Aex3 as it is. Note that the initial value V3 is not limited to 64 bits. Also,
When the external input F2C input to the second arithmetic processing circuit 307 is at the L level, the second arithmetic processing circuit 307 forcibly performs the transposition processing in mode 0.

【0136】第2演算処理制御回路308では、信号A
ex3の第1〜第8ビット、第9〜第16ビット、第1
7〜第24ビット、第25〜第32ビット、第33〜第
40ビット、第41〜第48ビット、第49〜第56ビ
ット、及び第57〜第64ビットの、それぞれ8ビット
からなる信号の排他的論理和の2進数としての値が0か
ら63の場合はモード1、64から127までの場合は
モード2、128から193までの場合はモード3、1
92から255までの場合はモード4の転置処理が行わ
れるようになっている。なお各モードに対応する転置処
理は互いに異なっている。また、各モード転置処理はイ
ンボリューション演算機能を実現するものである。例え
ば、転置処理モードがモード4である場合は、8の倍数
回だけ第2演算処理回路307で転置処理が施された場
合、入力データと転置処理後のデータとは同一のものと
なる。
In the second arithmetic processing control circuit 308, the signal A
ex3 first to eighth bits, ninth to sixteenth bits, first
7th to 24th bits, 25th to 32nd bits, 33th to 40th bits, 41st to 48th bits, 49th to 56th bits, and 57th to 64th bits Mode 1 when the value of the exclusive OR as a binary number is from 0 to 63, Mode 2 when from 64 to 127, and Mode 3 and 1 when from 128 to 193
In the case of 92 to 255, the transposition processing of mode 4 is performed. Note that transposition processing corresponding to each mode is different from each other. Each mode transposition process implements an involution operation function. For example, when the transposition processing mode is mode 4, when the transposition processing is performed by the second arithmetic processing circuit 307 by a multiple of 8, the input data and the data after the transposition processing are the same.

【0137】なお、上記信号Aex3の値に基づいてモ
ードの選択を行う方法は、上記実施の形態1,2で示し
たように種々のものが考えられ、さらに、モード1から
モード4の各モードでの転置処理は、図22の転置表に
示されている転置配列に限定されるものではなく、また
転置処理モードの数も4つに限定されるものではないこ
とは言うまでもない。
Note that various methods for selecting a mode based on the value of the signal Aex3 are conceivable as described in the first and second embodiments. Is not limited to the transposition array shown in the transposition table of FIG. 22, and it is needless to say that the number of transposition processing modes is not limited to four.

【0138】そして、暗号処理回数制御回路304に格
納されている、暗号処理回数だけ第1演算処理回路30
5及び第2演算処理回路307での処理が繰り返し行わ
れたとき、第2演算処理回路307の出力S3Cは、始
めて最終転置回路309にて最終転置処理が施され、出
力データラッチ回路311に保持される。このとき同時
に、入力データラッチ回路301に、次の平文ブロック
が保持され、前平文ブロックと同等の処理が行われる。
Then, the first arithmetic processing circuit 30 is stored in the encryption processing number control circuit 304 by the number of encryption processing times.
5 and the processing in the second arithmetic processing circuit 307 are repeated, the output S3C of the second arithmetic processing circuit 307 is subjected to the final transposition processing in the final transposition circuit 309 for the first time and held in the output data latch circuit 311. Is done. At this time, the next plaintext block is held in the input data latch circuit 301 at the same time, and the same processing as that of the previous plaintext block is performed.

【0139】このようにして全平文ブロックが暗号化さ
れると、平文の暗号化処理が終了する。このような構成
の本実施の形態3では、外部制御信号F2CをLレベル
にし、外部制御信号F1Cの値を01あるいは10にす
ることにより、暗号装置300を、DES暗号装置(外
部入力F1Cが01の場合)、あるいはFEAL暗号装
置(外部F1Cが10の場合)と同等な機能を有するも
のとできる。なお、外部制御信号F1C,F2Cの値は
これらに限定されるものではなく、他の値でもよい。
When all the plaintext blocks have been encrypted in this way, the plaintext encryption processing ends. In the third embodiment having such a configuration, by setting the external control signal F2C to L level and setting the value of the external control signal F1C to 01 or 10, the encryption device 300 can be connected to the DES encryption device (when the external input F1C is 01 ) Or the FEAL encryption device (when the external F1C is 10). The values of the external control signals F1C and F2C are not limited to these, and may be other values.

【0140】これにより本実施の形態3の暗号装置は、
他のDES暗号装置やFEAL暗号装置とデータ転送す
ることが可能な互換性を有することとなる。また、この
暗号装置を使用することにより、既存のDES暗号装置
やFEAL暗号装置としての暗号通信も可能になる。
As a result, the encryption device according to the third embodiment has
It has compatibility that allows data transfer with other DES encryption devices and FEAL encryption devices. Also, by using this encryption device, encrypted communication as an existing DES encryption device or FEAL encryption device becomes possible.

【0141】この結果、本実施の形態の暗号装置では、
すでにハードディスク等の蓄積メディアに保持されてい
るDES暗号装置やFEAL暗号装置によって暗号化さ
れたデータの復号を行い、アルゴリズムを変更して再び
蓄積メディアに保存することも可能である。
As a result, in the encryption device of the present embodiment,
It is also possible to decrypt data already encrypted by a DES encryption device or a FEAL encryption device already stored in a storage medium such as a hard disk, change the algorithm, and store the data again in the storage medium.

【0142】また、本実施の形態3の暗号装置300で
は、第1演算処理回路305を外部から制御し、第2演
算処理回路307における転置処理モードを乱数値に応
じて可変にすることも可能となり、第三者に対してデー
タ転送時の安全性を増すことができる。
In the encryption device 300 according to the third embodiment, the first arithmetic processing circuit 305 can be externally controlled, and the transposition processing mode in the second arithmetic processing circuit 307 can be changed according to the random number. Thus, security at the time of data transfer to a third party can be increased.

【0143】また、本実施の形態3においても、上記実
施の形態1と同様、第2演算処理回路305及び第2演
算処理回路307を、該各回路での暗号化処理がすべて
インボリューション演算のみにより実行されるよう構成
しているので、本実施の形態3の暗号装置も、上記実施
の形態1のものと同様、容易に復号装置に転用すること
が可能である。
Also, in the third embodiment, as in the first embodiment, the second arithmetic processing circuit 305 and the second arithmetic processing circuit 307 are configured such that the encryption processing in each circuit is performed only by the involution operation. Thus, the encryption device according to the third embodiment can be easily converted to a decryption device as in the first embodiment.

【0144】しかも、本実施の形態3の暗号装置300
においても、暗号化アルゴリズムの切り換えを、暗号化
処理として転置処理のみを行う第2演算処理回路307
にて所定の転置処理モードを選択して行うようにしてい
るので、暗号アルゴリズムが可変な暗号装置の回路規模
を、第1演算処理回路における暗号アルゴリズムを可変
としたものと比べて小さくできる。
Further, the encryption device 300 according to the third embodiment
, The switching of the encryption algorithm is performed by the second arithmetic processing circuit 307 which performs only the transposition process as the encryption process.
, The predetermined transposition processing mode is selected and performed, so that the circuit scale of the encryption device in which the encryption algorithm is variable can be made smaller than that in which the encryption algorithm in the first arithmetic processing circuit is variable.

【0145】[0145]

【発明の効果】以上のように本発明(請求項1)に係る
暗号装置によれば、演算処理の内容が異なる複数の処理
モードを有し、選択制御信号により選択された処理モー
ドでもって、入力された平文データに対して演算処理を
行うデータ処理手段と、外部入力に基づいて、該データ
処理手段に上記選択制御信号を出力する演算処理制御手
段とを備えたので、上記データ処理手段での演算処理を
外部から変更することが可能となる。つまり、暗号アル
ゴリズムを外部から簡単に変更することができ、これに
より転送されるデータを、第三者によるデータの盗聴、
改ざん、解読等の攻撃から守り、万が一、暗号装置のア
ルゴリズムが解読された場合でも、暗号装置の仕様変更
を行うことなく、暗号アルゴリズムの変更によりデータ
の安全性を保つことができる。
As described above, according to the encryption device of the present invention (claim 1), there are a plurality of processing modes in which the contents of the arithmetic processing are different, and the processing mode selected by the selection control signal has: A data processing means for performing arithmetic processing on the input plaintext data; and an arithmetic processing control means for outputting the selection control signal to the data processing means based on an external input. Can be changed externally. In other words, the encryption algorithm can be easily changed from the outside, and the data transferred by this can be eavesdropped on by a third party,
Even if the algorithm of the encryption device is decrypted, the data security can be maintained by changing the encryption algorithm without changing the specification of the encryption device even if the algorithm of the encryption device is decrypted.

【0146】この発明(請求項2)によれば、請求項1
記載の暗号装置において、上記データ処理手段として、
所定ビットの暗号鍵を用いて関数データに基づいた転置
処理及びデータ変更処理を含む第1の演算処理を施す第
1演算処理回路と、選択された転置処理モードでもって
該第1演算処理回路の出力データに転置処理を施す第2
の演算処理を行う第2演算処理回路とを備えたので、上
記関数データを、既存のDES暗号方式あるいはFEA
L暗号方式に対応したものとすることにより、これらの
方式の暗号装置との互換性を有し、しかもより暗号解読
の困難な暗号装置を実現できる。また、上記第1演算処
理回路の前段に初期転置手段を設け、さらに第2の演算
処理回路の後段に最終転置手段を設けているので、さら
なる暗号強度の向上を図ることができる。
According to the present invention (Claim 2), Claim 1
In the encryption device described in the above, as the data processing means,
A first operation processing circuit for performing a first operation process including a transposition process and a data change process based on function data using an encryption key of a predetermined bit, and a first operation processing circuit having the selected transposition processing mode. Second to perform transposition processing on output data
And a second arithmetic processing circuit for performing the arithmetic processing of the above.
By adopting the L encryption method, it is possible to realize an encryption device that is compatible with encryption devices of these methods and that is more difficult to decrypt. Further, since the initial transposition means is provided at a stage preceding the first arithmetic processing circuit, and the final transposition means is provided at a stage subsequent to the second arithmetic processing circuit, the encryption strength can be further improved.

【0147】この発明(請求項3)によれば、請求項2
記載の暗号装置において、上記第1演算処理回路を、そ
の入力データに第1の演算処理を施してなる第1の出力
データに再度第1の演算処理を施して第2の出力データ
を求めたとき、上記入力データと第2の出力データとが
同じ値となるインボリューション演算モードを有するも
のとしたので、本暗号装置の構成を簡単に復号装置に転
用でき、また、第1演算処理回路を比較的簡単な構成に
より実現可能である。
According to the present invention (Claim 3), Claim 2
In the cryptographic device described above, the first arithmetic processing circuit performs the first arithmetic processing again on the first output data obtained by performing the first arithmetic processing on the input data to obtain the second output data. At this time, since the input data and the second output data have an involution operation mode in which the same value is obtained, the configuration of the present encryption device can be easily converted to a decryption device, and the first operation processing circuit can be used. This can be realized by a relatively simple configuration.

【0148】この発明(請求項4)によれば、請求項2
記載の暗号装置において、上記第1演算処理回路を、複
数の関数データを有し、外部からの制御信号により選択
された関数データに基づいて、その入力データに対する
演算処理を行う構成としたので、第1演算処理回路での
演算処理を複数回行う暗号化処理では、関数データを演
算処理ごとに変更することにより暗号強度を強化するこ
とができる。また、第1演算処理回路を、DES等のデ
ータ暗号標準規格のf関数と同じ関数による演算処理モ
ードを有する構成とすることにより、本暗号装置をDE
S等のデータ暗号標準規格と互換性を持った暗号装置に
することも可能となる。
According to the present invention (claim 4), claim 2
In the cryptographic device described above, the first arithmetic processing circuit has a configuration having a plurality of function data and performing arithmetic processing on the input data based on function data selected by an external control signal. In the encryption processing in which the arithmetic processing in the first arithmetic processing circuit is performed a plurality of times, the encryption strength can be enhanced by changing the function data for each arithmetic processing. Further, by configuring the first arithmetic processing circuit to have an arithmetic processing mode using the same function as the f function of the data encryption standard such as DES,
It is also possible to make the encryption device compatible with the data encryption standard such as S.

【0149】この発明(請求項5)によれば、請求項2
記載の暗号装置において、上記第2演算処理回路を、そ
の入力データに対して第2の演算処理を施してなる第1
の出力データに再度第2の演算処理を施して第2の出力
データを求めたとき、該入力データと第2の出力データ
とが同じ値となるインボリューション演算モードを有す
る構成としたので、本暗号装置の構成を復号装置に容易
に転用でき、また、第1演算処理回路を比較的簡単な構
成により実現可能である。つまり、転置処理におけるイ
ンボリューション演算は、回路における入力端子と出力
端子との間での配線のつなぎかえだけで実現できる。
According to the present invention (claim 5), claim 2
In the above-mentioned encryption device, the second arithmetic processing circuit performs a second arithmetic processing on the input data.
When the second arithmetic processing is performed again on the output data of the second and the second output data is obtained, the input data and the second output data have the same value in the involution operation mode. The configuration of the encryption device can be easily diverted to the decryption device, and the first arithmetic processing circuit can be realized with a relatively simple configuration. That is, the involution operation in the transposition process can be realized only by changing the wiring between the input terminal and the output terminal in the circuit.

【0150】この発明(請求項6)によれば、請求項5
記載の暗号装置において、nビットの外部入力と変更不
可能なnビットの初期設定値との排他的論理和の値のう
ちの所定のビットに基づいて上記第2演算処理回路にお
ける転置処理モードを選択するよう構成したので、暗号
が解読された場合でも、排他的論理和の値の他のビット
に基づいて転置処理モードの選択を行うようにすること
により、暗号化処理の内容を簡単に変更することができ
る。
According to the present invention (Claim 6), Claim 5
In the cipher device described above, the transposition processing mode in the second arithmetic processing circuit is set based on a predetermined bit of an exclusive OR value of an n-bit external input and an unchangeable n-bit initialization value. Since the configuration is made to select, even if the encryption is decrypted, the content of the encryption processing can be easily changed by selecting the transposition processing mode based on the other bits of the exclusive OR value can do.

【0151】この発明(請求項7)によれば、請求項5
記載の暗号装置において、上記初期転置手段の出力であ
る初期転置データと、変更不可能なnビットの初期設定
値との排他的論理和に基づいて、上記第2演算処理回路
における転置処理モードを選択するようにしたので、出
力された暗号データを入手できた場合でも、前回の暗号
データが分からない限り暗号処理の内容を解読すること
ができない。つまり、一組の64ビットの入力(平文)
と64ビットの出力(暗号文)が分かったとしても、そ
の前の平文入力と暗号文出力の組がわからないと暗号の
解読ができず、結局、すべての入力と出力とを盗まない
限り、暗号の解読ができない。従って、データ処理手段
における暗号化処理を一層解読し難いものとできる。
According to the present invention (claim 7), claim 5
In the cipher device described above, the transposition processing mode in the second arithmetic processing circuit is set based on the exclusive OR of the initial transposition data output from the initial transposition means and an unchangeable initial value of n bits. Since the selection is made, even if the output encrypted data can be obtained, the contents of the encryption processing cannot be decrypted unless the previous encrypted data is known. That is, a set of 64-bit inputs (plaintext)
Even if the output of 64-bit (ciphertext) is known, the cipher cannot be deciphered unless the previous pair of plaintext input and ciphertext output is known. As a result, unless all inputs and outputs are stolen, the encryption Can't decipher Therefore, the encryption processing in the data processing means can be made more difficult to decipher.

【0152】この発明(請求項8)によれば、請求項5
記載の暗号装置において、乱数発生手段からの乱数の値
と、変更不可能なnビットの初期設定値との排他的論理
和に基づいて上記第2演算処理回路における転置処理モ
ードを選択するよう構成したので、転置処理モードの選
択がランダムに行われることとなり、データ処理手段に
おける暗号化処理を一層解読し難いものとできる。
According to the present invention (claim 8), claim 5
In the encryption device described above, the transposition processing mode in the second arithmetic processing circuit is selected based on an exclusive OR of a value of a random number from a random number generation unit and an unchangeable initial value of n bits. Therefore, the selection of the transposition processing mode is performed at random, and the encryption processing in the data processing means can be made more difficult to decipher.

【0153】この発明(請求項9)によれば、請求項3
ないし5のいずれかに記載の暗号装置において、上記第
1演算処理回路を、その出力データを入力データとする
第1の演算処理を3以上の所定回数行ったとき、最初の
入力データと最終の出力データとが同じ値となる複数回
インボリューション演算モードを有する構成としたの
で、暗号の解読には、暗号装置における暗号化データが
複数必要となり、暗号解読に対する安全性をさらに高め
ることができる。
According to the present invention (claim 9), claim 3
6. The encryption device according to any one of claims 1 to 5, wherein when the first arithmetic processing circuit performs the first arithmetic processing using the output data as input data for a predetermined number of times of three or more, the first input data and the final Since the configuration has a multiple involution operation mode in which the output data has the same value, a plurality of encrypted data in the encryption device are required for decryption of the encryption, and the security against the decryption can be further improved.

【0154】この発明(請求項10)によれば、請求項
6ないし8のいずれかに記載の暗号装置において、上記
第2演算処理回路を、その出力データを入力データとす
る第2の演算処理を3以上の所定回数行ったとき、最初
の入力データと最終の出力データとが同じ値となる複数
回インボリューション演算モードを有する構成としたの
で、暗号の解読には、暗号装置における暗号化データが
複数必要となり、暗号解読に対する安全性をさらに高め
ることができる。
According to the present invention (claim 10), in the encryption device according to any one of claims 6 to 8, the second arithmetic processing circuit uses the output data as input data for the second arithmetic processing circuit. Is performed a predetermined number of times equal to or more than three, the first input data and the final output data have the same value in multiple involution operation modes. Are required, and security against decryption can be further improved.

【0155】この発明(請求項11)によれば、請求項
6ないし9のいずれかに記載の暗号装置において、上記
第2演算処理回路を、外部信号が入力されたとき、強制
的に暗号化の演算モードが変更されるように構成したの
で、暗号送信の度に演算モードがランダムに変更可能と
なり、暗号強度を高めることができる。
According to the present invention (claim 11), in the encryption device according to any one of claims 6 to 9, the second arithmetic processing circuit is forcibly encrypted when an external signal is input. Is configured to be changed, so that the calculation mode can be changed randomly every time encryption is transmitted, and the encryption strength can be increased.

【0156】この発明(請求項12)によれば、請求項
11記載の暗号装置において、上記第1演算処理回路に
おける第1の演算処理に用いられる関数を、出力データ
に基づいて対応する入力データを求める逆方向演算プロ
セスでは、入力データに基づいて対応する出力データを
求める順方向演算プロセスに比べて非常に多くの演算処
理を必要とする一方向性関数としたので、暗号化したデ
ータの解読をより一層困難なものとできる。
According to the present invention (claim 12), in the encryption device according to claim 11, the function used for the first arithmetic processing in the first arithmetic processing circuit is converted into the corresponding input data based on the output data. Is a one-way function that requires much more arithmetic processing than the forward operation process that finds the corresponding output data based on the input data, so decryption of the encrypted data Can be made more difficult.

【0157】この発明(請求項13)によれば、請求項
11または12記載の暗号装置において、上記初期転置
手段を、その初期転置処理の内容が異なる複数の初期転
置処理モードを有し、外部あるいは内部からのモード選
択信号に基づいて選択された所要の初期転置処理モード
でもって、上記入力された分割データに初期転置処理を
施すよう構成したので、暗号アルゴリズムの変更を、外
部からの初期転置処理の変更によっても行うことができ
る。
According to the present invention (claim 13), in the encryption device according to claim 11 or 12, the initial transposition means has a plurality of initial transposition processing modes having different contents of the initial transposition processing, and Alternatively, the configuration is such that an initial transposition process is performed on the input divided data in a required initial transposition processing mode selected based on a mode selection signal from the inside, so that a change in the encryption algorithm can be performed by an external initial transposition. It can also be performed by changing the processing.

【0158】この発明(請求項14)によれば、請求項
11または12記載の暗号装置において、上記最終転置
手段を、その最終転置処理の内容が異なる複数の最終転
置処理モードを有し、外部あるいは内部からのモード選
択信号に基づいて選択された所要の最終転置処理モード
でもって、上記データ処理手段の出力データに最終転置
処理を施すよう構成したので、暗号アルゴリズムの変更
を、外部からの最終転置処理の変更によっても行うこと
ができる。
According to the invention (Claim 14), in the encryption device according to the invention 11 or 12, the final transposition means has a plurality of final transposition processing modes having different contents of the final transposition processing, and Alternatively, the final transposition processing is performed on the output data of the data processing means in a required final transposition processing mode selected based on a mode selection signal from the inside. It can also be performed by changing the transposition process.

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

【図1】本発明の実施の形態1による暗号装置の全体構
成を示すブロック図である。
FIG. 1 is a block diagram showing an overall configuration of an encryption device according to a first embodiment of the present invention.

【図2】上記暗号装置を構成する初期転値回路の転置処
理内容を、初期転値表(図(a))により、その最終転
置回路の転置処理内容を、最終転置表(図(b) )に
より示す図である。
FIG. 2 shows the contents of the transposition processing of the initial transposition circuit which constitutes the above-mentioned encryption device, based on the initial transposition table (FIG. 2A), FIG.

【図3】上記実施の形態1の暗号装置を構成する演算処
理回数制御回路の構成を示すブロック図である。
FIG. 3 is a block diagram illustrating a configuration of an arithmetic processing number control circuit included in the encryption device according to the first embodiment;

【図4】上記実施の形態1の暗号装置を構成する第1演
算処理回路の構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of a first arithmetic processing circuit included in the encryption device according to the first embodiment;

【図5】上記実施の形態1の暗号装置を構成する暗号鍵
制御回路の構成を示すブロック図である。
FIG. 5 is a block diagram illustrating a configuration of an encryption key control circuit included in the encryption device according to the first embodiment.

【図6】上記実施の形態1の暗号装置を構成する第2演
算処理回路による転置処理をモード別に示す図である。
FIG. 6 is a diagram illustrating transposition processing by a second arithmetic processing circuit constituting the encryption device according to the first embodiment for each mode.

【図7】上記実施の形態1の暗号装置を構成する第2演
算処理回路の、MSBからみて第8,第7バイト目に対
応する回路構成(図(a) ,図(b) )を示す図である。
FIG. 7 shows a circuit configuration (FIGS. (A) and (b)) corresponding to the eighth and seventh bytes as viewed from the MSB of the second arithmetic processing circuit constituting the encryption device according to the first embodiment. FIG.

【図8】上記実施の形態1の暗号装置を構成する第2演
算処理制御回路の構成を示すブロック図である。
FIG. 8 is a block diagram illustrating a configuration of a second arithmetic processing control circuit included in the encryption device according to the first embodiment;

【図9】本発明の実施の形態2による暗号装置の全体構
成を示すブロック図である。
FIG. 9 is a block diagram showing an overall configuration of an encryption device according to a second embodiment of the present invention.

【図10】上記実施の形態2の暗号装置を構成する初期
転値回路の構成(図(a) )及び最終転置回路の構成(図
(b) )を示すブロック図である。
FIG. 10 shows a configuration of an initial transposition circuit (FIG. 10A) and a configuration of a final transposition circuit (FIG.
It is a block diagram which shows (b)).

【図11】上記実施の形態2の暗号装置を構成する演算
処理回数制御回路の構成を示すブロック図である。
FIG. 11 is a block diagram showing a configuration of a control circuit of the number of times of operation constituting the encryption device of the second embodiment.

【図12】上記実施の形態2の暗号装置を構成する第1
演算処理回路の構成を示すブロック図である。
FIG. 12 shows a first example of the encryption device according to the second embodiment.
FIG. 3 is a block diagram illustrating a configuration of an arithmetic processing circuit.

【図13】上記実施の形態2の暗号装置を構成する暗号
鍵制御回路の構成を示すブロック図である。
FIG. 13 is a block diagram illustrating a configuration of an encryption key control circuit included in the encryption device according to the second embodiment.

【図14】上記実施の形態2の暗号装置を構成する第2
演算処理回路による転置処理をモード別に示す図であ
る。
FIG. 14 shows a second example of the encryption device according to the second embodiment.
It is a figure which shows the transposition process by an arithmetic processing circuit for every mode.

【図15】上記実施の形態2の暗号装置を構成する第2
演算処理回路の、MSBからみて第8,第7バイト目に
対応する回路構成(図(a) ,図(b) )を示す図である。
FIG. 15 shows a second example of the encryption device according to the second embodiment.
FIG. 9 is a diagram showing a circuit configuration (FIGS. 9A and 9B) corresponding to the eighth and seventh bytes of the arithmetic processing circuit when viewed from the MSB.

【図16】上記実施の形態2の暗号装置を構成する第2
演算処理制御回路の構成を示すブロック図である。
FIG. 16 shows a second example of the encryption device according to the second embodiment.
FIG. 3 is a block diagram illustrating a configuration of an arithmetic processing control circuit.

【図17】本発明の実施の形態3による暗号装置の全体
構成を示すブロック図である。
FIG. 17 is a block diagram illustrating an overall configuration of an encryption device according to a third embodiment of the present invention.

【図18】上記実施の形態3の暗号装置を構成する初期
転値回路の構成を示すブロック図である。
FIG. 18 is a block diagram illustrating a configuration of an initial value conversion circuit included in the encryption device according to the third embodiment.

【図19】上記実施の形態3の暗号装置を構成する演算
処理回数制御回路の構成を示すブロック図である。
FIG. 19 is a block diagram showing a configuration of a control circuit for the number of times of arithmetic processing constituting the encryption device of the third embodiment.

【図20】上記実施の形態3の暗号装置を構成する第1
演算処理回路の構成を示すブロック図である。
FIG. 20 shows a first example of the encryption device according to the third embodiment.
FIG. 3 is a block diagram illustrating a configuration of an arithmetic processing circuit.

【図21】上記実施の形態3の暗号装置を構成する暗号
鍵制御回路の構成を示すブロック図である。
FIG. 21 is a block diagram illustrating a configuration of an encryption key control circuit included in the encryption device according to the third embodiment.

【図22】上記実施の形態3の暗号装置を構成する第2
演算処理回路による転置処理をモード別に示す図であ
る。
FIG. 22 shows a second example of the encryption device according to the third embodiment.
It is a figure which shows the transposition process by an arithmetic processing circuit for every mode.

【図23】上記実施の形態3の暗号装置を構成する第2
演算処理回路の、MSBからみて第8,第7バイト目に
対応する回路構成(図(a) ,図(b) )を示す図である。
FIG. 23 shows a second example of the encryption device according to the third embodiment.
FIG. 9 is a diagram showing a circuit configuration (FIGS. 9A and 9B) corresponding to the eighth and seventh bytes of the arithmetic processing circuit when viewed from the MSB.

【図24】上記実施の形態3の暗号装置を構成する第2
演算処理制御回路の構成を示すブロック図である。
FIG. 24 shows a second example of the encryption device according to the third embodiment.
FIG. 3 is a block diagram illustrating a configuration of an arithmetic processing control circuit.

【図25】上記実施の形態3の暗号装置を構成する最終
転値回路の構成を示すブロック図である。
FIG. 25 is a block diagram illustrating a configuration of a final conversion circuit that constitutes the encryption device according to the third embodiment.

【図26】従来のDES暗号方式による暗号化回路の構
成を説明するための図である。
FIG. 26 is a diagram for explaining a configuration of an encryption circuit according to a conventional DES encryption method.

【図27】従来のFEAL−8暗号方式による暗号化回
路の構成を説明するための図である。
FIG. 27 is a diagram illustrating a configuration of a conventional encryption circuit using the FEAL-8 encryption method.

【図28】上記FEAL−8暗号方式の関数fによる演
算処理を行う演算処理回路の構成を説明するための図で
ある。
FIG. 28 is a diagram for explaining a configuration of an arithmetic processing circuit that performs arithmetic processing using a function f of the FEAL-8 encryption method.

【図29】従来のFEAL−8暗号方式で用いる暗号鍵
を作成する暗号鍵作成回路の構成を示す図である。
FIG. 29 is a diagram showing a configuration of an encryption key creation circuit for creating an encryption key used in the conventional FEAL-8 encryption method.

【図30】上記暗号鍵作成回路を構成する各段の暗号鍵
発生部の構成を示す図である。
FIG. 30 is a diagram showing a configuration of an encryption key generation unit of each stage constituting the encryption key generation circuit.

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

100、200、300 暗号装置 101、201、301 入力データラッチ回路 102、202、302 初期転置回路 103、203、303 セレクタ 104、204、304 演算処理回数制御回路 104a、204a、304a カウンター 104b、204b、304b 演算処理回数格納部 104c、204c、304c コンパレータ 105、205、305 第1演算処理回路 106、206、306 暗号鍵制御回路 107、207、307 第2演算処理回路 107a、207b、307b セレクタ回路 107b、207b、307b 論理積回路 108、208、308 第2演算処理制御回路 108a,208a 1ビットフルアダー 108b コンパレータ回路 109、210、310 最終転置回路 111、211、312 出力データラッチ回路 110、212、309 排他的論理和回路 213 前平文ブロックラッチ回路 311 乱数発生回路 205a f 関数回路 302a 第1の初期転値回路 302c 第2の初期転値回路 305b f1関数回路 305c f 2関数回路 310a 第1の最終転値回路 310c 第2の最終転値回路 S1A,S2A,S3A 初期転置データ S1B,S2B,S3B セレクト信号 S1C,S2C,S3C セレクタ出力 S1D,S2D,S3D 暗号鍵 S1E,S2E,S3E 第1演算処理回路出力 S1F,S2F,S3F 転値選択信号 S1G,S2G,S3G 第2演算処理回路出力 100, 200, 300 Cryptographic devices 101, 201, 301 Input data latch circuits 102, 202, 302 Initial transposition circuits 103, 203, 303 Selectors 104, 204, 304 Arithmetic processing number control circuits 104a, 204a, 304a Counters 104b, 204b, 304b Number of calculation processing storage units 104c, 204c, 304c Comparators 105, 205, 305 First calculation processing circuits 106, 206, 306 Cryptographic key control circuits 107, 207, 307 Second calculation processing circuits 107a, 207b, 307b Selector circuit 107b, 207b, 307b AND circuit 108, 208, 308 Second arithmetic processing control circuit 108a, 208a 1-bit full adder 108b Comparator circuit 109, 210, 310 Final transposition circuit 111, 211, 312 Output data latch circuit 110, 212, 309 Exclusive OR circuit 213 Pre-plaintext block latch circuit 311 Random number generation circuit 205a f function circuit 302a First initial value circuit 302c Second initial value circuit 305b f1 function circuit 305c f 2 function circuit 310a First final transposition circuit 310c Second final transposition circuit S1A, S2A, S3A Initial transposition data S1B, S2B, S3B Select signal S1C, S2C, S3C Selector output S1D, S2D, S3D Encryption key S1E , S2E, S3E First operation processing circuit output S1F, S2F, S3F Inversion value selection signal S1G, S2G, S3G Second operation processing circuit output

Claims (14)

【特許請求の範囲】[Claims] 【請求項1】 複数ビットの平文データを分割して得ら
れた個々の分割データを暗号化する暗号装置であって、 演算処理の内容が異なる複数の処理モードを有し、選択
制御信号により選択された処理モードでもって、上記分
割データを暗号化する演算処理を行うデータ処理手段
と、 外部入力に基づいて、該データ処理手段に上記選択制御
信号を出力する演算処理制御手段とを備えたことを特徴
とする暗号装置。
1. An encryption device for encrypting individual divided data obtained by dividing a plurality of bits of plaintext data, wherein the encryption device has a plurality of processing modes having different arithmetic processing contents and is selected by a selection control signal. Data processing means for performing arithmetic processing for encrypting the divided data in the specified processing mode, and arithmetic processing control means for outputting the selection control signal to the data processing means based on an external input. An encryption device characterized by the above-mentioned.
【請求項2】 請求項1記載の暗号装置において、 上記データ処理手段は、 外部から入力された分割データをビット単位又はバイト
単位で並び替えて初期転置データを作成する初期転置手
段と、 所定の関数データを有し、上記初期転置データ,あるい
は該初期転置データを演算処理した演算処理データに対
して、所定ビットの暗号鍵を用いて、上記関数データに
基づいた転置処理及びデータ変更処理を含む第1の演算
処理を施す第1演算処理回路と、 転置処理の内容が異なる複数の転置処理モードを有し、
選択された転置処理モードでもって該第1演算処理回路
の出力データに転置処理を施す第2の演算処理を行う第
2演算処理回路と、 上記第2演算処理回路の出力データ及び上記初期転置デ
ータのうちの一方をデータ選択信号に基づいて選択して
上記第1演算処理回路に出力するセレクタ手段と、 上記初期転置データに対して上記第1,第2の演算処理
回路による演算処理が繰り返し所定回数だけ連続して行
われるよう上記セレクタ手段を上記データ選択信号によ
り制御する演算処理回数制御回路と、 上記第2の演算処理回路の出力データに対して最終転置
処理を施して最終演算処理データを出力する最終転置手
段とを備えており、 上記演算処理制御手段は、外部入力に基づいて、上記第
2演算処理回路における転置処理モードの選択を行う転
置処理制御回路を有していることを特徴とする暗号装
置。
2. The encryption apparatus according to claim 1, wherein said data processing means is configured to rearrange divided data input from the outside in a bit unit or a byte unit to generate initial transposed data; Including function data, the method includes a transposition process and a data change process based on the function data, using an encryption key of a predetermined bit, with respect to the initial transposition data or the operation processing data obtained by performing an operation process on the initial transposition data. A first arithmetic processing circuit for performing the first arithmetic processing, and a plurality of transposition processing modes having different transposition processing contents;
A second arithmetic processing circuit for performing a second arithmetic processing for transposing the output data of the first arithmetic processing circuit in the selected transposition processing mode; an output data of the second arithmetic processing circuit and the initial transposed data; Selector means for selecting one of them based on a data selection signal and outputting the selected data to the first arithmetic processing circuit; and performing arithmetic processing by the first and second arithmetic processing circuits on the initial transposed data repeatedly in a predetermined manner. An arithmetic processing number control circuit for controlling the selector means by the data selection signal so as to be continuously performed by the number of times; and performing final transposition processing on output data of the second arithmetic processing circuit to obtain final arithmetic processing data. Final transposition means for outputting, and the arithmetic processing control means selects a transposition processing mode in the second arithmetic processing circuit based on an external input. An encryption device comprising a transposition processing control circuit.
【請求項3】 請求項2記載の暗号装置において、 上記第1演算処理回路は、その入力データに第1の演算
処理を施してなる第1の出力データに再度第1の演算処
理を施して第2の出力データを求めたとき、上記入力デ
ータと第2の出力データとが同じ値となるインボリュー
ション演算モードを有するものであることを特徴とする
暗号装置。
3. The encryption device according to claim 2, wherein the first arithmetic processing circuit performs the first arithmetic processing again on the first output data obtained by performing the first arithmetic processing on the input data. An encryption device having an involution operation mode in which the input data and the second output data have the same value when the second output data is obtained.
【請求項4】 請求項2記載の暗号装置において、 上記第1演算処理回路は、複数の関数データを有し、外
部からの制御信号により選択された関数データに基づい
て、その入力データに対する演算処理を行うよう構成し
たものであることを特徴とする暗号装置。
4. The encryption device according to claim 2, wherein the first arithmetic processing circuit has a plurality of function data, and performs an operation on the input data based on the function data selected by an external control signal. An encryption device configured to perform a process.
【請求項5】 請求項2記載の暗号装置において、 上記第2演算処理回路は、その入力データに対して第2
の演算処理を施してなる第1の出力データに再度第2の
演算処理を施して第2の出力データを求めたとき、該入
力データと第2の出力データとが同じ値となるインボリ
ューション演算モードを有するものであることを特徴と
する暗号装置。
5. The encryption device according to claim 2, wherein the second arithmetic processing circuit performs a second operation on the input data.
When the second output data is obtained by performing the second operation process again on the first output data obtained by performing the above operation process, the involution operation in which the input data and the second output data have the same value An encryption device having a mode.
【請求項6】 請求項5記載の暗号装置において、 nビットの外部入力と変更不可能なnビットの初期設定
値との排他的論理和を求める論理回路を備え、 上記転置処理制御回路を、該排他的論理和の値のうちの
mビット(m≦n)に基づいて上記第2演算処理回路に
おける転置処理モードを選択するよう構成したものであ
ることを特徴とする暗号装置。
6. The encryption device according to claim 5, further comprising: a logic circuit for obtaining an exclusive OR of an n-bit external input and an unchangeable n-bit initial setting value; An encryption device, wherein the transposition processing mode in the second arithmetic processing circuit is selected based on m bits (m ≦ n) of the value of the exclusive OR.
【請求項7】 請求項5記載の暗号装置において、 上記初期転置手段の出力である初期転置データと、変更
不可能なnビットの初期設定値との排他的論理和を求め
る論理回路を備え、 上記転置処理制御回路を、該排他的論理和の値のうちの
mビット(m≦n)に基づいて上記第2演算処理回路に
おける転置処理モードを選択するよう構成したものであ
ることを特徴とする暗号装置。
7. The encryption device according to claim 5, further comprising: a logic circuit for calculating an exclusive OR of the initial transposed data output from the initial transposition means and an unchangeable initial value of n bits. The transposition processing control circuit is configured to select a transposition processing mode in the second arithmetic processing circuit based on m bits (m ≦ n) of the value of the exclusive OR. Encryption device.
【請求項8】 請求項5記載の暗号装置において、 sビットの乱数を発生する乱数発生手段と、 該乱数の値と、変更不可能なsビットの初期設定値との
排他的論理和を求める論理回路とを備え、 上記転置処理制御回路を、該排他的論理和の値のうちの
mビット(m≦s)に基づいて上記第2演算処理回路に
おける転置処理モードを選択するよう構成したものであ
ることを特徴とする暗号装置。
8. The encryption device according to claim 5, wherein a random number generating means for generating an s-bit random number, and an exclusive OR of a value of the random number and an unchangeable s-bit initial setting value is obtained. A logic circuit, wherein the transposition processing control circuit is configured to select a transposition processing mode in the second arithmetic processing circuit based on m bits (m ≦ s) of the value of the exclusive OR. An encryption device, characterized in that:
【請求項9】 請求項3ないし5のいずれかに記載の暗
号装置において、 上記第1演算処理回路は、 その出力データを入力データとする第1の演算処理を所
定回数行ったとき、最初の入力データと最終の出力デー
タとが同じ値となる複数回インボリューション演算モー
ドを有することを特徴とする暗号装置。
9. The encryption device according to claim 3, wherein the first arithmetic processing circuit performs a first arithmetic processing using the output data as input data a predetermined number of times. An encryption device having a plurality of involution operation modes in which input data and final output data have the same value.
【請求項10】 請求項6ないし8のいずれかに記載の
暗号装置において、 上記第2演算処理回路は、 その出力データを入力データとする第2の演算処理を所
定回数行ったとき、最初の入力データと最終の出力デー
タとが同じ値となる複数回インボリューション演算モー
ドを有することを特徴とする暗号装置。
10. The encryption device according to claim 6, wherein the second arithmetic processing circuit performs a first arithmetic operation when the second arithmetic processing using the output data as input data is performed a predetermined number of times. An encryption device having a plurality of involution operation modes in which input data and final output data have the same value.
【請求項11】 請求項6ないし9のいずれかに記載の
暗号装置において、 上記データ処理手段は、上記第2演算処理回路への所定
の外部信号の入力により、強制的に、暗号化処理と復号
化処理とで同一の暗号鍵を用いる対象暗号方式でもって
インボリューション暗号化処理が行われるよう構成され
ており、 該インボリューション暗号化処理は、該暗号化処理にお
ける所定回数の演算と復号化処理における所定回数の演
算とにより、該暗号化処理における最初の演算処理が施
される初期入力データと、復号化処理における最終演算
処理の結果得られる最終出力データとが同じ値となるも
のであることを特徴とする暗号装置。
11. The encryption device according to claim 6, wherein the data processing means forcibly performs an encryption process by inputting a predetermined external signal to the second arithmetic processing circuit. The involution encryption process is configured to be performed by a target encryption method that uses the same encryption key in the decryption process. The involution encryption process includes a predetermined number of operations in the encryption process and decryption. By the predetermined number of operations in the processing, the initial input data subjected to the first operation in the encryption processing and the final output data obtained as a result of the final operation in the decryption processing have the same value. An encryption device characterized by the above-mentioned.
【請求項12】 請求項11記載の暗号装置において、 上記第1演算処理回路における第1の演算処理に用いら
れる関数は、出力データに基づいて対応する入力データ
を求める逆方向演算プロセスでは、入力データに基づい
て対応する出力データを求める順方向演算プロセスに比
べて多くの演算処理を必要とする一方向性関数であるこ
とを特徴とする暗号装置。
12. The cryptographic device according to claim 11, wherein the function used in the first arithmetic processing in the first arithmetic processing circuit is a function for inputting the corresponding input data based on the output data. An encryption device, which is a one-way function that requires more arithmetic processing than a forward arithmetic process for obtaining corresponding output data based on data.
【請求項13】 請求項11または12記載の暗号装置
において、 上記初期転置手段は、 その初期転置処理の内容が異なる複数の初期転置処理モ
ードを有し、 装置外部あるいは装置内部にて発生されたモード選択信
号に基づいて選択された所要の初期転置処理モードでも
って、上記入力された分割データに初期転置処理を施す
よう構成したものであることを特徴とする暗号装置。
13. The encryption device according to claim 11, wherein the initial transposition means has a plurality of initial transposition processing modes in which the contents of the initial transposition process are different, and the initial transposition mode is generated outside the device or inside the device. An encryption device characterized in that the input divided data is subjected to an initial transposition process in a required initial transposition processing mode selected based on a mode selection signal.
【請求項14】 請求項11または12記載の暗号装置
において、 上記最終転置手段は、 その最終転置処理の内容が異なる複数の最終転置処理モ
ードを有し、 装置外部あるいは装置内部にて発生されたモード選択信
号に基づいて選択された所要の最終転置処理モードでも
って、上記データ処理手段の出力データに最終転置処理
を施すよう構成したものであることを特徴とする暗号装
置。
14. The encryption apparatus according to claim 11, wherein said final transposition means has a plurality of final transposition processing modes in which the content of the final transposition processing is different, and is generated outside the apparatus or inside the apparatus. An encryption apparatus characterized in that final transposition processing is performed on output data of said data processing means in a required final transposition processing mode selected based on a mode selection signal.
JP9198934A 1997-07-24 1997-07-24 Ciphering device Pending JPH1145049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9198934A JPH1145049A (en) 1997-07-24 1997-07-24 Ciphering device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9198934A JPH1145049A (en) 1997-07-24 1997-07-24 Ciphering device

Publications (1)

Publication Number Publication Date
JPH1145049A true JPH1145049A (en) 1999-02-16

Family

ID=16399407

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9198934A Pending JPH1145049A (en) 1997-07-24 1997-07-24 Ciphering device

Country Status (1)

Country Link
JP (1) JPH1145049A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1202488A2 (en) * 2000-10-31 2002-05-02 Sharp Kabushiki Kaisha Encryption sub-key generation circuit
JP2014522171A (en) * 2011-07-22 2014-08-28 ネットフリックス・インコーポレイテッド System and method for obfuscated initial value of encryption protocol

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1202488A2 (en) * 2000-10-31 2002-05-02 Sharp Kabushiki Kaisha Encryption sub-key generation circuit
EP1202488A3 (en) * 2000-10-31 2003-03-19 Sharp Kabushiki Kaisha Encryption sub-key generation circuit
US7039186B2 (en) 2000-10-31 2006-05-02 Sharp Kabushiki Kaisha Encryption key generation circuit
JP2014522171A (en) * 2011-07-22 2014-08-28 ネットフリックス・インコーポレイテッド System and method for obfuscated initial value of encryption protocol
JP2016129403A (en) * 2011-07-22 2016-07-14 ネットフリックス・インコーポレイテッドNetflix, Inc. System and method for obfuscated initial value of encrypted protocol
US10972439B2 (en) 2011-07-22 2021-04-06 Netflix, Inc. System and method for obfuscating initiation values of a cryptography protocol

Similar Documents

Publication Publication Date Title
JP3029381B2 (en) Data converter
KR19990002840A (en) Fast Block Encryption Algorithm Guarantees Security against Differential and Linear Decryptions
Shah Kruti et al. New approach of data encryption standard algorithm
JP3012732B2 (en) Block cipher processor
ES2287978T3 (en) METHOD FOR THE CRYPTOGRAPHIC CONVERSION OF BINARY DATA BLOCKS.
JPH1145049A (en) Ciphering device
OleiwiTuama et al. Text encryption approach using DNA computation and hyperchaotic system
CN115811398A (en) Dynamic S-box-based block cipher algorithm, device, system and storage medium
KR100350207B1 (en) Method for cryptographic conversion of l-bit input blocks of digital data into l-bit output blocks
RU2206961C2 (en) Method for iterative block encryption of binary data
JPH1124558A (en) Ciphering device
Goswami Study and analysis of symmetric key-cryptograph DES, data encryption standard
Pal et al. Composite transposition substitution chaining based cipher technique
JP2001142395A (en) Extended key generator, ciphering/deciphering device, extended key generating method and recording medium
Al-Farraji DNA Cryptographic System Utilizing Random Permutation
RU2186467C2 (en) Method for iterative block encryption
Hassan New Approach for Modifying DES Algorithm Using 4-States Multi-keys
Umamaheswaran et al. An algorithm for encrypting/decrypting textual messages
JPH10153954A (en) Ciphering device
JPH09251267A (en) Encryption device and encryption method
RU2140716C1 (en) Method for cryptographic conversion of digital data blocks
JP2000089666A (en) Encoding/decoding device
RU2140712C1 (en) Method for ciphering binary data blocks
Kumari et al. An RTL Implementation of the Data Encryption Standard (DES)
Hattab et al. Developing the Complexity and Security of the Twofish Algorithm Through a New Key Scheduling Design