JPH10149101A - Cipher converting device - Google Patents

Cipher converting device

Info

Publication number
JPH10149101A
JPH10149101A JP9329845A JP32984597A JPH10149101A JP H10149101 A JPH10149101 A JP H10149101A JP 9329845 A JP9329845 A JP 9329845A JP 32984597 A JP32984597 A JP 32984597A JP H10149101 A JPH10149101 A JP H10149101A
Authority
JP
Japan
Prior art keywords
data
bit
bits
key data
function
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP9329845A
Other languages
Japanese (ja)
Other versions
JP2870532B2 (en
Inventor
Kazuo Takaragi
和夫 宝木
Akio Nakagawa
聡夫 中川
Ryoichi Sasaki
良一 佐々木
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP9329845A priority Critical patent/JP2870532B2/en
Publication of JPH10149101A publication Critical patent/JPH10149101A/en
Application granted granted Critical
Publication of JP2870532B2 publication Critical patent/JP2870532B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide the cipher converting device which executes ciphering algorithm performing 4-byte based processing oriented to a 32-bit microcomputer. SOLUTION: The cipher converting device is equipped with a providing means which provides data M of (n)-bit length to be ciphered and a ciphering device which ciphers the data M provided by the providing means into data C of (n)-bit length by using key data K1 and K2 of (n)-bit length. The ciphering device has a means which generates the data C by performing a process including operation prescribed by a function π for the data M by using the key data K1 and K2.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、暗号変換装置に関
する。
[0001] The present invention relates to a cryptographic conversion device.

【0002】[0002]

【従来の技術】従来の代表的な暗号アルゴリズムとして
は、DES(Data Encryption Standard)とFEAL
(Fast Encryption Standard)が知られており、DES
に関しては例えば、(1)小山他、「現代暗号理論」、
電子通信学会、pp.41〜49、昭和61年9月にお
いて、また、FEALに関しては、(2)清水他、「高
速データ暗号アルゴリズムFEAL」、電子通信学会論
文誌D、Vol.J70−D.No.7、pp.141
3〜1423、1987年7月において、それぞれ詳細
に述べられている。
2. Description of the Related Art Conventional typical encryption algorithms include DES (Data Encryption Standard) and FEAL.
(Fast Encryption Standard) is known and DES
For example, (1) Koyama et al., "Modern Cryptography",
IEICE, pp. 41-49, September 1986, and regarding FEAL, (2) Shimizu et al., "High-speed Data Encryption Algorithm FEAL", IEICE Transactions D, Vol. J70-D. No. 7, pp. 141
3-1423, July 1987, respectively.

【0003】先ず、DESの処理における非線形の計算
部分、つまりSボックスといわれる処理について説明す
る(上記(1)のp.45、図3−2とp46、図3−
3参照)。32ビットのRは、まず、表1に示す拡大型
転置表によって置き換えられると共に、一部のビットは
重複されて48ビットに拡大されている。
First, a non-linear calculation part in the DES process, that is, a process called an S box will be described (see (1) p. 45, FIGS. 3-2 and p 46, FIG.
3). The 32-bit R is first replaced by the extended transposition table shown in Table 1, and some bits are duplicated and expanded to 48 bits.

【0004】[0004]

【表1】 [Table 1]

【0005】このようにして得られた48ビットのR
は、頭から4ビットごとにその後の2ビットを加えた次
のような6ビットずつの8組のブロックを形成してい
る。
[0005] The thus obtained 48-bit R
Forms eight sets of 6-bit blocks, each of which is obtained by adding the following two bits for every four bits from the beginning.

【0006】 r31 r1 r2 r3 r4 r5, r4 r5 r6 r7 r8 r9, r8 r9 r10 r11 r12 r13, r12 r13 ……, ……、r28 r29, r28 r29 r30 r31 r32 r1, この48ビットのR’は、同じく48ビットの鍵Kと排
他的論理和の演算を行ない、6ビットずつ8組に分割し
て、S1からS8までの8つのSボックスに入力する。
S1〜S8を選択関数と呼ぶ。これらのSボックスは、
6ビットを入力して4ビットを出力する。
R31 r1 r2 r3 r4 r5, r4 r5 r6 r7 r8 r9, r8 r9 r10 r11 r12 r13, r12 r13..., R28 r29, r28 r29 r30 r31 r32 r31 Similarly, an exclusive OR operation with the 48-bit key K is performed, and the result is divided into eight sets of 6 bits each and input to eight S boxes from S1 to S8.
S1 to S8 are called selection functions. These S boxes are
Input 6 bits and output 4 bits.

【0007】例として、表2に一つのSボックスS1を
取り上げてその換字表を示す。
As an example, Table 2 shows a substitution table for one S box S1.

【0008】表2 拡大型転置表 E 32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1 一つのSボックスには、4種類(行番号0,1,2,
3)が用意され、この4種類の換字表のどれを用いるか
は、入力した6ビットのうち最初と最後のビットを用い
て換字表を選ぶ。そして選ばれた換字表にしたがって入
力した6ビットの中央の4ビットが換字される。具体的
な例として、S1に対して2進数の入力パターンが01
1011となっている場合、最初の0と最後の1で表わ
されている01、つまり行1(2進数01は10進数1
であるから)の換字表が選ばれる。次に中央の4ビット
のパターン1101(10進数13)で表わされる列1
3で指定され、この結果行1、列13で指定される値
5、つまり0101が出力されて4ビットの換字パター
ンとなる。DESではこのような処理f(R,K)を用
い一段の処理を構成し、これを16段繰り返す。
Table 2 Enlarged transposition table E 32 1 2 3 4 5 4 5 6 7 8 9 8 9 10 11 12 13 12 13 14 15 16 17 16 17 18 19 20 21 20 21 22 23 24 25 24 25 26 27 28 29 28 29 30 31 32 1 One S box has four types (line numbers 0, 1, 2,
3) is prepared, and the substitution table is selected by using the first and last bits of the input 6 bits to determine which of the four types of substitution table is used. Then, the central 4 bits of the 6 bits input according to the selected substitution table are substituted. As a specific example, the binary input pattern is 01 for S1.
If it is 1011, 01 represented by the first 0 and the last 1, that is, row 1 (binary 01 is decimal 1
) Is selected. Next, a column 1 represented by a central 4-bit pattern 1101 (decimal 13)
3 is output, and as a result, the value 5 specified in the row 1 and the column 13, that is, 0101 is output to form a 4-bit substitution pattern. In the DES, a single-stage process is configured using such a process f (R, K), and this is repeated 16 stages.

【0009】上記の処理例に見られるように、DESは
1ビット単位の処理が基本になっている。
As can be seen from the above processing example, DES is based on 1-bit unit processing.

【0010】次にFEALの処理における非線形の計算
部分、つまり、関数Sを含んでいる部分について説明す
る(上記(2)のp.1416,図4及び図5参照)。
FEALの非線形部はDESの非線形部に比べ、数学的
な記述が簡単である。32ビットデータαは8ビットの
データα0,α1,α2,α3にそれぞれ分割された後、8
ビットの単位として、鍵データと排他的論理和がとられ
る。その後、所定の関数Sによる処理が実行される。
Next, a non-linear calculation part in the FEAL process, that is, a part including the function S will be described (see p. 1416 of (2) above, FIGS. 4 and 5).
The non-linear part of FEAL is easier to describe mathematically than the non-linear part of DES. The 32-bit data α is divided into 8-bit data α 0 , α 1 , α 2 , α 3 and then divided into 8 bits.
As a bit unit, the key data and the exclusive OR are calculated. After that, processing by a predetermined function S is performed.

【0011】 関数S:S(x1+x2+δ)=Rot2(w) ただし、w=(x1+x2+δ)mod256 δ=0または1(定数) この処理f(α,β)を用い、一段の処理を構成し、こ
れが8段繰り返される。上記の処理に見られるように、
FEALは8ビット単位の処理が基本になっている。
Function S: S (x1 + x2 + δ) = Rot2 (w) where w = (x1 + x2 + δ) mod 256 δ = 0 or 1 (constant) Using this process f (α, β), a one-stage process is configured. Repeated eight steps. As seen in the above process,
FEAL is based on 8-bit processing.

【0012】[0012]

【発明が解決しようとする課題】情報処理と通信技術の
進歩によるコンピュータ・ネットワークの普及化、大衆
化に伴い、データの不正使用や奪取等に対する情報セキ
ュリティを確保するため、伝送路上のデータやコンピュ
ータに蓄積されたデータを暗号化することは有効な対策
であると考えられる。
With the spread and widespread use of computer networks due to advances in information processing and communication technology, data and computers on transmission lines are required to secure information security against unauthorized use or capture of data. It is considered that encrypting the data stored in the server is an effective countermeasure.

【0013】昭和52年に、米国商務省標準局が暗号ア
ルゴリズムの標準として制定したDESは、データの暗
号化を行う一つの手段である。
DES, established in 1982 by the United States Department of Commerce as a standard for encryption algorithms, is one means of encrypting data.

【0014】ところが、DESはビット単位での処理が
たいへん多いため、バイト単位の処理を基調とするマイ
クロコンピュータのソフトで実現しようとすると、処理
に時間がかかり、実用的な速度が得られなかった。
However, since DES has a large number of processing in bit units, it takes a long time to implement it with microcomputer software based on byte processing, and a practical speed cannot be obtained. .

【0015】この問題に対し、上記FEALは、1バイ
ト(8ビット)単位の処理を基調とするため、8ビット
マイクロコンピュータで実現する場合、DESに比べ数
倍以上の高速化を達成することができた。FEALによ
り、8ビットマイクロコンピュータのソフトを用いてあ
る程度実用的な速度が得られるようになったと考えられ
る。
In order to solve this problem, the FEAL is based on processing in units of 1 byte (8 bits). Therefore, when the FEAL is realized by an 8-bit microcomputer, it is possible to achieve several times higher speed than DES. did it. It is considered that FEAL has made it possible to obtain a practical speed to some extent using software of an 8-bit microcomputer.

【0016】しかし、最近のマイクロエレクトロニクス
の技術の進歩によって、8ビットマイクロコンピュータ
よりも16ビットマイクロコンピュータ、さらに、16
ビットマイクロコンピュータよりも32ビットマイクロ
コンピュータが使われ出している。近い将来、32ビッ
トマイクロコンピュータが使われる割合がたいへん大き
くなると予想されている。32ビットマイクロコンピュ
ータの時代になると、さらに高速の暗号処理が要求され
るものと予想される。ところが、32ビットマイクロコ
ンピュータは4バイト基調の処理を行うため、1バイト
基調の8ビットマイクロコンピュータ用に設計されたF
EALを32ビットマイクロコンピュータで実現しよう
とすると非効率であった。
However, due to recent advances in microelectronics technology, 16-bit microcomputers have been replaced by 8-bit microcomputers, and 16-bit microcomputers.
32-bit microcomputers have been used rather than bit microcomputers. It is anticipated that the use of 32-bit microcomputers will increase significantly in the near future. In the era of 32-bit microcomputers, higher-speed encryption processing is expected to be required. However, since a 32-bit microcomputer performs processing based on 4-byte data, an F designed for an 8-bit microcomputer based on 1-byte data is used.
Attempting to implement the EAL with a 32-bit microcomputer was inefficient.

【0017】そこで、32ビットマイクロコンピュータ
向けの4バイト基調の処理を行う暗号アルゴリズムが望
まれていた。
Therefore, there has been a demand for an encryption algorithm for a 32-bit microcomputer that performs a 4-byte key processing.

【0018】本発明の目的は、32ビットマイクロコン
ピュータ向けの4バイト基調の処理を行う暗号アルゴリ
ズムを実行する暗号変換装置を提供することにある。特
に、本発明の暗号変換装置は、暗号化対象のデータを提
供する手段と、暗号化変換するための暗号化装置とを備
え、暗号化装置は、換字処理と循環シフト処理を交互に
行ない、第1回目と第2回目の循環シフトのビット数が
異なることを特徴とする。
An object of the present invention is to provide a cryptographic conversion device for executing a cryptographic algorithm for performing a 4-byte key processing for a 32-bit microcomputer. In particular, the encryption conversion device of the present invention includes a unit for providing data to be encrypted and an encryption device for performing encryption conversion, and the encryption device alternately performs a substitution process and a cyclic shift process, The first and second cyclic shifts are different in the number of bits.

【0019】[0019]

【課題を解決するための手段】上記の問題点を解決する
ため、次の手段を用いる。
To solve the above problems, the following means are used.

【0020】すなわち、本発明の暗号変換装置は、暗号
化対象のnビット長のデータMを提供する提供手段と、
前記提供手段から提供された前記データMを各々がnビ
ット長の鍵データK1及びK2を用いてnビット長のデ
ータCに暗号変換するための暗号化装置とを備え、前記
暗号化装置は、π(A)をAに鍵データK1を用いて換
字処理を行い、第1のビット数で循環シフト処理を行な
い、鍵データK2を用いて換字処理を行ない、第1と異
なる第2のビット数で循環シフト処理を行なった結果を
出力する関数とし、前記2つの鍵データK1及びK2を
保持する第1の保持手段と、前記第1の提供手段が提供
する前記データMに対して、前記第1の保持手段が保持
する前記鍵データK1及びK2を用いて関数πで規定さ
れる演算を含む処理を実行することにより前記データC
を生成する手段と、生成した暗号文Cを保持する第2の
保持手段とを有する。
That is, the cipher conversion device of the present invention comprises: a providing means for providing n-bit data M to be encrypted;
An encryption device for encrypting the data M provided from the providing unit into data C having an n-bit length using key data K1 and K2 each having an n-bit length, wherein the encryption device comprises: Substitution processing is performed using key data K1 with π (A) as A, cyclic shift processing is performed using the first number of bits, substitution processing is performed using key data K2, and a second bit number different from the first is used. And a function for outputting the result of performing the cyclic shift process in the first storage means for holding the two key data K1 and K2, and the data M provided by the first providing means, By executing a process including an operation defined by a function π using the key data K1 and K2 held by
And a second holding unit for holding the generated ciphertext C.

【0021】これにより、32ビットマイクロコンピュ
ータを用いて、1回の基本命令で32ビットのデータが
換字または転置されるので、暗号変換を高速に行うこと
ができる。
As a result, since the 32-bit data is replaced or transposed by one basic instruction using the 32-bit microcomputer, the cryptographic conversion can be performed at high speed.

【0022】[0022]

【発明の実施の形態】BEST MODE FOR CARRYING OUT THE INVENTION

(1)第1の実施例 図1は、本発明の一実施例である。 (1) First Embodiment FIG. 1 shows an embodiment of the present invention.

【0023】図1において、64ビットの平文101と
64ビット×4=256ビットの鍵データ100が32
ビットマイクロコンピュータに入力され、その後、プロ
グラム103内の命令の順に32ビットマイクロコンピ
ュータ102において暗号変換され、その結果として6
4ビットの暗号文104が出力される。
In FIG. 1, a 64-bit plaintext 101 and a 64-bit × 4 = 256-bit key data 100 are 32 bits.
Input to the 32-bit microcomputer 102, and thereafter, are cryptographically converted by the 32-bit microcomputer 102 in the order of the instructions in the program 103.
The 4-bit ciphertext 104 is output.

【0024】図2は、図1の32ビットマイクロコンピ
ュータ102とプログラム103において実行される暗
号変換処理のフローを示している。
FIG. 2 shows a flow of a cryptographic conversion process executed by the 32-bit microcomputer 102 and the program 103 in FIG.

【0025】201:入力されたデータMは上位32ビ
ットM1と下位32ビットM2に分割される。
201: The input data M is divided into upper 32 bits M1 and lower 32 bits M2.

【0026】202:M1とM2のビット対応の排他的
論和がとられる。
202: An exclusive OR operation corresponding to the bits of M1 and M2 is performed.

【0027】WORK2 ← M1 (+) M2 以下、(+)は同様の処理を示すものとする。なお、図
中では、排他的論理和は、○と+とを重ね合わせた記号
で示している。
WORK2 ← M1 (+) M2 Hereinafter, (+) indicates the same processing. In the figure, the exclusive OR is indicated by a symbol obtained by superimposing ○ and +.

【0028】203:WORK2と鍵データK1のモジ
ュロ加算が行われる。
203: Modulo addition of WORK2 and key data K1 is performed.

【0029】x ← WORK2 + K1 ここに、x+K1はxとK1の和を232で割った余りを
とるという、232を法としたモジュロ加算を示してい
る。
X ← WORK2 + K1 Here, x + K1 indicates a modulo addition modulo 2 32 in which the remainder of the sum of x and K1 is divided by 2 32 .

【0030】以下、+は同様の処理を示すものとする。Hereinafter, + indicates the same processing.

【0031】204:xを左へ2ビット循環シフトした
後、そのデータとxと1のモジュロ加算をとる。
204: After x is cyclically shifted left by 2 bits, modulo addition of the data and x and 1 is performed.

【0032】x ← Rot2(x)+x+1 以下、Rot2は同様の処理を示すものとする。X ← Rot2 (x) + x + 1 Hereinafter, Rot2 indicates the same processing.

【0033】105:xを左へ4ビット循環シフトした
後、そのデータとxとの排他的論理和をとる。
105: After x is cyclically shifted left by 4 bits, exclusive OR of the data and x is obtained.

【0034】x←Rot4(x)(+)x 以下、Rot4は同様の処理を示すものとする。X ← Rot4 (x) (+) x Hereinafter, Rot4 indicates the same processing.

【0035】206:WORK1←x(+)M1 207:x←x+K2 208:x←Rot2(x)+x+1 y←x 209:x←Rot3(x)(+)x ここに、Rot3(x)はxを左へ8ビット循環シフト
させることを示す。
206: WORK1 ← x (+) M1 207: x ← x + K2 208: x ← Rot2 (x) + x + 1 y ← x209: x ← Rot3 (x) (+) x Here, Rot3 (x) is x Is cyclically shifted left by 8 bits.

【0036】210:x←x+K3 211:x←Rot2(x)+x+1 212:x←Rot16(x)+(x∧y) ここに、Rot16(x)はxを左へ16ビット循環シ
フトすることを示す。また、x∧yはxとyとのビット
対応の論理積をとることを示す。
210: x ← x + K3 211: x ← Rot2 (x) + x + 1 212: x ← Rot16 (x) + (x∧y) where Rot16 (x) shifts x to the left by 16 bits. Show. In addition, x∧y indicates that a logical AND of x and y corresponding to bits is taken.

【0037】213:WORK2←x(+)WORK2 214:x←WORK2+K4 215:x←Rot2(x)+x 216:WORK1←WORK1(+)x 217:WORK2←WORK2(+)WORK1 218:WORK1を出力データの上位32ビット、W
ORK2を出力データの下位32ビットとして出力す
る。
213: WORK2 ← x (+) WORK2 214: x ← WORK2 + K4 215: x ← Rot2 (x) + x 216: WORK1 ← WORK1 (+) x 217: WORK2 ← WORK2 (+) WORK1 218: Output data of WORK1 Upper 32 bits of W
ORK2 is output as the lower 32 bits of the output data.

【0038】以上、図2に示すように関数π1〜π4を
定義すると、本実施例は、 C=π1・π4・π3・π2・π1(M) というように合成関数で表すことができる。
As described above, when the functions π1 to π4 are defined as shown in FIG. 2, this embodiment can be represented by a composite function as follows: C = π1, π4, π3, π2, π1 (M).

【0039】関数πi・πi(i=1〜4)はすべて、 πi・πi(x)=x というように同じ関数変換を2回繰り返すとともに戻る
という性質がある。
The functions πi · πi (i = 1 to 4) all have the property of repeating the same function conversion twice and returning as πi · πi (x) = x.

【0040】したがって、復号関数として、 M=π1・π2・π3・π4・π1(C) を用いれば、暗号文Cをもとの平文Mに戻すことができ
る。
Therefore, if M = π1, π2, π3, π4, π1 (C) is used as the decryption function, the ciphertext C can be returned to the original plaintext M.

【0041】(2)実施例の変形例1 上記実施例における変換関数π1からπ4までにあたる
処理を2回繰り返したものを暗号変換として用いてもよ
い、すなわち、暗号変換を、 C=π1・π4・π3・π2・π1・π4・π3・π2
・π1(M) としてもよい。
(2) Modification 1 of the embodiment A process obtained by repeating the process corresponding to the conversion functions π1 to π4 twice in the above embodiment may be used as a cryptographic conversion.・ Π3 ・ π2 ・ π1 ・ π4 ・ π3 ・ π2
・ It may be π1 (M).

【0042】このとき、復号変換の式は M=π1・π2・π3・π4・π1・π2・π3・π4
・π1(C) である。
At this time, the equation of the decoding conversion is M = π1, π2, π3, π4, π1, π2, π3, π4.
Π1 (C)

【0043】同様に、一般に本実施例をn回繰り返した
ものを暗号変換としてもよい。
Similarly, in general, the present embodiment may be repeated n times and used as the cryptographic conversion.

【0044】(3)実施例の変形例2 図4は、本発明の他の実施例である。(3) Second Modification of Embodiment FIG. 4 shows another embodiment of the present invention.

【0045】401:入力されたデータMは上位16ビ
ットM1と下位16ビットM2に分割される。
401: Input data M is divided into upper 16 bits M1 and lower 16 bits M2.

【0046】402:M1とM2のビット対応の排他的
論理和がとられる。
402: Exclusive OR corresponding to the bits of M1 and M2 is calculated.

【0047】WORK2←M1+M2 以下、+は同様の処理を示すものとする。WORK2 ← M1 + M2 Hereinafter, + indicates the same processing.

【0048】403:xと鍵データK1のモジュロ減算
が行われる。
403: Modulo subtraction of x and key data K1 is performed.

【0049】x←x−K1 ここに、x−K1はxとK1の差を216で割った余りを
とるという、216を法としたモジュロ減算を示してい
る。
X ← x−K1 Here, x−K1 indicates a modulo subtraction modulo 2 16, that is, the remainder obtained by dividing the difference between x and K1 by 2 16 .

【0050】以下、−は同様の処理を示すものとする。Hereinafter, "-" indicates the same processing.

【0051】404:xを左へ2ビット循環シフトした
後、そのデータと1のモジュロ減算を行う。
404: After cyclically shifting x by 2 bits to the left, modulo subtraction of the data and 1 is performed.

【0052】x←Rot(x)−x−1 以下、Rot2は同様の処理を示すものとする。X ← Rot (x) −x−1 Hereinafter, Rot2 indicates the same processing.

【0053】405:xを左4ビット循環シフトした
後、そのデータとxとの排他的論理和をとる。
405: After x is cyclically shifted left by 4 bits, exclusive OR of the data and x is obtained.

【0054】x←Rot4(x)(+)x 以下、Rot4は同様の処理を示すものとする。X ← Rot4 (x) (+) x Hereinafter, Rot4 indicates the same processing.

【0055】406:WORK1←x(+)M1 407:x←x−K2 y←x 408:x←Rot2(x)−x−1 409:Rot8(x)−(x∧y) ここに、Rot8(x)はxを左へ8ビット循環シフト
することを示す。また、x∧yはxとyとのビット対応
の論理積をとることを示す。
406: WORK1 ← x (+) M1 407: x ← x−K2 y ← x 408: x ← Rot2 (x) −x−1 409: Rot8 (x) − (x∧y) where Rot8 (X) indicates that x is cyclically shifted left by 8 bits. In addition, x∧y indicates that a logical AND of x and y corresponding to bits is taken.

【0056】410:WORK2←x(+)WORK2 411:x←WORK2−K3 412:x←Rot2(x)−x−1 413:WORK1←WORK1(+)x 414:WORK2←WORK2(+)WORK1 415:WORK1を出力データの上位16ビット、W
ORK2を出力データの下位16ビットとして出力す
る。
410: WORK2 ← x (+) WORK2 411: x ← WORK2-K3 412: x ← Rot2 (x) -x-1 413: WORK1 ← WORK1 (+) x 414: WORK2 ← WORK2 (+) WORK1 415 : WORK1 as upper 16 bits of output data, W
ORK2 is output as the lower 16 bits of the output data.

【0057】(4)実施例の変形例3 図5は、本発明の他の実施例である。(4) Third Modification of Embodiment FIG. 5 shows another embodiment of the present invention.

【0058】501:入力されたデータMは上位8ビッ
トM1と下位8ビットM2に分割される。
501: Input data M is divided into upper 8 bits M1 and lower 8 bits M2.

【0059】502:M1とM2のビット対応の排他的
論和がとられる。
502: Exclusive OR of the bits corresponding to M1 and M2 is performed.

【0060】WORK2←M1(+)M2 以下、+は同様の処理を示すものとする。WORK2 ← M1 (+) M2 Hereinafter, + indicates the same processing.

【0061】503:xと鍵データK1のモジュロ加算
が行われる。
503: Modulo addition of x and key data K1 is performed.

【0062】x←WORK2+K1 y←x ここに、x+K1はxとK1の差を28で割った余りを
とるという、28を法としたモジュロ加算を示してい
る。
X ← WORK2 + K1 y ← x Here, x + K1 indicates a modulo addition modulo 2 8 in which the difference between x and K1 is divided by 2 8 .

【0063】以下、+は同様の処理を示すものとする。Hereinafter, + indicates the same processing.

【0064】504:xを左へ2ビット循環シフトした
後、そのデータとxと1のモジュロ加算を行う。
504: After cyclically shifting x by 2 bits to the left, modulo addition of the data and x and 1 is performed.

【0065】x←Rot2(x)+x+1 以下、Rot2は同様の処理を示すものとする。X ← Rot2 (x) + x + 1 Hereinafter, Rot2 indicates the same processing.

【0066】505:x←Rot4(x)+(x∧y) ここに、Rot4(x)はxを左へ4ビット循環シフト
することを示す。また、x∧yはxとyとのビット対応
の論理積をとることを示す。
505: x ← Rot4 (x) + (x∧y) Here, Rot4 (x) indicates that x is cyclically shifted to the left by 4 bits. In addition, x∧y indicates that a logical AND of x and y corresponding to bits is taken.

【0067】506:WORK1←WORK1(+)x 507:x←WORK1+K2 508:x←Rot4(x)+x+1 509:WORK2←WORK2(+)x 510:WORK1←WORK1(+)WORK2 511:WORK1を出力データの上位8ビット、WO
RK2を出力データの下位8ビットとして出力する。
506: WORK1 ← WORK1 (+) x 507: x ← WORK1 + K2 508: x ← Rot4 (x) + x + 1 509: WORK2 ← WORK2 (+) x 510: WORK1 ← WORK1 (+) WORK2 511: Output data of WORK1 Upper 8 bits of WO
RK2 is output as the lower 8 bits of the output data.

【0068】(5)実施例の変形例4 図6は本発明の他の一実施例である。(5) Fourth Modification of Embodiment FIG. 6 shows another embodiment of the present invention.

【0069】(1)認証を行うメッセージ62を鍵デー
タとして、任意の初期値61を本発明によるアルゴリズ
ム63を用いて暗号化する。
(1) Using a message 62 for performing authentication as key data, an arbitrary initial value 61 is encrypted using an algorithm 63 according to the present invention.

【0070】(2)暗号結果64を、(1)において用
いたメッセージの続きのデータにより再び暗号化し、メ
ッセージの終わりまでこの操作を繰り返す。
(2) The encryption result 64 is encrypted again with the subsequent data of the message used in (1), and this operation is repeated until the end of the message.

【0071】(3)最終的な暗号結果をメッセージ認証
コード65として出力する。
(3) The final encryption result is output as the message authentication code 65.

【0072】(6)実施例の変形例5 図7は本発明の他の実施例である。本ICカードは、メ
ッセージの認証コードを生成する。
(6) Modification 5 of Embodiment FIG. 7 shows another embodiment of the present invention. This IC card generates an authentication code of the message.

【0073】(1)メッセージの認証を行うために必要
な初期値76をI/O74を通して、ICカード71内
のマイクロコンピュータ72に送信する。
(1) An initial value 76 necessary for message authentication is transmitted to the microcomputer 72 in the IC card 71 through the I / O 74.

【0074】(2)認証を行うメッセージ77を(1)
と同様にマイクロコンピュータ72に順次送信し、マイ
クロコンピュータ72は、メモリ73に記憶されている
暗号ソフト75により認証コード78を生成する。
(2) A message 77 for performing authentication is sent to (1)
The microcomputer 72 generates the authentication code 78 using the encryption software 75 stored in the memory 73 in the same manner as described above.

【0075】[0075]

【発明の効果】本実施例は、図3に示すような換字、転
置の繰返しを行っている。
In the present embodiment, substitution and transposition as shown in FIG. 3 are repeated.

【0076】つまり、図2に示す実施例、(203、2
04)、(207、208)、(210、211)、
(214、215)の処理は、 x←x+Ki x←Rot2(x)+(x)+1 の形となっており、これは、それぞれ、32ビットのデ
ータを4ビットずつのブロックに分割したとき、各ブロ
ック単位の換字処理を、上記2回のデータ変換により8
ブロック分一斉に行っていると見ることができる。
That is, in the embodiment shown in FIG.
04), (207, 208), (210, 211),
The processing of (214, 215) has the form of x ← x + Kix ← Rot2 (x) + (x) +1, which is obtained by dividing 32-bit data into blocks each having 4 bits. Substitution processing for each block is performed by the above two data conversions.
It can be seen that they are going all at once for the block.

