JP2000035756A - Encryption apparatus - Google Patents

Encryption apparatus

Info

Publication number
JP2000035756A
JP2000035756A JP11205770A JP20577099A JP2000035756A JP 2000035756 A JP2000035756 A JP 2000035756A JP 11205770 A JP11205770 A JP 11205770A JP 20577099 A JP20577099 A JP 20577099A JP 2000035756 A JP2000035756 A JP 2000035756A
Authority
JP
Japan
Prior art keywords
data
bit
bits
key
processing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP11205770A
Other languages
Japanese (ja)
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 JP11205770A priority Critical patent/JP2000035756A/en
Publication of JP2000035756A publication Critical patent/JP2000035756A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To enable the execution of a cipher algorithm to execute the processing of a 4 byte base for a 32-bit microcomputer by executing the processing including the operation regulated by a function by using key data by forming the set of the data. SOLUTION: The data obtd. by subjecting π3 (A, B) to a first dyadic operation of A and the key data K2 with the data A of the n-bit length is subjected to first substitution processing. The resulted data is subjected to a second dyadic operation with the key data K3 and the resulted data is subjected to second substitution processing. The set of the data of the n-bit length subjected to the additive operation of the resulted data and B is determined as the function to be outputted and the data M2, M3 are held by a first holding means. The key data K2, K3 are held by a second holding means. The set (M1, M2) of the data held by the first holding means is subjected to processing including the operation regulated by the function π3 using the key data K2, K3 held by the second holding means, by which the set (M1, C2) of the data is formed.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、暗号化装置に関す
る。
The present invention relates to an encryption 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.7、pp.1413〜
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. 7, pp. 1413 ~
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】 このようにして得られた48ビットのRは、頭から4ビ
ットごとにその後の2ビットを加えた次のような6ビッ
トずつの8組のブロックを形成している。
[0004] The 48-bit R obtained in this way forms the following eight sets of 6-bit blocks, each of which is obtained by adding the subsequent 2 bits for every 4 bits from the beginning.

【0005】 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ビットを出力する。
[0005] 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 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.

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

【0007】 一つの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段繰り返す。
[0007] 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.

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

