JPH11212451A - Criptographic device - Google Patents

Criptographic device

Info

Publication number
JPH11212451A
JPH11212451A JP10024075A JP2407598A JPH11212451A JP H11212451 A JPH11212451 A JP H11212451A JP 10024075 A JP10024075 A JP 10024075A JP 2407598 A JP2407598 A JP 2407598A JP H11212451 A JPH11212451 A JP H11212451A
Authority
JP
Japan
Prior art keywords
processing
data
transposition
bit
input
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Withdrawn
Application number
JP10024075A
Other languages
Japanese (ja)
Inventor
Takahiro Okamoto
隆浩 岡本
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.)
Dai Nippon Printing Co Ltd
Original Assignee
Dai Nippon Printing 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 Dai Nippon Printing Co Ltd filed Critical Dai Nippon Printing Co Ltd
Priority to JP10024075A priority Critical patent/JPH11212451A/en
Publication of JPH11212451A publication Critical patent/JPH11212451A/en
Withdrawn legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a cryptographic device which has a high processing speed and a general usefulness and can cope with any kind of cryptography and is suitable for processing of common cryptography adopting exclusive OR, cyclic shift, and remainder operation with essential transposition and conversion like DES or FEAL. SOLUTION: A transposition processing means 201 for execution of an arbitrary transposition processing, a conversion processing means 202 for execution of an arbitrary conversion processing, a storage means where the processing result of the transposition processing means 201 and that of the conversion processing means 202 are stored, and a means which uses the processing results in the storage means to repeat the transposition processing and the conversion processing are provided. The transposition processing means 201 consists of a rewritable switch matrix, and the conversion processing means 202 consists of a rewritable random access memory.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は暗号処理装置に関す
るものであり、特に、処理速度が早く、汎用性があり、
どのような種類の暗号にも適合できる暗号処理装置に関
するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a cryptographic processing device, and in particular, has a high processing speed, is versatile,
The present invention relates to a cryptographic processing device that can be adapted to any type of cryptography.

【0002】[0002]

【従来の技術】従来から暗号方式として各種の方式が提
案されている。その代表的なものとして、暗号化鍵コー
ドと復号化鍵コードとが同一である対称暗号、いわゆる
慣用暗号と呼ばれる種類がある。その代表的な例とし
て、1977年に米国商務省標準局が制定した、データ
暗号標準DES(Data Encryption S
tandard)がある。また、日本では日本電信電話
(株)が開発提案したFEALと呼ばれる方式がある。
これらの慣用暗号技術の基本は、換字、転置、あるいは
双方を組み合わせた方式で、伝送データやファイルを暗
号処理することにある。
2. Description of the Related Art Conventionally, various schemes have been proposed as encryption schemes. As a typical example, there is a type called a symmetric encryption in which an encryption key code and a decryption key code are the same, that is, a so-called conventional encryption. A representative example is the data encryption standard DES (Data Encryption S), which was established by the US Bureau of Standards and Commerce in 1977.
standard). In Japan, there is a system called FEAL developed and proposed by Nippon Telegraph and Telephone Corporation.
The basis of these conventional cryptographic techniques is to encrypt transmission data and files by a method of substitution, transposition, or a combination of both.

【0003】換字式暗号(substitution
cipher)の歴史は古く、これは、文字を別の文字
に置き換えるもので、各文字ごとに、置き換えられる文
字の対応表をあらかじめ作成しておくコードブック方
式、文字を一定数だけずらしていくシーザ方式、シーザ
方式の鍵を周期的に変化させるビジネル暗号(Vigi
nere cipher)などの種類がある。同様に、
転置式暗号(transposition ciphe
r)は、メッセージを周期という一定の文字数ごとに区
切り、その区切られた文字数ごとに文字の並びを入れ換
えるものである。
[0003] Substitution encryption (substitution)
cipher) has a long history. It replaces a character with another character. A code book method that creates a correspondence table of the replaced character for each character in advance. Caesar shifts characters by a certain number. Encryption (Vigi) that periodically changes the key of the
ner cipher). Similarly,
Transposition cipher
In r), the message is divided for each fixed number of characters, ie, a period, and the character arrangement is changed for each divided number of characters.

【0004】以上のような換字方式と転置方式を組み合
わせたものに混合方式がある。その中の1つがDESで
あり、メッセージを64ビット単位のブロックに分け、
これを64ビットの鍵を用いて換字、転置を16回繰り
返すもので暗号強度が高いのが特徴である。このときに
使用される鍵コードは秘密にしておく必要がある(秘密
鍵方式)。このDESのアルゴリズムは公開されてい
る。DESの場合、鍵の種類は256(約1017)個あ
り、アルゴリズムに則って鍵コードを見つけるには、膨
大な時間がかかるとされている。
[0004] A combination of the above-described substitution method and transposition method is a mixed method. One of them is DES, which divides the message into 64-bit blocks,
Substitution and transposition are repeated 16 times using a 64-bit key, which is characterized by high encryption strength. The key code used at this time must be kept secret (secret key method). The algorithm of this DES is public. In the case of DES, there are 2 56 (about 10 17 ) types of keys, and it is said that it takes an enormous amount of time to find a key code according to an algorithm.

【0005】DESでは、先ず、利用者が任意に与える
56ビットの鍵に、次々に換字や転置、またはビットシ
フトを行い、各48ビットの鍵をK1 からK16まで16
種作る。次ぎに、メッセージを64ビットのブロックに
分け、1ブロックごとに64ビットの暗号文に変換す
る。すなわち、先ず、メッセージ1ブロックを32ビッ
トづつの左半分L0 と右半分R0 に分ける。次に、これ
に対して次の操作を16回行う。 Ln =Rn-1 Rn =Ln-1 +f(Kn ,Rn-1 )
In the DES, first, substitution, transposition, or bit shift is sequentially performed on a 56-bit key arbitrarily provided by a user, and each 48-bit key is converted into 16 keys from K1 to K16.
Make seeds. Next, the message is divided into 64-bit blocks, and each block is converted into a 64-bit ciphertext. That is, first, one message block is divided into a left half L0 and a right half R0 of 32 bits each. Next, the following operation is performed 16 times. Ln = Rn-1 Rn = Ln-1 + f (Kn, Rn-1)

【0006】上式の和は、各桁ごとの2を法(Mod
2)とする和、すなわち排他的論理和で、f(K,R)
は、32ビットのRを適切な転置により48ビットに拡
大し、前記48ビットの鍵Kn を用いて一種の換字を行
いつつ、再度、32ビットに変換する操作である。上式
の変換が16回行われて暗号文64ビットが得られる。
The sum of the above equation is modulo 2 for each digit (Mod
2), that is, the exclusive OR, and f (K, R)
Is an operation of expanding a 32-bit R into 48 bits by appropriate transposition, and performing a kind of substitution using the 48-bit key Kn, and again converting it to 32 bits. The above equation is converted 16 times to obtain 64 bits of ciphertext.

【0007】上記DESに代表される暗号方式は、ブロ
ック暗号とも呼ばれ、一定の長さにメッセージを区切っ
て暗号化するのに適している。一方、メッセージを構成
するデータ列を1ビットづつ暗号処理するストリーム暗
号方式がある。その代表的な例として、乱数を用いる換
字暗号、バーナム暗号(Vernam cipher)
が知られている。また、日本でも1993年に岡本氏か
ら発表されたストリーム暗号がある。
The cipher system represented by the DES is also called a block cipher, and is suitable for dividing a message into a certain length and encrypting the message. On the other hand, there is a stream cipher system in which a data string constituting a message is encrypted one bit at a time. A typical example is a substitution cipher using a random number, Vernam cipher.
It has been known. Also in Japan, there is a stream cipher announced by Okamoto in 1993.

【0008】前記DESに代表される暗号方式を実現す
る具体的な手段としては、8ビット、16ビット、また
は32ビットの汎用マイクロプロセッサを用いることが
できる。その場合は、マイクロプロセッサの制御ソフト
で暗号処理を実行し、平均1K〜1Mbpsの処理能力
が得られている。また、暗号処理用の専用LSIも開発
され、その場合は、1M〜100Mbpsの処理能力が
得られている。なお、近年は、パーソナルコンピュータ
に用いられるマイクロプロセッサの処理能力が向上し、
ソフトウェアのみで暗号処理がなされる例も多い。
As a concrete means for realizing the encryption system represented by the DES, a general-purpose microprocessor of 8 bits, 16 bits or 32 bits can be used. In this case, encryption processing is executed by control software of the microprocessor, and an average processing capability of 1K to 1 Mbps is obtained. Also, a dedicated LSI for encryption processing has been developed, and in that case, a processing capacity of 1 M to 100 Mbps has been obtained. In recent years, the processing capability of microprocessors used in personal computers has improved,
In many cases, encryption processing is performed only by software.

【0009】暗号方式の他の一つは、前記秘密鍵方式の
鍵管理のわずらわしさを解消するために考案された公開
鍵方式である。公開鍵方式は、暗号化用と復号化用とに
それぞれ別の鍵コードを使用する非対称系暗号である。
公開鍵暗号の原理は1976年にDiffieとHel
lmanとによって発表され、その後、1978年にR
ivest、Shamir、Adlemanにより、R
SA暗号が提案され、また1985年にElGamal
によって、エルガマル暗号が提案された。非対称系暗号
の代表であるRSA暗号では、べき乗剰余演算を用いて
おり、この暗号処理のために開発された専用LSIを用
いても、得られる処理速度は平均1Kbps〜100K
bps程度であり、秘密鍵を用いる慣用暗号と比較して
暗号処理の高速化が難しい。
Another one of the encryption systems is a public key system devised to eliminate the troublesome key management of the secret key system. The public key system is an asymmetric cryptosystem that uses different key codes for encryption and decryption, respectively.
The principle of public key cryptography was introduced in 1976 by Diffie and Hel
lman and then in 1978 R
est, Shamir, Adleman, R
The SA crypto was proposed, and in 1985 ElGamal
Proposed the El Gamal cipher. The RSA cryptosystem, which is a representative of asymmetric cryptosystems, uses a modular exponentiation operation. Even if a dedicated LSI developed for this cryptographic process is used, the processing speed obtained is an average of 1 Kbps to 100 Kbps.
bps, and it is difficult to speed up the encryption process as compared with conventional encryption using a secret key.

【0010】[0010]

【発明が解決しようとする課題】DESに代表される慣
用暗号は、転置処理、換字処理、排他的論理和、巡回シ
フト、剰余演算などの処理要素を組み合わせて暗号処理
されており、これらの暗号処理要素をすべてソフトウェ
アで実行しようとすると、大きな処理能力は得られな
い。一方、前記処理要素を含めて暗号処理の全ての要素
を専用LSI化すると、高い処理能力は得られるが、暗
号処理の市場規模からみて、非常にコストの高い装置に
なる。従って本発明は、処理速度が早く、汎用性があ
り、どのような種類の暗号にも対応できる暗号処理装置
を得ることを目的とし、特に、DESやFEALのよう
に転置や換字を主体に、排他的論理和や巡回シフト、剰
余演算を行う慣用暗号の処理に適した、暗号処理装置を
提供するものである。
Conventional cryptography represented by DES is cryptographically processed by combining processing elements such as transposition processing, substitution processing, exclusive OR, cyclic shift, and remainder operation. If all processing elements are to be implemented in software, no significant processing power is available. On the other hand, if all elements of the cryptographic processing including the processing elements are made into dedicated LSIs, high processing performance can be obtained, but the apparatus becomes very expensive in view of the market size of the cryptographic processing. Accordingly, an object of the present invention is to provide a cryptographic processing device that has a high processing speed, is versatile, and can cope with any type of cryptography. In particular, the present invention mainly deals with transposition and substitution as in DES and FEAL. It is an object of the present invention to provide a cryptographic processing device suitable for processing of a conventional cryptosystem that performs an exclusive OR, a cyclic shift, and a remainder operation.

【0011】[0011]

【課題を解決するための手段】本発明の暗号処理装置
は、請求項1に示したように、任意の転置処理を実行す
るための転置処理手段と、任意の換字処理を実行するた
めの換字処理手段と、前記転置処理手段による処理結
果、および前記換字処理手段による処理結果を記憶する
記憶手段と、前記記憶手段の処理結果を用いて、転置処
理、または換字処理を反復する手段とを備えている。
According to a first aspect of the present invention, there is provided a cryptographic processing apparatus comprising: a transposition processing unit for executing an arbitrary transposition process; and a substitution processing unit for executing an arbitrary transposition process. Processing means; storage means for storing a processing result by the transposition processing means and a processing result by the substitution processing means; and means for repeating transposition processing or substitution processing using the processing result of the storage means. ing.

【0012】また、本発明の暗号処理装置は、請求項2
に示したように、前記転置処理手段は、再書き込み可能
なスイッチマトリクスで構成されており、また、請求項
3に示したように、前記換字処理手段は、再書き込み可
能なランダムアクセスメモリで構成されている。
Further, the cryptographic processing device of the present invention is characterized in that
The transposition processing means is constituted by a rewritable switch matrix, and the substitution processing means is constituted by a rewritable random access memory. Have been.

【0013】[0013]

【発明の実施の形態】(DES暗号の仕組み)本発明の
実施の形態を説明する前に、先ず、秘密鍵を用いる慣用
暗号の代表であるDESについてその概要を説明する。
図11はDESにおける暗号化処理のブロック図であ
る。DESにおいては、先ず、64ビットの鍵コードK
に基づいて、16種類の系列鍵コードK1 〜K16を生成
する。64ビットの鍵コードKは、最初に、縮約転置処
理PC1において、56ビットに縮約されるとともに、
転置処理により所定のコード攪拌を行った後、上位28
ビットC0 と下位28ビットD0 とに分割する。次い
で、得られたC0 とD0 とは、それぞれ所定のビット数
の左巡回シフト処理LS1 を行ってC1 とD1 とに変換
する。
DESCRIPTION OF THE PREFERRED EMBODIMENTS (Mechanism of DES Cryptography) Before describing an embodiment of the present invention, an outline of DES, which is a representative of conventional cryptography using a secret key, will be described first.
FIG. 11 is a block diagram of the encryption processing in the DES. In DES, first, a 64-bit key code K
, 16 kinds of series key codes K1 to K16 are generated. First, the 64-bit key code K is reduced to 56 bits in the contracted transposition process PC1.
After performing predetermined code agitation by the transposition process, the top 28
It is divided into bit C0 and lower 28 bits D0. Next, the obtained C0 and D0 are respectively converted into C1 and D1 by performing a left cyclic shift process LS1 of a predetermined number of bits.