【0077】ここに、4ビットのブロックデータ A=(a1,a2,a3,a4)、ただし、 ai=1 or 0(i=1〜4) が、 B=(b1,b2,b3,b4)、ただし、 bi=1 or 0(i=1〜4) に換字変換されるということは、プール代数の演算f
1、f2、f3、f4が存在して、 b1=f1(a1,a2,a3,a4) b2=f2(a1,a2,a3,a4) b3=f3(a1,a2,a3,a4) b4=f4(a1,a2,a3,a4) となることを示す。
Here, 4-bit block data A = (a1, a2, a3, a4), where ai = 1 or 0 (i = 1 to 4), B = (b1, b2, b3, b4) However, the fact that the substitution conversion is made to bi = 1 or 0 (i = 1 to 4) means that the pool algebra operation f
1, f2, f3, and f4 exist; b1 = f1 (a1, a2, a3, a4) b2 = f2 (a1, a2, a3, a4) b3 = f3 (a1, a2, a3, a4) b4 = f4 (a1, a2, a3, a4).

【0078】また、図2の205、209、212はそ
れぞれ、 (1)x←Rot4(x)(+)x (2)x←Rot8(x)(+)x (3)x←Rot16(x)+(x∧y) の処理を行っており、これらは、それぞれ、(1)4ビ
ット左循環シフトを行うという転置を行った後、さらに
換字を行うという処理、(2)8ビット左循環シフトを
行うという転置を行った後、さらに換字を行うという処
理、(3)16ビット左循環シフトを行うという処理を
示している。
Further, 205, 209 and 212 in FIG. 2 are (1) x ← Rot4 (x) (+) x (2) x ← Rot8 (x) (+) x (3) x ← Rot16 (x ) + (X∧y), which are (1) transposed to perform a 4-bit left circular shift and then further substituted, (2) 8-bit left circular The figure shows a process of performing a transposition after performing a transposition of performing a shift, and a process of performing (3) a 16-bit left circular shift.