【0009】次に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 processing, that is, a part including the function S will be described (see p. 1416 of the above (2), 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, and α3, respectively, and exclusive-ORed with the key data in 8-bit units. After that, processing by a predetermined function S is performed.

【0010】 関数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.

【0011】[0011]

【発明が解決しようとする課題】情報処理と通信技術の
進歩によるコンピュータ・ネットワークの普及化、大衆
化に伴い、データの不正使用や奪取等に対する情報セキ
ュリティを確保するため、伝送路上のデータやコンピュ
ータに蓄積されたデータを暗号化することは有効な対策
であると考えられる。
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.

【0012】昭和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.

【0013】ところが、DESはビット単位での処理が
たいへん多いため、バイト単位の処理を基調とするマイ
クロコンピュータのソフトで実現しようとすると、処理
に時間がかかり、実用的な速度が得られなかった。
[0013] However, since DES performs a great deal 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. .

【0014】この問題に対し、上記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 speedup several times or more as compared with 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.

【0015】しかし、最近のマイクロエレクトロニクス
の技術の進歩によって、8ビットマイクロコンピュータ
よりも16ビットマイクロコンピュータ、さらに、16
ビットマイクロコンピュータよりも32ビットマイクロ
コンピュータが使われ出している。近い将来、32ビッ
トマイクロコンピュータが使われる割合がたいへん大き
くなると予想されている。32ビットマイクロコンピュ
ータの時代になると、さらに高速の暗号処理が要求され
るものと予想される。ところが、32ビットマイクロコ
ンピュータは4バイト基調の処理を行うため、1バイト
基調の8ビットマイクロコンピュータ用に設計されたF
EALを32ビットマイクロコンピュータで実現しよう
とすると非効率であった。
However, with recent advances in microelectronics technology, 16-bit microcomputers have been replaced by 8-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.

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

【0017】本発明の目的は、32ビットマイクロコン
ピュータ向けの4バイト基調の処理を行う暗号アルゴリ
ズムを実行する暗号化装置を提供することにある。
An object of the present invention is to provide an encryption device for executing an encryption algorithm for performing a process based on 4 bytes for a 32-bit microcomputer.

【0018】[0018]

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

【0019】すなわち、π3(A,B)をnビット長の
データAと、Aと鍵データK2との第1の2項演算を行
ない、当該第1の2項演算から得られるデータに対して
第1の換字処理を行ない、当該第1の換字処理から得ら
れるデータに対して鍵データK3との第2の2項演算を
行ない、当該第2の2項演算から得られるデータに対し
て第2の換字処理を行ない、さらに当該第2の換字処理
から得られるデータとBとの加法演算を行なったnビッ
ト長のデータとの組を出力する関数とし、前記データM
1およびM2を保持する第1の保持手段と、前記鍵デー
タK2、K3を保持する第2の保持手段と、前記第1の
保持手段が保持する前記データの組(M1,M2)に対
して、前記第2の保持手段が保持する前記鍵データK
2、K3を用いて関数π3で規定される演算を含む処理
を実行することによりデータの組(M1,C2)を生成
する手段とを有する。
That is, π3 (A, B) is subjected to a first binary operation of n-bit data A, A and key data K2, and the data obtained from the first binary operation is calculated. A first substitution process is performed, a second binary operation with key data K3 is performed on data obtained from the first substitution process, and a second binary operation is performed on data obtained from the second binary operation. 2 is a function that outputs a set of data obtained from the second substitution processing and n-bit data obtained by performing an addition operation on B,
1 and M2, a second holding means for holding the key data K2 and K3, and a data set (M1, M2) held by the first holding means. , The key data K held by the second holding means
Means for generating a data set (M1, C2) by executing a process including an operation defined by a function π3 using K3.

【0020】また、前記第1及び第2の2項演算は、各
々加法演算であることを特徴とする。
Further, the first and second binomial operations are each an additive operation.

【0021】また、前記第1及び第2の2項演算の各々
を1命令で実行可能であり、前記第1及び第2の換字処
理を各々1命令で実行可能である演算器を備え、前記デ
ータの組( M1,C2)を生成する手段は、前記第1
及び第2の2項演算、及び前記第1及び第2の換字処理
を当該演算器を用いて実行することを特徴とする。
In addition, there is provided a computing unit capable of executing each of the first and second binary operations by one instruction, and capable of executing each of the first and second substitution processing by one instruction. The means for generating the data set (M1, C2) comprises:
And the second and second binomial operations and the first and second substitution processing are executed using the arithmetic unit.

【0022】さらに、前記データの組( M1,C2)
を生成する手段は、前記第1の保持手段が保持する前記
データの組(M1,M2)に対して、前記第2の保持手
段が保持する前記鍵データK2、K3を用いて関数π3
で規定される演算を実行した後、当該関数π3で規定さ
れる演算の実行結果から得られるデータと鍵データK1
より得られるデータとのAND演算を含む処理を実行す
ることによりデータの組( M1,C2)を生成するこ
とを特徴とする。
Further, the data set (M1, C2)
Means for generating a function π3 with respect to the data set (M1, M2) held by the first holding means using the key data K2, K3 held by the second holding means.
After executing the operation defined by the equation (3), data obtained from the execution result of the operation defined by the function π3 and the key data K1
A data set (M1, C2) is generated by executing a process including an AND operation with the obtained data.

【0023】これにより、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.

【0024】[0024]

【発明の実施の形態】(1)第1の実施例 図1は、本発明の一実施例である。DESCRIPTION OF THE PREFERRED EMBODIMENTS (1) First Embodiment FIG. 1 shows an embodiment of the present invention.

【0025】図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.

【0026】図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 of FIG.

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

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

【0029】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 +.

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

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

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

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

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

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

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

【0037】 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 ← x 209: x ← Rot3 (x) (+) x Here, Rot3 (x) is x Is cyclically shifted left by 8 bits.

【0038】 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) Here, Rot16 (x) cyclically 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.

【0039】 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.

【0040】以上、図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).

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

【0042】したがって、復号関数として、 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.

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

【0044】このとき、復号変換の式は 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)

【0045】同様に、一般に本実施例をn回繰り返した
ものを暗号変換としてもよい。
Similarly, in general, what is obtained by repeating this embodiment n times may be used as encryption conversion.

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

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

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

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

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

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

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

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

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

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

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

【0057】 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) Here, 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.

【0058】 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.

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

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

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

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

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

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

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

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

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

【0068】 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.

【0069】 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 WORK1 Upper 8 bits of WO
RK2 is output as the lower 8 bits of the output data.

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