【0014】再び、56ビットに合成されたC1 とD1
は、縮約転置処理PC2において、48ビットに縮約す
るとともに、転置処理を行ってコードを攪拌し、系列鍵
コードK1 を得る。一方、LS1 にて左巡回シフト処理
が施されたC1 とD1 とは、LSn に代表される左巡回
シフト処理が順次施され、それぞれCn 、Dn に変換さ
れる。このCn 、Dn に基づいて、それぞれ縮約転置処
理PC2を施し、48ビットの系列鍵コードKn 、すな
わち16種類の系列鍵コードK1 〜K16を得る。
Again, C1 and D1 combined into 56 bits
Is reduced to 48 bits in the reduced transposition process PC2, and the transposition process is performed to agitate the code to obtain a sequence key code K1. On the other hand, C1 and D1 subjected to the left cyclic shift processing in LS1 are sequentially subjected to the left cyclic shift processing represented by LSn, and are converted into Cn and Dn, respectively. Based on Cn and Dn, a reduced transposition process PC2 is performed to obtain a 48-bit sequence key code Kn, that is, 16 types of sequence key codes K1 to K16.

【0015】DESにおけるメッセージの暗号化は、先
ず、メッセージを64ビットづつに区切り、各64ビッ
トの平文データMに対してそれぞれ暗号化処理を施す。
平文データMの暗号化処理では、先ず、初期転置処理I
Pによって平文データMを攪拌したのち、上位32ビッ
トL0 と下位32ビットR0 とに分割する。暗号化は、
2つに分割された上位下位各32ビットのデータに対し
て、前記系列鍵コードKn 、すなわちK1 〜K16を用い
て処理される。この暗号化処理は次式に基づいて16回
行う。 Ln =Rn-1 Rn =Ln-1 +f(Kn ,Rn-1 )
In encrypting a message in the DES, first, the message is divided into 64 bits, and each plaintext data M of 64 bits is subjected to an encryption process.
In the encryption processing of the plaintext data M, first, the initial transposition processing I
After the plaintext data M is mixed by P, it is divided into upper 32 bits L0 and lower 32 bits R0. Encryption is
The upper and lower 32-bit data divided into two are processed by using the sequence key code Kn, that is, K1 to K16. This encryption process is performed 16 times based on the following equation. Ln = Rn-1 Rn = Ln-1 + f (Kn, Rn-1)

【0016】上式の和は、各桁ごとの2を法とする和
(Mod2)、すなわち排他的論理和である。また、関
数f(K,R)は、32ビットのRを拡大転置処理によ
り48ビットに拡大した後、前記48ビットの系列鍵コ
ードKn を用いて一種の換字を行いつつ、再度、32ビ
ットに変換する操作である。前記処理を16回繰り返
し、最後に得られたL16とR16を入れ換えたのち、逆初
期転置処理IP-1を施すことによって64ビットの暗号
文データCを得る。
The sum in the above equation is a sum modulo 2 for each digit (Mod2), that is, an exclusive OR. The function f (K, R) is obtained by enlarging a 32-bit R into 48 bits by an extended transposition process and then performing a kind of substitution using the 48-bit sequence key code Kn, and again converting the 32-bit R to a 32-bit value. This is the conversion operation. The above process is repeated 16 times, and after the obtained L16 and R16 are exchanged, the inverse initial transposition process IP- 1 is performed to obtain 64-bit ciphertext data C.

【0017】上記DESにおける関数f(K,R)の処
理の詳細を図13に示す。図に示すように、関数f
(K,R)の処理は、先ず、32ビットの原字列Rn
を、拡大転置処理Eにて48ビットに拡大しつつ、転置
処理を施しデータを攪拌する。次いで、前記系列鍵コー
ド生成処理にて得られた48ビットの鍵コードKn との
排他的論理和を得る。次に、得られた48ビットのデー
タを6ビットづつ、8ブロックに分割し、それぞれS1
〜S8 で示される換字処理を施してデータを攪拌し、各
4ビットの換字データを得る。さらに、前記換字処理S
1 〜S8 で得られた、4×8=32ビットの換字データ
に対して、転置処理Pを施してデータを攪拌し32ビッ
トの換字列を得ている。
FIG. 13 shows details of the processing of the function f (K, R) in the DES. As shown in the figure, the function f
The processing of (K, R) is performed first by using a 32-bit original character string Rn.
Is enlarged to 48 bits by the enlargement transposition process E, and the data is agitated. Next, an exclusive OR with the 48-bit key code Kn obtained in the series key code generation processing is obtained. Next, the obtained 48-bit data is divided into 8 blocks of 6 bits each,
The data is subjected to the substitution processing shown in S8 to S8 to agitate the data to obtain 4-bit substitution data. Further, the substitution processing S
Transposition processing P is performed on the 4 × 8 = 32-bit substitution data obtained in 1 to S8 to agitate the data to obtain a 32-bit substitution string.

【0018】以上の説明は、DESにおける暗号化の処
理例である。次に、暗号化されたデータを、元のメッセ
ージに復号する暗号解読方法について説明する。図12
はDES暗号文の復号化ブロック図である。暗号文の復
号化においては、暗号化と同様に、先ず、復号用の系列
鍵コードを生成する。図に示すように、DESの復号用
鍵コードは、暗号化に用いた鍵コードと同じ64ビット
の鍵コードKを基に、最初に、縮約転置処理PC1にお
いて、56ビットに縮約するとともに、転置処理によっ
て所定のコード攪拌を行った後、上位28ビットC16と
下位28ビットD16とに分割する。次いで、得られたC
16とD16とを合成し、縮約転置処理PC2において、4
8ビットに縮約するともに、転置処理にてコードを攪拌
し、最初の系列鍵コードK16を得る。
The above description is an example of encryption processing in DES. Next, a decryption method for decrypting the encrypted data into the original message will be described. FIG.
Is a block diagram of the decryption of the DES ciphertext. In decryption of a ciphertext, similarly to the encryption, first, a series key code for decryption is generated. As shown in the figure, the DES decryption key code is first reduced to 56 bits in the reduced transposition process PC1 based on the same 64-bit key code K as the key code used for encryption. After a predetermined code agitation is performed by the transposition process, the data is divided into upper 28 bits C16 and lower 28 bits D16. Then, the obtained C
16 and D16 are combined, and the reduced transposition process PC2 generates 4
The code is reduced to 8 bits, and the code is agitated by the transposition process to obtain the first sequence key code K16.

【0019】一方、縮約転置処理PC1にて得られたC
16とD16とは、それぞれRS15にて右巡回シフト処理を
施し、C15、D15に変換する。このC15、D15に基づい
て、それぞれ縮約転置処理PC2を施し、48ビットの
鍵系列コードK15を得る。以下同様にして、右巡回シフ
トRS15〜RS1 で得られたCn 、Dn (図示せず)に
基づいて復号用の系列鍵コードKn (図示せず)、すな
わちK16〜K1 を得る。なお、DESでは、これらの復
号用の系列鍵コードK16〜K1 は、前述した暗号化処理
において生成した鍵系列コードK1 〜K16と同一であ
り、生成する順序が逆になっているだけである。
On the other hand, C obtained by contracted transposition processing PC1
16 and D16 are subjected to right cyclic shift processing by RS15, and are converted into C15 and D15. Based on these C15 and D15, a contracted transposition process PC2 is performed to obtain a 48-bit key sequence code K15. Similarly, a decoding sequence key code Kn (not shown), that is, K16 to K1, is obtained based on Cn and Dn (not shown) obtained by the right cyclic shifts RS15 to RS1. In the DES, these series key codes K16 to K1 for decryption are the same as the key series codes K1 to K16 generated in the above-described encryption processing, and the order of generation is only reversed.

【0020】DESにおける暗号文の復号化では、先
ず、暗号文を64ビットづつに区切り、各64ビットの
暗号文データCに対してそれぞれ復号化処理を施す。暗
号文Cの復号化処理では、先ず、初期転置処理IPによ
って暗号文データCを攪拌したのち、上位32ビットL
16と下位32ビットR16とに分割する。復号化は、2つ
に分割された上位下位各32ビットのデータに対して、
前記復号化用の系列鍵コードKn 、すなわちK16〜K1
を用いて処理される。この復号化処理は次式に基づいて
16回行われる。 Rn-1 =Ln Ln-1 =Rn +f(Kn ,Ln )
In the decryption of the ciphertext in the DES, first, the ciphertext is divided into 64 bits, and each 64-bit ciphertext data C is subjected to a decryption process. In the decryption process of the ciphertext C, first, the ciphertext data C is agitated by the initial transposition process IP, and then the upper 32 bits L
16 and lower 32 bits R16. Decoding is performed on the upper and lower 32-bit data divided into two,
The decryption sequence key code Kn, that is, K16 to K1
Is processed using This decoding process is performed 16 times based on the following equation. Rn-1 = Ln Ln-1 = Rn + f (Kn, Ln)

【0021】上式の和は、各桁ごとの2を法(Mod
2)とする和、すなわち排他的論理和である。また、関
数f(K,L)は、32ビットのLを拡大転置により4
8ビットに拡大し、前記48ビットの系列鍵コードKn
を用いて一種の換字を行いつつ、再度、32ビットに変
換する操作である。前記処理を16回繰り返し、最後に
得られたL0 とR0 を入れ換えたのち、逆初期転置処理
IP-1を施すことによって64ビットの解読文データM
が得られる。なお、前記復号化処理は、上位と下位の各
32ビットのデータが、暗号化処理の場合と入れ替わっ
て処理されるが、基本的な処理手順は暗号化処理と同じ
論理で実行される。
The sum of the above equation is modulo 2 for each digit (Mod
2), that is, an exclusive OR. The function f (K, L) is obtained by expanding L of 32 bits by 4
Expanded to 8 bits, the 48-bit sequence key code Kn
This is an operation to convert again to 32 bits while performing a kind of substitution using. The above process is repeated 16 times, and the last obtained L0 and R0 are exchanged. Then, the inverse initial transposition process IP- 1 is applied to obtain 64-bit decoded text data M-1.
Is obtained. In the above-described decryption processing, the upper and lower 32-bit data are processed in the same manner as in the encryption processing, but the basic processing procedure is executed by the same logic as the encryption processing.

【0022】以上に説明したDESの暗号処理において
は、各種の転置処理が行われており、その処理の具体的
な例を図10に示す。図10は、DESで実行される各
転置処理IP、E、P、IP-1、PC1、PC2におけ
る入力ビットが、どの出力ビットに出力されるかを表に
示している。例えば、初期転置処理IPにおいては、入
力ビットの第58ビットのデータが、出力ビットの第1
ビットに、また、入力ビットの第50ビットのデータ
が、出力ビットの第2ビットに出力されることを示して
いる。以下同様に、各転置処理における入力ビットと出
力ビットの関係を表している。
In the DES encryption process described above, various transposition processes are performed, and a specific example of the process is shown in FIG. FIG. 10 is a table showing to which output bits the input bits in each of the transposition processes IP, E, P, IP −1 , PC1 and PC2 executed by the DES are output. For example, in the initial transposition process IP, the data of the 58th bit of the input bit is replaced with the first bit of the output bit.
This indicates that the data of the 50th bit of the input bit is output to the second bit of the output bit. Similarly, the relationship between input bits and output bits in each transposition process is shown.

【0023】なお、DESの暗号処理においては、初期
転置処理IP、拡大転置処理E、及び逆初期転置処理I
-1は、規約によって入出力ビットの配列が固定されて
いる。一方、鍵コードKから系列鍵コードK1 〜K16を
生成する部分において実行する転置処理PC1、PC
2、および、関数f(K,R)または関数f(K,L)
の処理において実行する転置処理Pの配列は、DESの
利用者によってその配列を変更することができ、図10
に示した変換例は、その一例である。
In the DES encryption process, an initial transposition process IP, an enlarged transposition process E, and an inverse initial transposition process I
In P- 1 , the arrangement of input / output bits is fixed by convention. On the other hand, transposition processes PC1 and PC1, which are executed in a part for generating sequence key codes K1 to K16 from key code K,
2, and function f (K, R) or function f (K, L)
The arrangement of the transposition processing P executed in the processing of (1) can be changed by the user of the DES.
The conversion example shown in FIG.

【0024】同様に、DESの暗号処理において、図1
3に示した関数f(K,R)の処理において実行する換
字処理S1 〜S8 の具体的な例を図9に示す。図9は、
DESで実行される換字処理S1 〜S8 において、各換
字処理における6ビットの入力データに対する4ビット
の出力データの内容を一覧表に示したものである。この
表は、例えば、換字処理S1 における入力データが、2
進数で「000000」のとき、出力データが「1110」である
ことを示している。以下同様に、各換字処理S1 〜S8
における6ビットの入力データ「000000」〜「111111」
に対して、出力される4ビットの換字データを、一部省
略して示している。なお、DESの規約では、前記換字
処理S1 〜S8 の出力データの内容は固定されておら
ず、DESの利用者によってその内容を変更することが
でき、図10に示した配列は、その一例である。
Similarly, in the DES encryption process, FIG.
FIG. 9 shows a specific example of the substitution processing S1 to S8 executed in the processing of the function f (K, R) shown in FIG. FIG.
In the substitution processing S1 to S8 executed by the DES, the contents of 4-bit output data corresponding to 6-bit input data in each substitution processing are shown in a table. This table indicates that, for example, if the input data in the substitution process S1 is 2
When the value is “000000” in base, it indicates that the output data is “1110”. Hereinafter, similarly, each of the substitution processing S1 to S8
6-bit input data "000000" to "111111"
, The output 4-bit substitution data is partially omitted. According to the DES rules, the contents of the output data of the substitution processing S1 to S8 are not fixed, and can be changed by the user of the DES. The array shown in FIG. is there.