【0079】図3から明らかなように、最初の32ビッ
トのデータのうち、いかなるビットの変化も最後の32
ビットのデータすべてに影響を与えることが分かる。
As is apparent from FIG. 3, any bit change in the first 32 bits of data is the last 32 bits.
It can be seen that all bits of data are affected.

【0080】これにより、本実施例は、高度なランダム
性を持つ暗号変換を効率良く行うという効果が得られる
ことが分かる。
As a result, it is understood that the present embodiment has an effect of efficiently performing encryption conversion having a high degree of randomness.

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

【図1】本発明を実施する暗号変換装置の一実施例。FIG. 1 shows an embodiment of a cryptographic conversion device for implementing the present invention.

【図2】図1における暗号変換の詳細を示すフローチャ
ート。
FIG. 2 is a flowchart showing details of encryption conversion in FIG. 1;

【図3】本発明の実施例が効率的に換字変換、転置変換
を繰り返していることを示す説明図。
FIG. 3 is an explanatory diagram showing that the embodiment of the present invention efficiently repeats substitution conversion and transposition conversion.

【図4】16ビットマイクロコンピュータを用いた場合
の暗号変換の詳細を示すフローチャート。
FIG. 4 is a flowchart showing details of cryptographic conversion when a 16-bit microcomputer is used.