【0071】(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.

【0072】(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.

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

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

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

【0076】(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.

【0077】[0077]

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

【0078】つまり、図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.

【0079】ここに、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 conversion is made to bi = 1 or 0 (i = 1 to 4) means that the Boolean 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).

【0080】また、図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.

【0081】図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.

【0082】これにより、本実施例は、高度なランダム
性を持つ暗号変換を効率良く行うという効果が得られる
ことが分かる。
Thus, 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:
Cryptogram.

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】nビット長のデータM1およびM2を鍵デ
ータK2、K3を用いてnビット長のデータC2に暗号
変換するための暗号化装置であって、 π3(A,B)をnビット長のデータAと、Aと鍵デー
タK2との第1の2項演算を行ない、当該第1の2項演
算から得られるデータに対して第1の換字処理を行な
い、当該第1の換字処理から得られるデータに対して鍵
データK3との第2の2項演算を行ない、当該第2の2
項演算から得られるデータに対して第2の換字処理を行
ない、さらに当該第2の換字処理から得られるデータと
Bとの加法演算を行なったnビット長のデータとの組を
出力する関数とし、 前記データM1およびM2を保持する第1の保持手段
と、 前記鍵データK2、K3を保持する第2の保持手段と、 前記第1の保持手段が保持する前記データの組(M1,
M2)に対して、前記第2の保持手段が保持する前記鍵
データK2、K3を用いて関数π3で規定される演算を
含む処理を実行することによりデータの組( M1,C
2)を生成する手段とを有することを特徴とする暗号化
装置。
An encryption apparatus for encrypting n-bit data M1 and M2 into n-bit data C2 using key data K2 and K3, wherein π3 (A, B) is converted to n-bit data. A first binary operation is performed on the long data A, A and the key data K2, a first substitution process is performed on data obtained from the first binary operation, and the first substitution process is performed. Performs a second binary operation on the key data K3 for the data obtained from
A function for performing a second substitution process on data obtained from the term operation, and further outputting a set of data obtained from the second substitution process and n-bit data obtained by performing an addition operation on B A first holding unit that holds the data M1 and M2; a second holding unit that holds the key data K2 and K3; and a data set (M1, M1) held by the first holding unit.
M2) is subjected to a process including an operation defined by a function π3 using the key data K2 and K3 held by the second holding means, thereby forming a data set (M1, C
Means for generating 2).
【請求項2】前記第1及び第2の2項演算は、各々加法
演算であることを特徴とする請求項1に記載の暗号化装
置。
2. The encryption apparatus according to claim 1, wherein said first and second binary operations are each an addition operation.
【請求項3】前記第1及び第2の2項演算の各々を1命
令で実行可能であり、前記第1及び第2の換字処理を各
々1命令で実行可能である演算器を備え、 前記データの組( M1,C2)を生成する手段は、前
記第1及び第2の2項演算、及び前記第1及び第2の換
字処理を当該演算器を用いて実行することを特徴とする
請求項2に記載の暗号化装置。
3. An arithmetic unit capable of executing each of the first and second binomial operations with one instruction, and executing each of the first and second substitution processing with one instruction. The means for generating a data set (M1, C2) executes the first and second binomial operations and the first and second substitution processing using the arithmetic unit. Item 3. The encryption device according to Item 2.
【請求項4】前記データの組( M1,C2)を生成す
る手段は、前記第1の保持手段が保持する前記データの
組(M1,M2)に対して、前記第2の保持手段が保持
する前記鍵データK2、K3を用いて関数π3で規定さ
れる演算を実行した後、当該関数π3で規定される演算
の実行結果から得られるデータと鍵データK1より得ら
れるデータとのAND演算を含む処理を実行することに
よりデータの組( M1,C2)を生成することを特徴
とする請求項3に記載の暗号化装置。
4. The means for generating the data set (M1, C2) is provided by the second holding means for holding the data set (M1, M2) held by the first holding means. After performing the operation defined by the function π3 using the key data K2 and K3, the AND operation of the data obtained from the execution result of the operation specified by the function π3 and the data obtained from the key data K1 is performed. 4. The encryption device according to claim 3, wherein a data set (M1, C2) is generated by executing a process including the data set.
JP11205770A 1988-04-28 1988-04-28 Encryption apparatus Pending JP2000035756A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11205770A JP2000035756A (en) 1988-04-28 1988-04-28 Encryption apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP9329841A JP2980085B2 (en) 1988-04-28 1988-04-28 Encryption method and decryption method
JP11205770A JP2000035756A (en) 1988-04-28 1988-04-28 Encryption apparatus

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP9329841A Division JP2980085B2 (en) 1988-04-28 1988-04-28 Encryption method and decryption method

Publications (1)

Publication Number Publication Date
JP2000035756A true JP2000035756A (en) 2000-02-02

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 After (10)

Application Number Title Priority Date Filing Date
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

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
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
JPH10149101A (en) 1998-06-02
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
KR100308322B1 (en) Method and apparatus for performing strong encryption or decryption of data using special encryption functions
JP3225440B2 (en) Digital signal block conversion device and method of using the same
EP0725511A2 (en) Method for data encryption/decryption using cipher block chaining (CBC) and message authetication codes (MAC)
KR20180081559A (en) Generate key sequence for encryption operation
CN113098675B (en) Binary data encryption system and method based on polynomial complete homomorphism
JP2950485B2 (en) Stream cipher processor
JP4515716B2 (en) Extended key generation device, encryption device, and encryption system
JP2980085B2 (en) Encryption method and decryption method
JPH10153954A (en) Ciphering device
CN116527236B (en) Information change verification method and system for encryption card
KR102393958B1 (en) Data processing method in system with encryption algorithm
JPH10153955A (en) Ciphering device
JP3115350B2 (en) Encryption method
JPH10214026A (en) Electronic signature method
JP2762470B2 (en) Encryption processing method and IC card device using the method
JPH10224339A (en) Data security device
JP2005529365A (en) AES mix column conversion
JPH03155591A (en) Sequential ciphering device
KR19990027040A (en) Encryption method and device
JPH081367U (en) Sequential encryption device
JPH10153953A (en) Ciphering device
JPH0244391A (en) Enciphering processing method and ic card device using such method
JP2000112348A (en) Encryption apparatus and decryption apparatus
JP2003308011A (en) Cryptographic key producing apparatus, cryptographic key production program and recording medium with the program recorded thereon

Legal Events

Date Code Title Description
RD01 Notification of change of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7421

Effective date: 20060427