JP2000010480A - Random number generation method and cipher communication method as well as memory medium storing random number generation program - Google Patents

Random number generation method and cipher communication method as well as memory medium storing random number generation program

Info

Publication number
JP2000010480A
JP2000010480A JP10175101A JP17510198A JP2000010480A JP 2000010480 A JP2000010480 A JP 2000010480A JP 10175101 A JP10175101 A JP 10175101A JP 17510198 A JP17510198 A JP 17510198A JP 2000010480 A JP2000010480 A JP 2000010480A
Authority
JP
Japan
Prior art keywords
random number
decimal
binary
bit
conversion table
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
JP10175101A
Other languages
Japanese (ja)
Other versions
JP2980588B1 (en
Inventor
Koji Take
弘司 武
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.)
METEOOLA SYST KK
Original Assignee
METEOOLA SYST KK
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 METEOOLA SYST KK filed Critical METEOOLA SYST KK
Priority to JP10175101A priority Critical patent/JP2980588B1/en
Application granted granted Critical
Publication of JP2980588B1 publication Critical patent/JP2980588B1/en
Publication of JP2000010480A publication Critical patent/JP2000010480A/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a genuine random number generation apparatus which is safe in spite of opening of all of information exclusive of cipher keys to the public and is high in speed equal to or higher than a communication speed and a cipher communication method and an apparatus therefor. SOLUTION: This cipher communication method uses a decimal integer random number generator which has a period of >=1030 formed by using a multiplex accuracy computation method capable of producing arbitrary accuracy, an apparatus which has a bit conversion table having all patterns of 8 or 16 bits, consults the table by using a portion of decimal random numbers obtd. by adding the decimal number of a secret key to the decimal integer random number generator and continuously fetches the binary pit strings of 8 or 16 bits at one time and an apparatus which reads communication text or ciphertext, converts the communication text into the ciphertext or converts the ciphertext into the communication text by executing exclusive OR (XOR) of this binary information and the binary bit strings.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、無限周期の乱数列
を1回限りの使い捨て鍵として用いるストリーム暗号の
通信方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a stream cipher communication method using a random number sequence having an infinite period as a one-time use disposable key.

【0002】[0002]

【従来の技術】通信ネットワークにおける回線暗号装置
では、一般にストリーム暗号が多く用いられている。ス
トリーム暗号の鍵系列の生成方式を同期式と自己同期式
とに分ける事が出来る。同期式では、鍵系列が通信文
(或は暗号文)の系列と独立に生成され、自己同期式で
は、鍵系列が前の暗号文の系列に依存して生成される。
いずれにせよ鍵系列としては、真正乱数、即ち0と1の
発生確率がおのおの0.5で、各ビットは他の部分と独
立で、かつ同一に分布する乱数(参考文献:「暗号理論
入門」著者:岡本栄司、共立出版株式会社、1994年
出版)になるべく近いものが望ましい。真正乱数を用い
たストリーム暗号が、完全に解読不可能であることは、
この技術分野では、良く知られている事実である。本発
明は、同期式および自己同期式に用いる事の出来るスト
リーム暗号の方法を提供する。
2. Description of the Related Art Stream ciphers are generally used in line encryption devices in communication networks. The stream cipher key sequence generation method can be divided into a synchronous method and a self-synchronous method. In the synchronous system, the key sequence is generated independently of the sequence of the communication text (or ciphertext). In the self-synchronous system, the key sequence is generated depending on the previous ciphertext sequence.
In any case, the key sequence is a true random number, that is, a random number in which the probability of occurrence of 0 and 1 is 0.5 and each bit is distributed independently and identically to other parts (Reference: "Introduction to Cryptography"). Author: Eiji Okamoto, Kyoritsu Shuppan Co., Ltd., published in 1994). The fact that a stream cipher using true random numbers is completely unbreakable means that
This is a well-known fact in the art. The present invention provides a stream cipher method that can be used in a synchronous and self-synchronous manner.

【0003】真正乱数は、現在、物理的にしか作成でき
ず、また0と1のバランス性でさえ補正を必要とするよ
うなものしか出来ない様である。またたとえ作成できた
としても、暗号として用いるには、再現性が無い為受信
側で同じものを作成できず、通信文(以下平文と言う)
と同じ長さだけ必要とされる真正乱数を通信相手に送ら
ねばならないと言う矛盾がある。そこで真正乱数に近い
疑似的乱数を、確定的(決定性)アルゴリズムから作ろ
うとする工夫がなされている。
At present, true random numbers can only be physically created, and even the balance of 0 and 1 seems to require only correction. Even if it can be created, if it is used as a cipher, it cannot be created on the receiving side due to lack of reproducibility because it has no reproducibility.
There is a contradiction that a true random number required by the same length must be sent to the communication partner. Therefore, a scheme has been devised to create a pseudo random number close to a true random number from a deterministic (deterministic) algorithm.

【0004】ストリーム暗号に用いられる鍵系列は、現
在、非線型フィードバック、シフトレジスターを複雑に
組み合わせて作られる場合が多いが、この鍵系列作成方
法では、得られる乱数の周期が比較的短く、またレジス
ターの構成やアルゴリズムを公開する事は安全性の点か
ら出来ない。本発明は、初期条件(暗号鍵)さえ秘密に
しておけば、アルゴリズムを公開しても同じ乱数列が作
れないと言う意味で安全性が保たれ、しかも乱数の周期
が、任意に長く取れる疑似乱数の発生方法に関する。
At present, a key sequence used for stream cipher is often created by a complicated combination of non-linear feedback and a shift register. In this key sequence creation method, the cycle of the obtained random numbers is relatively short, and It is not possible to disclose the register configuration or algorithm from the viewpoint of security. The present invention maintains the security that if the initial conditions (encryption key) are kept secret, the same random number sequence cannot be created even if the algorithm is released, and the pseudo-random number cycle can be arbitrarily long. It relates to a method for generating random numbers.

【0005】この疑似乱数の発生技術として、本発明者
による特願平8−108058(先願1)及び特願平8
−338583(先願2)がある。この技術を具体的に
説明する。先ず初めに、周期の長い10進乱数発生器を
使用して、必要とする2進ビット列の長さ以上の桁数の
10進数を作り、これを1桁毎に0か1に対応させる変
換を開示している。10進乱数の周期を長くする為に、
乱数の桁数を30以上にとり、このため乱数発生器は多
重精度演算法を採用している。このようにして作られた
10進数1桁を、0か1に圧縮変換し、それを2進乱数
として使用している。
As techniques for generating the pseudo-random numbers, Japanese Patent Application Nos. 8-108058 (prior application 1) and 8
There is -338584 (prior application 2). This technique will be described specifically. First, using a long-period decimal random number generator, create a decimal number having more digits than the required length of the binary bit string, and convert it to 0 or 1 for each digit. Has been disclosed. To lengthen the period of the decimal random number,
The number of digits of the random number is set to 30 or more. For this reason, the random number generator employs a multi-precision arithmetic method. One digit of the decimal number created in this way is compressed and converted to 0 or 1, and is used as a binary random number.

【0006】なお疑似乱数を暗号通信に使う場合には、
初期条件として乱数の種を通信相手に送れば良いので、
秘密鍵暗号で使われている鍵配送方式が使用可能であ
る。
When pseudo-random numbers are used for cryptographic communication,
Since it is only necessary to send the seed of the random number to the communication partner as the initial condition,
The key distribution method used in secret key cryptography can be used.

【0007】[0007]

【発明が解決しようとする課題】ところで、先願の特願
平8−108058号公報、特願平8−338583号
公報に開示されている技術は、3つの欠点を持ってい
る。1つは、真正乱数に近い2進ビット列を得る事が、
3つのパラメータ即ち、10進乱数のアルゴリズムと定
数、10進/2進の変換方法、及び10進乱数の初期値
等を変えても非常に困難な点である。2つ目は、演算ス
ピードの問題である。多重精度演算法で計算した整数を
1桁毎に分解して、1ビットづつ作っていては、通信速
度に追従出来ない。3つ目は、アルゴリズムを公開出来
ないと言う点である。圧縮変換によって10進数は、見
えない様になっているが、一度10進数が知られると、
2進ビット列は正確に予測できる事になる。演算スピー
ドを上げる為に、圧縮変換を4回以上実行する事が、1
0進数が割り出されると言う意味で差し障りとなる事は
言うまでもない。また仮に、圧縮変換を2回実行するも
のとした場合でも、アルゴリズムを公開する事は安全で
ない。
However, the techniques disclosed in Japanese Patent Application Nos. Hei 8-108058 and Hei 8-338583 have three disadvantages. One is to obtain a binary bit string close to a true random number,
It is very difficult to change the three parameters, that is, the algorithm and constant of decimal random number, the conversion method of decimal / binary, and the initial value of decimal random number. Second, there is the problem of calculation speed. If the integer calculated by the multi-precision arithmetic method is decomposed for each digit and made one bit at a time, the communication speed cannot be followed. Third, the algorithm cannot be published. The decimal number is made invisible by the compression conversion, but once the decimal number is known,
The binary bit string can be accurately predicted. Executing compression conversion four times or more to increase the operation speed
Needless to say, this is an obstacle in that a decimal number is calculated. Also, even if the compression conversion is performed twice, it is not safe to publish the algorithm.

【0008】以下先願の方法で作成した2進ビット列
が、真正乱数にどの位近いかについて述べるが、この尺
度は明確な規準がないので、以下の4つの条件について
調べ、また、条件a.とb.については統計的な有意性
検定を行った。
The following describes how close a binary bit string created by the method of the prior application is to a true random number. However, since there is no clear standard for this measure, the following four conditions are examined and the condition a. And b. Was subjected to a statistical significance test.

【0009】a.発生ビットのバランス性が良い事。
(1ビットのバランスは、自明であるが2以上8ビット
までのバランスも調べた。例えば、2ビットのバランス
では、乱数ビット列を2ビットづつ分割して00,0
1,10,11の個数を数える。)
A. Good balance of generated bits.
(The 1-bit balance is obvious, but the balance from 2 to 8 bits was also examined. For example, in the 2-bit balance, the random number bit string is divided into two bits at a time, 00, 0
Count the number of 1,10,11. )