【図5】8ビットマイクロコンピュータを用いた場合の
暗号変換の詳細を示すフローチャート。
FIG. 5 is a flowchart showing details of encryption conversion when an 8-bit microcomputer is used.

【図6】本発明による暗号アルゴリズムを用いてメッセ
ージ認証コードを生成する方法を示すフローチャート。
FIG. 6 is a flowchart illustrating a method for generating a message authentication code using a cryptographic algorithm according to the present invention.

【図7】本発明による暗号アルゴリズムを用いてメッセ
ージ認証コードを生成するICカードの構成図である。
FIG. 7 is a configuration diagram of an IC card that generates a message authentication code using an encryption algorithm according to the present invention.

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

100:鍵データ、101:平文、102:32ビット
マイクロコンピュータ、103:プログラム、104:
暗号文。
100: key data, 101: plaintext, 102: 32-bit microcomputer, 103: program, 104:
Ciphertext.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】暗号化対象のnビット長のデータMを提供
する提供手段と、 前記提供手段から提供された前記データMを各々がnビ
ット長の鍵データK1及びK2を用いてnビット長のデ
ータCに暗号変換するための暗号化装置とを備えた暗号
変換装置であって、 前記暗号化装置は、 π(A)をAに鍵データK1を用いて換字処理を行い、
第1のビット数で循環シフト処理を行ない、鍵データK
2を用いて換字処理を行ない、第1と異なる第2のビッ
ト数で循環シフト処理を行なった結果を出力する関数と
し、 前記2つの鍵データK1及びK2を保持する第1の保持
手段と、 前記第1の提供手段が提供する前記データMに対して、
前記第1の保持手段が保持する前記鍵データK1及びK
2を用いて関数πで規定される演算を含む処理を実行す
ることにより前記データCを生成する手段と、 生成した暗号文Cを保持する第2の保持手段とを有する
ことを特徴とする暗号変換装置。
1. A providing means for providing n-bit length data M to be encrypted, and said data M provided by said providing means is provided with n-bit length data using key data K1 and K2 each having n-bit length. An encryption device for performing encryption conversion to convert the data into the data C, wherein the encryption device performs a substitution process using π (A) for A and the key data K1,
A cyclic shift process is performed with the first bit number, and key data K
2 as a function for performing a substitution process using the second key data and performing a cyclic shift process with a second bit number different from the first bit number, and a first holding unit for holding the two key data K1 and K2; For the data M provided by the first providing means,
The key data K1 and K1 held by the first holding unit
2. A cipher comprising: means for generating the data C by executing a process including an operation defined by a function π by using the function C.2; and second holding means for holding the generated ciphertext C. Conversion device.
【請求項2】前記前記データMに対して、関数πで規定
される演算を含む処理を複数回実行することにより前記
データCを生成する手段を有することを特徴とする請求
項1に記載の暗号変換装置。
2. The apparatus according to claim 1, further comprising means for generating the data C by executing a process including an operation defined by a function π a plurality of times on the data M. Cryptographic converter.
【請求項3】復号化対象のnビット長のデータCを提供
する提供手段と、 前記提供手段から提供された前記データMを各々がnビ
ット長の鍵データK1及びK2を用いてnビット長のデ
ータMに復号変換するための復号化装置とを備えた暗号
変換装置であって、 前記復号化装置は、 π(A)をAに鍵データK1を用いて換字処理を行い、
第1のビット数で循環シフト処理を行ない、鍵データK
2を用いて換字処理を行ない、第1と異なる第2のビッ
ト数で循環シフト処理を行なった結果を出力する関数と
し、 前記2つの鍵データK1及びK2を保持する第1の保持
手段と、 前記第1の提供手段が提供する前記データMに対して、
前記第1の保持手段が保持する前記鍵データK1及びK
2を用いて関数πで規定される演算を含む処理を実行す
ることにより前記データMを生成する手段と、 生成したデータMを保持する第2の保持手段とを有する
ことを特徴とする暗号変換装置。
3. A providing means for providing data C having an n-bit length to be decrypted, and said data M provided from said providing means being provided with an n-bit length using key data K1 and K2 each having an n-bit length. And a decryption device for decrypting and converting the data M into the data M. The decryption device performs a substitution process using π (A) as A and key data K1,
A cyclic shift process is performed with the first bit number, and key data K
2 as a function for performing a substitution process using the second key data and performing a cyclic shift process with a second bit number different from the first bit number, and a first holding unit for holding the two key data K1 and K2; For the data M provided by the first providing means,
The key data K1 and K1 held by the first holding unit
2, a means for generating the data M by executing a process including an operation defined by a function π, and a second holding means for holding the generated data M apparatus.
【請求項4】前記前記データCに対して、関数πで規定
される演算を含む処理を複数回実行することにより前記
データMを生成する手段を有することを特徴とする請求
項3に記載の暗号変換装置。
4. The apparatus according to claim 3, further comprising means for generating the data M by executing a process including an operation defined by a function π a plurality of times on the data C. Cryptographic converter.
JP9329845A 1988-04-28 1988-04-28 Cryptographic converter Expired - Lifetime JP2870532B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9329845A JP2870532B2 (en) 1988-04-28 1988-04-28 Cryptographic converter

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP9329845A JP2870532B2 (en) 1988-04-28 1988-04-28 Cryptographic converter
JP9329841A JP2980085B2 (en) 1988-04-28 1988-04-28 Encryption method and decryption method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP63103919A Division JP2760799B2 (en) 1988-04-28 1988-04-28 Encryption method