【0025】(FEAL暗号の仕組み)秘密鍵を用いる
慣用暗号の一方式であるFEALは、日本電信電話
(株)が開発した暗号方式であり、128ビットまたは
64ビットの鍵コードを用いて、64ビットづつにブロ
ック化されたメッセージを暗号文に変換する。前記DE
Sでは、暗号化の過程で16回メッセージを攪拌する
が、FEALでは4、8、16、または32回以上、攪
拌処理を行う。また、暗号化の過程では、排他的論理和
処理とともに、系列鍵コードの生成やデータの攪拌に用
いる関数として、2ビット巡回シフトや剰余演算(mo
d256)が用いられる。さらに、系列鍵コードの生成
やデータの攪拌に際し、データ長を8ビットづつにブロ
ック化して処理しており、DESと比較して高速処理や
ソフトウェア処理に適している。
(Mechanism of FEAL Cryptography) FEAL, which is one type of conventional encryption using a secret key, is an encryption method developed by Nippon Telegraph and Telephone Corporation, and uses a 128-bit or 64-bit key code to generate 64 bits. Converts a message that is blocked bit by bit into ciphertext. The DE
In S, the message is agitated 16 times in the encryption process, whereas in FEAL, the agitation process is performed 4, 8, 16, or 32 or more times. In addition, in the encryption process, a two-bit cyclic shift and a remainder operation (mo
d256) is used. Further, when generating a sequence key code and mixing data, the data length is divided into blocks of 8 bits for processing, which is more suitable for high-speed processing and software processing than DES.

【0026】(本発明の概要)本発明では、上記したD
ESやFEALなどの暗号化処理、および復号化処理
を、処理速度が早く、汎用性があり、どのような種類の
暗号にも対応できる暗号処理装置を得ることを目的と
し、特に、DESやFEALのように転置や換字、、排
他的論理和、巡回シフト、剰余演算を行う慣用暗号の処
理に適した、暗号処理装置を提供するものである。すな
わち、本発明の暗号処理装置は、転置や換字、排他的論
理和、巡回シフト、剰余演算などの暗号処理要素のう
ち、少なくとも転置処理を実行するための専用の手段
と、換字処理を実行するための専用の手段とを備え、前
記いづれかの手段を用いて、転置処理、または換字処理
を所定の回数反復処理するように構成した暗号処理装置
である。
(Summary of the present invention) In the present invention, the D
An object of the present invention is to obtain a cryptographic processing device that performs encryption processing such as ES and FEAL, and decryption processing, which has a high processing speed, is versatile, and can cope with any type of encryption. The present invention provides a cryptographic processing apparatus suitable for processing of conventional cryptography for performing transposition, substitution, exclusive OR, cyclic shift, and remainder operation. That is, the cryptographic processing device of the present invention executes a transposing process and a dedicated means for performing at least the transposing process among cryptographic processing elements such as transposition and substitution, exclusive OR, cyclic shift, and remainder operation. And a dedicated means for performing the transposition process or the substitution process a predetermined number of times by using any one of the means.

【0027】(装置の構成)次に、本発明の暗号処理装
置に関し、実施例の図面に基づいてその構成を詳細に説
明する。図1は、本発明の暗号処理装置の概念図であ
る。また、図2は、本発明の暗号処理装置全体の構成例
を示すブロック図である。さらに、図3は、暗号処理部
の詳細な実施例を示すブロック図である。
(Configuration of Apparatus) Next, the configuration of the cryptographic processing apparatus of the present invention will be described in detail with reference to the drawings of the embodiments. FIG. 1 is a conceptual diagram of the cryptographic processing device of the present invention. FIG. 2 is a block diagram showing a configuration example of the entire cryptographic processing device of the present invention. FIG. 3 is a block diagram showing a detailed embodiment of the encryption processing unit.

【0028】(装置の概要)先ず、図1を用いて、本発
明の暗号処理装置の概要について説明する。図におい
て、1は暗号処理装置である。暗号処理装置1は、平文
データM、または暗号文データCを入力し、平文データ
Mを暗号文データCに暗号化したり、暗号文データCを
平文データMに復号化する装置である。前記暗号処理装
置1は、暗号処理を実行するための制御部100、およ
び暗号処理の内、転置処理を実行するための専用の転置
処理手段201と、換字処理を実行するための専用の換
字処理手段202とを備えた暗号処理部200とで構成
される。図に示すように、前記暗号処理部200に備え
た転置処理手段201と換字処理手段202とは、それ
ぞれのデータ入力端子が、共通の入力データレジスタ2
03の出力端子に接続されており、また、各処理手段の
出力端子が、出力データセレクタ204の入力端子に接
続されている。さらに、出力データセレクタ204の出
力端子は、前記入力データレジスタ203の入力端子に
接続されている。
(Outline of Apparatus) First, an outline of the encryption processing apparatus of the present invention will be described with reference to FIG. In the figure, reference numeral 1 denotes a cryptographic processing device. The cryptographic processing device 1 is a device that receives plaintext data M or ciphertext data C, encrypts the plaintext data M into ciphertext data C, and decrypts the ciphertext data C into plaintext data M. The cryptographic processing device 1 includes a control unit 100 for performing a cryptographic process, a transposition processing unit 201 for performing a transposition process among the cryptographic processes, and a dedicated permutation process for performing a permutation process. And a cryptographic processing unit 200 having means 202. As shown in the figure, the transposition processing means 201 and the substitution processing means 202 provided in the cryptographic processing unit 200 are configured such that each data input terminal has a common input data register 2.
03, and the output terminal of each processing means is connected to the input terminal of the output data selector 204. Further, the output terminal of the output data selector 204 is connected to the input terminal of the input data register 203.

【0029】上記構成の暗号処理装置1において、暗号
処理を行う場合、先ず、制御部100によって、暗号処
理部200の入力データレジスタ203に、暗号処理を
実行しようとする最初のデータが入力される。入力デー
タレジスタ203に入力されたデータは、転置処理手段
201、および換字処理手段202に入力され、それぞ
れ転置処理、および換字処理が実行され、その処理結果
は、出力データセレクタ204に入力される。次いで、
制御部100によって、出力データセレクタ204に入
力された処理結果のうち、転置処理、または換字処理の
いづれかの処理結果が選択される。選択された処理結果
は、出力データセレクタ204の出力端子を経て、入力
データレジスタ203に入力され、再び転置処理および
換字処理が行われる。すなわち、一旦入力データレジス
タ201にデータを入力すれば、制御部100によっ
て、転置処理または換字処理の処理結果を、出力データ
セレクタ204にて選択するだけで、転置処理または換
字処理を、連続して次々と実行することができる。
In the cryptographic processing apparatus 1 having the above configuration, when performing cryptographic processing, first, the control unit 100 inputs the first data to be subjected to cryptographic processing to the input data register 203 of the cryptographic processing unit 200. . The data input to the input data register 203 is input to the transposition processing unit 201 and the substitution processing unit 202, where the transposition processing and the substitution processing are executed, and the processing result is input to the output data selector 204. Then
The control unit 100 selects one of the transposition processing and the substitution processing from among the processing results input to the output data selector 204. The selected processing result is input to the input data register 203 via the output terminal of the output data selector 204, and the transposition processing and the substitution processing are performed again. That is, once data is input to the input data register 201, the control unit 100 selects the processing result of the transposition processing or the substitution processing by the output data selector 204, and performs the transposition processing or the substitution processing continuously. Can be executed one after another.

【0030】一方、出力データセレクタ204にて選択
された転置処理または換字処理の処理結果を、出力デー
タセレクタ204の出力端子を介して、制御部100の
図示しないデータ記憶手段に記憶し、必要に応じて、制
御部100によって、暗号処理部200の入力データレ
ジスタ203に再入力することもできる。この場合は、
複数のデータの転置処理や換字処理を、実質的に並行し
て処理することができる。
On the other hand, the processing result of the transposition process or the substitution process selected by the output data selector 204 is stored in the data storage means (not shown) of the control unit 100 via the output terminal of the output data selector 204 and becomes necessary. Accordingly, the control unit 100 can re-input the data to the input data register 203 of the encryption processing unit 200. in this case,
Transposition processing and substitution processing of a plurality of data can be performed substantially in parallel.

【0031】例えば、DESの鍵コードKを制御部10
0に入力し、暗号化に用いる系列鍵コードK1 〜K16を
生成する場合、先ず、鍵コードKを転置処理手段201
で縮約転置処理PC1を実行し、次いで得られた結果を
左巡回シフトする。この巡回シフトは、実質的に転置処
理と同じ処理であり、縮約転置処理PC1を実行した
後、その処理結果を、再び転置処理手段201にて転置
処理することによって、系列鍵コードK1 を生成するた
めの左巡回シフトが施されたデータを得られる。
For example, the DES key code K is
0 to generate the sequence key codes K1 to K16 used for encryption, first, the key code K is
Executes the reduced transposition process PC1, and then shifts the obtained result leftward cyclically. This cyclic shift is substantially the same as the transposition processing. After the contracted transposition processing PC1 is executed, the processing result is again transposed by the transposition processing means 201 to generate the sequence key code K1. To obtain the data subjected to the left cyclic shift.

【0032】実質的に左巡回シフトと同じ結果を得られ
る転置処理によって得たデータは、次の系列鍵コードK
2 を生成するための左巡回シフトのためのデータとし
て、一旦、制御部100に記憶しておく。次に、系列鍵
コードK1 を生成するために得たデータを入力データレ
ジスタ203に入力し、転置処理手段201にて、縮約
転置処理PC2を実行すれば、系列鍵コードK1 を得、
これを制御部100に記憶する。
The data obtained by the transposition process that can obtain substantially the same result as the left cyclic shift is the following sequence key code K
2 is temporarily stored in the control unit 100 as data for the left cyclic shift for generating the second shift. Next, the data obtained to generate the sequence key code K1 is input to the input data register 203, and the transposition processing means 201 executes the contracted transposition process PC2 to obtain the sequence key code K1.
This is stored in the control unit 100.

【0033】次いで、先に制御部100に記憶した系列
鍵コードK2 を生成するための次の左巡回シフトのため
のデータを、暗号処理部200の入力データレジスタ2
03に入力し、実質的に左巡回シフトと等価な転置処理
を実行することによって、次に必要な系列鍵コードを生
成するためのデータが得られる。このように、暗号処理
部200の転置処理手段201を用いて、順次転置処理
を実行することによって、暗号化に必要な16種類の系
列鍵コードをK1 〜K16を得ることができる。
Next, the data for the next left-handed cyclic shift for generating the sequence key code K2 previously stored in the control unit 100 is stored in the input data register 2 of the encryption processing unit 200.
By inputting the data to the key code 03 and performing a transposition process substantially equivalent to the left cyclic shift, data for generating the next necessary sequence key code is obtained. As described above, by sequentially performing the transposition processing using the transposition processing means 201 of the cryptographic processing unit 200, it is possible to obtain 16 types of series key codes K1 to K16 required for encryption.

【0034】なお、後に詳しく説明するが、暗号処理部
200に設けた転置処理手段201における入力ビット
と出力ビットの関係は、転置処理の内容、例えば、縮約
転置処理PC1、PC2、または左巡回シフトLS1 ・
・・LS15などによって異なるので、転置処理を実行す
る前に、転置処理手段201の入力ビットと出力ビット
の関係を変更する必要がある。
As will be described in detail later, the relationship between the input bits and the output bits in the transposition processing means 201 provided in the encryption processing unit 200 depends on the content of the transposition processing, for example, the reduced transposition processing PC1, PC2, or the left cyclic operation. Shift LS1
It is necessary to change the relationship between the input bits and the output bits of the transposition processing unit 201 before performing the transposition processing because it differs depending on LS15 and the like.

【0035】また、暗号処理部200の換字処理手段2
02は、例えば、DESの暗号化、および復号化で用い
られる非線形関数f(K,R)またはf(K,L)に含
まれるS1 〜S8 の選択換字処理において使用される。
例えば、拡大転置処理Eを施した原字列RまたはLと系
列鍵コードKとの排他的論理和演算で得られた48ビッ
トのデータを、先ず、制御部100に記憶しておく。次
に、前記48ビットのデータを8ブロックに分割し、各
6ビットのデータを、順次、制御部100から暗号処理
部200の入力データレジスタ203に入力し、換字処
理手段202にて、選択換字処理S1 〜S8 を順次実行
する。換字処理は8回実行されるので、その都度、入力
データレジスタ203に6ビットのデータを入力すると
ともに、換字処理手段202で得られた4ビットの換字
処理結果を、出力データレジスタ204で選択し、制御
部100のデータ記憶手段に記憶させ、合計32ビット
の換字データを得る。
The substitution processing means 2 of the encryption processing section 200
02 is used, for example, in the selective substitution processing of S1 to S8 included in the non-linear function f (K, R) or f (K, L) used for encryption and decryption of DES.
For example, the control unit 100 first stores 48-bit data obtained by an exclusive OR operation of the original character string R or L subjected to the extended transposition processing E and the sequence key code K. Next, the 48-bit data is divided into eight blocks, and the 6-bit data is sequentially input from the control unit 100 to the input data register 203 of the encryption processing unit 200. Steps S1 to S8 are sequentially executed. Since the substitution processing is executed eight times, each time, 6-bit data is input to the input data register 203 and the 4-bit substitution processing result obtained by the substitution processing means 202 is selected by the output data register 204. Is stored in the data storage means of the control unit 100 to obtain a total of 32 bits of substitution data.

【0036】その際、換字処理手段202の入力ビット
と出力ビットの関係は、選択換字処理S1 ・・・S8 ご
とに異なっているので、選択換字処理S1 〜S8 を実行
する都度、換字処理手段202の入力ビットと出力ビッ
トの関係を変更する必要がある。
At this time, the relationship between the input bits and the output bits of the substitution processing means 202 is different for each of the substitution processing S1... S8, so that each time the selected substitution processing S1 to S8 is executed, the substitution processing means 202 is executed. It is necessary to change the relationship between the input bits and the output bits.

【0037】つまり、前記、転置処理手段201の入力
ビットと出力ビットの関係、および換字処理手段202
の入力ビットと出力ビットの関係は、暗号処理部200
での転置処理または換字処理の都度、制御部100によ
って変更するように構成する。
That is, the relationship between the input bits and the output bits of the transposition processing means 201 and the substitution processing means 202
The relationship between the input bits and the output bits of
Each time the transposition process or the substitution process is performed, the control unit 100 changes the configuration.

