JP2001154580A - Prime number generation method and apparatus, and storage medium storing prime number generation program - Google Patents
Prime number generation method and apparatus, and storage medium storing prime number generation programInfo
- Publication number
- JP2001154580A JP2001154580A JP33490599A JP33490599A JP2001154580A JP 2001154580 A JP2001154580 A JP 2001154580A JP 33490599 A JP33490599 A JP 33490599A JP 33490599 A JP33490599 A JP 33490599A JP 2001154580 A JP2001154580 A JP 2001154580A
- Authority
- JP
- Japan
- Prior art keywords
- prime
- bit
- bits
- storage area
- prime number
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/30—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy
- H04L9/3006—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters
- H04L9/3033—Public key, i.e. encryption algorithm being computationally infeasible to invert or user's encryption keys not requiring secrecy underlying computational problems or public-key parameters details relating to pseudo-prime or prime number generation, e.g. primality test
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L9/00—Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
- H04L9/08—Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
- H04L9/0861—Generation of secret information including derivation or calculation of cryptographic keys or passwords
- H04L9/0869—Generation of secret information including derivation or calculation of cryptographic keys or passwords involving random numbers or seeds
Landscapes
- Engineering & Computer Science (AREA)
- Computer Security & Cryptography (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computing Systems (AREA)
- Theoretical Computer Science (AREA)
Abstract
(57)【要約】
【課題】 大量に生成される素数の一意性を保証し、か
つそのためのメモリ使用量を低減させることが可能な素
数生成方法及び装置及び素数生成プログラムを格納した
記憶媒体を提供する。
【解決手段】 本発明は、kを正の整数とし、mをk未
満の正の整数とし、wを2m 未満の正の整数とし、kビ
ットとmビットの長さを持つ記憶領域をそれぞれ用意す
る場合において、 mビットの記憶領域に予め与えられ
た初期値を設定し、周期がwで値域が{1,2,…,2
m −1}である数列を計算し、外部から通信手段を介し
て素数生成の要求を受けた場合、mビットの記憶領域を
入力値として数列における入力値の次の値を計算し、m
ビットの値を、kビットの記憶領域の所定の場所へコピ
ーし、k−mビットの乱数を発生させ、kビットの記憶
領域のうち、残ったk−mビットにコピーし、kビット
の整数とみなして素数判定を行い、素数であれば、その
kビットデータを通信手段を介して外部へ返却し、素数
でなければ、再び乱数発生を行う。
PROBLEM TO BE SOLVED: To provide a prime number generation method and apparatus capable of guaranteeing uniqueness of a large number of generated prime numbers and reducing the amount of memory used therefor, and a storage medium storing a prime number generation program. provide. The present invention provides a storage area having a length of k bits and m bits, wherein k is a positive integer, m is a positive integer less than k, w is a positive integer less than 2 m. In the case of preparing, an initial value given in advance is set in an m-bit storage area, the cycle is w, and the value range is {1, 2,.
m- 1} is calculated, and when a request for generation of a prime number is received from the outside via the communication means, the next value of the input value in the sequence is calculated using the m-bit storage area as an input value, and m
The bit value is copied to a predetermined location in a k-bit storage area, a km-bit random number is generated, and the remaining k-m bits in the k-bit storage area are copied to a k-bit integer. And if it is a prime, the k-bit data is returned to the outside via the communication means. If it is not a prime, a random number is generated again.
Description
【0001】[0001]
【発明の属する技術分野】本発明は、素数生成方法及び
装置及び素数生成プログラムを格納した記憶媒体に係
り、特に、暗号技術で用いられる素数生成方法及び装置
及び素数生成プログラムを格納した記憶媒体に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method and an apparatus for generating prime numbers and a storage medium storing a program for generating prime numbers, and more particularly to a method and apparatus for generating prime numbers used in cryptography and a storage medium storing a program for generating prime numbers. .
【0002】[0002]
【従来の技術】データを秘匿するためには暗号化技術が
有効である。データの暗号化には、共通鍵暗号と公開鍵
暗号がある。公開鍵暗号ではデータを暗号化する鍵と復
号化する鍵が異なっており、通常は暗号化に用いる鍵を
一般に公開し、復号化に用いる鍵は利用者が秘密に保持
する。公開される暗号化に用いる鍵から復号化に用いる
鍵を求めることは、現在の数学的理論及び計算機の計算
能力をもってしても現実的な時間には完了しないものと
信じられている。2. Description of the Related Art An encryption technique is effective for concealing data. Data encryption includes common key encryption and public key encryption. In public key cryptography, a key for encrypting data and a key for decrypting data are different. Usually, a key used for encryption is made public, and a key used for decryption is kept secret by a user. Determining a key for decryption from a publicly available key for encryption is believed to be incomplete in a practical time even with current mathematical theories and the computing power of the computer.
【0003】上記性質をもつ公開鍵暗号の具体的な実現
にはいくつか方法があるが、最も有名な方法として、R
SA暗号がある。RSA暗号は初めて公開鍵暗号として
1977年に発表されたもので、素因数分解の困難性を
安全性の根拠にしている(岡本、山本、「現代暗号」、
産業図書、p.110 ,1997を参照)。素因数分解の困難性
とは、素数pとqがあった場合、乗算n=qpを行うこ
とは簡単であるが、逆にnからpとqを求めることは難
しいことをいう。nの桁数が大きくなるにつれて必要な
計算時間は増大し、例えば、64桁と65桁の素数の乗
算結果である129桁の数を素因数分解するために、1
994年に600台の計算機を8カ月用いたことが報告
されている(岡本、太田編、「暗号・ゼロ知識証明・数
論」、共立出版、p.150, 1995 を参照)。他には、離散
対数の問題の困難性に基づく公開鍵暗号も提案されてい
るが、扱いが簡単であることから素因数分解の困難性に
基づく公開鍵暗号が最も利用されており、その中でもR
SA暗号が最も多く利用されている。There are several concrete methods for realizing public key cryptography having the above properties.
There is SA encryption. The RSA cipher was first announced as a public key cipher in 1977, and uses the difficulty of factorization as the basis for security (Okamoto, Yamamoto, "Hyundai Cipher",
See Industrial Books, p. 110, 1997). The difficulty of prime factorization means that when there are prime numbers p and q, it is easy to perform multiplication n = qp, but conversely it is difficult to find p and q from n. As the number of digits of n increases, the calculation time required increases. For example, in order to factorize a 129-digit number that is a result of multiplying a 64-digit and a 65-digit prime, 1 is required.
It has been reported that 600 computers were used for eight months in 994 (see Okamoto and Ota, ed., "Cryptography / Zero Knowledge Proof / Number Theory", Kyoritsu Shuppan, p.150, 1995). In addition, public key cryptography based on the difficulty of the discrete logarithm problem has been proposed, but the public key cryptography based on the difficulty of factorization is most used because it is easy to handle.
SA encryption is most often used.
【0004】RSA暗号は、上述の通り素因数分解の安
全性に根拠をおいているために、もしnの素因数分解に
成功したならば、そのnを用いた暗号文が第三者によっ
て解読されてしまう。従って、nの素因数分解が困難で
あるようにしなければならない。既存の素因数分解法の
うち、RSA暗号を破るために用いられる可能性のある
方法は、その多くが素因数のビットサイズに比例して処
理時間がかかる。そのため、nが1024ビットであっ
たとしても、pが24ビットでqが1000ビットであ
ったとするならば、pのサイズが小さいために素因数分
解される可能性が高い。よって、nのサイズが1024
ビットであれば、pとqはそれぞれ512ビット程度に
しておくことが推奨される。Since the RSA encryption is based on the security of the factorization as described above, if the factorization of n is successful, the ciphertext using the n is decrypted by a third party. I will. Therefore, the factorization of n must be difficult. Among existing prime factorization methods, many of the methods that may be used to break the RSA encryption take processing time in proportion to the bit size of the prime factor. Therefore, even if n is 1024 bits, if p is 24 bits and q is 1000 bits, there is a high possibility that factorization is performed because p is small in size. Therefore, the size of n is 1024
If it is a bit, it is recommended that each of p and q is set to about 512 bits.
【0005】一般に、p,qを素数としてn=pqのビ
ットサイズをl(エル)として「l(エル)ビットRS
A暗号」と呼ばれる。現在商用目的には、1024ビッ
トが推奨され、軍事目的などさらに高度な安全性が必要
な場面では、2048ビットが推奨されている。従っ
て、素数としては、512ビットや1024ビットの長
さを持たせることが求められる。[0005] In general, when p and q are prime numbers and the bit size of n = pq is 1 (el), "l (el) bits RS
It is called "A cipher". At present, 1024 bits are recommended for commercial purposes, and 2048 bits are recommended in situations requiring higher security such as military purposes. Therefore, it is required that the prime numbers have a length of 512 bits or 1024 bits.
【0006】素数を生成するためには、まず、乱数を発
生させ、必要なビットサイズを持つ奇数を取得し、その
値が素数であるかどうかを検査する。もし、素数判定に
失敗すれば、別の奇数を再び乱数によって発生させ、検
査を続ける。素数判定にはいくつか方法があり、例え
ば、Rabin 法がある(Rabin, M.O.,"Probabilistic Alg
orithm for Testing Primality," J.Number Theory 12,
pp.128-138, 1980 を参照)。In order to generate a prime number, first, a random number is generated, an odd number having a required bit size is obtained, and it is checked whether the value is a prime number. If the determination of the prime number fails, another odd number is generated again by a random number, and the inspection is continued. There are several methods for determining the prime number, for example, the Rabin method (Rabin, MO, "Probabilistic Alg
orithm for Testing Primality, "J.Number Theory 12,
pp.128-138, 1980).
【0007】また、素数は、無限に存在することが素数
定理によって保証されており、判定に失敗したときの次
の候補を適切に選択すれば有限回で処理は終了する(素
数定理については「数学セミナーリーティングス、数の
世界、日本評論社、p.97,1982 」を参照)。ここで、乱
数の発生には、多くの場合決定論的な方法が用いられ
る。即ち、乱数系列の初期値を設定し、その値とある関
数fを用いて系列{rn}を生成する。Further, the prime number is guaranteed to exist infinitely by the prime number theorem, and the process ends in a finite number of times if the next candidate when the determination fails is appropriately selected (for the prime number theorem, see Mathematics Seminar Readings, World of Numbers, Nihon Hyoronsha, p. 97, 1982). Here, a deterministic method is often used to generate random numbers. That is, the initial values of the random number sequence, generating a sequence {r n} using a function f with that value.
【0008】[0008]
【発明が解決しようとする課題】しかしながら、上記の
ような方法で素数を生成し、暗号鍵を作成する場合、次
のような問題がある。即ち、あるネットワークシステム
において大量に暗号鍵を作成しなければならない場合、
その暗号鍵の一意性の保証が必要となる。もし同じ素数
が生成された場合、その過程で用いられた乱数が同じで
ある可能性があり、また、乱数生成が決定論的であれば
その後に生成される素数も同じである可能性があるた
め、結果としてRSA暗号鍵が同じになることが考えら
れる。このような事態において、鍵が暗号処理に利用さ
れた場合には他人に暗号文を復号される危険があるこ
と、また、署名処理に利用された場合には他人へのなり
すましが結果として可能となる。特に、署名鍵がシステ
ム内部で重複すると、本人性確認の手段として暗号処理
を用いたとしても、その信頼性が満足されない。電子商
取引などを行うには確実な本人性確認が必要とされ、即
ち、鍵の重複を避けることがシステムに求められる。However, when a prime number is generated by the above-described method and an encryption key is created, there are the following problems. In other words, when a large number of encryption keys must be created in a certain network system,
It is necessary to guarantee the uniqueness of the encryption key. If the same prime is generated, the random numbers used in the process may be the same, and if the random number generation is deterministic, the subsequently generated primes may also be the same Therefore, it is possible that the same RSA encryption key results. In such a situation, if the key is used for cryptographic processing, there is a risk that others will be able to decrypt the ciphertext, and if it is used for signature processing, impersonation to others is possible as a result. Become. In particular, if the signature key is duplicated inside the system, the reliability is not satisfied even if encryption processing is used as a means for confirming the identity. Performing electronic commerce or the like requires a secure identity check, that is, the system is required to avoid duplication of keys.
【0009】本発明は、上記の点に鑑みなされたもの
で、大量に生成される素数の一意性を保証し、かつその
ためのメモリ使用量を低減させることが可能な素数生成
方法及び装置及び素数生成プログラムを格納した記憶媒
体を提供することを目的とする。SUMMARY OF THE INVENTION The present invention has been made in view of the above points, and provides a method and apparatus for generating prime numbers and a prime number capable of guaranteeing the uniqueness of a large number of generated prime numbers and reducing the amount of memory used therefor. It is an object to provide a storage medium storing a generation program.
【0010】[0010]
【課題を解決するための手段】図1は、本発明の原理を
説明するための図である。本発明(請求項1)は、デー
タを秘匿化するための暗号技術で用いられる素数を生成
するための素数生成方法において、kを正の整数とし、
mをk未満の正の整数とし、wを2m 未満の正の整数と
し、kビットとmビットの長さを持つ記憶領域をそれぞ
れ用意する場合において、mビットの記憶領域に予め与
えられた初期値を設定し(ステップ1)、周期がwで値
域が{1,2,…,2m −1}である数列を計算し(ス
テップ2)、外部から通信手段を介して素数生成の要求
を受けた場合(ステップ3)、mビットの記憶領域を入
力値として数列における入力値の次の値を計算し(ステ
ップ4)、mビットの値を、kビットの記憶領域の所定
の場所へコピーし(ステップ5)、k−mビットの乱数
を発生させ、kビットの記憶領域のうち、残ったk−m
ビットにコピーし(ステップ6)、kビットの整数とみ
なして素数判定を行い(ステップ7)、素数であれば、
そのkビットデータを通信手段を介して外部へ返却し
(ステップ8)、素数でなければ、再び乱数発生を行う
(ステップ6)。FIG. 1 is a diagram for explaining the principle of the present invention. The present invention (claim 1) provides a prime generation method for generating a prime used in a cryptographic technique for concealing data, wherein k is a positive integer,
When m is a positive integer less than k, w is a positive integer less than 2 m, and a storage area having a length of k bits and m bits is prepared, the storage area of m bits is given in advance. An initial value is set (step 1), a sequence having a period of w and a range of {1, 2,..., 2 m -1} is calculated (step 2), and a request for generation of a prime number from outside via a communication means is made. (Step 3), the next value of the input value in the sequence is calculated using the m-bit storage area as an input value (step 4), and the m-bit value is transferred to a predetermined location in the k-bit storage area. Copy (step 5), generate a random number of km bits, and store the remaining km within the k-bit storage area.
Is copied to bits (step 6), and is judged as a k-bit integer to determine a prime number (step 7).
The k-bit data is returned to the outside via the communication means (step 8), and if it is not a prime number, a random number is generated again (step 6).
【0011】本発明(請求項2)は、nをk以下の正の
整数とし、m+n<kを満たすものとし、kビットのm
ビットとnビットの長さを持つ記憶領域をそれぞれ用意
する場合において、nビットの記憶領域に予め与えられ
た初期値を設定し、計算されたnビットの値を、kビッ
トの記憶領域の所定の場所にコピーし、k−m−nビッ
トの乱数を発生させ、kビットの記憶領域のうち、残っ
たk−m−nビットにコピーし、kビットの整数とみな
して素数判定を行い、素数であれば、該kビットデータ
を通信部を介して外部へ返却し、素数でなければ再び乱
数発生を行う処理を繰り返す。According to the present invention (claim 2), n is a positive integer equal to or less than k, and m + n <k is satisfied.
In the case of preparing a storage area having a length of n bits and n bits, respectively, an initial value given in advance is set in the storage area of n bits, and the calculated value of n bits is replaced with a predetermined value of the storage area of k bits. To generate a km-n-bit random number, copy it to the remaining km-n-bit of the k-bit storage area, and perform a prime number judgment by regarding it as a k-bit integer. If it is a prime number, the k-bit data is returned to the outside via the communication unit. If it is not a prime number, the process of generating a random number is repeated.
【0012】図2は、本発明の原理構成図である。本発
明(請求項3)は、データを秘匿化するための暗号技術
で用いられる素数を生成するための素数生成装置であっ
て、kを正の整数とし、mをk未満の正の整数とし、w
を2m 未満の正の整数とし、kビットとmビットの長さ
を持つ記憶領域11 、12 をそれぞれ用意する場合にお
いて、mビットの記憶領域12 に予め与えられた初期値
を設定する初期値設定手段2と、周期がwで、値域が
{1,2,…,2m −1}である数列を計算する計算手
段3と、外部から通信手段を介して素数生成の要求を受
けた場合、mビットの記憶領域を入力値として上記の数
列における入力値の次の値を計算し、mビットの値を、
kビットの記憶領域11 の所定の場所へコピーするコピ
ー手段4と、k−mビットの乱数を発生させ、kビット
の記憶領域のうち、残ったk−mビットにコピーし、k
ビットの整数とみなして素数判定を行い、素数であれ
ば、そのkビットデータを通信手段を介して外部へ返却
し、素数でなければ、再び乱数発生を行う乱数発生手段
5とを有する。FIG. 2 is a diagram showing the principle of the present invention. The present invention (claim 3) is a prime number generation device for generating a prime number used in encryption technology for concealing data, where k is a positive integer and m is a positive integer less than k. , W
Was a positive integer less than 2 m, in the case of preparing the storage area 1 1 having a length of k bits and m bits, 1 2, respectively, set the initial value given in advance in the storage area 1 2 m-bit Initial value setting means 2 for performing calculation, a calculating means 3 for calculating a sequence having a period w and a range of {1, 2,..., 2 m -1}, and a request for generating a prime number from outside via a communication means. If it is received, the next value of the input value in the above sequence is calculated using the m-bit storage area as the input value, and the m-bit value is calculated as
and copying means (4) for copying the k bits of the storage area 1 1 of a predetermined location, to generate a k-m bit random number, among the storage region of k bits, then copied to the remaining k-m bits, k
There is a random number generating means 5 which performs a prime determination assuming that it is a bit integer, returns the k-bit data to the outside via a communication means if it is a prime number, and generates a random number again if it is not a prime number.
【0013】本発明(請求項4)は、データを秘匿化す
るための暗号技術で用いられる素数を生成するための素
数生成装置であって、nをk以下の正の整数とし、m+
n<kを満たすものとし、kビットのmビットとnビッ
トの長さを持つ記憶領域をそれぞれ用意する場合におい
て、nビットの記憶領域に予め与えられた初期値を設定
する初期値設定手段と、計算されたnビットの値を、k
ビットの記憶領域の所定の場所にコピーするコピー手段
と、k−m−nビットの乱数を発生させ、kビットの記
憶領域のうち、残ったk−m−nビットにコピーし、k
ビットの整数とみなして素数判定を行い、素数であれ
ば、該kビットデータを通信部を介して外部へ返却し、
素数でなければ再び乱数発生を行う乱数発生手段とを有
する。According to a fourth aspect of the present invention, there is provided a prime number generating apparatus for generating a prime number used in an encryption technique for concealing data, wherein n is a positive integer equal to or less than k, and m +
initial value setting means for setting an initial value given in advance to the n-bit storage area when n <k is satisfied and a storage area having a length of k bits of m bits and n bits is prepared. , The calculated n-bit value to k
A copy means for copying to a predetermined location in the bit storage area, generating a kmn bit random number, and copying to the remaining kmn bits in the k bit storage area;
A prime number determination is performed assuming that the integer is a bit, and if it is a prime number, the k-bit data is returned to the outside via the communication unit.
If it is not a prime number, there is provided a random number generating means for generating a random number again.
【0014】本発明(請求項5)は、データを秘匿化す
るための暗号技術で用いられる素数を生成するための素
数生成プログラムを格納した記憶媒体であって、kを正
の整数とし、mをk未満の正の整数とし、wを2m 未満
の正の整数とし、kビットとmビットの長さを持つ記憶
領域をそれぞれ用意する場合において、mビットの記憶
領域に予め与えられた初期値を設定する初期値設定プロ
セスと、周期がwで値域が{1,2,…,2m −1}で
ある数列を計算する計算プロセスと、外部から通信プロ
セスを介して素数生成の要求を受けた場合、mビットの
記憶領域を入力値として上記の数列における入力値の次
の値を計算し、mビットの値を、kビットの記憶領域の
所定の場所へコピーするコピープロセスと、k−mビッ
トの乱数を発生させ、kビットの記憶領域のうち、残っ
たk−mビットにコピーし、kビットの整数とみなして
素数判定を行い、素数であれば、そのkビットデータを
通信プロセスを介して外部へ返却し、素数でなければ、
再び乱数発生を行う乱数発生プロセスとを有する。The present invention (claim 5) is a storage medium storing a prime generating program for generating a prime used in encryption technology for concealing data, wherein k is a positive integer, m Is a positive integer less than k, w is a positive integer less than 2 m, and a storage area having a length of k bits and m bits is prepared. An initial value setting process for setting a value, a calculation process for calculating a sequence having a period of w and a range of {1, 2,..., 2 m -1}, and a request for generation of a prime number from outside via a communication process. A copy process of calculating the next value of the input value in the above sequence using the m-bit storage area as an input value, and copying the m-bit value to a predetermined location in the k-bit storage area; -Generate an m-bit random number , The remaining k-m bits of the k-bit storage area are copied, and a prime number is determined by considering the k-bit integer. If it is a prime number, the k-bit data is returned to the outside via a communication process. , If not a prime,
And a random number generation process for generating random numbers again.
【0015】本発明(請求項6)は、データを秘匿化す
るための暗号技術で用いられる素数を生成するための素
数生成プログラムを格納した記憶媒体であって、nをk
以下の正の整数とし、m+n<kを満たすものとし、k
ビットのmビットとnビットの長さを持つ記憶領域をそ
れぞれ用意する場合において、nビットの記憶領域に予
め与えられた初期値を設定する初期値設定プロセスと、
計算されたnビットの値を、kビットの記憶領域の所定
の場所にコピーするコピープロセスと、k−m−nビッ
トの乱数を発生させ、kビットの記憶領域のうち、残っ
たk−m−nビットにコピーし、kビットの整数とみな
して素数判定を行い、素数であれば、該kビットデータ
を通信部を介して外部へ返却し、素数でなければ再び乱
数発生を行う乱数発生プロセスとを有する。The present invention (claim 6) is a storage medium storing a prime generating program for generating a prime used in encryption technology for concealing data, wherein n is k
The following positive integer shall satisfy m + n <k, and k
An initial value setting process of setting an initial value given in advance to the n-bit storage area when preparing storage areas each having a length of m bits and n bits of bits;
A copy process of copying the calculated n-bit value to a predetermined location in a k-bit storage area; generating a km-n-bit random number; -Copy to n bits, judge it as a k-bit integer, judge a prime number. If it is a prime number, return the k-bit data to the outside via the communication unit. If it is not a prime number, generate a random number again. Process.
【0016】上記のように、数列{si }としてmビッ
トの数列を用いた場合、個々の値としては、0から2m
−1までの2m 通りが考えられる。この数列の周期をw
とする。このとき、初期値s1 を用いて生成した数列
は、i番目の値をsi とおくと、sw までの値は全て異
なる値である。各si を素数の一部として考慮すること
により、この装置が返却する値に重複がないことが最初
のw個について保証できる。As described above, when an m-bit sequence is used as the sequence {s i }, the individual values are 0 to 2 m
2 m patterns up to -1 are conceivable. The period of this sequence is w
And At this time, sequence generated using the initial value s 1, when put i-th values as s i, values of up to s w are all different values. By considering each s i as part of a prime number, it is possible to guarantee that the values returned by this device are not duplicated for the first w values.
【0017】次に、記憶容量については、この数列は、
直前の値si-1 を用いれば、次の値si が得られる。従
って、直前の数列の値si-1 を記憶しておけばよい。よ
って、素数生成の個数にかかわらず、記憶領域としては
mビットで充分である。一般に一意性を確保するために
は、以前に生成された素数や、素数から生成される暗号
鍵を記憶装置に保持しておき、過去に生成したものと比
較させることにより、一意性の判断を行うことができる
が、記憶する数が多くなるに従い、記憶装置の増大化、
検索時間の増大化を招くが、本発明によれば、周期が非
常に長く、かつ、直前の値から次の値を求めることがで
きる数列の値を素数の一部とすることによって、過去に
生成した素数を記憶することなく、一意性を確保し、記
憶装置や、生成時間の増大を防ぐことが可能となる。Next, regarding the storage capacity, this sequence is:
By using the value s i-1 immediately preceding, the following values s i is obtained. Therefore, the value s i-1 of the immediately preceding sequence may be stored. Therefore, irrespective of the number of generated prime numbers, m bits are sufficient for the storage area. Generally, in order to ensure uniqueness, a previously generated prime number and an encryption key generated from the prime number are stored in a storage device, and the uniqueness is determined by comparing the generated key with a previously generated one. Can be performed, but as the number of storages increases,
According to the present invention, the search time is increased. However, according to the present invention, the value of a sequence that can obtain the next value from the immediately preceding value is a part of a prime number. Without storing the generated prime numbers, it is possible to ensure uniqueness and prevent an increase in the storage device and generation time.
【0018】[0018]
【発明の実施の形態】図3は、本発明の素数生成装置の
構成を示す。同図に示す素数生成装置は、制御部10、
データ記憶部20、通信部30、50、算術演算部40
から構成される。同図において、点線枠は、制御部10
において本発明の処理における各処理部のコントロール
を行う範囲である。FIG. 3 shows a configuration of a prime number generating apparatus according to the present invention. The prime number generation device shown in FIG.
Data storage unit 20, communication units 30, 50, arithmetic operation unit 40
Consists of In the figure, a dotted frame indicates the control unit 10.
Is a range in which each processing unit in the processing of the present invention is controlled.
【0019】算術演算部40は、乱数の発生、LFSR
の計算、素数判定を行うRabin 法の計算処理を行う。算
術演算部40で行う数列の生成には、線形フィードバッ
クシフトレジスタ(以下、LFSR)を用いる。LFS
Rは、数列を生成するアルゴリズムであり、数列におけ
る直前の値を入力として次の値を出力する。また、mビ
ットの数を入出力するLFSRは、1から2m −1まで
の値を出力し、その周期は、2m −1となる。なお、L
FSRの構造については、「Bruce Schneier, Applied
Cryptography, 2nd edition, John-Wiley and Sons, p.
372, 1996 」に示されている。The arithmetic operation unit 40 generates a random number, LFSR
Performs the Rabin method of calculating the prime number and determining the prime number. A linear feedback shift register (hereinafter, LFSR) is used to generate a sequence performed by the arithmetic operation unit 40. LFS
R is an algorithm for generating a sequence, and outputs the next value by inputting the immediately preceding value in the sequence. The LFSR for inputting / outputting an m-bit number outputs a value from 1 to 2 m -1 and its cycle is 2 m -1. Note that L
For the structure of the FSR, see Bruce Schneier, Applied
Cryptography, 2nd edition, John-Wiley and Sons, p.
372, 1996 ".
【0020】データ記憶部20には、予めLFSRの直
前の出力値あるいは初期値であるs i-1 が格納され、処
理終了時には、出力データsi を格納する。上記の構成
における算術演算部40は、図2における初期値設定手
段2、計算手段3、コピー手段4、乱数発生手段5の各
手段を含む。当該算術演算部40では、kを正の整数と
し、mをk未満の正の整数とし、wを2m 未満の正の整
数とし、uを0以上の整数とし、vを0以上の整数と
し、u+v=k−mを満たすものとする。mビットの数
s1 を数列の初期値とし、システムを最初に起動する際
に、初期値s1 を設定しておく。また、数列のそれぞれ
の値は、mビットの長さとする。The data storage unit 20 stores the LFSR
Previous output value or initial value s i-1Is stored.
At the end of processing, output data siIs stored. The above configuration
The arithmetic operation unit 40 in FIG.
Each of the stage 2, the calculating means 3, the copying means 4, and the random number generating means 5
Including means. In the arithmetic operation unit 40, k is a positive integer.
And m is a positive integer less than k and w is 2mLess than positive integer
U is an integer greater than or equal to 0, and v is an integer greater than or equal to 0.
It is assumed that u + v = km is satisfied. m-bit number
s1Is the initial value of the sequence, and when the system is first started
And the initial value s1Is set. Also, each of the sequence
Has a length of m bits.
【0021】算術演算部40が素数生成の要求を通信部
30を介して取得すると、まず、直前の数列の値si-1
から次の値であるmビットの数si を得る。次に、uビ
ットの乱数ru とvビットの乱数rv を生成する。そし
て、kビットの数として、 R=ru 2m+v +si 2v +rv とする。右辺のそれぞれの値は、u,m,vビットであ
ることと、 u+v+m=k とする。When the arithmetic operation unit 40 acquires a request for generating a prime number via the communication unit 30, first, the value s i-1 of the immediately preceding sequence is obtained.
, The next value m-bit number s i is obtained. Then generates a random number r u and v-bit random number r v of u bits. Then, as the number of k bits, the R = r u 2 m + v + s i 2 v + r v. Each value on the right side is u, m, v bits, and u + v + m = k.
【0022】最後に、Rが素数であるか否かをRabin 法
を用いて検証する。もし、Rが合成数である場合には、
乱数rv の生成、あるいは、乱数ru の生成に戻って上
記の処理を再度行う。但し、si の再生成は行わない。
Rが素数であるならば、この値を通信部50を介して外
部に返却する。Finally, it is verified whether or not R is a prime number by using the Rabin method. If R is a composite number,
Generation of random number r v, or again perform the above process returns to the generation of the random number r u. However, re-generation of the s i is not performed.
If R is a prime number, this value is returned to the outside via the communication unit 50.
【0023】[0023]
【実施例】以下、図面と共に本発明の実施例を説明す
る。図4は、本発明の一実施例のkビット素数の内部構
成を示し、図5は、本発明の一実施例のkビット素数の
内部構成(固有の値を含む)を示す。図4では、LFS
Rの出力値を乱数の一部に埋め込んだ場合の構成を示し
ている。一般に、kビットの素数を生成する場合には、
真にkビットの長さを持つ値、即ち最上位ビットに1が
立っている値を求められる。従って、図4、図5では、
それぞれ最上位ビットに1を置いている。Embodiments of the present invention will be described below with reference to the drawings. FIG. 4 shows an internal configuration of a k-bit prime in one embodiment of the present invention, and FIG. 5 shows an internal configuration (including a unique value) of a k-bit prime in one embodiment of the present invention. In FIG. 4, LFS
The configuration when the output value of R is embedded in a part of the random number is shown. Generally, when generating a k-bit prime number,
A value having a length of truly k bits, that is, a value in which 1 stands in the most significant bit, is obtained. Therefore, in FIGS. 4 and 5,
Each has a 1 in the most significant bit.
【0024】LFSRの出力値を、素数Rのどの部分に
埋め込むかについては、特に制限はない。また、一つの
纏まった部分として埋め込むのではなく、いくつかの部
分に分解してRの中に埋め込んでもよい。但し、最下位
ビット付近には、図中のvビット文の乱数部(rv )が
示すように一つのまとまった部分として乱数成分を埋め
込む形を採った方が確実な素数生成として推奨される。
即ち、素数定理によると、例えば、512ビットの場
合、素数である確率は約500分の1であって、vを比
較的多く採ってある値r0 v を中心として、r0 v ±M
の範囲を探索すれば(ここでMは、ある正の整数)、そ
の検索範囲中に素数が入る確率が結果として大きくなる
からである。There is no particular limitation on in which part of the prime number R the LFSR output value is embedded. Also, instead of embedding as one integrated part, it may be decomposed into several parts and embedded in R. However, in the vicinity of the least significant bit, as shown by the random number part (r v ) of the v-bit sentence in the drawing, it is recommended to embed a random number component as one unit as a reliable prime number generation. .
That is, according to the prime number theorem, for example, in the case of 512 bits, the probability is a prime number from about 500 minutes of 1, v around the relatively large take in Aru value r 0 v a, r 0 v ± M
(Where M is a positive integer), the probability that a prime number falls within the search range increases as a result.
【0025】図5では、LFSRの出力だけでなく、固
有の値もRの中に埋め込まれている。これは、素数及び
素数から構成される暗号鍵を生成するサーバが、あるネ
ットワークシステム内に複数台存在し、かつシステムと
して素数や暗号鍵の一意性を保証しなければならない場
合に有効である。固有の値としては、例えば、サーバの
製造IDなどを割り当てればよい。この場合も、上記の
ように、固有の値を一つのまとまった部分として埋め込
むのではなく、いくつかの部分に分解してRの中に埋め
込んでもよい。In FIG. 5, not only the output of the LFSR but also a unique value is embedded in R. This is effective when there are a plurality of servers that generate prime numbers and encryption keys composed of prime numbers in a certain network system, and the system must guarantee uniqueness of prime numbers and encryption keys. As the unique value, for example, a server manufacturing ID may be assigned. Also in this case, as described above, instead of embedding the unique value as a single unit, it may be divided into several parts and embedded in R.
【0026】例として、k=512,m=64,n=3
2,v=352とし、LFSRは、64ビットの入出力
を行うものとする。これにより、まず、固有の値としてAs an example, k = 512, m = 64, n = 3
2, v = 352, and the LFSR performs 64-bit input / output. As a result, first, as a unique value
【0027】[0027]
【数1】 (Equation 1)
【0028】を入れることができる。このフィールドに
は、例えば、サーバの製造IDなどを入れることが可能
となる。また、LFSRの出力ビットはm=64ビット
となる。従って、Can be inserted. In this field, for example, a server manufacturing ID can be entered. The output bits of the LFSR are m = 64 bits. Therefore,
【0029】[0029]
【数2】 (Equation 2)
【0030】個の異なる素数を生成することが保証でき
る。システム起動時に、初期値s1 を定めて指定してお
く。素数生成の要求があると、まず、LFSRを用いて
直前の出力値si-1 から新しい出力値si を得る。これ
をデータ記憶部20にて記憶しておくと同時に、si を
Rの然るべき位置に複写する。また、32ビットの固有
の値を、同じRの然るべき位置へ複写しておく。The generation of a number of different prime numbers can be guaranteed. At system startup, you have specified defines the initial value s 1. When there is a request for prime generation, first, obtain a new output value s i from the output value s i-1 of the immediately preceding use the LFSR. At the same time storing them in the data storage unit 20 copies the s i in position of R. Also, the 32-bit unique value is copied to an appropriate position of the same R.
【0031】残ったuビット分の領域とvビット分の領
域に対し、それぞれuビットとvビットの乱数(ru ,
rv )を生成して然るべき位置に複写する。ここでは、
図5にあるように、rv を複写する領域は一つの纏まっ
た部分としてRの最下位を含んだ領域であるとする。但
し、これらの過程において、Rの最上位ビットは1が立
つようにしておく。また、2を除いて素数は奇数である
から、同様に最下位ビットも1が立つようにしておく。For the remaining u-bit area and v-bit area, u-bit and v-bit random numbers (r u ,
r v ) and copy it in place. here,
As in Figure 5, a region to copy r v is a region including the lowest R as portion collectively of one. However, in these processes, the most significant bit of R is set to 1. Since prime numbers are odd except for 2, the least significant bit is also set to 1 similarly.
【0032】従って、vビット分の領域に複写される乱
数rv の最下位ビットは、常に1が立っているものと仮
定してよい。こうして得られたRに対して、Rabin 法を
用いて素数検査を行う。合成数と判断された場合には、
rv に2を足す、あるいは、2を減じて隣の奇数を表す
ようにして再びvビット分の領域に複写し、得られたR
に対して、Rabin 法による素数判定を行うことを繰り返
す。ここで、Rそのものに2を足したり、2を減じたり
すると、繰り上がりあるいは、繰り下がりによってmビ
ット分の領域やnビット分の領域に影響を及ぼす可能性
があるため、ここでの操作はvビット分の領域に限定す
るべきである。また、このような操作を行った結果、r
v がvビットを超えたり、負の値になった場合には、2
v を減じる、あるいは、2v を足すなどの操作を行って
1から2v −1の範囲内に値を保持しておく。素数検査
に合格した場合には、Rを返却する。Therefore, it may be assumed that the least significant bit of the random number r v copied to the v-bit area is always “1”. The obtained R is subjected to a prime number test using the Rabin method. If it is determined to be a composite number,
Rv is incremented by 2, or 2 is subtracted to represent an adjacent odd number, and is copied again to a v-bit area.
Is repeated for the prime number judgment by the Rabin method. Here, if 2 is added to or subtracted from R itself, carry up or carry down may affect the area for m bits or the area for n bits. It should be limited to an area of v bits. Also, as a result of performing such an operation, r
If v exceeds v bits or becomes negative, 2
An operation such as subtracting v or adding 2 v is performed to keep the value in the range of 1 to 2 v −1. If it passes the prime number test, return R.
【0033】また、本発明では、算術演算部40の動作
を図1のフローチャートに示すように、kビット、mビ
ットの記憶領域に初期値を設定するプロセス、周期がw
で値域が{1,2,…,2m −1}である数列を計算す
るプロセス、素数生成要求時に、mビットの記憶領域を
入力値として計算された数列における入力値の次の値を
計算して、mビットの記憶領域へ格納するプロセス、計
算されたmビットの値を、kビットの記憶領域へコピー
するプロセス、k−mビットの乱数を発生させ、kビッ
トの記憶領域のうち、残ったk−mビットの領域にコピ
ーするプロセス、素数判定の結果、素数である場合に
は、kビットデータを素数として外部に出力するプロセ
ス、素数でない場合には再度乱数を発生させるプロセス
からなるプログラムを構築する。さらに、当該プログラ
ムを素数生成装置として利用されるコンピュータに接続
されるディスク装置や、フロッピーディスク、CD−R
OM等の可搬記憶媒体に格納しておき、本発明を実施す
る際にインストールすることにより、容易に本発明を実
現することができる。Further, according to the present invention, the operation of the arithmetic operation unit 40 is a process of setting an initial value in a k-bit and m-bit storage area as shown in the flowchart of FIG.
Process of calculating a sequence whose value range is {1, 2,..., 2 m -1}, and calculating the next value of the input value in the sequence calculated using the m-bit storage area as an input value at the time of a prime number generation request Then, a process of storing the calculated value of m bits in the storage area of m bits, a process of copying the calculated value of m bits to the storage area of k bits, and generating a random number of k−m bits. It consists of a process of copying to the remaining km-bit area, a process of outputting k-bit data as a prime if it is a prime, and a process of generating a random number again if it is not a prime. Build a program. Further, a disk device connected to a computer that uses the program as a prime number generating device, a floppy disk, a CD-R
The present invention can be easily realized by storing it in a portable storage medium such as OM and installing it when implementing the present invention.
【0034】なお、本発明は、上記の実施例に限定され
ることなく、特許請求の範囲内において、種々変更・応
用が可能である。It should be noted that the present invention is not limited to the above-described embodiment, and various modifications and applications are possible within the scope of the claims.
【0035】[0035]
【発明の効果】上述のように、本発明によれば、主に暗
号技術で用いられる素数生成処理において、生成された
素数の一意性を容易に保証しつつ、使用記憶領域を削減
することができる。As described above, according to the present invention, it is possible to reduce the used storage area while easily assuring the uniqueness of the generated prime numbers in the prime number generation processing mainly used in the encryption technology. it can.
【図1】本発明の原理を説明するための図である。FIG. 1 is a diagram for explaining the principle of the present invention.
【図2】本発明の原理構成図である。FIG. 2 is a principle configuration diagram of the present invention.
【図3】本発明の素数生成装置の構成図である。FIG. 3 is a configuration diagram of a prime number generation device of the present invention.
【図4】本発明の一実施例のkビット素数の内部構造を
示す。FIG. 4 shows an internal structure of a k-bit prime number according to an embodiment of the present invention.
【図5】本発明の一実施例のkビット素数の内部構造
(固有の値を含む)を示す。FIG. 5 shows an internal structure (including a unique value) of a k-bit prime number according to an embodiment of the present invention.
1 記憶領域 11 kビット記憶領域 12 mビット記憶領域 2 初期値設定手段 3 計算手段 4 コピー手段 5 乱数発生手段 10 制御部 20 データ記憶部 30、50 通信部 40 算術演算部DESCRIPTION OF SYMBOLS 1 Storage area 1 1 k-bit storage area 1 2 m-bit storage area 2 Initial value setting means 3 Calculation means 4 Copy means 5 Random number generation means 10 Control unit 20 Data storage unit 30, 50 Communication unit 40 Arithmetic operation unit
Claims (6)
いられる素数を生成するための素数生成方法において、 kを正の整数とし、mをk未満の正の整数とし、wを2
m 未満の正の整数とし、kビットとmビットの長さを持
つ記憶領域をそれぞれ用意する場合において、mビット
の記憶領域に予め与えられた初期値を設定し、 周期がwで値域が{1,2,…,2m −1}である数列
を計算し、 外部から通信手段を介して素数生成の要求を受けた場
合、mビットの記憶領域を入力値として前記数列におけ
る入力値の次の値を計算し、mビットの値を、kビット
の記憶領域の所定の場所へコピーし、 k−mビットの乱数を発生させ、kビットの記憶領域の
うち、残ったk−mビットにコピーし、kビットの整数
とみなして素数判定を行い、素数であれば、そのkビッ
トデータを通信手段を介して外部へ返却し、素数でなけ
れば、再び乱数発生を行うことを特徴とする素数生成方
法。1. A prime generation method for generating a prime used in encryption technology for concealing data, wherein k is a positive integer, m is a positive integer less than k, and w is 2
When a storage area having a length of k bits and m bits is prepared as a positive integer less than m , a predetermined initial value is set in the storage area of m bits, and the period is w and the range is 域1, 2,..., 2 m -1}, and when a request for generation of a prime number is received from outside via a communication means, an m-bit storage area is used as an input value and the next input value in the sequence is calculated. Is calculated, the m-bit value is copied to a predetermined location in a k-bit storage area, a random number of km is generated, and the remaining km bits of the k-bit storage area are calculated. It is copied and regarded as a k-bit integer, and a prime determination is performed. If the prime is a prime, the k-bit data is returned to the outside via the communication means. If the prime is not a prime, a random number is generated again. Prime number generation method.
を満たすものとし、kビットのmビットとnビットの長
さを持つ記憶領域をそれぞれ用意する場合において、 nビットの記憶領域に予め与えられた初期値を設定し、 計算されたnビットの値を、kビットの記憶領域の所定
の場所にコピーし、 k−m−nビットの乱数を発生させ、kビットの記憶領
域のうち、残ったk−m−nビットにコピーし、kビッ
トの整数とみなして素数判定を行い、素数であれば、該
kビットデータを通信部を介して外部へ返却し、素数で
なければ再び乱数発生を行う請求項1記載の素数生成方
法。2. n is a positive integer equal to or less than k, and m + n <k
In the case of providing a storage area having a length of k bits of m bits and n bits, a predetermined initial value is set in the storage area of n bits, and the calculated value of n bits Is copied to a predetermined place in a k-bit storage area, a km-n-bit random number is generated, and the remaining k-mn bits in the k-bit storage area are copied, and 2. The prime number generation method according to claim 1, wherein the prime number is determined as an integer, and if it is a prime number, the k-bit data is returned to the outside via a communication unit, and if not, a random number is generated again.
いられる素数を生成するための素数生成装置であって、 kを正の整数とし、mをk未満の正の整数とし、wを2
m 未満の正の整数とし、kビットとmビットの長さを持
つ記憶領域をそれぞれ用意する場合において、 mビットの記憶領域に予め与えられた初期値を設定する
初期値設定手段と、 周期がwで値域が{1,2,…,2m −1}である数列
を計算する計算手段と、 外部から通信手段を介して素数生成の要求を受けた場
合、mビットの記憶領域を入力値として上記の数列にお
ける入力値の次の値を計算し、mビットの値を、kビッ
トの記憶領域の所定の場所へコピーするコピー手段と、 k−mビットの乱数を発生させ、kビットの記憶領域の
うち、残ったk−mビットにコピーし、kビットの整数
とみなして素数判定を行い、素数であれば、そのkビッ
トデータを通信手段を介して外部へ返却し、素数でなけ
れば、再び乱数発生を行う乱数発生手段とを有すること
を特徴とする素数生成装置。3. A prime generating apparatus for generating a prime used in a cryptographic technique for concealing data, wherein k is a positive integer, m is a positive integer less than k, and w is 2
When a storage area having a length of k bits and m bits is prepared as a positive integer less than m, initial value setting means for setting an initial value given in advance to the storage area of m bits; a calculating means for calculating a sequence having a range of {1, 2,..., 2 m -1} at w; Calculating means for calculating the next value of the input value in the above sequence, and copying the m-bit value to a predetermined location in a k-bit storage area; generating a k-m-bit random number; In the storage area, the remaining k-m bits are copied, and a prime determination is performed assuming that the k-bit is an integer. If the prime is a prime, the k-bit data is returned to the outside through the communication means and must be a prime. If you want to generate random numbers again, Prime generating apparatus characterized by having and.
いられる素数を生成するための素数生成装置であって、 nをk以下の正の整数とし、m+n<kを満たすものと
し、kビットのmビットとnビットの長さを持つ記憶領
域をそれぞれ用意する場合において、 nビットの記憶領域に予め与えられた初期値を設定する
初期値設定手段と、 計算されたnビットの値を、kビットの記憶領域の所定
の場所にコピーするコピー手段と、 k−m−nビットの乱数を発生させ、kビットの記憶領
域のうち、残ったk−m−nビットにコピーし、kビッ
トの整数とみなして素数判定を行い、素数であれば、該
kビットデータを通信部を介して外部へ返却し、素数で
なければ再び乱数発生を行う乱数発生手段とを有するこ
とを特徴とする素数生成装置。4. A prime number generation device for generating a prime number used in encryption technology for concealing data, wherein n is a positive integer equal to or less than k, m + n <k is satisfied, and k bits When each of the storage areas having the length of m bits and n bits is prepared, initial value setting means for setting a predetermined initial value in the storage area of n bits; copy means for copying to a predetermined location in a k-bit storage area; generating km-n-bit random numbers; and copying to the remaining km-n bits in the k-bit storage area, And a random number generating means for returning the k-bit data to the outside via the communication unit if the prime number is a prime number, and generating a random number again if the prime number is not a prime number. Prime number generator.
いられる素数を生成するための素数生成プログラムを格
納した記憶媒体であって、 kを正の整数とし、mをk未満の正の整数とし、wを2
m 未満の正の整数とし、kビットとmビットの長さを持
つ記憶領域をそれぞれ用意する場合において、 mビットの記憶領域に、予め与えられた初期値を設定す
る初期値設定プロセスと、 周期がwで値域が{1,2,…,2m −1}である数列
を計算する計算プロセスと、 外部から通信プロセスを介して素数生成の要求を受けた
場合、mビットの記憶領域を入力値として上記の数列に
おける入力値の次の値を計算し、mビットの値を、kビ
ットの記憶領域の所定の場所へコピーするコピープロセ
スと、 k−mビットの乱数を発生させ、kビットの記憶領域の
うち、残ったk−mビットにコピーし、kビットの整数
とみなして素数判定を行い、素数であれば、そのkビッ
トデータを通信プロセスを介して外部へ返却し、素数で
なければ、再び乱数発生を行う乱数発生プロセスとを有
することを特徴とする素数生成プログラムを格納した記
憶媒体。5. A storage medium storing a prime generation program for generating a prime used in a cryptographic technique for concealing data, wherein k is a positive integer, and m is a positive integer less than k. And w is 2
When a storage area having a length of k bits and m bits is prepared as a positive integer less than m, an initial value setting process of setting a predetermined initial value in the storage area of m bits; Is a calculation process that calculates a sequence with a range of {1, 2,..., 2 m -1}, and when a request for generating a prime number is received from outside via a communication process, a storage area of m bits is input. A copy process of calculating the next value of the input value in the above sequence as a value and copying the m-bit value to a predetermined location of a k-bit storage area; generating a k-m-bit random number; Is copied to the remaining km bits of the storage area, and the prime number is determined by considering the integer as a k-bit integer. If the prime number is a prime number, the k-bit data is returned to the outside via a communication process, and the prime number is determined. If not, re-ran Storage medium storing a prime number generation program, characterized in that it comprises a random number generation process to perform generation.
いられる素数を生成するための素数生成プログラムを格
納した記憶媒体であって、 nをk以下の正の整数とし、m+n<kを満たすものと
し、kビットのmビットとnビットの長さを持つ記憶領
域をそれぞれ用意する場合において、 nビットの記憶領域に予め与えられた初期値を設定する
初期値設定プロセスと、 計算されたnビットの値を、kビットの記憶領域の所定
の場所にコピーするコピープロセスと、 k−m−nビットの乱数を発生させ、kビットの記憶領
域のうち、残ったk−m−nビットにコピーし、kビッ
トの整数とみなして素数判定を行い、素数であれば、該
kビットデータを通信部を介して外部へ返却し、素数で
なければ再び乱数発生を行う乱数発生プロセスとを有す
ることを特徴とする素数生成プログラムを格納した記憶
媒体。6. A storage medium storing a prime generating program for generating a prime used in a cryptographic technique for concealing data, wherein n is a positive integer equal to or less than k and m + n <k is satisfied. In the case where a storage area having a length of k bits of m bits and n bits is prepared, an initial value setting process of setting a predetermined initial value to the storage area of n bits; A copy process of copying a bit value to a predetermined location in a k-bit storage area, generating a km-n-bit random number, and replacing the remaining km-n-bit in the k-bit storage area A random number generation process of performing a prime number judgment by considering the copied data as a k-bit integer, returning the k-bit data to the outside via the communication unit if the data is a prime number, and generating a random number again if the data is not a prime number. Storage medium storing a prime number generation program characterized Rukoto.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33490599A JP3711821B2 (en) | 1999-11-25 | 1999-11-25 | Prime number generation method and apparatus, and storage medium storing prime number generation program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP33490599A JP3711821B2 (en) | 1999-11-25 | 1999-11-25 | Prime number generation method and apparatus, and storage medium storing prime number generation program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2001154580A true JP2001154580A (en) | 2001-06-08 |
| JP3711821B2 JP3711821B2 (en) | 2005-11-02 |
Family
ID=18282561
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP33490599A Expired - Lifetime JP3711821B2 (en) | 1999-11-25 | 1999-11-25 | Prime number generation method and apparatus, and storage medium storing prime number generation program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3711821B2 (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014138060A1 (en) * | 2013-03-08 | 2014-09-12 | Qualcomm Incorporated | Prime number generation |
| WO2015031458A3 (en) * | 2013-08-30 | 2015-06-25 | Qualcomm Incorporated | Methods and apparatuses for prime number generation and storage |
| KR20200083117A (en) * | 2018-12-31 | 2020-07-08 | 한양대학교 산학협력단 | Prime number test method and apparatus using sieve of euler |
| WO2021076119A1 (en) * | 2019-10-16 | 2021-04-22 | Hewlett-Packard Development Company, L.P. | Generating prime numbers |
| CN113900476A (en) * | 2021-10-11 | 2022-01-07 | 吴鸿邦 | Novel algorithm for efficiently decomposing prime numbers and synthesizing RSA (rivest-Shamir-Adleman) passwords |
-
1999
- 1999-11-25 JP JP33490599A patent/JP3711821B2/en not_active Expired - Lifetime
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2014138060A1 (en) * | 2013-03-08 | 2014-09-12 | Qualcomm Incorporated | Prime number generation |
| US9182943B2 (en) | 2013-03-08 | 2015-11-10 | Qualcomm Incorporated | Methods and devices for prime number generation |
| KR20150128798A (en) * | 2013-03-08 | 2015-11-18 | 퀄컴 인코포레이티드 | Prime number generation |
| JP2016514315A (en) * | 2013-03-08 | 2016-05-19 | クアルコム,インコーポレイテッド | Method and device for prime number generation |
| KR101666974B1 (en) | 2013-03-08 | 2016-10-17 | 퀄컴 인코포레이티드 | Prime number generation |
| WO2015031458A3 (en) * | 2013-08-30 | 2015-06-25 | Qualcomm Incorporated | Methods and apparatuses for prime number generation and storage |
| JP2016535310A (en) * | 2013-08-30 | 2016-11-10 | クアルコム,インコーポレイテッド | Method and apparatus for generating and storing prime numbers |
| US9800407B2 (en) | 2013-08-30 | 2017-10-24 | Qualcomm Incorporated | Methods and apparatuses for prime number generation and storage |
| KR20200083117A (en) * | 2018-12-31 | 2020-07-08 | 한양대학교 산학협력단 | Prime number test method and apparatus using sieve of euler |
| KR102200132B1 (en) * | 2018-12-31 | 2021-01-08 | 한양대학교 산학협력단 | Prime number test method and apparatus using sieve of euler |
| WO2021076119A1 (en) * | 2019-10-16 | 2021-04-22 | Hewlett-Packard Development Company, L.P. | Generating prime numbers |
| CN113900476A (en) * | 2021-10-11 | 2022-01-07 | 吴鸿邦 | Novel algorithm for efficiently decomposing prime numbers and synthesizing RSA (rivest-Shamir-Adleman) passwords |
Also Published As
| Publication number | Publication date |
|---|---|
| JP3711821B2 (en) | 2005-11-02 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11876901B2 (en) | Elliptic curve random number generation | |
| Kiss et al. | Private set intersection for unequal set sizes with mobile applications | |
| Naor et al. | Universal one-way hash functions and their cryptographic applications | |
| US7516321B2 (en) | Method, system and device for enabling delegation of authority and access control methods based on delegated authority | |
| Hao et al. | A privacy-preserving remote data integrity checking protocol with data dynamics and public verifiability | |
| US7167565B2 (en) | Efficient techniques for sharing a secret | |
| CN109039640B (en) | An encryption and decryption hardware system and method based on RSA cryptographic algorithm | |
| US7020776B2 (en) | Cryptosystem based on a Jacobian of a curve | |
| US11349668B2 (en) | Encryption device and decryption device | |
| US7000110B1 (en) | One-way function generation method, one-way function value generation device, proving device, authentication method, and authentication device | |
| Azraoui et al. | Stealthguard: Proofs of retrievability with hidden watchdogs | |
| CN110750796A (en) | A Deduplication Method for Encrypted Data Supporting Public Audit | |
| Khan et al. | Quantum cryptography a real threat to classical blockchain: Requirements and challenges | |
| Abo-Alian et al. | Auditing-as-a-service for cloud storage | |
| JP3711821B2 (en) | Prime number generation method and apparatus, and storage medium storing prime number generation program | |
| JPH11234263A (en) | Method and device for mutual authentication | |
| CN115883123A (en) | A dynamic searchable encryption method and system supporting multiple users | |
| JP2004004784A (en) | System and method for mounting hash algorithm | |
| Kaur et al. | Data deduplication methods: a review | |
| JP3881273B2 (en) | ENCRYPTION KEY GENERATION DEVICE, ENCRYPTION KEY GENERATION PROGRAM, AND RECORDING MEDIUM CONTAINING THE PROGRAM | |
| CN119892394B (en) | A file encryption and decryption hierarchical management method, device, electronic device and medium | |
| Sivasubramanian | A comparative analysis of Post-Quantum Hash-based Signature Algorithm | |
| JP3617259B2 (en) | User qualification verification device | |
| CN119892394A (en) | File encryption and decryption hierarchical management method and device, electronic equipment and medium | |
| Yan et al. | On-Line Database Encryption and Authentication |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20040706 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20050726 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20050808 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 3711821 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20080826 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090826 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20090826 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100826 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20100826 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20110826 Year of fee payment: 6 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120826 Year of fee payment: 7 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130826 Year of fee payment: 8 |
|
| S531 | Written request for registration of change of domicile |
Free format text: JAPANESE INTERMEDIATE CODE: R313531 |
|
| R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
| EXPY | Cancellation because of completion of term |