【0010】b.長さがiとi+1の連の個数の比が
0.5である事。但しここで言う連とは、0と1のビッ
ト列の中で、1がn個続いてその両側が0ではさまれて
いる部分を、長さnの“1の連”と言う。0の後に1が
既にn個続いて出ている時に、次に0が出て長さnの連
が出来る確率は0.5であり、一方次に1、その次に0
が出て長さn+1の連が出来る確率は0.25であるか
ら、limt→∞(長さn+1の連の個数/長さnの連
の個数)=0.5が確率1で成り立つ。“0の連”につ
いても同様である。limt→∞はビット列を無限に長
くする事を意味する。(参考文献:「乱数」著者:伏見
正則、東京大学出版会、1989年)
B. The ratio of the number of runs of length i and i + 1 is 0.5. However, the run referred to here is a portion of a bit sequence of 0s and 1s where n consecutive 1s and both sides are sandwiched by 0s are a "run of 1s" of length n. When n 1s have already been output after 0, the probability that the next 0 will be output to form a run of length n is 0.5, while the next is 1, then the 0
Is 0.25, and the probability that limit → ∞ (number of runs of length n + 1 / number of runs of length n) = 0.5 holds with probability 1. The same applies to “run of 0”. lim → ∞ means that the bit string is infinitely long. (Reference: "Random number" Author: Masanori Fushimi, University of Tokyo Press, 1989)

【0011】c.自己相関がない事。C. No autocorrelation.

【0012】d.周期は実用的に無いと言えるほど長い
事。
D. The period must be long enough to be practically non-existent.

【0013】先願の方法で作成した2進ビット列を、上
記条件で厳密に調べたところ、条件c.とd.では問題
は無いが、a.の2ビット以上のバランス性とb.の統
計検定に有意性が認められ不合格になる場合が多い。
When the binary bit string created by the method of the prior application was strictly examined under the above conditions, the condition c. And d. Is no problem, but a. 2 bits or more of balance and b. Is often rejected because of its significance.

【0014】演算スピードが遅いと言う問題は、暗号通
信の分野では致命的な欠点となり、オンラインで情報を
送信するスピードに追従できない為、前もって2進ビッ
ト列を作っておき、暗号化又は複号化を行うタイミング
に合わせて読み込むと言った使い方の制限を余儀なくさ
れる。本発明が解決しようとする問題は、暗号鍵以外の
全ての情報を公開しても安全な、通信速度と同程度以上
に高速な、真正乱数に近い疑似乱数の発生方法を提供す
る事である。
The problem that the operation speed is slow is a fatal drawback in the field of cryptographic communication. Since it is impossible to follow the speed of transmitting information online, a binary bit string is created in advance, and encryption or decryption is performed. You have to restrict the usage, such as loading at the timing of performing. The problem to be solved by the present invention is to provide a method for generating pseudo-random numbers close to true random numbers, which is safe even if all information other than the encryption key is disclosed, and is as fast as the communication speed. .

【0015】[0015]

【課題を解決するための手段】上記の課題を解決する為
に、本発明の第1の実施態様によれば、任意の精度が出
せる多重精度演算法を用いて作成した1060以上の周期
を持つ10進整数乱数発生器と、8ビット又は16ビッ
トの全パターンを持つビット変換テーブルを有し、秘密
鍵の10進数を前記10進整数乱数発生器に加えて得ら
れる10進乱数の一部分を使ってビット変換テーブルを
引き、一度に8又は16ビットの2進ビット列を連続し
て取り出す装置と、平文又は暗号文を読み込み、そのバ
イナリー情報と、前記2進ビット列との排他的論理和
(XOR)演算を行って、平文を暗号文に変換するか、
または暗号文を平文に変換する装置とを使用する暗号通
信方法が提供される。
According to a first embodiment of the present invention, to solve the above-mentioned problem, a cycle of 10 60 or more created by using a multi-precision arithmetic method capable of providing an arbitrary accuracy is used. And a bit conversion table having an entire pattern of 8 bits or 16 bits, and a part of a decimal random number obtained by adding a decimal number of a secret key to the decimal integer random number generator. A device for pulling a bit conversion table and continuously extracting a binary bit string of 8 or 16 bits at a time, reading a plaintext or ciphertext, and obtaining an exclusive OR (XOR) of the binary information and the binary bit string ) Operation to convert plaintext to ciphertext,
Alternatively, there is provided an encrypted communication method using an apparatus for converting a ciphertext into a plaintext.

【0016】上記の課題を解決する為に、本発明の第2
および第3の実施態様によれば、任意の精度が出せる多
重精度演算法を用いて作成した1030以上の周期を持つ
10進整数乱数発生器と、通常精度の10進整数乱数発
生器と、8ビット又は16ビットの全パターンを持つビ
ット変換テーブルを有し、秘密鍵の10進数を前記多重
精度10進整数乱数発生器に加えて得られる10進乱数
を基に、この例では線形合同法を用いている通常精度の
10進整数乱数発生器のパラメータと初期値を計算して
からそれを使い10進整数乱数を発生させる。そして得
られる通常精度の10進整数乱数を使ってビット変換テ
ーブルを引き、一度に8又は16ビットの2進ビット列
を連続して取り出す装置と、平文又は暗号文を読み込
み、そのバイナリー情報と、前記2進ビット列との排他
的論理和(XOR)演算を行って、平文を暗号文に変換
するか、または暗号文を平文に変換する装置とを使用す
る暗号通信方法が提供される。
In order to solve the above-mentioned problems, the second aspect of the present invention
According to the third and third embodiments, a decimal integer random number generator having a period of 10 30 or more created by using a multi-precision arithmetic method capable of giving an arbitrary accuracy, a decimal integer random number generator having a normal accuracy, This example has a bit conversion table having an entire pattern of 8 bits or 16 bits, and in this example, a linear congruential method based on a decimal random number obtained by adding a decimal number of a secret key to the multi-precision decimal integer random number generator. Calculates parameters and initial values of a normal-precision decimal integer random number generator using, and uses them to generate decimal integer random numbers. Then, a bit conversion table is obtained by using the obtained normal-precision decimal integer random number, a device for continuously extracting a binary bit string of 8 or 16 bits at a time, a plaintext or a ciphertext are read, and the binary information thereof is read. An encryption communication method is provided, which performs an exclusive OR (XOR) operation with a binary bit string to convert a plaintext into a ciphertext or a device that converts a ciphertext into a plaintext.

【0017】上記の課題を解決する為に、本発明の第4
の実施態様によれば、ビット変換テーブルは、各行に格
納してあるビット列が上記実施態様に述べたような固定
長のものでなく、1から10ビットの長さを持ち、更に
テーブルの各行が0だけ、或は1だけとなっているもの
を使用する。なお第4の実施態様では、ビット変換テー
ブルのみについて述べてある。
In order to solve the above-mentioned problems, the fourth aspect of the present invention is described.
According to the embodiment, in the bit conversion table, the bit string stored in each row is not of a fixed length as described in the above embodiment, has a length of 1 to 10 bits, and further, each row of the table is Use only 0 or 1 only. In the fourth embodiment, only the bit conversion table is described.

【0018】ここで、前記4ケースのビット変換テーブ
ルの初期化処理において、その行番号を暗号鍵から作成
した乱数を用いてランダマイズする事が大切である。こ
の処理を加える事により、使用開始時のビット変換テー
ブルの行番号の並びが隠せる。
Here, in the initialization processing of the bit conversion table in the above four cases, it is important to randomize the line number using a random number created from an encryption key. By adding this processing, the arrangement of the row numbers of the bit conversion table at the start of use can be hidden.

【0019】また、前記ビット変換テーブルからビット
列を取り出す際、該ビット列の並び順を変えたり、およ
び/又は、該ビット列の一部又は全部を取り除く処理を
付加する事が可能である。この処理をビット処理演算で
行う事により、固定長のビット変換テーブルの1行分の
長さを8から32ビットの範囲で自由にとる事が出来る
ようになる。この固定長のビット数は、平文の長さとの
関係で決める必要がある。例えば、平文が500バイト
程度であれば8ビットに、500〜5000バイトであ
れば12ビットに、それ以上では16ビットにとる事が
推奨される。
When extracting a bit string from the bit conversion table, it is possible to add a process of changing the order of the bit string and / or removing a part or all of the bit string. By performing this processing by a bit processing operation, the length of one row of the fixed-length bit conversion table can be freely set in a range of 8 to 32 bits. The number of fixed-length bits must be determined in relation to the length of the plaintext. For example, it is recommended to take 8 bits if the plaintext is about 500 bytes, 12 bits if the plaintext is 500 to 5000 bytes, and 16 bits if it exceeds 500 bytes.

【0020】また、前記ビット変換テーブル引く場合
に、全部の行が引かれる迄出来るだけ新しい行をランダ
ムな順に引くように制御する。こうする事により、2進
乱数の性質が真正乱数に近くなる事が発見された。また
全部の行が引かれた後の次の一巡の順序は、それまでの
順序と無相関に近くなる様制御する。なお、ビット変換
テーブルの引き方を完全に制御すると、最後の一行が予
測できるようになる。この場合は、暗号方式を自己同期
式にするか、2進乱数を1ブロック(例えば8ビット)
余分に作り、隣り合うブロックで排他的論理和演算を行
ってから改めて2進乱数とする。
Further, when the bit conversion table is to be drawn, control is performed so that new rows are drawn in a random order as far as possible until all the rows are drawn. By doing so, it was discovered that the property of the binary random number was close to a true random number. Also, the order of the next round after all the lines are drawn is controlled so as to be almost uncorrelated with the order up to that time. If the way of drawing the bit conversion table is completely controlled, the last row can be predicted. In this case, use a self-synchronous encryption method or use one block of binary random numbers (for example, 8 bits).
It is made extra, an exclusive OR operation is performed on adjacent blocks, and then a new binary random number is obtained.

【0021】ここで10進乱数発生器について触れてお
く。本発明で検討した10進乱数発生器のアルゴリズム
は、次の4種類である。
Here, the decimal random number generator will be described. The algorithms of the decimal random number generator studied in the present invention are the following four types.

【0022】1.線形合同法 Xn+1=(aXn+c)mod m ここでa,cはパラメータであり、mはたとえば1064
である。modは 剰余を求める演算である。この場合
Xiは64桁の正数である。
1. Linear congruential method X n + 1 = (aX n + c) mod m where a and c are parameters, and m is, for example, 10 64
It is. mod is an operation for obtaining a remainder. In this case, Xi is a 64-digit positive number.

【0023】2.かき混ぜ法 線形合同法の改良版である。補助表V[0],V
[1],,,V[k−1]にXn の最初のk個の値を入
れ、Yにはk+1番目の値を入れる。(kは100とす
る)
2. Stirring An improved version of the linear congruential method. Auxiliary table V [0], V
The first k values of X n are put in [1],..., V [k−1], and the (k + 1) th value is put in Y. (K is 100)

【外1】 きくない最大の整数である。jは0≦j<kの乱数とな
る。
[Outside 1] This is the largest unintended integer. j is a random number satisfying 0 ≦ j <k.

【0024】b.V[j]をYとし出力とする。その後
で、V[j]にXnの次の値を入れる。
B. Let V [j] be Y and output. After that, the next value of Xn is put into V [j].