【0038】(装置の構成例)前記入力ビットと出力ビ
ットとの関係の変更処理を含めた暗号処理を行うための
暗号処理装置の、具体的な装置構成例を図2に示す。図
2において、10はマイクロプロセッサなどのCPU
(演算制御装置)、20は処理データを一時記憶するた
めのRAM(ランダムアクセスメモリ)、30はCPU
を動作させるためのプログラム、および、転置処理手段
201の入力ビットと出力ビットの関係や、換字処理手
段202の入力ビットと出力ビットの関係を、制御デー
タとして記憶しておくためのROM(リードオンリメモ
リ)、40は図1に示した転置処理手段201、換字処
理手段202、入力データレジスタ203、および出力
データセレクタ204などで構成される暗号処理部(C
LU)である。
(Example of Apparatus Configuration) FIG. 2 shows a specific example of an apparatus configuration of an encryption processing apparatus for performing an encryption process including a process of changing the relationship between the input bits and the output bits. In FIG. 2, reference numeral 10 denotes a CPU such as a microprocessor.
(Arithmetic control device), 20 is a RAM (random access memory) for temporarily storing processing data, 30 is a CPU
And a ROM (read-only) for storing, as control data, a program for causing the transposition processing means 201 to operate, and a relation between input and output bits of the transposition processing means 201 and a relation between input and output bits of the substitution processing means 202. A cryptographic processing unit (C) comprising the transposition processing means 201, the substitution processing means 202, the input data register 203, and the output data selector 204 shown in FIG.
LU).

【0039】前記CPU10、RAM20、ROM3
0、およびCLU40は、バス11を介して相互に接続
され、プログラムおよびデータを伝送することができ
る。さらに、前記バス11には、I/Oで示されるデー
タ入出力制御部12が接続され、その入力端子13、お
よび出力端子14を介して、外部装置から入力されるメ
ッセージおよび鍵コードを受け取り、メッセージを暗号
文に変換して送り出したり、逆に、暗号文と鍵コードを
受け取り、暗号文を復号して解読文に変換して送り出す
ように構成されている。
The CPU 10, RAM 20, ROM 3
0 and the CLU 40 are interconnected via the bus 11 and can transmit programs and data. Further, a data input / output control unit 12 indicated by I / O is connected to the bus 11, and receives a message and a key code input from an external device via an input terminal 13 and an output terminal 14 thereof. It is configured to convert a message into a ciphertext and send it out, or conversely, receive a ciphertext and a key code, decode the ciphertext and convert it into a decrypted sentence and send it out.

【0040】(暗号処理部の構成)次に、前記暗号処理
部(CLU)40のより詳細な回路構成について説明す
る。図3は、暗号処理部40の詳細構成図である。図に
おいて、40は暗号処理部(CLU)である。暗号処理
部40は、半導体集積回路で構成され、内蔵されている
制御レジスタ41を介して、暗号処理装置1のバス11
に接続される。前記制御レジスタ41は、バス11に接
続されたCPU10によって制御され、暗号処理部40
の内部に組み込まれた暗号処理用の各回路の動作を制御
したり、データの入出力を制御する。暗号処理部40内
の各回路は、データバス42、および制御バス43を介
して前記制御レジスタ41に接続され、制御レジスタ4
1に設定されたデータを受け取って暗号処理を実行した
り、処理結果を制御レジスタ41に転送する。なお、デ
ータバス42は64ビット長のデータ幅を有している。
(Configuration of Cryptographic Processing Unit) Next, a more detailed circuit configuration of the cryptographic processing unit (CLU) 40 will be described. FIG. 3 is a detailed configuration diagram of the encryption processing unit 40. In the figure, reference numeral 40 denotes a cryptographic processing unit (CLU). The cryptographic processing unit 40 is configured by a semiconductor integrated circuit, and controls the bus 11 of the cryptographic processing device 1 via a built-in control register 41.
Connected to. The control register 41 is controlled by the CPU 10 connected to the bus 11 and
It controls the operation of each of the circuits for encryption processing incorporated in the, and controls the input and output of data. Each circuit in the encryption processing unit 40 is connected to the control register 41 via a data bus 42 and a control bus 43,
It receives the data set to 1 and executes encryption processing, and transfers the processing result to the control register 41. The data bus 42 has a data width of 64 bits.

【0041】暗号処理部40には、図3に示すように、
転置処理や換字処理などの暗号処理の対象である64ビ
ットの鍵コード、および64ビットに区切られた平文デ
ータや暗号文データを設定するための2つの入力データ
レジスタ44、45を備えている。前記2つの入力デー
タレジスタ44、45の入力端子は、各々64ビット長
のデータ幅を有し、前記データバス42を介して制御レ
ジスタ41に接続されている。また、前記入力データレ
ジスタ44の出力端子は、転置処理を実行するためのプ
ログラマブルなスイッチマトリクスアレイ50と、換字
処理を実行するためのプログラマブルなRAM(ランダ
ムアクセスメモリ)60、および、他方の入力データレ
ジスタ45に設定されたデータとの排他的論理和演算を
実行するための、排他的論理和演算回路70とに接続さ
れている。
As shown in FIG. 3, the encryption processing unit 40
It has a 64-bit key code to be subjected to encryption processing such as transposition processing and substitution processing, and two input data registers 44 and 45 for setting plaintext data and encrypted text data divided into 64 bits. The input terminals of the two input data registers 44 and 45 each have a data width of 64 bits and are connected to the control register 41 via the data bus 42. An output terminal of the input data register 44 includes a programmable switch matrix array 50 for performing transposition processing, a programmable RAM (random access memory) 60 for performing substitution processing, and the other input data. It is connected to an exclusive OR operation circuit 70 for executing an exclusive OR operation with the data set in the register 45.

【0042】さらに、前記スイッチマトリクスアレイ5
0の出力端子と、RAM60の出力端子と、排他的論理
和演算回路70の出力端子は、出力データセレクタ46
の入力端子X、Y、Zにそれぞれ接続されている。そし
て前記出力データセレクタ46の出力端子は、データバ
ス42を介して、制御レジスタ41に接続されている。
なお、出力データセレクタ46の出力端子は、64ビッ
ト長のデータ幅を有し、前記X、Y、またはZのいずれ
かの入力端子の内容を選択して制御レジスタ41にデー
タを転送する。
Further, the switch matrix array 5
0, the output terminal of the RAM 60, and the output terminal of the exclusive OR operation circuit 70 are connected to the output data selector 46.
Are connected to the input terminals X, Y, and Z, respectively. The output terminal of the output data selector 46 is connected to the control register 41 via the data bus 42.
The output terminal of the output data selector 46 has a data width of 64 bits, and selects the content of any of the X, Y, or Z input terminals and transfers the data to the control register 41.

【0043】ここで、転置処理を実行するためのプログ
ラマブルなスイッチマトリクスアレイ50について、よ
り詳しく説明する。プログラマブルスイッチマトリクス
アレイ50は、レジスタ部51とスイッチマトリクス部
52とで構成される。そして前記スイッチマトリクス部
52は、例えば、64入力、64出力の半導体スイッチ
群で構成され、前記レジスタ部51に設定されたデータ
によって、入力ビットと出力ビットの関係が決定され
る。このレジスタ部51に設定されるデータは、64ビ
ット×64ビット=4096ビット、すなわち512バ
イトあり、CPU10によって、ROM30から読み出
された512バイトの転置制御データが、制御レジスタ
41に入力され、データバス42を介してレジスタ部5
1に転送されて設定される。レジスタ部51に設定され
た4096ビットの転置制御データによって、前記スイ
ッチマトリクス部52に設けられた64本の入力線と6
4本の出力線との接、断が決定され、入力データレジス
タ44に設定されたデータが、前記64本の入力線に入
力されることによって、所定の出力線に転置処理された
データが出力される。この転置処理されたデータは、出
力データセレクタ46の入力端子Xに入力される。
Here, the programmable switch matrix array 50 for performing the transposition process will be described in more detail. The programmable switch matrix array 50 includes a register unit 51 and a switch matrix unit 52. The switch matrix unit 52 is composed of, for example, a 64-input, 64-output semiconductor switch group, and the relationship between input bits and output bits is determined by data set in the register unit 51. The data set in the register unit 51 is 64 bits × 64 bits = 4096 bits, that is, 512 bytes. The CPU 10 inputs 512 bytes of transposition control data read from the ROM 30 to the control register 41, and outputs the data. Register unit 5 via bus 42
1 and set. According to the transposition control data of 4096 bits set in the register unit 51, 64 input lines provided in the switch matrix unit 52 and 6
The connection or disconnection with the four output lines is determined, and the data set in the input data register 44 is input to the 64 input lines, so that the data transposed to a predetermined output line is output. Is done. The transposed data is input to the input terminal X of the output data selector 46.

【0044】また、換字処理を実行するためのプログラ
マブルなRAM(ランダムアクセスメモリ)60は、例
えば、8ビットのアドレス入力線と8ビットのデータ出
力線を備え、最大で256バイトの換字制御データを保
持することができる。この換字制御データは、転置制御
データと同様に、CPU10によって、ROM30から
読み出されて制御レジスタ41に入力され、データバス
42を介してRAM60に転送されて設定される。この
RAM60に換字制御データを書き込んでおき、入力デ
ータレジスタ44に換字処理すべきデータを設定するこ
とによって、前記入力データレジスタ44に設定された
データの下位8ビットのデータがRAM60のアドレス
入力線に入力され、当該アドレスに対応する換字データ
がRAM60のデータ出力線に出力され、換字処理され
たデータが、出力データセレクタ46の入力端子Yに入
力される。
The programmable RAM (random access memory) 60 for performing the substitution process has, for example, an 8-bit address input line and an 8-bit data output line, and stores a maximum of 256 bytes of substitution control data. Can be held. Like the transposition control data, the substitution control data is read out from the ROM 30 by the CPU 10, input to the control register 41, transferred to the RAM 60 via the data bus 42, and set. Substitution control data is written in the RAM 60, and data to be subjected to substitution processing is set in the input data register 44, so that the lower 8 bits of data set in the input data register 44 are applied to the address input line of the RAM 60. The input, the substitute data corresponding to the address is output to the data output line of the RAM 60, and the data subjected to the substitute processing is input to the input terminal Y of the output data selector 46.

【0045】本実施例の暗号処理部40では、上述した
転置処理用回路と換字処理用回路とは別に、入力データ
レジスタ44と入力データレジスタ45とに設定された
2つの入力データの排他的論理和を演算するための排他
的論理和演算回路70を備えている。この排他的論理和
演算回路70は、2つの64ビットデータの排他的論理
和を演算し、出力データセレクタ46の入力端子Zに演
算結果を入力する。
In the encryption processing unit 40 of this embodiment, the exclusive logic of two input data set in the input data register 44 and the input data register 45 is set separately from the transposition processing circuit and the substitution processing circuit. An exclusive OR operation circuit 70 for operating the sum is provided. The exclusive OR operation circuit 70 performs an exclusive OR operation on the two 64-bit data, and inputs the operation result to the input terminal Z of the output data selector 46.

【0046】(装置の作用動作)次に、本発明の暗号処
理装置の作用動作について説明する。動作例として、D
ESの暗号化処理の場合について説明する。図4はDE
Sの暗号化処理の動作を説明するためのデータ処理を模
式的に示したフロー図である。DESの暗号化処理で
は、先ず、図4(a)に示すように、64ビットの平文
データMから、初期転置処理IPによって64ビットの
転置データを得る。この処理は、図3に示したスイッチ
マトリクス部52で行われる処理である。
(Operation of Apparatus) Next, the operation of the cryptographic processing apparatus of the present invention will be described. As an operation example, D
The case of ES encryption processing will be described. Figure 4 shows the DE
It is the flowchart which showed typically the data processing for demonstrating operation | movement of the encryption process of S. In the DES encryption processing, first, as shown in FIG. 4A, 64-bit transposed data is obtained from the 64-bit plaintext data M by the initial transposition processing IP. This process is a process performed in the switch matrix unit 52 shown in FIG.

【0047】暗号処理部40にて初期転置処理IPを実
行する場合は、先ず、CPU10がROM30から転置
制御データを読み出し、これを暗号処理部40の制御レ
ジスタ41に入力する。制御レジスタ41に入力された
転置制御データは、データバス42、および制御バス4
3を介して、プログラマブルなスイッチマトリクスアレ
イ50に設けてあるレジスタ部51に転送される。レジ
スタ部51に転送された転置制御データによって、スイ
ッチマトリクス部52の入力線と出力線との各交点に設
けられた半導体スイッチが接、断され、入力ビットと出
力ビットの関係が設定される。
When performing the initial transposition process IP in the cryptographic processing unit 40, first, the CPU 10 reads the transposition control data from the ROM 30, and inputs this to the control register 41 of the cryptographic processing unit 40. The transposition control data input to the control register 41 is stored in the data bus 42 and the control bus 4
3, the data is transferred to a register section 51 provided in a programmable switch matrix array 50. With the transposition control data transferred to the register unit 51, the semiconductor switches provided at the respective intersections of the input lines and the output lines of the switch matrix unit 52 are turned on and off, and the relationship between the input bits and the output bits is set.

【0048】図5は、初期転置処理IPにおける、スイ
ッチマトリクス部52の64本の入力線が、どの出力線
に接続されるかを示している。図において縦軸が64ビ
ット分の入力線を示し、各入力線が、横軸に示す出力線
のどのビット線と接続されているかを*印で示してい
る。例えば、入力線の第1ビットは、出力線の第40ビ
ットに接続され、入力線の第2ビットは、出力線の第8
ビットに接続されている。従って、スイッチマトリクス
部52の入力線に入力された第1ビットのデータは出力
線の第40ビットに、また第2ビットに入力されたデー
タは出力線の第8ビットに出力されて転置処理されるこ
とになる。なお、このスイッチマトリクス部52は、6
4本の入力線と64本の出力線が設けられ、各交点に1
個づつ、全体で4096個の半導体スイッチを備えてい
るので、入力されたデータの各ビットをどの出力線に出
力するかを自由に設定することができる。
FIG. 5 shows which output lines are connected to the 64 input lines of the switch matrix unit 52 in the initial transposition process IP. In the figure, the vertical axis indicates an input line for 64 bits, and the * line indicates which bit line of the input line is connected to each input line. For example, the first bit of the input line is connected to the 40th bit of the output line, and the second bit of the input line is connected to the eighth bit of the output line.
Connected to a bit. Therefore, the data of the first bit input to the input line of the switch matrix unit 52 is output to the 40th bit of the output line, and the data input to the second bit is output to the 8th bit of the output line and subjected to transposition processing. Will be. Note that this switch matrix unit 52
There are four input lines and 64 output lines, one at each intersection.
Since 4096 semiconductor switches are provided for each unit, it is possible to freely set to which output line each bit of the input data is output.