Publications (2)

Publication Number Publication Date
JPH10149101A true JPH10149101A (en) 1998-06-02
JP2870532B2 JP2870532B2 (en) 1999-03-17

Family

ID=18225838

Family Applications (11)

Application Number Title Priority Date Filing Date
JP11205770A Pending JP2000035756A (en) 1988-04-28 1988-04-28 Encryption apparatus
JP9329842A Expired - Lifetime JP2798086B2 (en) 1988-04-28 1988-04-28 Encryption and decryption device
JP20577199A Expired - Lifetime JP3275881B2 (en) 1988-04-28 1988-04-28 Code generation method and apparatus
JP9329843A Expired - Lifetime JP2870531B2 (en) 1988-04-28 1988-04-28 Encryption and decryption device
JP9329845A Expired - Lifetime JP2870532B2 (en) 1988-04-28 1988-04-28 Cryptographic converter
JP9329844A Expired - Lifetime JP2798087B2 (en) 1988-04-28 1988-04-28 Cryptographic converter
JP2001310859A Pending JP2002182558A (en) 1988-04-28 1988-04-28 Information processor, computer program product, code generating method, and ic card
JP9329841A Expired - Lifetime JP2980085B2 (en) 1988-04-28 1988-04-28 Encryption method and decryption method
JP9329846A Expired - Lifetime JP2993487B2 (en) 1988-04-28 1997-04-28 Information processing apparatus, IC card, and code generation method
JP22132098A Expired - Lifetime JP3277894B2 (en) 1988-04-28 1998-08-05 Information processing apparatus and code generation method
JP10221319A Pending JPH11109851A (en) 1988-04-28 1998-08-05 Computer program product