【0025】c.a.へ移る。C. a. Move to

【0026】この方法は、乱数を線形合同法でk個作っ
て置き、それを取り出す時かき混ぜてから取り出そうと
言うのである。
According to this method, k random numbers are produced by a linear congruential method, placed, and when they are taken out, they are stirred and then taken out.

【0027】3.ロジステイク写像法 Xn+1=4Xn(1−Xn) この乱数は、0<x<1の値を持つ。整数乱数の左端に
小数点があるので注意が必要である。理論周期解があ
り、その確率をゼロにする事はできないので短い周期に
嵌まる事がある。しかし初期値のみで使えるので、便利
である。
3. Rojisuteiku Mapping Method X n + 1 = 4X n ( 1-X n) The random number has a 0 <x <1 value. Note that there is a decimal point at the left end of the integer random number. Since there is a theoretical periodic solution and its probability cannot be made zero, it may fit into a short period. However, it is convenient because you can use only the initial value.

【0028】4.加算法 Xn=(Xn-24+Xn-55)mod m n≧55 この方法は、最初の55個は別の乱数発生器で作る必要
がある。加算と剰余演算のみである為計算速度が速い。
4. Addition method X n = (X n−24 + X n−55 ) mod mn ≧ 55 In this method, the first 55 pieces need to be made by another random number generator. The calculation speed is fast because only addition and remainder operations are performed.

【0029】以上の1,2,4については、クヌースの
本(参考文献:「準数演算法/乱数」,著者;KNUT
H,訳;渋谷政昭、サイエンス社、1985年)を、3
については、(参考文献:「カオス入門」,著者;長島
弘幸、馬場良和、倍風館、1993年)を参照した。
The above 1, 2 and 4 are described in Knuth's book (Reference: "Quadrature arithmetic method / random number", author; KNUT
H, translation; Masaaki Shibuya, Science, 1985)
Reference was made to (Reference: "Introduction to Chaos", author; Hiroyuki Nagashima, Yoshikazu Baba, Baifukan, 1993).

【0030】線形合同法は、従来暗号には不向きである
と考えられてきたが、乱数をそのままでは扱わないと
か、ビット変換テーブルの行番号では、最初の行番号を
ランダマイズするとかして追跡を意識した使い方をすれ
ば、使える。パラメータa,cの選択だけでビット変換
テーブルの全行数を最大周期とする乱数が得られるのは
魅力であるが、危険な場合は、図2のS211からS2
17の方法でテーブル行をランダマイズしてから使うべ
きである。
Conventionally, the linear congruential method has been considered to be unsuitable for cryptography. However, tracking is conscious by not treating random numbers as they are or by randomizing the first line number in the line number of the bit conversion table. You can use it if you use it properly. It is attractive that a random number having the maximum number of rows of the bit conversion table as the maximum cycle can be obtained only by selecting the parameters a and c.
You should randomize the table rows in 17 ways before using them.

【0031】以下、本発明の作用について説明する。本
発明の暗号通信方法では、上記で指摘した3つの問題点
を一挙に解決する方法が考案され、使用されている。以
下、その代表的なケースについて説明する。
Hereinafter, the operation of the present invention will be described. In the cryptographic communication method of the present invention, a method for solving the above-mentioned three problems at once is devised and used. Hereinafter, a typical case will be described.

【0032】先ず、8ビットの全パターン即ち、000
00000,00000001,00000010,
…,11111111を格納するための256行×8列
のテーブルを用意する。上記テーブルの行の順番は、所
与の10進乱数の鍵を使ってランダマイズする。即ち、
秘密鍵以外の情報を公開してもテーブルの行の順番は、
攻撃者には分からないようにする。次に、多重精度演算
法を使っている10進乱数発生器に鍵を加えて得られる
長い桁数の10進数を作る。この10進数を1桁毎に分
解して取り出し、その情報を使って上記テーブルを引
く。テーブルから8ビットをそのまま取り出し、2進乱
数とする。長い桁数の10進数を使い切ったら、多重精
度演算法の10進乱数発生器で長い桁数の10進数を更
新する。
First, all patterns of 8 bits, that is, 000
000000000000000000001010,
.., 11111111 are prepared in a table of 256 rows × 8 columns. The order of the rows in the above table is randomized using a given decimal random key. That is,
Even if information other than the secret key is disclosed, the order of the rows in the table is
Don't let the attacker know. Next, a key is added to a decimal random number generator using a multi-precision arithmetic method to create a long-digit decimal number obtained. This decimal number is decomposed for each digit and taken out, and the table is drawn using the information. The 8 bits are directly taken out of the table and used as a binary random number. When the long-digit decimal number is used up, the long-digit decimal number is updated by a multi-precision arithmetic decimal random number generator.

【0033】テーブルの種類は、8ビットの他、10,
12,16ビット等が使える。2進ビット列に0があま
り長く続くのを避けたければ、例えば全部が0である行
を除いたり、ある行だけにテーブルを限定してしまえば
良い。ただしこの場合、出力の2進ビット列の性質は悪
くなり、真正乱数から遠ざかることが分かっている。
The type of table is 10 bits in addition to 8 bits.
12 or 16 bits can be used. If one wants to avoid a binary bit string having 0s continuing for too long, for example, it is only necessary to remove rows where all 0s are present or to limit the table to only certain rows. However, in this case, it is known that the property of the binary bit string of the output deteriorates, and the binary bit string goes away from the true random number.

【0034】[0034]

【発明の実施の形態】以下、本発明の実施の形態を図面
を参照して説明する。
Embodiments of the present invention will be described below with reference to the drawings.

【0035】(第1の実施の形態)図1は、本発明の第
1の実施の形態に係る暗号通信方法の動作を示すフロー
チャートである。
(First Embodiment) FIG. 1 is a flowchart showing the operation of the cryptographic communication method according to the first embodiment of the present invention.

【0036】本実施の形態は、請求項1に対応してい
る。
This embodiment corresponds to claim 1.

【0037】図1に動作を示す暗号通信方法を実現する
ための暗号通信装置は、送信側と受信側で各々1セット
必要である。送信側では、平文を入力して暗号文を出力
し、受信側では、暗号文を入力して平文を出力する。な
お通信の部分は、省略されている。10進数の鍵すなわ
ち初期値が同一であれば、完全暗号の通信が実施でき
る。
One set of an encryption communication device for realizing the encryption communication method whose operation is shown in FIG. 1 is required for each of the transmission side and the reception side. The transmitting side inputs the plaintext and outputs the ciphertext, and the receiving side inputs the ciphertext and outputs the plaintext. Note that the communication part is omitted. If the key of the decimal number, that is, the initial value is the same, communication of complete encryption can be performed.

【0038】以下、図1に示す本発明の第1の実施の形
態に係る暗号通信方法の動作を各ステップ毎に説明す
る。
The operation of the cryptographic communication method according to the first embodiment of the present invention shown in FIG. 1 will be described below for each step.

【0039】まず、ステップS101で処理を開始する
が、秘密鍵1が既存の技術、例えばDiffie-Hellmanの方
法で共有されているものとする。
First, the process starts in step S101. It is assumed that the secret key 1 is shared by an existing technology, for example, the Diffie-Hellman method.

【0040】ステップS103で、秘密鍵1によって1
0進乱数発生器を初期化する。本実施の形態では、秘密
鍵1は10進数64桁とする。この10進乱数発生器
は、多重精度演算法を用いたものである。乱数発生のア
ルゴリズムは限定しないが、長周期であることを要す
る。初期化後ウオーム・アップを行い、鍵長が64桁未
満であれば64桁にする。上記のウオーム・アップにつ
いてであるが、通常、乱数発生器は、ウオーム・アップ
として最初に数回空回しをする。特に初期値が規定桁数
に満たない時には、ウオーム・アップを必ず行う。
In step S103, the secret key 1
Initialize the zero-base random number generator. In the present embodiment, the secret key 1 has 64 decimal digits. This decimal random number generator uses a multiple precision arithmetic method. The algorithm of random number generation is not limited, but it is required that the period be long. After initialization, warm-up is performed, and if the key length is less than 64 digits, it is set to 64 digits. Regarding the warm-up described above, usually, the random number generator idles several times as a warm-up first. Especially when the initial value is less than the specified number of digits, be sure to warm up.

【0041】ステップS104で、ビット変換テーブル
を作成する。本実施の形態では、8ビットの全パターン
の表とする。ビット変換テーブルのn番目のエントリー
をtb[n]と表現することにすると、tb[0]〜t
b[255]に上記8ビットの全ビット・パターンを格
納する。
In step S104, a bit conversion table is created. In the present embodiment, a table of all 8-bit patterns is used. If the n-th entry of the bit conversion table is expressed as tb [n], tb [0] to tb [0]
The above 8-bit all bit pattern is stored in b [255].

【0042】ステップS105では、テーブルの各エン
トリーの順序を、最新の10進乱数を用いてランダマイ
ズする。該ランダマイズの方法は、次のステップS10
6で使用する奇数増分法以外の方法を使用することが望
ましい。
In step S105, the order of each entry in the table is randomized using the latest decimal random number. The randomizing method includes the following step S10
It is desirable to use a method other than the odd increment method used in 6.

【0043】ステップS106では、上記ビット変換テ
ーブルのポインタと、ポインタ更新用の増分とをセット
する。本実施の形態では、ポインタを3個使う。初期値
のセットは、例えば下記で与える。但し、下記では、最
新の64桁乱数から取り出した8桁整数をnとしてい
る。
In step S106, the pointer of the bit conversion table and the increment for updating the pointer are set. In the present embodiment, three pointers are used. A set of initial values is given below, for example. However, in the following, n is an 8-digit integer extracted from the latest 64-digit random number.

【0044】まず、上記3つのポインタは、それぞれ、 p[0]= n%256 (但し、記号%は、剰余演算
の演算子を示す) p[1]= (p[0]+ 85)%256 p[2]= (p[1]+ 85)%256 とする。
First, the above three pointers are respectively p [0] = n% 256 (where the symbol% indicates the operator of the remainder operation) p [1] = (p [0] +85)% 256 p [2] = (p [1] +85)% 256.

【0045】次に、上記各ポインタに対応する更新用増
分は、それぞれ、 delt[0]= 9 delt[1]= 11 delt[2]= 13 とする。
Next, the update increment corresponding to each of the pointers is set to delt [0] = 9 delt [1] = 11 delt [2] = 13.