【0049】レジスタ部51に転置制御データが転送さ
れ、初期転置処理IPのためのスイッチマトリクス部5
2の設定が完了すると、次いで、CPU10が、暗号化
すべき64ビットの平文データMを、暗号処理部40の
制御レジスタ41に入力する。制御レジスタ41に入力
された64ビットの平文データMは、データバス42、
制御バス43を介して入力データレジスタ44に転送さ
れる。入力データレジスタ44に転送された64ビット
の平文データMは、入力データレジスタ44の出力線に
接続された、プログラマブルなスイッチマトリクスアレ
イ50のスイッチマトリクス部52と、プログラマブル
なRAM(ランダムアクセスメモリ)60と、排他的論
理和演算回路70とに入力され、それぞれの処理結果
が、出力データセレクタ46の入力端子X、Y、および
Zに出力される。ここで、制御レジスタ41にあらかじ
め設定された、演算結果選択データによって、出力デー
タセレクタ46は、転置処理結果Xを選択する。その結
果、制御レジスタ41に入力された64ビットの平文デ
ータMに対する、スイッチマトリクス部52での初期転
置処理IPの処理結果が、出力データセレクタ46から
出力され、データバス42を介して制御レジスト41に
その結果が設定される。同時に入力データレジスタ44
に初期転置処理IPの処理結果が転送される。
The transposition control data is transferred to the register unit 51, and the switch matrix unit 5 for the initial transposition process IP is transferred.
After completing the setting of 2, the CPU 10 inputs the 64-bit plaintext data M to be encrypted to the control register 41 of the encryption processing unit 40. The 64-bit plaintext data M input to the control register 41 is transmitted to the data bus 42,
The data is transferred to the input data register 44 via the control bus 43. The 64-bit plaintext data M transferred to the input data register 44 is connected to the switch matrix section 52 of the programmable switch matrix array 50 connected to the output line of the input data register 44, and a programmable RAM (random access memory) 60. And the exclusive OR operation circuit 70, and the respective processing results are output to the input terminals X, Y and Z of the output data selector 46. Here, the output data selector 46 selects the transposition processing result X according to the operation result selection data set in the control register 41 in advance. As a result, the processing result of the initial transposition processing IP in the switch matrix unit 52 with respect to the 64-bit plaintext data M input to the control register 41 is output from the output data selector 46, and is transmitted via the data bus 42 to the control register 41. Is set to the result. At the same time, the input data register 44
, The processing result of the initial transposition processing IP is transferred.

【0050】次に、制御レジスタ41に設定された初期
転置処理IPの結果は、CPU10が読み出しRAM2
0に記憶させる。このとき、64ビットの初期転置処理
IPの結果は、図4(a)に示すように、上位の32ビ
ットL0 と下位の32ビットR0 の2つに分割されて、
RAM20に記憶される。
Next, the result of the initial transposition process IP set in the control register 41 is read by the CPU 10 and stored in the RAM 2.
0 is stored. At this time, the result of the 64-bit initial transposition process IP is divided into upper 32 bits L0 and lower 32 bits R0, as shown in FIG.
It is stored in the RAM 20.

【0051】次に、CPU10は、鍵コードKに基づい
てあらかじめ生成した系列鍵コードK1 〜K16を用いる
暗号化の主処理を実行する。この主処理は、図4(b)
に示すように、初期転置処理IPを施して得られた結果
の下位の32ビットR0 に対し、先ず、拡大転置処理E
を施し、その結果得られた48ビットのデータと、あら
かじめ生成しておいた48ビットの系列鍵コードK1 と
の排他的論路和を演算し、次に、S1 〜S8 で示される
選択換字処理を施して、32ビットの換字データを得
る。さらに、転置処理Pを施し、その結果と、あらかじ
めらRAM20に記憶しておいた上位の32ビットL0
との排他的論理和を演算し、32ビットのR1 を得てR
AM20に記憶する。一方、あらかじめRAM20に記
憶しておいた下位の32ビットR0 は、次の暗号化処理
の上位32ビットL1 に変換してRAM20に記憶して
おく。次に、前記R1 、L1 とあらかじめ生成しておい
た系列鍵コードK2 を用いて前記と同様な手順でR2 、
L2 を演算する。これらの処理を16回繰り返し、各3
2ビットのR16とL16を得るのが暗号化の主処理であ
る。
Next, the CPU 10 executes main processing of encryption using the sequence key codes K1 to K16 generated in advance based on the key code K. This main processing is shown in FIG.
As shown in the figure, the lower-order 32 bits R0 of the result obtained by performing the initial transposition process IP are first subjected to the expanded transposition process E
To calculate the exclusive logical sum of the 48-bit data obtained as a result and the 48-bit sequence key code K1 generated in advance, and then perform the selective substitution processing represented by S1 to S8. To obtain 32-bit substitution data. Further, a transposition processing P is performed, and the result is compared with the upper 32 bits L0 stored in the RAM 20 in advance.
And exclusive-OR operation to obtain a 32-bit R1
Store in AM20. On the other hand, the lower 32 bits R0 stored in the RAM 20 in advance are converted into the upper 32 bits L1 for the next encryption processing and stored in the RAM 20. Next, using R1 and L1 and the previously generated sequence key code K2, R2,
Calculate L2. These processes are repeated 16 times, and 3
Obtaining 2-bit R16 and L16 is the main processing of encryption.

【0052】図3に示す暗号処理装置では、上記主処理
を以下の手順で実行する。先ず、拡大転置処理Eを実行
するために、ROM30から転置制御データを読み出
し、制御レジスタ41に入力する。前記転置制御データ
は、データバス42、および制御バス43を介して、制
御レジスタ41からプログラマブルなスイッチマトリク
スアレイ50に設けてあるレジスタ部51に転送され
る。レジスタ部51に転送された転置制御データによっ
て、スイッチマトリクス部52の入力線と出力線との各
交点に設けられた半導体スイッチが接、断され、入力ビ
ットと出力ビットの関係が設定される。図6に、拡大転
置処理Eにおけるスイッチマトリクス部52の入力ビッ
トと出力ビットの関係を示す。図6の縦軸は入力ビッ
ト、横軸は出力ビットを示し、例えば、入力データの第
1ビットは、出力線の第2ビットと第48ビットの出力
線に出力される。以下同様に、拡大転置処理Eにおけ
る、縦軸に示す32ビットの入力データが、横軸に示す
48ビットのどの出力線に出力されるかを示している。
すなわち32ビットの入力データが、48ビットに拡
大、つまり、特定の入力ビットが複数の出力線に出力さ
れるとともに、データのビット位置が攪拌される。
In the cryptographic processing apparatus shown in FIG. 3, the main processing is executed in the following procedure. First, in order to execute the enlarged transposition processing E, transposition control data is read from the ROM 30 and input to the control register 41. The transposition control data is transferred from the control register 41 to the register unit 51 provided in the programmable switch matrix array 50 via the data bus 42 and the control bus 43. With the transposition control data transferred to the register unit 51, the semiconductor switches provided at the respective intersections of the input lines and the output lines of the switch matrix unit 52 are turned on and off, and the relationship between the input bits and the output bits is set. FIG. 6 shows a relationship between input bits and output bits of the switch matrix unit 52 in the enlarged transposition processing E. In FIG. 6, the vertical axis indicates input bits and the horizontal axis indicates output bits. For example, the first bit of input data is output to the second and 48th output lines of the output line. Similarly, in the same manner, in the enlargement transposition processing E, it indicates to which output line of 48 bits shown on the vertical axis the 32-bit input data shown on the vertical axis is output.
That is, 32-bit input data is expanded to 48 bits, that is, a specific input bit is output to a plurality of output lines, and the bit position of the data is agitated.

【0053】上記の如くスイッチマトリクス部52の設
定を終えると、CPU10は、RAM20に記憶してお
いた32ビットのR0 を読み出し、制御レジスタ41に
入力する。制御レジスタ41に入力されたR0 は、デー
タバス42、制御バス43を介して入力データレジスタ
44に転送される。入力データレジスタ44に転送され
た32ビットのR0 は、入力データレジスタ44の出力
線に接続された、プログラマブルなスイッチマトリクス
アレイ50のスイッチマトリクス部52と、プログラマ
ブルなRAM(ランダムアクセスメモリ)60と、排他
的論理和演算回路70に入力され、それぞれの処理結果
が、出力データセレクタ46の入力端子X、Y、および
Zに出力される。ここで、制御レジスタ41にあらかじ
め設定された、演算結果選択データによって、出力デー
タセレクタ46は、転置処理結果Xを選択する。その結
果、制御レジスタ41に入力された32ビットのR0 に
対する、スイッチマトリクス部52での拡大転置処理E
の処理結果が、出力データセレクタ46から出力され、
データバス42を介して制御レジスト41に、その処理
結果が設定され、同時に入力データレジスタ44へ拡大
転置処理Eの処理結果が転送される。
When the setting of the switch matrix section 52 is completed as described above, the CPU 10 reads out the 32-bit R 0 stored in the RAM 20 and inputs the read R 0 into the control register 41. R0 input to the control register 41 is transferred to the input data register 44 via the data bus 42 and the control bus 43. The 32-bit R0 transferred to the input data register 44 includes a switch matrix unit 52 of a programmable switch matrix array 50 connected to the output line of the input data register 44, a programmable RAM (random access memory) 60, The result is input to the exclusive OR operation circuit 70, and the respective processing results are output to the input terminals X, Y, and Z of the output data selector 46. Here, the output data selector 46 selects the transposition processing result X according to the operation result selection data set in the control register 41 in advance. As a result, the switch matrix unit 52 enlarges and transposes E to the 32-bit R0 input to the control register 41.
Is output from the output data selector 46,
The processing result is set in the control register 41 via the data bus 42, and at the same time, the processing result of the enlarged transposition processing E is transferred to the input data register 44.

【0054】次に、CPU10は、64ビットの鍵コー
ドKに基づいてあらかじめ生成した各48ビットの系列
鍵コードK1 〜K16のうち、第1の系列鍵コードK1 を
RAM20から読み出し、制御レジスタ41を介して第
2入力レジスタ45に設定する。その結果、排他的論理
和演算回路70において、入力データレジスタ44に転
送されていた転置処理Eの処理結果と第1の系列鍵コー
ドK1 との排他的論理和演算が実行され、出力データセ
レクタ46の入力端子Zに48ビットの演算結果が出力
される。出力データセレクタ46では、制御レジスタ4
1の制御バス43によって、入力端子Zが選択され、出
力データセレクタ46の出力端子に、前記排他的論理和
の演算結果が出力される。この48ビットの演算結果
は、制御レジスタ41に設定されるとともに、入力デー
タレジスタ44へ転送される。次いで、制御レジスタ4
1に設定された排他的論理和の演算結果を、CPU10
が読み出し、RAM20に記憶する。
Next, the CPU 10 reads the first sequence key code K1 from the RAM 20 among the 48-bit sequence key codes K1 to K16 generated in advance based on the 64-bit key code K from the RAM 20, and reads the control register 41. Via the second input register 45 via As a result, in the exclusive OR operation circuit 70, an exclusive OR operation of the processing result of the transposition processing E transferred to the input data register 44 and the first sequence key code K1 is executed, and the output data selector 46 A 48-bit operation result is output to the input terminal Z of the. In the output data selector 46, the control register 4
The input terminal Z is selected by one control bus 43, and the result of the exclusive OR operation is output to the output terminal of the output data selector 46. The 48-bit operation result is set in the control register 41 and transferred to the input data register 44. Next, the control register 4
The result of the exclusive OR operation set to 1 is sent to the CPU 10
Is read out and stored in the RAM 20.

【0055】次に、CPU10は、図4(b)に示す換
字処理Sを実行する。換字処理Sは、48ビットの入力
データに対して32ビットの攪拌された出力データを得
るものであり、具体的には、入力される48ビットのデ
ータを6ビットづつ8ブロックに分割し、S1 〜S8 か
らなる選択換字処理にて、前記6ビットのデータをそれ
ぞれ4ビットの別のデータに変換し、4ビット×8ブロ
ック=32ビットのデータを得る。この換字処理は、図
3に示すプログラマブルなRAM(ランダムアクセスメ
モリ)60を用いて実行する処理である。
Next, the CPU 10 executes a substitution process S shown in FIG. The substitution process S is to obtain 32-bit mixed output data from 48-bit input data. Specifically, the input 48-bit data is divided into 8 blocks of 6 bits each, and S1 The 6-bit data is converted into another 4-bit data by the selective substitution process consisting of .about.S8 to obtain 4 bits.times.8 blocks = 32 bits. This substitution process is a process executed using a programmable RAM (random access memory) 60 shown in FIG.

【0056】本実施例の暗号処理装置では、前記換字処
理Sを次の手順で実行する。すなわち、先ず、RAM6
0に、あらかじめ決められた換字制御データを書き込
み、次いで、入力データレジスタ44に6ビットの換字
元データを設定する。前記入力データレジスタ44の出
力端子は、RAM60のアドレス制御線に接続してあ
り、入力データレジスタ44に設定された6ビットの換
字元データは、RAM60のアドレス入力線に印加され
る。RAM60には、6ビットのアドレス入力線の対応
する番地に所定の換字データが書き込まれており、この
換字データがRAM60のデータ出力線に出力され、出
力データセレクタ46の入力端子Yに入力される。な
お、本実施例の暗号処理部40に設けたRAM60は、
8ビットのアドレス入力線と8ビットのデータ出力線を
備えているが、DESの換字処理Sを実行する場合は、
アドレス入力線の下位の6ビット、およびデータ出力線
の下位の4ビットが有効な信号となる。
In the encryption processing device of this embodiment, the substitution process S is executed in the following procedure. That is, first, the RAM 6
The predetermined substitution control data is written in 0, and then 6-bit substitution original data is set in the input data register 44. The output terminal of the input data register 44 is connected to an address control line of the RAM 60, and the 6-bit substitution original data set in the input data register 44 is applied to the address input line of the RAM 60. In the RAM 60, predetermined substitution data is written at the corresponding address of the 6-bit address input line, and this substitution data is output to the data output line of the RAM 60 and input to the input terminal Y of the output data selector 46. . The RAM 60 provided in the encryption processing unit 40 of the present embodiment is
Although it has an 8-bit address input line and an 8-bit data output line, when performing the DES substitution process S,
The lower 6 bits of the address input line and the lower 4 bits of the data output line are valid signals.