Family Applications Before (4)

Application Number Title Priority Date Filing Date
JP11205770A Pending JP2000035756A (en) 1988-04-28 1988-04-28 Encryption apparatus
JP9329842A Expired - Lifetime JP2798086B2 (en) 1988-04-28 1988-04-28 Encryption and decryption device
JP20577199A Expired - Lifetime JP3275881B2 (en) 1988-04-28 1988-04-28 Code generation method and apparatus
JP9329843A Expired - Lifetime JP2870531B2 (en) 1988-04-28 1988-04-28 Encryption and decryption device

Family Applications After (6)

Application Number Title Priority Date Filing Date
JP9329844A Expired - Lifetime JP2798087B2 (en) 1988-04-28 1988-04-28 Cryptographic converter
JP2001310859A Pending JP2002182558A (en) 1988-04-28 1988-04-28 Information processor, computer program product, code generating method, and ic card
JP9329841A Expired - Lifetime JP2980085B2 (en) 1988-04-28 1988-04-28 Encryption method and decryption method
JP9329846A Expired - Lifetime JP2993487B2 (en) 1988-04-28 1997-04-28 Information processing apparatus, IC card, and code generation method
JP22132098A Expired - Lifetime JP3277894B2 (en) 1988-04-28 1998-08-05 Information processing apparatus and code generation method
JP10221319A Pending JPH11109851A (en) 1988-04-28 1998-08-05 Computer program product