【0046】ステップS108では、データすなわち暗
号文2により、送信側で平文を、受信側で暗号文を読み
込む。データは入力バッファに読み込む。出力バッファ
のポインタは0にする。但し、入力バッファ,出力バッ
ファのサイズは、共に256×3(3はポインタの個
数)とする。
In step S108, plain text is read on the transmitting side and cipher text is read on the receiving side using the data, ie, cipher text 2. Data is read into the input buffer. The output buffer pointer is set to 0. However, the size of the input buffer and the size of the output buffer are both 256 × 3 (3 is the number of pointers).

【0047】ステップS109では、上記データの終了
を判断する。
In step S109, the end of the data is determined.

【0048】ステップS110では、終了フラグをセッ
トする。図では省略したが、ステップS105以前のス
テップで、終了フラグは、リセットしておく。
In step S110, an end flag is set. Although not shown in the figure, the end flag is reset in steps before step S105.

【0049】ステップS111では、多重精度演算法を
用いた64桁の10進乱数の発生を行う。該乱数のルー
プ開始時点の初期値はステップS103で設定されたも
のを使用する。このステップの動作目的は、周期の長い
乱数を得ることである。
In step S111, a 64-digit decimal random number is generated using a multiple precision arithmetic method. As the initial value of the random number at the start of the loop, the one set in step S103 is used. The purpose of this step is to obtain a random number with a long period.

【0050】ステップS112は、ここからステップS
123に至る迄の一連の処理を64回繰り返すループの
入口を示す。
Step S112 is a step S112.
This shows the entrance to a loop in which a series of processes up to 123 is repeated 64 times.

【0051】ステップS113では、上記のステップS
111で発生させた10進乱数を分解して、1桁づつ順
に取り出す。以下、この取り出した数をdとする。
In step S113, the above step S
The decimal random number generated in step 111 is decomposed to take out one digit at a time. Hereinafter, the extracted number is defined as d.

【0052】ステップS114では、上記のdの値域に
応じて4つの岐路に分岐する。図1に記載する分岐の方
法は、単なる1例である。
In step S114, the process branches into four branches according to the value range of d. The branching method described in FIG. 1 is merely an example.

【0053】ステップS115は、上記のdが1,2,
3の場合であり、ここの処理としては、p[0]=(p
[0]+delt[0])%256に設定する。
In step S115, d is 1, 2, 2,
3, where p [0] = (p
[0] + delt [0])% Set to 256.

【0054】ステップS116は、上記のdが4,5,
6の場合であり、ここの処理としては、p[1]=(p
[1]+delt[1])%256に設定する。
In step S116, d is 4, 5,
6, and the processing here is p [1] = (p
[1] + delt [1]) Set to% 256.

【0055】ステップS117は、上記のdが7,8,
9の場合であり、ここの処理としては、p[2]=(p
[2]+delt[2])%256に設定する。
In step S117, d is 7, 8,
9 and the processing here is p [2] = (p
[2] + delt [2]) Set to% 256.

【0056】ステップS118は、上記のdが0の場合
であり、ここからステップS123へ、スキップする。
この処置は、複雑さを増す為である。
Step S118 is a case where d is 0, and the process skips to step S123.
This procedure is to increase complexity.

【0057】ステップS119では、上記ステップS1
15,ステップS116,ステップS117のいずれか
で設定したポインタp[?]が指す上記ビット変換テー
ブルの行から、8ビットのパターンを出力バッファにコ
ピーし、出力バッファのポインタを1バイト(=8ビッ
ト)分進める。
In step S119, the above step S1
15, the pointer p [? Set in any of steps S116 and S117. ], The 8-bit pattern is copied from the row of the bit conversion table to the output buffer, and the pointer of the output buffer is advanced by one byte (= 8 bits).

【0058】ステップS120では、出力バッファが一
杯になったかどうか、ポインタで調べる。出力バッファ
が満杯になっていれば、ステップS121の処理にスキ
ップする。
In step S120, a check is made with a pointer to see if the output buffer is full. If the output buffer is full, the process skips to step S121.

【0059】ステップS123では、ループ回数が64
回に達したか否かを調べ、64回に達していなければス
テップS112に戻り、64回に達していれば、ステッ
プS111に帰る。
In step S123, the number of loops is 64
It is checked whether or not the number of times has been reached. If the number of times has not reached 64, the process returns to step S112. If the number of times has reached 64, the process returns to step S111.