【0057】例えば、前述した排他的論理和の演算結果
を換字処理する場合は、CPU10が、先ず、RAM2
0に格納した48ビットのデータを8ブロックに分割
し、それぞれ6ビットの換字元データを生成する。次
に、選択換字処理S1 に用いる換字制御データをROM
30から読み出して、暗号処理部40の制御レジスタ4
1へ入力する。制御レジスタ41へ入力された換字制御
データは、データバス42、および制御バス43を介し
て、RAM60に転送される。次いで、先に生成した6
ビットの換字元データを、RAM20から読み出して、
暗号処理部40の制御レジスタ41へ入力する。制御レ
ジスタ41へ入力された換字元データは、データバス4
2、および制御バス43を介して、入力データレジスタ
44に転送される。
For example, when performing the substitution process on the result of the exclusive OR operation, the CPU 10
The 48-bit data stored in 0 is divided into 8 blocks, and 6-bit substitution original data is generated. Next, the substitution control data used for the selected substitution processing S1 is stored in the ROM.
30 and read from the control register 4 of the cryptographic processing unit 40.
Enter 1 The substitution control data input to the control register 41 is transferred to the RAM 60 via the data bus 42 and the control bus 43. Then, the previously generated 6
The bit substitution source data is read from the RAM 20 and
It is input to the control register 41 of the encryption processing unit 40. Substitution original data input to the control register 41 is transmitted to the data bus 4
2, and transferred to the input data register 44 via the control bus 43.

【0058】この処理の結果、6ビットの換字元データ
に対応する換字データがRAM60から出力され、出力
データセレクタ46の入力端子Yに入力される。ここ
で、制御レジスタ41にあらかじめ設定された、演算結
果選択データによって、出力データセレクタ46は、換
字処理結果Yを選択する。その結果、制御レジスタ41
に入力された6ビットの換字元データに対する、4ビッ
トの換字データが、出力データセレクタ46から出力さ
れ、データバス42を介して制御レジスト41に、その
処理結果が設定される。次いで、CPU10が、制御レ
ジスト41に設定された、4ビットの換字データを読み
出しRAM20に一旦格納する。
As a result of this processing, substitution data corresponding to the 6-bit substitution original data is output from the RAM 60 and input to the input terminal Y of the output data selector 46. Here, the output data selector 46 selects the substitution processing result Y according to the operation result selection data set in the control register 41 in advance. As a result, the control register 41
Is output from the output data selector 46 with respect to the 6-bit substitution original data input to the control register 41, and the processing result is set in the control register 41 via the data bus 42. Next, the CPU 10 reads the 4-bit substitution data set in the control register 41 and temporarily stores it in the RAM 20.

【0059】CPU10は、選択換字処理S1 〜S8 に
対応する前記処理を8回繰り返し、あらかじめ8ブロッ
クに分割した、各6ビットの換字元データに対する、そ
れぞれ4ビットの換字データを得る。次に、CPU10
は、得られた4ビットの換字データを合成して32ビッ
トの換字データを得、RAM20に記憶しておく。
The CPU 10 repeats the above processing corresponding to the selection substitution processing S1 to S8 eight times, and obtains 4-bit substitution data for each 6-bit substitution original data divided in advance into 8 blocks. Next, the CPU 10
Synthesizes the obtained 4-bit substitution data to obtain 32-bit substitution data and stores it in the RAM 20.

【0060】次に、CPU10は、図4(b)に示す転
置処理Pを実行する。転置処理Pは、32ビットの入力
データに対して32ビットの攪拌された出力データを得
るものである。この処理は、前述した拡大転置処理Eと
同様に、暗号処理部40のプログラマブルなスイッチマ
トリクスアレイ50にて実行される処理である。このと
き、レジスタ部51に設定される転置制御データによっ
て制御される、スイッチマトリクス部52の入力線と出
力線の接、断状態を図7に示す。図7の例では、入力さ
れる第1ビットのデータが出力線の第9ビットに、また
入力ビットの第2ビットが出力線の第17ビットに出力
されることを示し、以下同様に、縦軸に示す32ビット
の入力データが、横軸に示す32ビットのどの出力線に
出力されるかを示している。
Next, the CPU 10 executes a transposition process P shown in FIG. The transposition process P is to obtain 32-bit mixed output data for 32-bit input data. This process is a process executed by the programmable switch matrix array 50 of the encryption processing unit 40, similarly to the above-described enlarged transposition process E. At this time, FIG. 7 shows the connection and disconnection states of the input and output lines of the switch matrix unit 52, which are controlled by the transposition control data set in the register unit 51. The example of FIG. 7 shows that the input first bit data is output to the ninth bit of the output line, and the second bit of the input bit is output to the 17th bit of the output line. It indicates to which output line of 32 bits shown on the horizontal axis the 32-bit input data shown on the axis is output.

【0061】転置処理Pにおいては、先ず、CPU10
がROM30から転置制御データを読み出し、暗号処理
部40の制御レジスタ41に前記転置制御データを入力
する。制御レジスタ41に入力された転置制御データ
は、プログラマブルなスイッチマトリクスアレイ50の
レジスタ部51に転送され、前記レジスタ部51の出力
データによって、スイッチマトリクス部52の入力線と
出力線の各交点に設けられた半導体スイッチが接、断さ
れる。次に、CPU10がRAM20に格納しておい
た、換字処理Sを施した32ビットの換字データを読み
出し、暗号処理部40の制御レジスタ41に前記換字デ
ータを入力する。制御レジスタ41に入力された換字デ
ータは、データバス42、および制御バス43を介し
て、制御レジスタ41から入力データレジスタ44に転
送される。
In the transposition process P, first, the CPU 10
Reads the transposition control data from the ROM 30 and inputs the transposition control data to the control register 41 of the encryption processing unit 40. The transposition control data input to the control register 41 is transferred to the register unit 51 of the programmable switch matrix array 50, and provided at each intersection of the input line and the output line of the switch matrix unit 52 by the output data of the register unit 51. The connected semiconductor switch is connected and disconnected. Next, the CPU 10 reads the 32-bit substitution data that has been subjected to the substitution processing S and stored in the RAM 20, and inputs the substitution data to the control register 41 of the encryption processing unit 40. The substitution data input to the control register 41 is transferred from the control register 41 to the input data register 44 via the data bus 42 and the control bus 43.

【0062】入力データレジスタ44に転送された32
ビットの換字データは、入力データレジスタ44の出力
線に接続された、プログラマブルなスイッチマトリクス
アレイ50のスイッチマトリクス部52と、プログラマ
ブルなRAM(ランダムアクセスメモリ)60と、排他
的論理和演算回路70に入力され、それぞれの処理結果
が、出力データセレクタ46の入力端子X、Y、および
Zに出力される。ここで、制御レジスタ41にあらかじ
め設定された、演算結果選択データによって、出力デー
タセレクタ46は、転置処理結果Xを選択する。その結
果、制御レジスタ41に入力された32ビットの換字デ
ータに対する、スイッチマトリクス部52での転置処理
Pの処理結果が、出力データセレクタ46から出力さ
れ、データバス42を介して制御レジスト41に、その
処理結果が設定され、同時に入力データレジスタ44へ
転置処理Pの処理結果が転送される。
32 transferred to the input data register 44
The bit substitution data is supplied to the switch matrix unit 52 of the programmable switch matrix array 50 connected to the output line of the input data register 44, the programmable RAM (random access memory) 60, and the exclusive OR operation circuit 70. The input and the respective processing results are output to the input terminals X, Y, and Z of the output data selector 46. Here, the output data selector 46 selects the transposition processing result X according to the operation result selection data set in the control register 41 in advance. As a result, the processing result of the transposition processing P in the switch matrix unit 52 with respect to the 32-bit substitution data input to the control register 41 is output from the output data selector 46 and transmitted to the control resist 41 via the data bus 42. The processing result is set, and at the same time, the processing result of the transposition processing P is transferred to the input data register 44.

【0063】次に、CPU10は、図4(b)に示すよ
うに、転置処理Pの処理結果と、あらかじめRAM20
に格納しておいた32ビットのL0 との排他的論理和を
演算し、32ビットの暗号化データR1 を得る。前記排
他的論理和の演算処理は、拡大転置処理Eの処理結果
と、系列鍵コードK1 との排他的論理和の演算処理と同
様の手順で実行される。この排他的論理和の演算処理
は、暗号処理部40の排他的論理和演算回路70で行わ
れる処理である。先ず、CPU10は、RAM20に格
納しておいた32ビットのL0 を読み出し、制御レジス
タ41を介して、入力データレジスタ45に32ビット
のL0 を設定する。
Next, as shown in FIG. 4B, the CPU 10 stores the processing result of the transposition processing P and the RAM 20 in advance.
The exclusive-OR operation with the 32-bit L0 stored in is performed to obtain 32-bit encrypted data R1. The exclusive OR operation is performed in the same procedure as the exclusive OR operation of the processing result of the extended transposition E and the sequence key code K1. This exclusive OR operation is a process performed by the exclusive OR operation circuit 70 of the encryption processing unit 40. First, the CPU 10 reads the 32-bit L0 stored in the RAM 20, and sets the 32-bit L0 in the input data register 45 via the control register 41.

【0064】その結果、排他的論理和演算回路70にお
いて、入力データレジスタ44に転送されていた転置処
理Pの処理結果と、入力データレジスタ45に転送され
た32ビットのL0 との排他的論理和演算が実行され、
出力データセレクタ46の入力端子Zに32ビットの演
算結果R1 が出力される。出力データセレクタ46で
は、制御レジスタ41の制御バス43によって、入力端
子Zが選択され、出力データセレクタ46の出力端子
に、前記排他的論理和の演算結果R1 が出力される。こ
の32ビットの演算結果は、制御レジスタ41に設定さ
れるとともに、入力データレジスタ44へ転送される。
次いで、制御レジスタ41に設定された排他的論理和の
演算結果R1 を、CPU10が読み出し、RAM20に
記憶する。さらに、RAM20に記憶されていた32ビ
ットのR0 を、次の暗号化処理のデータL1 として記憶
しておく。
As a result, in the exclusive OR operation circuit 70, the processing result of the transposition processing P transferred to the input data register 44 and the 32-bit L0 transferred to the input data register 45 are exclusive ORed. The operation is performed,
A 32-bit operation result R1 is output to the input terminal Z of the output data selector 46. In the output data selector 46, the input terminal Z is selected by the control bus 43 of the control register 41, and the operation result R1 of the exclusive OR is output to the output terminal of the output data selector 46. The 32-bit operation result is set in the control register 41 and transferred to the input data register 44.
Next, the CPU 10 reads the exclusive OR operation result R1 set in the control register 41 and stores it in the RAM 20. Further, the 32-bit R0 stored in the RAM 20 is stored as data L1 for the next encryption processing.

【0065】以上で、図4(b)に示した暗号化の主処
理を1回実行したことになる。DESの暗号化処理で
は、上記で得られた32ビットのR1 、L1 、およびあ
らかじめ生成した48ビットの系列鍵コードK2 に基づ
いて、上記と同様な手順で、32ビットのR2 、L2 を
得る。同様に、R2 、L2 、およびK3 を用いてR3 、
L3 を得る。DESでは、図4(b)に示した暗号化の
主処理において、上述した処理を16回繰り返し、暗号
化データR16およびL16を得る。
Thus, the main processing of the encryption shown in FIG. 4B has been executed once. In the DES encryption process, 32-bit R2 and L2 are obtained by the same procedure as described above, based on the 32-bit R1 and L1 obtained above and the 48-bit sequence key code K2 generated in advance. Similarly, using R2, L2, and K3, R3,
Get L3. In the DES, in the main processing of the encryption shown in FIG. 4B, the above processing is repeated 16 times to obtain encrypted data R16 and L16.

【0066】最後に、CPU10は、上記主処理で得ら
れた各32ビットのR16およびL16を用いて、図4
(c)に示す逆初期転置処理IP-1を実行し、暗号文デ
ータCを得る。この処理は、前述した各種転置処理と同
様に、暗号処理部40のプログラマブルなスイッチマト
リクスアレイ50にて行われる処理である。図7は、逆
初期転置処理IP-1におけるスイッチマトリック部52
の入力ビットと出力ビットの関係を示す。縦軸は入力デ
ータのビット位置を示し、横軸は出力データのビット位
置を示している。例えば、入力データの第1ビットは、
出力線の第58ビットに出力される。また入力データの
第2ビットは、出力線の第50ビットに出力される。初
期転置処理IP-1では、前記主処理で得られた各32ビ
ットのR16およびL16を合成し、64ビットのデータを
構成し、このデータをスイッチマトリック部52に入力
して、攪拌された64ビットの暗号文データCを得る。
Finally, the CPU 10 uses the 32-bit R16 and L16 obtained in the main processing described above to execute FIG.
The reverse initial transposition process IP- 1 shown in (c) is executed to obtain ciphertext data C. This process is a process performed by the programmable switch matrix array 50 of the encryption processing unit 40, similarly to the above-described various transposition processes. FIG. 7 shows the switch matrix unit 52 in the inverse initial transposition process IP- 1 .
Shows the relationship between the input bits and the output bits. The vertical axis indicates the bit position of the input data, and the horizontal axis indicates the bit position of the output data. For example, the first bit of the input data is
It is output to the 58th bit of the output line. The second bit of the input data is output to the 50th bit of the output line. In the initial transposition process IP- 1 , the 32-bit R16 and L16 obtained in the main process are combined to form 64-bit data. Bit ciphertext data C is obtained.

【0067】この逆初期転置処理IP-1では、CPU1
0は、先ず、ROM30に記憶されている転置制御デー
タを読み出し、暗号処理部40の制御レジスタ41に前
記転置制御データを入力する。制御レジスタ41に入力
された転置制御データは、プログラマブルなスイッチマ
トリクスアレイ50のレジスタ部51に転送され、前記
レジスタ部51の出力データによって、スイッチマトリ
クス部52の入力線と出力線の各交点に設けられた半導
体スイッチが接、断される。次に、CPU10がRAM
20に格納しておいた、各32ビットの暗号化データR
16およびL16を読み出し、これを合成して64ビットの
暗号化データを構成する。次いで、この64ビットの暗
号化データを、暗号処理部40の制御レジスタ41に入
力する。制御レジスタ41に入力された暗号化データ
は、データバス42、および制御バス43を介して、制
御レジスタ41から入力データレジスタ44に転送され
る。
In the reverse initial transposition process IP- 1 , the CPU 1
0 first reads the transposition control data stored in the ROM 30 and inputs the transposition control data to the control register 41 of the encryption processing unit 40. The transposition control data input to the control register 41 is transferred to the register unit 51 of the programmable switch matrix array 50, and provided at each intersection of the input line and the output line of the switch matrix unit 52 by the output data of the register unit 51. The connected semiconductor switch is connected and disconnected. Next, the CPU 10
20 stored in 32-bit encrypted data R
16 and L16 are read and combined to form 64-bit encrypted data. Next, the 64-bit encrypted data is input to the control register 41 of the encryption processing unit 40. The encrypted data input to the control register 41 is transferred from the control register 41 to the input data register 44 via the data bus 42 and the control bus 43.