Country Status (1)

Country Link
JP (11) JP2000035756A (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005309148A (en) * 2004-04-22 2005-11-04 Hitachi Ltd Data converter and the data conversion method

Also Published As

Publication number Publication date
JP2993487B2 (en) 1999-12-20
JP3277894B2 (en) 2002-04-22
JPH10149100A (en) 1998-06-02
JPH10149098A (en) 1998-06-02
JP2000035756A (en) 2000-02-02
JP2870531B2 (en) 1999-03-17
JP2002182558A (en) 2002-06-26
JP2000035755A (en) 2000-02-02
JP2798086B2 (en) 1998-09-17
JP2798087B2 (en) 1998-09-17
JP2870532B2 (en) 1999-03-17
JP2980085B2 (en) 1999-11-22
JP3275881B2 (en) 2002-04-22
JPH11109851A (en) 1999-04-23
JPH11109852A (en) 1999-04-23
JPH10149097A (en) 1998-06-02
JPH10149102A (en) 1998-06-02
JPH10149099A (en) 1998-06-02

Similar Documents

Publication Publication Date Title
JP2760799B2 (en) Encryption method
JP4127472B2 (en) Data conversion apparatus, data conversion method and program for data conversion apparatus, and computer-readable recording medium
US5222139A (en) Cryptographic method and apparatus
JP5000365B2 (en) Hash value generation device, program, and hash value generation method
JPH08248879A (en) Method and apparatus for encryption by using two keys
JP2011512562A (en) Random encryption and decryption method for access and communication data
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
JPH10240500A (en) Random number generator and method, enciphering device and method, decoder and method and stream cipher system
US6035042A (en) High speed and method of providing high speed table generation for block encryption
JP4515716B2 (en) Extended key generation device, encryption device, and encryption system
JP2798087B2 (en) Cryptographic converter
JP5586758B1 (en) Dynamic encryption key generation system
KR101076747B1 (en) Method and apparatus for random accessible encryption and decryption by using a hierarchical tree structure of stream cipher module
US7142673B1 (en) Method for the cryptographic conversion of L-bit input blocks of digital data into L-bit output blocks
JPH10153954A (en) Ciphering device
CN117725605B (en) Method and system for remotely and automatically compiling electronic archive file information confidentiality
KR102393958B1 (en) Data processing method in system with encryption algorithm
JPH10153955A (en) Ciphering device
JPH10224339A (en) Data security device
JPH10214026A (en) Electronic signature method
JPH11265146A (en) Method and device for generating authenticator
CN112910626A (en) Data encryption and decryption method based on power operation
JP2003308011A (en) Cryptographic key producing apparatus, cryptographic key production program and recording medium with the program recorded thereon
JPH06152590A (en) Encipherment system
JPH0760292B2 (en) Data randomizer

Legal Events

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

Free format text: PAYMENT UNTIL: 20080108

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20080108

Year of fee payment: 9

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

Free format text: PAYMENT UNTIL: 20090108

Year of fee payment: 10

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

Free format text: PAYMENT UNTIL: 20090108

Year of fee payment: 10