【0060】ステップS121では、出力バッファが一
杯である時、入力と出力のバッファの排他的論理和(X
OR)演算を行い結果を暗号文又は平文3に出力する。
送信側では暗号文を、受信側では平文を得る。
In step S121, when the output buffer is full, the exclusive OR (X
(OR) operation and outputs the result to ciphertext or plaintext 3.
The transmitting side obtains the ciphertext, and the receiving side obtains the plaintext.

【0061】ステップS124では、まだデータ文があ
るかどうか、終了フラグを調べて判断する。終了フラグ
がセットされていなければ、ステップS105に帰る。
In step S124, it is determined whether or not there is any data sentence by checking the end flag. If the end flag has not been set, the process returns to step S105.

【0062】上記終了フラグがセットされていれば、ス
テップS125で、処理を終了する。
If the end flag has been set, the process ends in step S125.

【0063】(第2の実施の形態)図2は、本発明の第
2の実施の形態に係る暗号通信方法の動作を示すフロー
チャートである。
(Second Embodiment) FIG. 2 is a flowchart showing the operation of the cryptographic communication method according to the second embodiment of the present invention.

【0064】本実施の形態は請求項2に対応している。This embodiment corresponds to claim 2.

【0065】図2に動作を示す暗号通信方法を実現する
ための暗号通信装置も、第1の実施の形態と同様に送信
側と受信側で各々1セット必要である。送信側では、平
文を入力して暗号文を出力し、受信側では、暗号文を入
力して平文を出力する。なお通信の部分は、省略されて
いる。10進数の鍵すなわち初期値が同一であれば、完
全暗号の通信が実施できる。
As in the first embodiment, one set of an encryption communication device for realizing the encryption communication method whose operation is shown in FIG. 2 is required for each of the transmission side and the reception side. The transmitting side inputs the plaintext and outputs the ciphertext, and the receiving side inputs the ciphertext and outputs the plaintext. Note that the communication part is omitted. If the key of the decimal number, that is, the initial value is the same, communication of complete encryption can be performed.

【0066】以下、図2に示す本発明の第2の実施の形
態に係る暗号通信方法の動作を各ステップ毎に説明す
る。
The operation of the cryptographic communication method according to the second embodiment of the present invention shown in FIG. 2 will be described below for each step.

【0067】ステップS201では、処理を開始するに
当たり、秘密鍵が送信側と受信側で共有されているとす
る。
In step S201, when starting the process, it is assumed that the secret key is shared between the transmitting side and the receiving side.

【0068】ステップS203では、秘密鍵21によっ
て10進乱数発生器を初期化する。本実施の形態では、
秘密鍵21は10進数32桁とする。この10進乱数発
生器は、多重精度演算法を用いたものである。乱数発生
のアルゴリズムは限定しないが、長周期であることを要
する。初期化後ウオーム・アップを行い、鍵長が32桁
未満であれば32桁にする。
In step S203, a decimal random number generator is initialized with the secret key 21. In the present embodiment,
The secret key 21 has 32 decimal digits. This decimal random number generator uses a multiple precision arithmetic method. The algorithm of random number generation is not limited, but it is required that the period be long. After initialization, warm-up is performed, and if the key length is less than 32 digits, it is set to 32 digits.

【0069】ステップS204では、ビット変換テーブ
ルを作成する。本実施の形態では、第1の実施の形態と
同様に、該ビット変換テーブルは、8ビットの全パター
ンの表とする。tb[0]〜tb[255]にビット・
パターンを格納する。テーブルの各エントリーの順序
を、最新の10進乱数(32桁)を用いてランダマイズ
する。
In step S204, a bit conversion table is created. In the present embodiment, as in the first embodiment, the bit conversion table is a table of all 8-bit patterns. Bits are set in tb [0] to tb [255].
Store the pattern. The order of each entry in the table is randomized using the latest decimal random number (32 digits).

【0070】ステップS206では、データすなわち暗
号文22により、送信側で平文を、受信側で暗号文を読
み込む。データは入力バッファに読み込む。出力バッフ
ァのポインタは使わない。入力バッファ,出力バッファ
のサイズは、共に256×kとする。ここで、上記のk
は、下記のステップS210からステップS217に至
る一連の処理の繰り返し数とする。
In step S206, the plaintext is read on the transmitting side and the ciphertext is read on the receiving side using the data, that is, the ciphertext 22. Data is read into the input buffer. Do not use the output buffer pointer. The sizes of the input buffer and the output buffer are both 256 × k. Where k
Is the number of repetitions of a series of processes from step S210 to step S217 described below.

【0071】ステップS207では、データ文の終了を
判断する。
In step S207, the end of the data sentence is determined.

【0072】ステップS208では、終了フラグをセッ
トする。図では省略したが、ステップS204で、該終
了フラグは、リセットしておく。
In step S208, an end flag is set. Although not shown in the figure, the end flag is reset in step S204.

【0073】ステップS209では、多重精度演算法を
用いて32桁の10進乱数の発生を行う。該乱数のルー
プ開始時点の初期値はステップS203で設定されたも
のを使用する。このステップの動作目的は、周期の長い
乱数を得ることである。
In step S209, a 32-digit decimal random number is generated by using a multiple precision arithmetic method. As the initial value of the random number at the start of the loop, the one set in step S203 is used. The purpose of this step is to obtain a random number with a long period.

【0074】ステップS210は、ステップS211〜
ステップS216の一連の処理を繰り返す入口を示す。
該繰り返しの繰り返し数は、ステップS206に記載す
るkに等しい。
Step S210 includes steps S211 to S211.
An entrance to repeat a series of processes in step S216 is shown.
The number of repetitions is equal to k described in step S206.

【0075】ステップS211では、ステップS209
で発生させた32桁の10進数の端から8桁づつ取り出
す。以下、この8桁の数をnとする。
At step S211, step S209
The 8 digits are extracted from the end of the 32 digit decimal number generated in the above. Hereinafter, this eight-digit number is defined as n.

【0076】ステップS212は、パラメータmを0か
ら254まで1づつ増して、ステップS213〜ステッ
プS216を255回行う入口を示す。
Step S212 is an entrance where the parameter m is incremented by one from 0 to 254, and steps S213 to S216 are performed 255 times.

【0077】ステップS213では、nを種として通常
の10進乱数発生器を使いnを更新する。この乱数発生
器の初期化が必要であれば、ステップS203で行う。
上記で、「通常の10進乱数発生器」と表現したのは、
多重精度演算法を用いたものではないと言う意味であ
る。
In step S213, n is updated using a normal decimal random number generator with n as a seed. If the random number generator needs to be initialized, it is performed in step S203.
Above, "ordinary decimal random number generator" is expressed as
This means that it does not use the multiple precision arithmetic method.

【0078】ステップS214では、p=m+n%(2
56−m)を求める。上記で、%は法演算を示す演算子
であり、この場合は、nを(256−m)で割って余り
を求めることを意味する。pはテーブルのポインタでm
行から最後の255行までの何れかを指す。
In step S214, p = m + n% (2
56-m). In the above,% is an operator indicating a modulus operation, and in this case, it means that n is divided by (256-m) to obtain a remainder. p is a table pointer and m
It refers to any of the lines up to the last 255 lines.

【0079】ステップS215では、テーブルのp行目
の8ビットのパターンを出力バッファに格納する。
In step S215, the 8-bit pattern in the p-th row of the table is stored in the output buffer.

【0080】ステップS216では、テーブルのp行目
は使ったので、まだ使っていないm行目と交換する。こ
の処理で、テーブルの初めからm行までは、使った行番
号が、m+1行から255行までは未使用の行番号が並
ぶことになる。
In step S216, since the p-th row of the table has been used, it is replaced with an m-th row which has not been used yet. In this process, the used row numbers are arranged for the m rows from the beginning of the table, and the unused row numbers are arranged for the m + 1 to 255 rows.

【0081】ステップS217では、255回の繰り返
しが終わって、最後の1行が残るので、その行の8ビッ
トのバターンを出力バッファに格納する。
In step S217, since the last one row remains after the repetition of 255 times, the 8-bit pattern of that row is stored in the output buffer.

【0082】ステップS218では、ステップS206
で読み込んである入力バッファと、出力バッファとの排
他的論理和(XOR)演算を行い、結果を暗号文又は平
文23に出力する。送信側では暗号文を、受信側では平
文を得る。
In step S218, step S206
Performs an exclusive OR (XOR) operation between the input buffer and the output buffer that have been read in step (1), and outputs the result to the ciphertext or plaintext 23. The transmitting side obtains the ciphertext, and the receiving side obtains the plaintext.

【0083】ステップS220では、まだデータ文があ
るかどうか、終了フラグにより判断する。終了フラグが
セットされていなければ、ステップS206の処理に帰
る。終了フラグがセットされていれば、ステップS22
1で、処理を終了する。
In step S220, it is determined from the end flag whether or not there is any data sentence. If the end flag has not been set, the process returns to step S206. If the end flag has been set, step S22
At 1, the process ends.

【0084】尚、この後、同じ通信相手と暗号通信を行
う場合には、テーブルと多重精度演算の10進乱数発生
器の状態を保持すれば、秘密鍵の交換は不要である。
After that, when performing cryptographic communication with the same communication partner, the exchange of the secret key is unnecessary if the state of the table and the decimal random number generator of the multi-precision operation are held.

【0085】(第3の実施の形態)図3は、本発明の第
3の実施の形態に係る暗号通信方法の動作を示すフロー
チャートである。
(Third Embodiment) FIG. 3 is a flowchart showing the operation of the cryptographic communication method according to the third embodiment of the present invention.

【0086】本実施の形態も、請求項2に対応してい
る。
This embodiment also corresponds to claim 2.

【0087】図3に動作を示す暗号通信方法を実現する
ための暗号通信装置も、第1の実施の形態と同様に送信
側と受信側で各々1セット必要である。送信側では、平
文を入力して暗号文を出力し、受信側では、暗号文を入
力して平文を出力する。なお通信の部分は、省略されて
いる。10進数の鍵すなわち初期値が同一であれば、完
全暗号の通信が実施できる。
As in the first embodiment, one set of an encryption communication device for realizing the encryption communication method whose operation is shown in FIG. 3 is required for each of the transmission side and the reception side. The transmitting side inputs the plaintext and outputs the ciphertext, and the receiving side inputs the ciphertext and outputs the plaintext. Note that the communication part is omitted. If the key of the decimal number, that is, the initial value is the same, communication of complete encryption can be performed.

【0088】以下、図3に示す本発明の第3の実施の形
態に係る暗号通信方法の動作を各ステップ毎に説明す
る。
The operation of the cryptographic communication method according to the third embodiment of the present invention shown in FIG. 3 will be described below for each step.

【0089】ステップS301で、処理を開始する。以
下では、秘密鍵が送信側と受信側で共有されているもの
とする。
In step S301, the process starts. In the following, it is assumed that the secret key is shared between the transmitting side and the receiving side.

【0090】ステップS303では、10進数64桁の
秘密鍵31により、10進乱数発生器(64桁)の初期
化を行う。該10進乱数発生器は、多重精度演算法を用
いたものである。初期化後、上述のウオーム・アップを
行う。
In step S303, the decimal random number generator (64 digits) is initialized using the 64-digit decimal secret key 31. The decimal random number generator uses a multiple precision arithmetic method. After initialization, the warm-up described above is performed.

【0091】ステップS304では、ポインタ(0)用
のビット変換テーブルの初期化を行う。本実施の形態で
は、ポインタを2個使う。詳細は後段の図4を用いて後
述する。
In step S304, the bit conversion table for the pointer (0) is initialized. In the present embodiment, two pointers are used. Details will be described later with reference to FIG.

【0092】ステップS305では、ポインタ(1)用
のビット変換テーブルの初期化を行う。詳細は後段の図
4を用いて後述する。
In step S305, the bit conversion table for pointer (1) is initialized. Details will be described later with reference to FIG.

【0093】ステップS307では、平文又は暗号文3
2のデータを、入力バッファに読み込む。送信側で平文
を、受信側で暗号文を読み込む。次に、出力バッファの
ポインタをゼロにセットする。入出力バッファのサイズ
は、128バイトの倍数で等しくする。
In step S307, plaintext or ciphertext 3
2 is read into the input buffer. The sender reads the plaintext and the receiver reads the ciphertext. Next, the output buffer pointer is set to zero. The sizes of the input and output buffers are equal in multiples of 128 bytes.

【0094】ステップS308では、データ文の終了を
判断する。終了であれば、ステップS309で、終了フ
ラグをセットする。図では省略したが、ステップS30
3で該終了フラグはリセットしておく。
In step S308, the end of the data sentence is determined. If completed, an end flag is set in step S309. Although omitted in the figure, step S30
At 3, the end flag is reset.

【0095】ステップS310では、多重精度演算法を
用いて64桁の10進乱数の発生を行う。このこのステ
ップの動作目的は、周期の長い乱数を得ることである。
In step S310, a 64-digit decimal random number is generated by using a multiple precision arithmetic method. The purpose of this step is to obtain a long-period random number.

【0096】ステップS311では、ステップS312
〜ステップS316の一連の処理を繰り返す。
In step S311, step S312
-A series of processes of step S316 is repeated.

【0097】ステップS312では、ステップS310
で発生させた64桁の10進数の端から1桁づつ取り出
す。以下、この取り出した1桁の数をdとする。
In step S312, step S310
Is extracted one digit at a time from the end of the 64-digit decimal number generated in. Hereinafter, the extracted one-digit number is defined as d.

【0098】ステップS313では、dが奇数か偶数か
で分岐する。dが奇数であれば、ステップS314にス
キップし、ステップS314では、ポインタ(1)を使
ってビット変換テーブルを引き、ステップS316に移
る。詳細は図5で説明する。
In step S313, the process branches depending on whether d is an odd number or an even number. If d is an odd number, the process skips to step S314. In step S314, the bit conversion table is drawn using the pointer (1), and the process proceeds to step S316. Details will be described with reference to FIG.

【0099】ステップS315では、ポインタ(0)を
使ってビット変換テーブルを引く。
In step S315, a bit conversion table is drawn using the pointer (0).

【0100】ステップS316では、取り出した1バイ
ト(8ビット)分のビット列を出力バッファに格納し、
出力バッファのポインタを1進める。
At step S316, the extracted 1-bit (8-bit) bit string is stored in the output buffer.
Advances the output buffer pointer by one.

【0101】ステップS317では、出力バッファのポ
インタを調べ、満杯であればステップS318に分岐す
る。満杯でなければ、ステップS310に帰る。
In step S317, the output buffer pointer is checked, and if it is full, the flow branches to step S318. If it is not full, the process returns to step S310.

【0102】ステップS318では、ステップS307
で読み込んである入力バッファの内容と、出力バッファ
の内容との排他的論理和(XOR)演算を行い、結果を
暗号文又は平文33として出力する。送信側では暗号文
を、受信側では平文を得る。
At step S318, step S307 is executed.
An exclusive OR (XOR) operation is performed between the contents of the input buffer and the contents of the output buffer, which are read in step (1), and the result is output as ciphertext or plaintext 33. The transmitting side obtains the ciphertext, and the receiving side obtains the plaintext.

【0103】ステップS320では、まだデータ文があ
るかどうかを終了フラグにより判断し、終了フラグがセ
ットされていなければステップS307に帰る。
In step S320, it is determined from the end flag whether or not there is a data sentence. If the end flag has not been set, the process returns to step S307.

【0104】終了フラグがセットされていることをもっ
て、ステップS321にて、処理を終了する。
When the end flag is set, the process ends in step S321.

【0105】図4は、本発明の第3の実施の形態に係る
暗号通信方法のステップS304とステップS305で
使用される初期化ルーチンの動作を示すフローチャート
である。本フローチャートは、C言語に近い形式で記述
してある。
FIG. 4 is a flowchart showing the operation of the initialization routine used in steps S304 and S305 of the cryptographic communication method according to the third embodiment of the present invention. This flowchart is described in a format close to the C language.

【0106】以下、図4に示す本発明の第3の実施の形
態に係る暗号通信方法のステップS304とステップS
305で使用される初期化ルーチンの動作を各ステップ
毎に説明する。なお、以下でテーブルとあるのはビット
変換テーブルのことである。ステップS350は、この
ルーチンへの入り口の宣言である。
Hereinafter, steps S304 and S304 of the encryption communication method according to the third embodiment of the present invention shown in FIG.
The operation of the initialization routine used in step 305 will be described for each step. In the following, a table is a bit conversion table. Step S350 is a declaration of entry to this routine.

【0107】ステップS351では、引数(アーギュメ
ン)と外部変数(パラメータ)の定義を行う。定義され
る全ての変数、配列は整数である。入力のnは8桁の整
数、出力のtable は2次元配列の引数で、1つは使用中
のもの、他は行番号を書き換え中のものである。ポイン
タ(0)用とポインタ(1)用で、上記別の配列が使わ
れる。出力のフラグswは、0か1で使用中を示す。出
力のフラグswsは、フラグswの反対で書き換え中を
示す。
In step S351, arguments (arguments) and external variables (parameters) are defined. All variables and arrays defined are integers. The input n is an 8-digit integer, and the output table is a two-dimensional array argument, one being used and the other being rewriting the row number. The above-mentioned separate arrays are used for the pointer (0) and the pointer (1). The output flag sw is 0 or 1 to indicate that it is in use. The output flag sws indicates that rewriting is in progress, opposite to the flag sw.

【0108】また、出力のpは、最初のポインタを示
し、出力のa,cは、線型合同法の乱数発生器で使用す
る定数,出力のcounter は、テーブルを引いた回数を示
す。
The output p indicates the first pointer, the outputs a and c indicate constants used in the linear congruential random number generator, and the output counter indicates the number of times the table has been drawn.

【0109】ステップS352では、上記のnが奇数か
偶数かで分岐する。nが奇数の場合はステップS354
へ、nが偶数の場合はステップS353へ移動する。
In step S352, the process branches depending on whether n is an odd number or an even number. If n is an odd number, step S354
If n is an even number, the process moves to step S353.

【0110】ステップS353では、最初に使うテーブ
ルを0、書き換え中を1とする。
In step S353, the table used first is set to 0, and the table being rewritten is set to 1.

【0111】ステップS354では、最初に使うテーブ
ルを1、書き換え中を0とする。
In the step S354, the table used first is set to 1 and the table being rewritten is set to 0.

【0112】ステップS355では、最初に使うテーブ
ルのビット.パターンをセットする為のp,a,cをn
から計算する。線形合同法の乱数発生法で、その周期が
256になるようにクヌースの方法(参考文献:「準数
値算法/乱数」,著者;KNUTH ,訳;渋谷政昭,サイエ
ンス社,1985年)に従ってaとcを決める。a−1
が4の倍数になるように、cが奇数になるようにする。
p,a,cの具体的な計算法については、図4のステッ
プS355に記載する通りである。
In step S355, p, a, and c for setting the bit pattern of the table used first are set to n.
Calculate from In the random number generation method of the linear congruential method, according to the Knuth method (reference: "quasi-numerical algorithm / random number", author: KNUTH, translation: Shibuya Masaaki, Science Inc., 1985) so that the period becomes 256. Determine c. a-1
Is an odd number so that is a multiple of 4.
The specific calculation method of p, a, and c is as described in step S355 of FIG.

【0113】ステップS356では、最初に使うテーブ
ルのビット.パターンと最初のポインタpをセットす
る。上記のテーブルとポインタpの具体的な設定方法に
ついては、図4のステップS356に記載する通りであ
る。
At step S356, the bit pattern of the table to be used first and the first pointer p are set. The specific setting method of the table and the pointer p is as described in step S356 of FIG.

【0114】ステップS357では、p,a,cについ
て、ステップS355で求めた値とは別の値を求める。
counter すなわちテーブルを引いた回数はゼロとする。
p,a,cの具体的な計算法については、図4のステッ
プS357に記載する通りである。
In step S357, different values for p, a, and c are obtained from the values obtained in step S355.
counter, that is, the number of times the table is drawn is set to zero.
The specific calculation method of p, a, and c is as described in step S357 of FIG.

【0115】ステップS358では、初期化処理を終
え、このルーチンの呼び出し元である上位のルーチンへ
帰る。
In step S358, the initialization processing ends, and the routine returns to the higher-level routine that is the caller of this routine.

【0116】図5は、本発明の第3の実施の形態に係る
暗号通信方法のステップS314とステップS315で
使用されるテーブルの読み書きルーチンの動作を示すフ
ローチャートである。本フローチャートは、C言語に近
い形式で記述してある。
FIG. 5 is a flowchart showing the operation of the table read / write routine used in steps S314 and S315 of the encryption communication method according to the third embodiment of the present invention. This flowchart is described in a format close to the C language.

【0117】以下、図5に示す本発明の第3の実施の形
態に係る暗号通信方法のステップS314とステップS
315で使用されるテーブルの読み書きルーチンの動作
を各ステップ毎に説明する。なお、以下でもテーブルと
あるのはビット変換テーブルのことである。
Hereinafter, steps S314 and S314 of the encryption communication method according to the third embodiment of the present invention shown in FIG.
The operation of the table read / write routine used in 315 will be described for each step. In the following, a table is a bit conversion table.

【0118】ステップS370は、このルーチンへの入
り口の宣言である。
Step S370 is a declaration of entry to this routine.

【0119】ステップS371では、引数及び外部変数
を定義する。出力のoutbytは、文字型変数、それ以外は
整数変数である。入力のorbit は64桁の乱数で4桁づ
つに区切って配列に入っている。その他は、ステップS
351に示す定義と同じである。
In step S371, arguments and external variables are defined. The output outbyt is a character variable and the rest are integer variables. The input orbit is a 64-digit random number and is divided into four-digit numbers in the array. Otherwise, step S
351 is the same as the definition.

【0120】ステップS372では、outbytにビット列
を取り出す。書き換え中のテーブルのcounter 番目の行
にpの2進表示を入れ、新しいポインタpを計算する。
In step S372, a bit string is extracted outbyt. Put the binary representation of p in the counter-th row of the table being rewritten and calculate a new pointer p.

【0121】counter は増分1だけ上げる。outbyt,テ
ーブル,新しいポインタpの具体的な設定方法について
は、図5のステップS372に記載する通りである。
The counter is incremented by one. The specific setting method of outbyt, table, and new pointer p is as described in step S372 in FIG.

【0122】ステップS373では、テーブルを256
回引いたかどうかをcounter によりチェックする。coun
ter がまだ256にならない時は、ステップS374
で、このルーチンを呼び出した上位のルーチンへ帰る。
In the step S373, the table is set to 256
Check if counter has been drawn by counter. coun
If ter has not become 256 yet, step S374
Then, return to the upper routine that called this routine.

【0123】ステップS375では、テーブルを256
回引いたので、次に使う線形合同法の乱数発生器のパラ
メータとスタート行を計算する。counter をゼロに戻
す。
In the step S375, the table is set to 256
Now that we have rounded up, we calculate the parameters for the next linear congruential random number generator and the starting row. Reset counter to zero.

【0124】n,p,a,c,counter の具体的な設定
方法については、図5のステップS375に記載する通
りである。
The specific method of setting n, p, a, c, and counter is as described in step S375 in FIG.

【0125】ステップS376では、ステップS37
7,ステップS378の選択により、テーブルの切り替
えを行う。
In step S376, step S37
7. The table is switched by the selection in step S378.

【0126】ステップS379では、テーブルの読み書
きを終え、このルーチンを呼び出した上位のルーチンへ
帰る。
In step S379, the reading / writing of the table is finished, and the routine returns to the higher-level routine that called this routine.

【0127】(第4の実施の形態)表1は、本発明の第
4の実施の形態に係る暗号通信方法のビット変換テーブ
ルの一例を示す。
(Fourth Embodiment) Table 1 shows an example of a bit conversion table of an encryption communication method according to a fourth embodiment of the present invention.

【0128】表1は、上記実施の形態で用いた固定長の
テーブルでない一般的なビット変換テーブルの一例であ
る。
Table 1 is an example of a general bit conversion table other than the fixed-length table used in the above embodiment.

【0129】2進乱数の中に出来る“0”の連と、
“1”の連との個数の比が、0.5に近くなるようなテ
ーブルを用意する。“0”だけの表と“1”だけの表を
交互に引けば、連の個数は制御できる。この例は、
“0”だけの表で全行数は1032である。“1”の表
は省略したが、ビット・パターンの列が“1”に変わる
外は、表1と同一である。使用する前に行番号をランダ
マイズする。その方法は、図2のステップS212〜ス
テップS217を参考に行うか、線形合同法で周期を、
1032=23×3×43となるように、aとcを決め
る。後者の場合、cは6×43と素に、a−1が4×3
×43の倍数になるようにすることを、前記のクヌース
は教えている。
A sequence of “0” s formed in a binary random number,
A table is prepared so that the ratio of the number of runs to "1" is close to 0.5. By alternately drawing a table containing only "0" and a table containing only "1", the number of runs can be controlled. This example
In the table with only “0”, the total number of rows is 1032. The table of "1" is omitted, but is the same as Table 1 except that the column of the bit pattern is changed to "1". Randomize line numbers before use. The method is performed with reference to steps S212 to S217 in FIG.
A and c are determined so that 1032 = 2 3 × 3 × 43. In the latter case, c is 6 × 43 and a-1 is 4 × 3.
The aforementioned Knuth teaches that it should be a multiple of × 43.

【0130】“0”の表と“1”の表で、最初に行番号
をランダマイズする時に用いる乱数の種は変える。長さ
が1の連の個数は、この例では518で、総ビット数は
2048である。“0”と“1”の2表を全部使うと、
4096ビット(=512バイト)の2進乱数が作られ
る。データ文を読み込むバッファの大きさは、512バ
イト単位にする。表1中のもっとも長い連は、10であ
るがこれを8としたり、12として、バッファの大きさ
を変えることは可能である。
In the table of “0” and the table of “1”, the seed of the random number used when the line numbers are randomized first is changed. The number of runs having a length of 1 is 518 in this example, and the total number of bits is 2048. Using all the two tables “0” and “1”,
A binary random number of 4096 bits (= 512 bytes) is generated. The size of the buffer for reading the data sentence is in units of 512 bytes. The longest run in Table 1 is 10, but it is possible to change this to 8 or 12 to change the buffer size.

【0131】テーブルを引く方法は、図3を修正して簡
単に出来る。ポインタ(0)のテーブルを“0”のテー
ブル、ポインタ(1)のテーブルを“1”のテーブルと
読み替える。この2つのテーブルを交互に引くので、ス
テップS312で計算したdは不要であるが、線形合同
法のパラメータa,cとポインタの初期値pを計算する
為に、長い桁数の乱数発生器は必要である。パラメータ
a,cの計算方法は、上述した。取り出すビット数が変
化するので、出力バイトの何ビット目まで処理済である
かを示すポインタが必要である。最初にどちらの表を引
くかの決定は、図4の動作フローに示す方法を使用して
決定することができる。
The method of drawing the table can be easily performed by modifying FIG. The table of pointer (0) is replaced with the table of “0”, and the table of pointer (1) is replaced with the table of “1”. Since these two tables are alternately drawn, d calculated in step S312 is unnecessary. However, in order to calculate the parameters a and c of the linear congruential method and the initial value p of the pointer, a random number generator having a long number of digits is required. is necessary. The calculation method of the parameters a and c has been described above. Since the number of bits to be extracted changes, it is necessary to provide a pointer indicating up to which bit of the output byte has been processed. The determination of which table to draw first can be determined using the method shown in the operational flow of FIG.

【0132】[0132]

【表1】 この表は特殊なテーブルの例(行をランダマイズする
前)である。
[Table 1] This table is an example of a special table (before randomizing rows).

【0133】[0133]

【発明の効果】本発明の乱数発生方法によれば、通信速
度を上まわる暗号化/複号化処理を行うことが出来るよ
うになった。
According to the random number generation method of the present invention, encryption / decryption processing exceeding the communication speed can be performed.

【0134】また、本発明の乱数発生方法によれば、そ
の出力は、上述の統計的検定において、より真正乱数に
近くなる場合が多い事が実証された。
In addition, according to the random number generation method of the present invention, it has been proved that the output is often closer to a true random number in the above-described statistical test.

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

【図1】本発明の第1の実施の形態に係る暗号通信方法
の動作を示すフローチャートである。
FIG. 1 is a flowchart showing an operation of an encryption communication method according to a first embodiment of the present invention.

【図2】本発明の第2の実施の形態に係る暗号通信方法
の動作を示すフローチャートである。
FIG. 2 is a flowchart illustrating an operation of an encryption communication method according to a second embodiment of the present invention.

【図3】本発明の第3の実施の形態に係る暗号通信方法
の動作を示すフローチャートである。
FIG. 3 is a flowchart illustrating an operation of an encryption communication method according to a third embodiment of the present invention.

【図4】本発明の第3の実施の形態に係る暗号通信方法
のステップS304とステップS305で使用される初
期化ルーチンの動作を示すフローチャートである。
FIG. 4 is a flowchart showing the operation of an initialization routine used in steps S304 and S305 of the cryptographic communication method according to the third embodiment of the present invention.

【図5】本発明の第3の実施の形態に係る暗号通信方法
のステップS314とステップS315で使用されるテ
ーブルの読み書きルーチンの動作を示すフローチャート
である。
FIG. 5 is a flowchart showing an operation of a table read / write routine used in steps S314 and S315 of the cryptographic communication method according to the third embodiment of the present invention.

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

1,21,31 秘密鍵 2,22,32 入力の平文又は暗号文 3,23,33 出力の暗号文又は平文 1,21,31 Private key 2,22,32 Input plaintext or ciphertext 3,23,33 Output ciphertext or plaintext

【手続補正書】[Procedure amendment]

【提出日】平成11年4月15日(1999.4.1
5)
[Submission date] April 15, 1999 (1999.4.1
5)

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項1[Correction target item name] Claim 1

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【手続補正2】[Procedure amendment 2]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項2[Correction target item name] Claim 2

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【手続補正3】[Procedure amendment 3]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項4[Correction target item name] Claim 4

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【手続補正4】[Procedure amendment 4]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0007[Correction target item name] 0007

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0007】[0007]

【発明が解決しようとする課題】ところで、先願の特願
平8−108058号、特願平8−338583号に
示されている技術は、3つの欠点を持っている。1つ
は、真正乱数に近い2進ビット列を得る事が、3つのパ
ラメータ即ち、10進乱数のアルゴリズムと定数、10
進/2進の変換方法、及び10進乱数の初期値等を変え
ても非常に困難な点である。2つ目は、演算スピードの
問題である。多重精度演算法で計算した整数を1桁毎に
分解して、1ビットづつ作っていては、通信速度に追従
出来ない。3つ目は、アルゴリズムを公開出来ないと言
う点である。圧縮変換によって10進数は、見えない様
になっているが、一度10進数が知られると、2進ビッ
ト列は正確に予測できる事になる。演算スピードを上げ
る為に、圧縮変換を4回以上実行する事が、10進数が
割り出されると言う意味で差し障りとなる事は言うまで
もない。また仮に、圧縮変換を2回実行するものとした
場合でも、アルゴリズムを公開する事は安全でない。
Meanwhile [0008], prior application Japanese Patent Application No. 8-108058, are open <br/> shown in Japanese Patent Application No. 8-338583 technology, has three drawbacks. One is to obtain a binary bit string close to a true random number by using three parameters, a decimal random number algorithm and a constant.
It is very difficult to change the binary / binary conversion method and the initial value of the decimal random number. Second, there is the problem of calculation speed. If the integer calculated by the multi-precision arithmetic method is decomposed for each digit and made one bit at a time, the communication speed cannot be followed. Third, the algorithm cannot be published. The decimal number is made invisible by the compression conversion, but once the decimal number is known, the binary bit string can be accurately predicted. It goes without saying that executing the compression conversion four or more times in order to increase the calculation speed is an obstacle in the sense that a decimal number is calculated. Also, even if the compression conversion is performed twice, it is not safe to publish the algorithm.

【手続補正5】[Procedure amendment 5]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0014[Correction target item name] 0014

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0014】演算スピードが遅いと言う問題は、暗号通
信の分野では致命的な欠点となり、オンラインで情報を
送信するスピードに追従できない為、前もって2進ビッ
ト列を作っておき、暗号化又は復号化を行うタイミング
に合わせて読み込むと言った使い方の制限を余儀なくさ
れる。本発明が解決しようとする問題は、暗号鍵以外の
全ての情報を公開しても安全な、通信速度と同程度以上
に高速な、真正乱数に近い疑似乱数の発生方法を提供す
る事である。
The problem that the operation speed is slow is a fatal drawback in the field of cryptographic communication. Since it is impossible to follow the speed of transmitting information online, a binary bit string is created in advance to perform encryption or decryption. You have to limit the usage, such as loading it at the right time. The problem to be solved by the present invention is to provide a method for generating pseudo-random numbers close to true random numbers, which is safe even if all information other than the encryption key is disclosed, and is as fast as the communication speed. .

【手続補正6】[Procedure amendment 6]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0015[Correction target item name] 0015

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0015】[0015]

【課題を解決するための手段】上記の課題を解決する為
に、本発明の第1の実施態様によれば、任意の精度が出
せる多重精度演算法を用いて作成した1060以上の周期
を持つ10進整数乱数発生器と、8ビット又は16ビッ
の2進ビット列の全パターンを持ち各行に格納してあ
る2進ビット列を構成する0の個数と1の個数とがテー
ブル全体として等しいビット変換テーブルを有し、秘密
鍵の10進数を前記10進整数乱数発生器に加えて得ら
れる10進乱数の一部分を使ってビット変換テーブルを
引き、一度に8又は16ビットの2進ビット列を連続し
て取り出す装置と、平文又は暗号文を読み込み、そのバ
イナリー情報と、前記2進ビット列との排他的論理和
(XOR)演算を行って、平文を暗号文に変換するか、
または暗号文を平文に変換する装置とを使用する暗号通
信方法が提供される。
According to a first embodiment of the present invention, to solve the above-mentioned problem, a cycle of 10 60 or more created by using a multi-precision arithmetic method capable of providing an arbitrary accuracy is used. It has a decimal integer random number generator, and all the patterns of 8-bit or 16-bit binary bit strings are stored in each row.
The number of 0s and the number of 1s forming a binary bit string
The whole bit table has the same bit conversion table, and the bit conversion table is drawn using a part of the decimal random number obtained by adding the decimal number of the secret key to the decimal integer random number generator, and 8 or 16 bits at a time. A device for continuously extracting a binary bit string, reading a plain text or cipher text, and performing an exclusive OR (XOR) operation on the binary information and the binary bit string to convert the plain text into a cipher text;
Alternatively, there is provided an encrypted communication method using an apparatus for converting a ciphertext into a plaintext.

【手続補正7】[Procedure amendment 7]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0016[Correction target item name] 0016

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0016】上記の課題を解決する為に、本発明の第2
および第3の実施態様によれば、任意の精度が出せる多
重精度演算法を用いて作成した1030以上の周期を持つ
10進整数乱数発生器と、通常精度の10進整数乱数発
生器と、8ビット又は16ビットの2進ビット列の全パ
ターンを持ち各行に格納してある2進ビット列を構成す
る0の個数と1の個数とがテーブル全体として等しい
ット変換テーブルを有し、秘密鍵の10進数を前記多重
精度10進整数乱数発生器に加えて得られる10進乱数
を基に、この例では線形合同法を用いている通常精度の
10進整数乱数発生器のパラメータと初期値を計算して
からそれを使い10進整数乱数を発生させる。そして得
られる通常精度の10進整数乱数を使ってビット変換テ
ーブルを引き、一度に8又は16ビットの2進ビット列
を連続して取り出す装置と、平文又は暗号文を読み込
み、そのバイナリー情報と、前記2進ビット列との排他
的論理和(XOR)演算を行って、平文を暗号文に変換
するか、または暗号文を平文に変換する装置とを使用す
る暗号通信方法が提供される。
In order to solve the above-mentioned problems, the second aspect of the present invention
According to the third and third embodiments, a decimal integer random number generator having a period of 10 30 or more created by using a multi-precision arithmetic method capable of providing an arbitrary precision, a decimal integer random number generator having a normal precision, All bits of an 8-bit or 16-bit binary bit string
Construct a binary bit string stored in each row with a turn
A decimal random number obtained by adding a decimal number of a secret key to the multi-precision decimal integer random number generator. In this example, a parameter and an initial value of a normal-precision decimal integer random number generator using the linear congruential method are calculated in this example, and then used to generate a decimal integer random number. Then, a bit conversion table is obtained by using the obtained normal-precision decimal integer random number, a device for continuously extracting a binary bit string of 8 or 16 bits at a time, a plaintext or a ciphertext are read, and the binary information thereof is read. An encryption communication method is provided, which performs an exclusive OR (XOR) operation with a binary bit string to convert a plaintext into a ciphertext or a device that converts a ciphertext into a plaintext.

【手続補正8】[Procedure amendment 8]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0017[Correction target item name] 0017

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0017】上記の課題を解決する為に、本発明の第4
の実施態様によれば、ビット変換テーブルは、各行に格
納してあるビット列が上記実施態様に述べたような固定
長のものでなく、1から10ビットの長さを持ち、更に
テーブルの各行が0だけ、或は1だけとなっている2つ
のサブテーブルに分割されている。そして、2つのサブ
テーブルを交互に索引してビット列を取り出し、これを
2進乱数列とする。これら2つのサブテーブルを合わせ
れば、各行に格納してある2進ビット列を構成する0の
個数と1の個数とは、テーブル全体として等しくなるよ
うに配列されている。なお第4の実施態様では、ビット
変換テーブルのみについて述べてある。
In order to solve the above-mentioned problems, the fourth aspect of the present invention is described.
According to the embodiment, in the bit conversion table, the bit string stored in each row is not of a fixed length as described in the above embodiment, has a length of 1 to 10 bits, and further, each row of the table is Two that are only 0 or only 1
Is divided into sub-tables. And two sub
The table is indexed alternately to extract bit strings,
This is a binary random number sequence. Combine these two subtables
Then, the 0 of the binary bit string stored in each row is
The number and the number of 1 will be equal for the whole table
It is arranged like. In the fourth embodiment, only the bit conversion table is described.

【手続補正9】[Procedure amendment 9]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0022[Correction target item name] 0022

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0022】1.線形合同法 Xn+1=(aXn+c)mod m ここでa,cはパラメータであり、mはたとえば1064
である。modは 剰余を求める演算である。この場合
Xiは64桁の整数である。
1. Linear congruential method X n + 1 = (aX n + c) mod m where a and c are parameters, and m is, for example, 10 64
It is. mod is an operation for obtaining a remainder. In this case, Xi is a 64-digit integer .

【手続補正10】[Procedure amendment 10]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0029[Correction target item name] 0029

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0029】以上の1,2,4については、クヌースの
本(参考文献:「準数演算法/乱数」,著者;KNUT
H,訳;渋谷政昭、サイエンス社、1985年)を、3
については、(参考文献:「カオス入門」,著者;長島
弘幸、馬場良和、培風館、1993年)を参照した。
The above 1, 2 and 4 are described in Knuth's book (Reference: "Quadrature arithmetic method / random number", author; KNUT
H, translation; Masaaki Shibuya, Science, 1985)
Reference was made to (Reference: "Introduction to Chaos", author; Hiroyuki Nagashima, Yoshikazu Baba, Baifukan , 1993).