【0068】入力データレジスタ44に転送された64
ビットの暗号化データは、入力データレジスタ44の出
力線に接続された、プログラマブルなスイッチマトリク
スアレイ50のスイッチマトリクス部52と、プログラ
マブルなRAM(ランダムアクセスメモリ)60と、排
他的論理和演算回路70とに入力され、それぞれの処理
結果が、出力データセレクタ46の入力端子X、Y、お
よびZに出力される。ここで、制御レジスタ41にあら
かじめ設定された、演算結果選択データによって、出力
データセレクタ46は、転置処理結果Xを選択する。そ
の結果、制御レジスタ41に入力された64ビットの暗
号化データに対する、スイッチマトリクス部52での逆
初期転置処理IP-1の処理結果が、出力データセレクタ
46から出力され、データバス42を介して制御レジス
ト41にその結果が設定される。CPU10は、制御レ
ジスト41に設定された逆初期転置処理IP-1の処理結
果を読み出し、暗号文データCを得る。
The 64 transferred to the input data register 44
The bit encrypted data is connected to the output line of the input data register 44, the switch matrix section 52 of the programmable switch matrix array 50, the programmable RAM (random access memory) 60, and the exclusive OR operation circuit 70. And the respective processing results are output to the input terminals X, Y, and Z of the output data selector 46. Here, the output data selector 46 selects the transposition processing result X according to the operation result selection data set in the control register 41 in advance. As a result, the processing result of the inverse initial transposition processing IP- 1 in the switch matrix unit 52 with respect to the 64-bit encrypted data input to the control register 41 is output from the output data selector 46, and is output via the data bus 42. The result is set in the control resist 41. The CPU 10 reads the processing result of the reverse initial transposition processing IP- 1 set in the control register 41, and obtains the ciphertext data C.

【0069】以上に述べた暗号処理装置の一連の処理動
作によって、64ビットの平文データMに対するDES
による64ビットの暗号文データCを得ることができ
る。
By the series of processing operations of the cryptographic processing apparatus described above, the DES
, The 64-bit ciphertext data C can be obtained.

【0070】なお、上記説明では、暗号化に用いる64
ビットの鍵コードKから、暗号化の主処理で用いる、各
48ビットで構成された16種類の系列鍵コードK1 〜
K16の生成については、詳しく触れなかったが、図4に
示した64ビットの平文データMの暗号化処理を行う前
に、暗号処理部40のプログラマブルなスイッチマトリ
クスアレイ50を用いて、縮約転置処理PC1を実行
し、さらに、実質的に左巡回シフトと同等な転置処理、
および縮約転置処理PC2を繰り返し実行することによ
って、16種類の系列鍵コードK1 〜K16を得ることが
できる。それを一旦RAM20に格納しておき、平文デ
ータMの暗号化処理を実行するとき、RAM20から、
順次系列鍵コードK1 〜K16を読み出して用いることに
より、DESの暗号化を実現できる。
In the above description, 64 used for encryption is used.
From the bit key code K, 16 kinds of series key codes K1 to K2 each composed of 48 bits, which are used in the main processing of encryption, are used.
Although the generation of K16 is not described in detail, before performing the encryption processing of the 64-bit plaintext data M shown in FIG. 4, the reduced transpose is performed using the programmable switch matrix array 50 of the encryption processing unit 40. The processing PC1 is executed, and further, transposition processing substantially equivalent to the left cyclic shift,
By repeatedly executing the contracted transposition process PC2, 16 types of series key codes K1 to K16 can be obtained. It is stored once in the RAM 20 and when the plaintext data M is encrypted,
By sequentially reading and using the sequence key codes K1 to K16, DES encryption can be realized.

【0071】また、上記実施例では、64ビットで構成
された1つの平文データを64ビットの暗号文に変換す
る場合について説明したが、本実施例の暗号処理装置で
は、複数の平文データを同時並行処理で、それぞれ暗号
文データに変換することができる。もちろん、暗号処理
に用いる鍵コードは、同一であることが前提である。例
えば、複数の平文データM1〜Mnを、複数の暗号文デ
ータC1〜Cnに変換する場合の暗号処理装置の動作は
以下のようになる。
Further, in the above-described embodiment, the case where one plaintext data composed of 64 bits is converted into a 64-bit ciphertext has been described. In parallel processing, each can be converted into ciphertext data. Of course, it is assumed that the key codes used for the encryption processing are the same. For example, the operation of the cryptographic processing device when converting a plurality of plaintext data M1 to Mn into a plurality of ciphertext data C1 to Cn is as follows.

【0072】先ず、64ビットの鍵コードKから生成さ
れた、各48ビットで構成された16種類の系列鍵コー
ドK1 〜K16が、図3に示す暗号処理装置のRAM20
にあらかじめ格納されているものとする。また、平文デ
ータM1〜MnもRAM20にあらかじめ格納されてい
るものとする。さらに、暗号処理装置のROM30に
は、初期転置処理IP、拡大転置処理E、転置処理P、
逆処理転置処理IP-1などの各転置制御データ、および
選択換字処理S1 〜S8 の各換字制御データが格納され
ているものとする。
First, 16 kinds of sequence key codes K1 to K16 each composed of 48 bits generated from the 64-bit key code K are stored in the RAM 20 of the cryptographic processing apparatus shown in FIG.
In advance. The plaintext data M1 to Mn are also stored in the RAM 20 in advance. Further, in the ROM 30 of the cryptographic processing device, an initial transposition process IP, an enlarged transposition process E, a transposition process P,
It is assumed that the transposition control data such as the inverse processing transposition processing IP- 1 and the respective substitution control data of the selected substitution processing S1 to S8 are stored.

【0073】複数の平文データM1〜Mnを、複数の暗
号文データC1〜Cnに変換する場合、先ず、CPU1
0が、ROM30に格納されている初期転置処理IPの
転置制御データを読み出し、暗号処理部40の制御レジ
スタ41に入力する。入力された転置制御データはレジ
スタ部51に転送され、初期転置処理IPのためのスイ
ッチマトリクス部52の設定が完了する。
When converting a plurality of plaintext data M1 to Mn into a plurality of ciphertext data C1 to Cn, first, the CPU 1
0 reads the transposition control data of the initial transposition processing IP stored in the ROM 30 and inputs the read data to the control register 41 of the encryption processing unit 40. The input transposition control data is transferred to the register unit 51, and the setting of the switch matrix unit 52 for the initial transposition process IP is completed.

【0074】次いで、CPU10が、暗号化すべき64
ビットの平文データMx(1≦x≦n)を、順次、暗号
処理部40の制御レジスタ41に入力する。制御レジス
タ41に入力された64ビットの平文データMxは、デ
ータバス42、制御バス43を介して入力データレジス
タ44に転送される。入力データレジスタ44に転送さ
れた64ビットの平文データMxは、入力データレジス
タ44の出力線に接続された、プログラマブルなスイッ
チマトリクスアレイ50のスイッチマトリクス部52に
入力され、初期転置処理IPの処理結果が、出力データ
セレクタ46の入力端子Xに順次出力される。
Next, the CPU 10 transmits the 64
Bit plaintext data Mx (1 ≦ x ≦ n) is sequentially input to the control register 41 of the encryption processing unit 40. The 64-bit plaintext data Mx input to the control register 41 is transferred to the input data register 44 via the data bus 42 and the control bus 43. The 64-bit plaintext data Mx transferred to the input data register 44 is input to the switch matrix unit 52 of the programmable switch matrix array 50 connected to the output line of the input data register 44, and the processing result of the initial transposition process IP Are sequentially output to the input terminal X of the output data selector 46.

【0075】ここで、制御レジスタ41にあらかじめ設
定された、演算結果選択データによって、出力データセ
レクタ46は、転置処理結果Xを選択する。その結果、
制御レジスタ41に入力された64ビットの平文データ
Mxに対する、スイッチマトリクス部52での初期転置
処理IPの処理結果が、出力データセレクタ46から順
次出力され、データバス42を介して制御レジスト41
にその結果が設定される。
Here, the output data selector 46 selects the transposition processing result X according to the operation result selection data set in the control register 41 in advance. as a result,
The processing result of the initial transposition processing IP in the switch matrix unit 52 with respect to the 64-bit plaintext data Mx input to the control register 41 is sequentially output from the output data selector 46, and is output via the data bus 42 to the control register 41.
Is set to the result.

【0076】この間、CPU10は、平文データMx
(1≦x≦n)を、順次、暗号処理部40の制御レジス
タ41に入力する都度、制御レジスト41に設定される
初期転置処理IPの処理結果を読み出しRAM20に格
納する。つまり、初期転置処理IPを実行するための転
置制御データを、最初に一度だけ、暗号処理部40のレ
ジスタ部51に転送するだけで、複数の平文データM1
〜Mnに対する初期転置処理IPを連続して実行するこ
とができる。
During this time, the CPU 10 sends the plaintext data Mx
Each time (1 ≦ x ≦ n) is sequentially input to the control register 41 of the encryption processing unit 40, the processing result of the initial transposition processing IP set in the control register 41 is read and stored in the RAM 20. That is, the transposition control data for executing the initial transposition process IP is first transferred only once to the register unit 51 of the encryption processing unit 40, and the plurality of plaintext data M1
To the Mn can be continuously executed.

【0077】図4(b)に示した暗号処理の主処理にお
いても、上記初期転置処理IPと同様に、例えば、拡大
転置処理Eを実行する場合は、最初に、転置制御データ
を暗号処理部40のレジスタ部51に転送し、拡大転置
処理Eのためのスイッチマトリクス部52の設定を行
う。次に、複数の平文データM1〜Mnに対応する32
ビットのR0X(1≦x≦n)を、RAM20から順次読
み出し、暗号処理部40の制御レジスタ41を介して入
力データレジスタ44に転送する都度、スイッチマトリ
クス部52における拡大転置処理Eの処理結果を、出力
データセレクタ46および制御レジスタ41を介して読
み出し、RAM20に順次格納する。
In the main processing of the encryption processing shown in FIG. 4B, similarly to the above-described initial transposition processing IP, for example, when the extended transposition processing E is executed, first, the transposition control data is transmitted to the encryption processing unit. The data is transferred to the register unit 51, and the switch matrix unit 52 for the enlarged transposition processing E is set. Next, 32 corresponding to the plurality of plaintext data M1 to Mn.
Each time the bit R0X (1 ≦ x ≦ n) is sequentially read from the RAM 20 and transferred to the input data register 44 via the control register 41 of the encryption processing unit 40, the processing result of the enlarged transposition processing E in the switch matrix unit 52 is read. , Via the output data selector 46 and the control register 41, and sequentially stored in the RAM 20.

【0078】以下同様に、図4(b)に示す系列鍵コー
ドKn (1≦n≦16)との排他的論理和演算を実行す
る場合は、RAM20にあらかじめ格納してある系列鍵
コードKn を読み出して、暗号処理部40の制御レジス
タ41を介して入力データレジスタ45に転送する。次
に、複数の平文データM1〜Mnに対応する48ビット
の拡大転置処理Eの処理結果を、RAM20から順次読
み出し、暗号処理部40の制御レジスタ41を介して入
力データレジスタ44に転送する都度、排他的論理和演
算回路70による演算結果を、出力データセレクタ46
および制御レジスタ41を介して読み出し、RAM20
に順次格納する。
Similarly, when performing an exclusive OR operation with the sequence key code Kn (1 ≦ n ≦ 16) shown in FIG. 4B, the sequence key code Kn stored in the RAM 20 in advance is used. The data is read and transferred to the input data register 45 via the control register 41 of the encryption processing unit 40. Next, each time the processing result of the 48-bit enlarged transposition processing E corresponding to the plurality of plaintext data M1 to Mn is sequentially read from the RAM 20 and transferred to the input data register 44 via the control register 41 of the encryption processing unit 40, The operation result of the exclusive OR operation circuit 70 is output to the output data selector 46.
And read out via the control register 41,
Are stored sequentially.

【0079】また、同様に、図4(b)に示す選択換字
処理S1 〜S8 を実行する場合は、先ず最初に、ROM
30に格納してある換字制御データを読み出し、暗号処
理部40の制御レジスタ41を介して換字処理用のRA
M60に転送する。次に、複数の平文データM1〜Mn
に対応する48ビットの排他的論理和の演算結果を、そ
れぞれ8ブロックに分割した各6ビットの換字元データ
を、RAM20から順次読み出し、暗号処理部40の制
御レジスタ41を介して入力データレジスタ44に転送
する。次いで、換字処理用のRAM60にて得られた換
字データを、出力データセレクタ46および制御レジス
タ41を介して読み出し、RAM20に順次格納する。
Similarly, in the case where the selective substitution processing S1 to S8 shown in FIG.
The substituting control data stored in the subroutine 30 is read out, and the RA for the substituting process is
Transfer to M60. Next, a plurality of plaintext data M1 to Mn
The 6-bit substitution original data obtained by dividing the operation result of the exclusive OR of 48 bits corresponding to the data into 8 blocks is sequentially read out from the RAM 20 and input to the input data register 44 via the control register 41 of the encryption processing unit 40. Transfer to Next, the substitution data obtained in the substitution RAM 60 is read out via the output data selector 46 and the control register 41 and is sequentially stored in the RAM 20.

【0080】上記と同様な手順で、転置処理Pや、転置
処理Pの処理結果と暗号化データの上位32ビットLn-
1 (1≦n≦16)との排他的論理和演算、および逆初
期転置処理IP-1を実行することによって、同時並行処
理で複数の平文データM1〜Mnから暗号文データC1
〜Cnを得ることができる。すなわち、前述の動作手順
に従えば、図3に示すような簡単な構造の暗号処理部で
あっても、転置制御データの書き換え処理や、換字制御
データの書き換え回数を必要最小限にとどめることがで
き、長文のデータの暗号処理を、実用的に十分な処理速
度で実行することができる。
In the same procedure as above, the transposition processing P, the processing result of the transposition processing P and the upper 32 bits Ln-
By performing an exclusive OR operation with 1 (1 ≦ n ≦ 16) and the inverse initial transposition process IP −1 , the ciphertext data C1 is converted from the plurality of plaintext data M1 to Mn in a concurrent parallel process.
~ Cn can be obtained. That is, according to the above-described operation procedure, even in the encryption processing unit having a simple structure as shown in FIG. 3, it is possible to minimize the number of rewriting processes of the transposition control data and the number of rewriting of the substitution control data. As a result, the encryption processing of long-text data can be executed at a practically sufficient processing speed.

【0081】以上の説明において、本実施例の暗号処理
装置における、平文データを暗号文データに変換する暗
号化処理について例示したが、暗号文データを解読文デ
ータに変換する復号化処理にも、本実施例の暗号処理装
置を適用できるものであることは、容易に推量できるの
で、復号化処理に関する詳細な説明は省略する。
In the above description, the encryption processing for converting the plaintext data to the ciphertext data in the cryptographic processing apparatus of the present embodiment has been exemplified. However, the decryption processing for converting the ciphertext data to the decrypted text data is also applicable. Since it can be easily guessed that the cryptographic processing apparatus of the present embodiment can be applied, detailed description on the decryption processing is omitted.

【0082】(他の実施例)なお、上記実施例の暗号処
理装置では、ROMに組み込まれた暗号処理制御プログ
ラムと暗号処理制御データとを用いて、CPU10で示
される演算制御装置を駆動し、転置処理手段および換字
処理手段を備えた暗号処理部を制御したが、前記暗号処
理プログラムや暗号処理制御データを固定磁気ディスク
や、フロッピディスクなどの記憶媒体に記録しておき、
それをRAMに読み出して暗号処理を実行するようにし
てもよい。
(Other Embodiments) In the cryptographic processing apparatus of the above embodiment, the arithmetic and control unit indicated by the CPU 10 is driven by using the cryptographic processing control program and the cryptographic processing control data incorporated in the ROM. Controlling the encryption processing unit provided with transposition processing means and substitution processing means, but the encryption processing program and encryption processing control data are recorded on a storage medium such as a fixed magnetic disk or a floppy disk,
It may be read out to the RAM to execute the encryption process.

【0083】また、本実施例の暗号処理部は、転置処理
手段を64ビット入力、64ビット出力として構成した
が、32ビット入出力や、128ビット入出力、256
ビット入出力に変更することもできる。同様に換字処理
手段を8ビット入力、8ビット出力として構成したが、
処理ビット単位を何等制約するものではない。例えば、
6ビット入力、4ビット出力で構成したり、あるいは1
2ビット入力、8ビット出力で構成し、選択換字処理S
1とS2、S3とS4、S5とS6、またはS7とS8
を、それぞれ同時に処理するように構成してもよい。さ
らに、本実施例では、暗号処理部に排他的論理和演算回
路を設けたが、これは、CPU10で示した演算制御装
置自身の有する排他的論理和演算命令を用いて演算処理
するように構成してもよい。
In the encryption processing unit of this embodiment, the transposition processing means is configured as a 64-bit input and a 64-bit output.
It can be changed to bit input / output. Similarly, the substitution processing means is configured as an 8-bit input and an 8-bit output.
It does not restrict the processing bit unit at all. For example,
6-bit input, 4-bit output, or 1
It is composed of 2-bit input and 8-bit output.
1 and S2, S3 and S4, S5 and S6, or S7 and S8
May be simultaneously processed. Further, in the present embodiment, an exclusive OR operation circuit is provided in the cryptographic processing unit. However, this is configured so as to perform an operation using an exclusive OR operation instruction of the operation control device itself shown by the CPU 10. May be.

【0084】なお、以上の説明では、DESの暗号処理
の場合について説明したが、FEALの暗号処理も本実
施例の暗号処理装置を用いて実行することができる。例
えば、FEALでは、左巡回シフトや剰余演算が行われ
るが、巡回シフトは実質的に転置処理手段を用いること
で実現することができ、また、剰余演算は実質的に換字
処理で代用演算することができる。また、DESの暗号
処理における転置処理や換字処理の制御データを、暗号
処理部の外部に設けたROMに記憶させる構成にしてあ
るので、本実施例で示した転置制御データや換字制御デ
ータを変更することも容易であり、すなわち、本発明の
暗号処理装置は多様な暗号方式に対応可能である。
In the above description, the case of the DES encryption processing has been described. However, the FEAL encryption processing can also be executed by using the encryption processing apparatus of this embodiment. For example, in FEAL, left cyclic shift and remainder operation are performed, but cyclic shift can be substantially realized by using transposition processing means. In addition, remainder operation is substantially equivalent to substitution operation by substitution processing. Can be. Also, since the control data for the transposition processing and the substitution processing in the DES encryption processing is stored in a ROM provided outside the encryption processing unit, the transposition control data and the substitution control data shown in the present embodiment are changed. That is, the cryptographic processing device of the present invention can support various cryptosystems.

【0085】[0085]

【発明の効果】以上詳細に説明した如く本発明の暗号処
理装置は、請求項1に示すように、任意の転置処理を実
行するための転置処理手段と、任意の換字処理を実行す
るための換字処理手段と、前記転置処理手段による処理
結果、および前記換字処理手段による処理結果を記憶す
る記憶手段と、前記記憶手段の処理結果を用いて、転置
処理、または換字処理を反復する手段を備えているの
で、DESやFEALなどの秘密鍵方式の慣用暗号に対
する、暗号化処理や復号化処理を、簡便かつ、高速に実
行することができる。また、暗号処理回路は簡単な構成
なので、マイクロプロセッサやROM、RAMなどとと
もに集積化し、ワンチップ化するのが容易である。
As described above in detail, the cryptographic processing apparatus of the present invention has a transposition processing means for executing an arbitrary transposition processing and a transposition processing means for executing an arbitrary substitution processing. Substitution processing means, storage means for storing a processing result by the transposition processing means and a processing result by the substitution processing means, and means for repeating transposition processing or substitution processing using the processing result of the storage means Therefore, the encryption process and the decryption process for the conventional encryption using the secret key method such as DES or FEAL can be performed easily and at high speed. Further, since the cryptographic processing circuit has a simple configuration, it can be easily integrated with a microprocessor, a ROM, a RAM, and the like to form a single chip.

【0086】また、本発明の暗号処理装置は、請求項2
に示すように、請求項1の発明に加えて、前記転置処理
手段は、再書き込み可能なスイッチマトリクスで構成さ
れているので、各種の転置処理を1組の転置処理手段に
て実行することができ、また、暗号処理回路を小型化
し、低コスト化を図ることができる。
The cryptographic processing apparatus according to the present invention is characterized in that:
As described above, in addition to the first aspect of the present invention, the transposition processing means is constituted by a rewritable switch matrix, so that various transposition processes can be executed by one set of transposition processing means. In addition, the size of the encryption processing circuit can be reduced, and the cost can be reduced.

【0087】さらに、本発明の暗号処理装置は、請求項
3に示すように、請求項1または請求項2の発明に加え
て、前記換字処理手段は、再書き込み可能なランダムア
クセスメモリで構成されているので、各種の換字処理を
1組の換字処理手段にて実行することができ、また、暗
号処理回路を小型化し、低コスト化を図ることができ
る。
Further, in the cryptographic processing apparatus of the present invention, in addition to the first or second aspect of the present invention, the substitution processing means is constituted by a rewritable random access memory. Therefore, various substitution processing can be performed by one set of substitution processing means, and the size and cost of the encryption processing circuit can be reduced.

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

【図1】 暗号処理装置の概略構成図である。FIG. 1 is a schematic configuration diagram of a cryptographic processing device.

【図2】 暗号処理装置の全体構成図である。FIG. 2 is an overall configuration diagram of a cryptographic processing device.

【図3】 暗号処理部の詳細構成図である。FIG. 3 is a detailed configuration diagram of an encryption processing unit.

【図4】 暗号化処理のデータ処理工程図である。FIG. 4 is a data processing process diagram of an encryption process.

【図5】 転置処理IPにおけるスイッチマトリクスの
状態図である。
FIG. 5 is a state diagram of a switch matrix in transposition processing IP.

【図6】 転置処理Eにおけるスイッチマトリクスの状
態図である。
FIG. 6 is a state diagram of a switch matrix in transposition processing E;

【図7】 転置処理Pにおけるスイッチマトリクスの状
態図である。
FIG. 7 is a state diagram of a switch matrix in transposition processing P;

【図8】 転置処理IP-1におけるスイッチマトリクス
の状態図である。
FIG. 8 is a state diagram of a switch matrix in transposition processing IP- 1 .

【図9】 換字処理のデータ変換例である。FIG. 9 is a data conversion example of a substitution process.

【図10】 各種転置処理のビット位置変換例である。FIG. 10 is an example of bit position conversion in various transposition processes.

【図11】 DESにおける暗号化処理のブロック図で
ある。
FIG. 11 is a block diagram of an encryption process in DES.

【図12】 DESにおける復号化処理のブロック図で
ある。
FIG. 12 is a block diagram of a decryption process in DES.

【図13】 DESにおける非線形関数のブロック図で
ある。
FIG. 13 is a block diagram of a nonlinear function in DES.

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

1 暗号処理装置 10 CPU(演算制御装置) 11 バス 12 データ入出力制御部 13 入力端子 14 出力端子 20 RAM 30 ROM 40 暗号処理部(CLU) 41 制御レジスタ 42 データバス 43 制御バス 44、45 入力データレジスタ 46 出力データセレクタ 50 プログラマブルスイッチマトリクスアレイ 51 レジスタ部 52 スイッチマトリクス部 60 プログラマブルランダムアクセスメモリ(RA
M) 70 排他的論理和演算回路 100 制御部 200 暗号処理部 201 転置処理手段 202 換字処理手段 203 入力データレジスタ 204 出力データセレクタ
DESCRIPTION OF SYMBOLS 1 Cryptographic processing unit 10 CPU (arithmetic control unit) 11 Bus 12 Data input / output control unit 13 Input terminal 14 Output terminal 20 RAM 30 ROM 40 Cryptographic processing unit (CLU) 41 Control register 42 Data bus 43 Control bus 44, 45 Input data Register 46 Output data selector 50 Programmable switch matrix array 51 Register section 52 Switch matrix section 60 Programmable random access memory (RA
M) 70 exclusive OR operation circuit 100 control unit 200 encryption processing unit 201 transposition processing means 202 substitution processing means 203 input data register 204 output data selector

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 任意の転置処理を実行するための転置処
理手段と、任意の換字処理を実行するための換字処理手
段と、前記転置処理手段による処理結果、および前記換
字処理手段による処理結果を記憶する記憶手段と、前記
記憶手段の処理結果を用いて、転置処理、または換字処
理を反復する手段を備えていることを特徴とする暗号処
理装置。
1. A transposition processing unit for performing an arbitrary transposition process, a substitution processing unit for performing an arbitrary substitution process, a processing result by the transposition processing unit, and a processing result by the substitution processing unit. A cryptographic processing apparatus comprising: a storage unit for storing; and a unit for repeating transposition processing or substitution processing using a processing result of the storage unit.
【請求項2】 前記転置処理手段は、再書き込み可能な
スイッチマトリクスで構成されていることを特徴とする
請求項1に記載の暗号処理装置。
2. The cryptographic processing apparatus according to claim 1, wherein said transposition processing means comprises a rewritable switch matrix.
【請求項3】 前記換字処理手段は、再書き込み可能な
ランダムアクセスメモリで構成されていることを特徴と
する請求項1に記載の暗号処理装置。
3. The cryptographic processing apparatus according to claim 1, wherein said substitution processing means is constituted by a rewritable random access memory.
JP10024075A 1998-01-22 1998-01-22 Criptographic device Withdrawn JPH11212451A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10024075A JPH11212451A (en) 1998-01-22 1998-01-22 Criptographic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10024075A JPH11212451A (en) 1998-01-22 1998-01-22 Criptographic device

Publications (1)

Publication Number Publication Date
JPH11212451A true JPH11212451A (en) 1999-08-06

Family

ID=12128314

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10024075A Withdrawn JPH11212451A (en) 1998-01-22 1998-01-22 Criptographic device

Country Status (1)

Country Link
JP (1) JPH11212451A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003037482A (en) * 2001-01-23 2003-02-07 Hitachi Ltd Pseudo-random number generator, and decoder using the same
KR100583635B1 (en) * 2003-01-24 2006-05-26 삼성전자주식회사 Cryptographic apparatus for supporting multiple modes
US7283628B2 (en) 2001-11-30 2007-10-16 Analog Devices, Inc. Programmable data encryption engine

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003037482A (en) * 2001-01-23 2003-02-07 Hitachi Ltd Pseudo-random number generator, and decoder using the same
US7283628B2 (en) 2001-11-30 2007-10-16 Analog Devices, Inc. Programmable data encryption engine
KR100583635B1 (en) * 2003-01-24 2006-05-26 삼성전자주식회사 Cryptographic apparatus for supporting multiple modes

Similar Documents

Publication Publication Date Title
JP3029381B2 (en) Data converter
EP0839418B1 (en) Cryptographic method and apparatus for non-linearly merging a data block and a key
JP4774509B2 (en) Pseudo random number generation system
US7672455B2 (en) Method and apparatus for data encryption
US7801307B2 (en) Method of symmetric key data encryption
US6189095B1 (en) Symmetric block cipher using multiple stages with modified type-1 and type-3 feistel networks
JPH1055135A (en) Ciphering/deciphering device and method using programmable logic element/device
KR20050078271A (en) Hardware cryptographic engine and method improving power consumption and operation speed
US20030086564A1 (en) Method and apparatus for cipher encryption and decryption using an s-box
JPWO2006019152A1 (en) Message authenticator generation device, message authenticator verification device, and message authenticator generation method
JPH10240500A (en) Random number generator and method, enciphering device and method, decoder and method and stream cipher system
JP2950485B2 (en) Stream cipher processor
JPH0946332A (en) Communication system for communication statement enciphered by rsa procedure
JP3547474B2 (en) Cryptographic operation circuit
KR20030051111A (en) Round processing circuit and on-line round key generation circuit for the hardware implementation of AES Rijndael cipher algorithm
JPH11212451A (en) Criptographic device
Kareem et al. A new multi-level key block cypher based on the Blowfish algorithm
JP5207153B2 (en) Pseudo random number generation system
JPH09269727A (en) Ciphering method and ciphering device
KR100350207B1 (en) Method for cryptographic conversion of l-bit input blocks of digital data into l-bit output blocks
JP2001142395A (en) Extended key generator, ciphering/deciphering device, extended key generating method and recording medium
JPH1152850A (en) Device and method for cipher conversion
JPH10153954A (en) Ciphering device
JPH09251267A (en) Encryption device and encryption method
JPH10303881A (en) Enciphering and decoding device, and method

Legal Events

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

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20050405