【手続補正11】[Procedure amendment 11]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0107[Correction target item name]

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0107】ステップS351では、引数(アーギュメ
ント)と外部変数(パラメータ)の定義を行う。定義さ
れる全ての変数、配列は整数である。入力のnは8桁の
整数、出力のtable は2次元配列の引数で、1つは使用
中のもの、他は行番号を書き換え中のものである。ポイ
ンタ(0)用とポインタ(1)用で、上記別の配列が使
われる。出力のフラグswは、0か1で使用中を示す。
出力のフラグswsは、フラグswの反対で書き換え中
を示す。
[0107] In step S351, the argument (Agyume
Cement) and a definition of external variables (parameters). All variables and arrays defined are integers. The input n is an 8-digit integer, and the output table is a two-dimensional array argument, one being used and the other being rewriting the row number. The above-mentioned separate arrays are used for the pointer (0) and the pointer (1). The output flag sw is 0 or 1 to indicate that it is in use.
The output flag sws indicates that rewriting is in progress, opposite to the flag sw.

【手続補正12】[Procedure amendment 12]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】0133[Correction target item name]

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【0133】[0133]

【発明の効果】本発明の乱数発生方法によれば、通信速
度を上まわる暗号化/復号化処理を行うことが出来るよ
うになった。
According to the random number generation method of the present invention, encryption / decryption processing exceeding the communication speed can be performed.

【手続補正書】[Procedure amendment]

【提出日】平成11年7月30日(1999.7.3
0)
[Submission date] July 30, 1999 (July 7, 1999)
0)

【手続補正1】[Procedure amendment 1]

【補正対象書類名】明細書[Document name to be amended] Statement

【補正対象項目名】請求項1[Correction target item name] Claim 1

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 10進整数乱数発生手段と、各行に格納
してある2進ビット列の0の個数と1の個数がテーブル
全体として等しいビット変換テーブルと、を用いた2進
乱数を発生する乱数発生方法であって、前記10進乱数
発生手段により10進乱数を発生する第1の過程と、前
記発生された10進乱数から所定の桁数の10進数を取
り出す第2の過程と、前記取り出された10進数を前記
ビット変換テーブルの行番号に変換する第3の過程と、
前記ビット変換テーブルの前記行番号の内容であるビッ
ト列を取り出す第4の過程と、を備えた事を特徴とする
乱数発生方法。
1. A random number for generating a binary random number using a decimal integer random number generating means and a bit conversion table in which the number of 0s and 1s in a binary bit string stored in each row are equal in the entire table. A first step of generating a decimal random number by said decimal random number generating means, a second step of extracting a predetermined number of decimal digits from the generated decimal random number, and A third step of converting the obtained decimal number into a row number of the bit conversion table;
A fourth step of extracting a bit string that is the contents of the row number of the bit conversion table.
【請求項2】 任意の精度が出せる多重精度演算法を採
用した10進整数乱数発生手段と、通常の単精度演算法
を採用した10進整数乱数発生手段と、各行に格納して
ある2進ビット列の0の個数と1の個数がテーブル全体
として等しいビット変換テーブルと、を用いた2進乱数
を発生する乱数発生方法であって、前記多重精度10進
乱数発生手段により10進乱数を発生する第1の過程
と、前記発生された10進乱数から所定の桁数の10進
数を所定の個数取り出す第2の過程と、前記取り出され
た10進数を基に前記単精度10進乱数発生手段に必要
なパラメータ及び/又は初期値等を計算する第3の過程
と、その結果使用可能となる前記単精度の10進乱数発
生手段により10進乱数を発生する第4の過程と、前記
単精度の10進乱数発生手段により発生された10進乱
数からビット変換テーブルの行番号を計算する第5の過
程と、前記ビット変換テーブルの前記計算された値に該
当する行番号の内容である乱数ビット列を取り出す第6
の過程と、を備えた事を特徴とする乱数発生方法。
2. A decimal integer random number generating means employing a multi-precision arithmetic method capable of providing an arbitrary precision, a decimal integer random number generating means employing a normal single precision arithmetic method, and a binary number stored in each row. A random number generation method for generating a binary random number using a bit conversion table in which the number of 0s and 1s in a bit string are equal in the entire table, wherein the multi-precision decimal random number generation means generates a decimal random number. A first process, a second process of extracting a predetermined number of decimal numbers having a predetermined number of digits from the generated decimal random number, and a process of generating the single-precision decimal random number based on the extracted decimal number. A third step of calculating necessary parameters and / or initial values and the like; a fourth step of generating a decimal random number by the single-precision decimal random number generation means which can be used as a result thereof; Decimal random number generation A fifth step of calculating the row number of the bit conversion table from the decimal random number generated by the generating means, and a sixth step of extracting a random number bit string that is the content of the row number corresponding to the calculated value of the bit conversion table
And a random number generation method.
【請求項3】 請求項1或は請求項2に記載の10進整
数および10進乱数を、2のべき乗の数を基数とする整
数および乱数と読み替える事を特徴とする請求項1或は
請求項2に記載の乱数発生方法。
3. The method according to claim 1, wherein the decimal integer and the decimal random number according to claim 1 or 2 are replaced with an integer and a random number based on a power of two. Item 4. The random number generation method according to Item 2.
【請求項4】 請求項1から請求項3までに記載された
方法で乱数ビット列を発生させ、一方通信文(或は暗号
文)を読み込み、そのバイナリー情報との排他的論理和
(XOR)演算を行って、通信文を暗号文に(或は暗号
文を通信文に)変換させる事を特徴とする暗号通信方
法。
4. A method of generating a random number bit string by the method according to claim 1, reading a communication message (or a ciphertext), and performing an exclusive OR (XOR) operation with the binary information. To convert the communication text into cipher text (or convert the cipher text into communication text).
【請求項5】 請求項1から請求項3までに記載された
方法で乱数ビット列を発生させるプログラムを記憶した
記憶媒体。
5. A storage medium storing a program for generating a random number bit string by the method according to claim 1. Description:
JP10175101A 1998-06-22 1998-06-22 Random number generation method, encryption communication method, and storage medium storing random number generation program Expired - Fee Related JP2980588B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10175101A JP2980588B1 (en) 1998-06-22 1998-06-22 Random number generation method, encryption communication method, and storage medium storing random number generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10175101A JP2980588B1 (en) 1998-06-22 1998-06-22 Random number generation method, encryption communication method, and storage medium storing random number generation program

Publications (2)

Publication Number Publication Date
JP2980588B1 JP2980588B1 (en) 1999-11-22
JP2000010480A true JP2000010480A (en) 2000-01-14

Family

ID=15990282

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10175101A Expired - Fee Related JP2980588B1 (en) 1998-06-22 1998-06-22 Random number generation method, encryption communication method, and storage medium storing random number generation program

Country Status (1)

Country Link
JP (1) JP2980588B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011530719A (en) * 2008-08-06 2011-12-22 キャシー・ホールディングス・リミテッド・ライアビリティ・カンパニー Uncertainty random value generator

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011530719A (en) * 2008-08-06 2011-12-22 キャシー・ホールディングス・リミテッド・ライアビリティ・カンパニー Uncertainty random value generator
JP2014178716A (en) * 2008-08-06 2014-09-25 Cassy Holdings Llc Uncertainty random value generator

Also Published As

Publication number Publication date
JP2980588B1 (en) 1999-11-22

Similar Documents

Publication Publication Date Title
CA2632857C (en) Closed galois field combination
US8180055B2 (en) Cryptographic system incorporating a digitally generated chaotic numerical sequence
JP3029381B2 (en) Data converter
US8340295B2 (en) High-speed cryptographic system using chaotic sequences
EP1583278B1 (en) Stream Cipher Design with Revolving Buffers
JP4052480B2 (en) Pseudorandom number generation method, pseudorandom number generator, and pseudorandom number generation program
EP1276272A1 (en) Encryption method, program for encryption, memory medium for storing the program, and encryption apparatus, as well as decryption method and decryption apparatus
JPH04250490A (en) Encrypting system based on chaos theory
US6606385B1 (en) Data encrypting/decrypting conversion methods and apparatuses and data communication system adopting the same
WO2006098015A1 (en) Data converting apparatus and data converting method
KR100583495B1 (en) Efficient block cipher method
JP3735670B2 (en) Random number sequence generation device, encryption / decryption device, random number sequence generation method, encryption / decryption method, and program
JP2980588B1 (en) Random number generation method, encryption communication method, and storage medium storing random number generation program
JP4709685B2 (en) Pseudorandom number generation device, pseudorandom number generation method, pseudorandom number generation program, encryption device, and decryption device
Xiong et al. A bit-plane encryption algorithm for RGB image based on modulo negabinary code and chaotic system
Qasim et al. Encrypt medical image using Csalsa20 stream algorithm
CN112202548A (en) Stream encryption key stream generation method, device, circuit and encryption method
KR100350207B1 (en) Method for cryptographic conversion of l-bit input blocks of digital data into l-bit output blocks
JPH09288565A (en) Random number generation device and method, ciphering device and method, decoding device and method, key system generation device and method, and storage medium
Kothandan Modified Blowfish Algorithm to Enhance its Performance and Security
JP3526504B2 (en) Random number generator
KR100308893B1 (en) Extended rc4 chipher algorithm using lfsr
JPH09251267A (en) Encryption device and encryption method
RU2024209C1 (en) Binary information coding device
CN114826548A (en) Image processing hardware accelerator based on homomorphic encryption and image processing method

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees