JP2004206025A - Random number generating method, computer program for random number generation, computer network system, and computer - Google Patents
Random number generating method, computer program for random number generation, computer network system, and computer Download PDFInfo
- Publication number
- JP2004206025A JP2004206025A JP2002381727A JP2002381727A JP2004206025A JP 2004206025 A JP2004206025 A JP 2004206025A JP 2002381727 A JP2002381727 A JP 2002381727A JP 2002381727 A JP2002381727 A JP 2002381727A JP 2004206025 A JP2004206025 A JP 2004206025A
- Authority
- JP
- Japan
- Prior art keywords
- random number
- time
- error
- computer
- access
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Abstract
Description
【0001】
【発明の属する技術分野】
本発明は、乱数生成方法及び乱数生成用コンピュータプログラム等に関し、乱数が必要となる分野で、たとえばセッション鍵やワンタイムパスワードなどで利用するシード(種)に使用する乱数を生成する乱数生成方法及び乱数生成用コンピュータプログラム等に関する。
【0002】
【従来技術】
従来より、有線や無線により情報通信を行う際に、内容が第三者に漏れないように情報を暗号化して送信することが行われている。暗号化するために使用される秘密鍵は、ランダムに作成し、予測されないようにする必要がある。
【0003】
秘密鍵は、ユーザを識別するためのパスワード認証の場合には、ユーザが自ら生成するのに対し、通常の暗号化アプリケーションや、SSL(Secure Sockets Layer)、IPsec(IP Security Protocol)のような暗号化通信用プロトコルの場合には、ユーザは秘密鍵の生成に直接関与せず、ソフトウエアが自動的に生成する。
【0004】
暗号化アプリケーションや暗号化通信用プロトコル等の場合、ソフトウエアは、シード(種)と呼ばれる入力ビットパターンに所定の演算処理を施して乱数を生成し、その乱数を基に秘密鍵を生成している。この入力ビットパターンには、サーバーのホスト名の一部や日付、時刻等が利用されており、また、乱数を求める演算には、SHA−1、MD5、MDC2、MD2などのアルゴリズムやUNIX(登録商標)、Linuxで付属しているシステム関数(r)などが利用されている。
【0005】
また、タイマと乱数の一部を記憶する記憶部を備え、乱数生成時に、タイマの計数値と記憶部のデータを用いて乱数を生成する装置が提案されている(例えば、特許文献1参照)。
【0006】
【特許文献1】
特開2000−242470号公報
【0007】
【発明が解決しようとする課題】
ソフトウエアが秘密鍵をある一定の規則に基づいて生成してしまうと、その規則を利用した攻撃者にその秘密鍵を推定される危険性が存在する。したがって、秘密鍵を生成するためのシードには、偶然性、予測不可能性、非再現性が必要である。
【0008】
しかしながら、上述のように、乱数を求める演算には周知のアルゴリズムが利用されており、また、サーバーのホスト名の一部や日付、時刻を利用しているので、生成した乱数には一様性(規則性)が出現し、予測が可能で、再現性もあり、偶然性に乏しい。このため、秘密鍵が解読されるおそれがあり、安全性に問題がある。
【0009】
また、従来より、安全にシードを作成するために、物理乱数を使用する方法が知られているが、物理乱数の生成には特別な装置が必要であり、端末ごとにそのような特別な装置を設けることは、現実的には困難である。
【0010】
本発明は、上述の点に鑑みなされたものであり、偶然性、予測不可能性、非再現性を満たす乱数を、通常に利用しているコンピュータ装置から生成することができる乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータネットワークシステム及びコンピュータを提供することを目的とするものである。
【0011】
【課題を解決するための手段】
上記課題を解決する請求項1に記載の発明による乱数生成方法は、コンピュータネットワークによって相互に接続された第1の通信装置と第2の通信装置との間を所定のデータが往復するのに必要なデータ往復時間を予測し、実際に計測したデータ往復時間との誤差を用いて乱数を生成することを特徴とする。
【0012】
請求項2に記載の発明による乱数生成方法は、コンピュータネットワークによって相互に接続された第1の通信装置と第2の通信装置との間をパケットが往復するのに必要なパケット往復時間を予測するパケット往復時間予測ステップと、第1の通信装置と第2の通信装置との間でパケットを往復させて実際のパケット往復時間を計測するパケット往復時間計測ステップと、予測したパケット往復時間と計測したパケット往復時間との誤差を算出する誤差算出ステップと、誤差を用いて乱数を生成する乱数生成ステップと、を有することを特徴とする。
【0013】
請求項3に記載の発明は、請求項2に記載の乱数生成方法において、パケット往復時間予測ステップが、過去に計測したパケット往復時間に基づいてパケット往復時間時間を予測することを特徴とする。
【0014】
請求項4に記載の発明は、請求項2または3に記載の乱数生成方法において、乱数生成ステップが、誤差を2進数に変換し、その2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする。
【0015】
請求項5に記載の発明による乱数生成用コンピュータプログラムは、コンピュータネットワークによって相互に接続された第1の通信装置と第2の通信装置との間を所定のデータが往復するのに必要な往復時間を予測するデータ往復時間予測手順と、第1の通信装置と第2の通信装置との間でデータを往復させて実際のデータ往復時間を計測するデータ往復時間計測手順と、予測したデータ往復時間と計測したデータ往復時間との誤差を算出する誤差算出手順と、誤差を用いて乱数を生成する乱数生成手順と、をコンピュータに実行させるプログラムであることを特徴とする。
【0016】
請求項6に記載の発明によるコンピュータネットワークシステムは、コンピュータネットワークによって相互に接続された第1の通信装置と第2の通信装置との間をパケットが往復するのに必要なパケット往復時間を予測し、第1の通信装置と第2の通信装置との間でパケットを往復させて実際のパケット往復時間を計測し、その予測したパケット往復時間と計測したパケット往復時間との誤差を算出し、その誤差を用いて乱数を生成することを特徴とする。
【0017】
請求湖1〜6に記載の乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータネットワークシステムによれば、第1の通信装置と第2の通信装置との間のパケット往復時間を予測し、実際に計測したパケット往復時間との誤差を乱数源とするので、コンピュータネットワークのトラフィックの不確実性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を容易に生成することができる。
【0018】
請求項7に記載の発明による乱数生成方法は、処理装置と記憶装置を有するコンピュータにおいて、処理装置から記憶装置にアクセスするのに必要なアクセス時間を予測するアクセス時間予測ステップと、処理装置から記憶装置にアクセスさせて実際のアクセス時間を計測するアクセス時間計測ステップと、その予測したアクセス時間と計測したアクセス時間との誤差を算出する誤差算出ステップと、その誤差を用いて乱数を生成する乱数生成ステップと、を有することを特徴とする。
【0019】
請求項8に記載の発明は、請求項7に記載の乱数生成方法において、アクセス時間予測ステップが、過去に計測したアクセス時間に基づいてアクセス時間を予測することを特徴とする。
【0020】
請求項9に記載の発明は、請求項7または8に記載の乱数生成方法において、乱数生成ステップが、誤差を2進数に変換し、その2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする。
【0021】
請求項10に記載の発明による乱数生成用コンピュータプログラムは、処理装置と記憶装置を有するコンピュータに、処理装置から記憶装置にアクセスするのに必要なアクセス時間を予測するアクセス時間予測手順と、処理装置から記憶装置にアクセスさせて実際のアクセス時間を計測するアクセス時間計測手順と、予測したアクセス時間と計測したアクセス時間との誤差を算出する誤差算出手順と、誤差を用いて乱数を生成する乱数生成手順とを実行させることを特徴とする。
【0022】
請求項11に記載の発明によるコンピュータは、処理装置と記憶装置を有するコンピュータにおいて、処理装置から前記記憶装置にアクセスするのに必要なアクセス時間を予測し、処理装置から記憶装置にアクセスさせて実際のアクセス時間を計測し、予測したアクセス時間と計測したアクセス時間との誤差を算出し、誤差を用いて乱数を生成することを特徴とする。
【0023】
請求湖7〜11に記載の乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータによれば、処理装置から記憶装置へのアクセス時間を予測し、実際に計測したアクセス時間との誤差を乱数源として用いるので、アクセス時間の不規則性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を1台のコンピュータ内で容易に生成することができる。
【0024】
請求項12に記載の発明による乱数生成方法は、コンピュータが所定のプログラムを処理するのに必要な処理時間を予測する処理時間予測ステップと、コンピュータに所定のプログラムを処理させて実際の処理時間を計測する処理時間計測ステップと、予測した処理時間と計測した処理時間との誤差を算出する誤差算出ステップと、誤差を用いて乱数を生成する乱数生成ステップと、を有することを特徴とする。
【0025】
請求項13に記載の発明は、請求項12に記載の乱数生成方法において、処理時間予測ステップが、過去に計測した処理時間に基づいて処理時間を予測することを特徴とする。
【0026】
請求項14に記載の発明は、請求項12または13に記載の乱数生成方法において、乱数生成ステップが、誤差を2進数に変換し、その2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする。
【0027】
請求項15に記載の発明による乱数生成用コンピュータプログラムは、コンピュータが所定のプログラムを処理するのに必要な処理時間を予測する処理時間予測手順と、コンピュータに所定のプログラムを処理させて実際の処理時間を計測する処理時間計測手順と、その予測した処理時間と計測した処理時間との誤差を算出する誤差算出手順と、その誤差を用いて乱数を生成する乱数生成手順と、をコンピュータに実行させることを特徴とする。
【0028】
請求項16に記載の発明によるコンピュータは、所定のプログラムの実行を開始してから完了するまでの処理時間を予測し、所定のプログラムの実行を開始してから完了するまでの実際の処理時間を計測し、その予測した処理時間と計測した処理時間との誤差を算出し、その誤差を用いて乱数を生成することを特徴とする。
【0029】
請求湖12〜16に記載の乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータによれば、コンピュータによるプログラムの処理時間を予測し、実際に計測した処理時間との誤差を乱数源として用いるので、コンピュータの状況に応じた処理時間の不規則性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を1台のコンピュータ内で容易に生成することができる。
【0030】
【発明の実施の形態】
次に、本発明の実施の形態について図に基づいて説明する。
【0031】
(第1の実施の形態)
図1は、第1の実施の形態を説明する全体構成図である。第1の通信装置1と第2の通信装置2は、PCやサーバなどのコンピュータ端末であり、パケット等の所定のデータを送受信できるように、コンピュータネットワーク3によって互いに接続されている。ネットワーク3には、図示していない他の端末が複数接続され、様々なプロトコルが混在している。本実施の形態における乱数生成方法は、コンピュータネットワーク3に接続された第1の通信装置1にインストールされたコンピュータソフトウエアプログラムによって実現されるものであり、第1の通信装置1と第2の通信装置2との間で所定のデータを往復させた場合に、その往復時間を予測し、実際の往復時間との誤差を用いて乱数を生成するものである。
【0032】
具体的には、図2のフローチャートを用いて以下に説明する。図2は、第1の実施の形態における乱数生成方法を説明するフローチャートである。
【0033】
先ず、ステップS1では、所定時刻におけるパケット往復時間を予測する。予測する方法は、例えば、過去に実際に計測したパケット往復時間に基づいて予測してもよく、また、他の端末の接続状況や、ネットワーク3の利用率などの種々のパラメータに基づいて予測してもよい。
【0034】
そして、ステップS2では、所定時刻における実際のパケット往復時間を計測する。計測には、例えばリクエストパケットとレスポンスパケットを使用する。リクエストパケットとは、例えば第1の通信装置から第2の通信装置に対してそのリクエストパケットを送信した場合に、そのリクエストパケットを受信した第2の通信装置2によって第1の通信装置1にレスポンスパケットを返信させる機能を有するものである。第1の通信装置1でリクエストパケットを送信した時刻と、レスポンスパケットを受信した時刻を計測することで、実際のパケット往復時間を計測することができる。
【0035】
それから、ステップS3では、予測したパケット往復時間と実際に計測したパケット往復時間との誤差を算出する。この誤差の算出は、予測したパケット往復時間から実際に計測したパケット往復時間を減算し、その絶対値をとるによって求めることができる。
【0036】
そして、ステップS4では、誤差を使って乱数を生成する。複数の端末が接続され、様々なプロトコルが存在するコンピュータネットワーク3では、例えば第1の通信装置1と第2の通信装置2との間で同じアプリケーションを実行したとしても、バースト的なトラフィックなどの原因によって厳密に同一時刻にパケットが送受信されることは現実的にはあり得ない。また、人為的にコンピュータネットワーク3に流れるパケット数を変化させた場合であっても、パケット往復時間は、ある程度の幅で変化するだけで、0.01秒が10時間になるような極端な変化は生じない。したがって、予測したパケット往復時間と実際に計測したパケット往復時間との間には、必ず所定範囲内の誤差が発生し、その誤差は、予測不可能であり、偶然性及び非再現性を有する。したがって、この誤差をそのまま乱数として使用することができ、更に実用的で性質の良い乱数を得るべく、その誤差の一部を乱数として使用しても良い。
【0037】
上述の乱数生成方法によれば、第1の通信装置1と第2の通信装置2との間のパケット往復時間を予測し、実際に計測した時間との誤差を乱数源とするので、コンピュータネットワーク3のトラフィックの不確実性を利用して、予測不可能性、偶然性、及び非再現性を有する乱数を容易に生成することができる。
【0038】
次に、第1の実施の形態における具体的な実施例について以下に説明する。
【0039】
図3は、本実施例の全体構成図である。図中で符号10は、コンピュータネットワークシステムの一例であるクライアントサーバシステムであり、クライアント11とサーバ12がLAN13を介して互いに接続されており、互いにIPパケットを送受信可能なIPネットワークを構成している。このLAN13には、図示していない複数の端末が接続され、様々なプロトコルが混在している。そして、クライアント11には、本実施例における乱数生成用コンピュータプログラムがインストールされている。尚、上記のIPネットワークは、LAN13に限定されるものではなく、LAN13の代わりにWAN(Wide Area Network)やインターネットであってもよい。
【0040】
図4は、乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。
【0041】
まず最初に、ステップS11〜ステップS14によって、往復伝搬遅延時間の予測値x’iを算出するために必要な初期値の設定処理を行う。
【0042】
ステップS11では、クライアント11とサーバ12との間でIPパケットを往復させ、クライアント11におけるIPパケットの送信時刻と受信時刻を計測する処理が行われる。ここで、クライアント11は、サーバ12に対してリクエストIPパケットを送信し、その送信時刻t1を計測する。一方、サーバ12は、クライアント11からのリクエストIPパケットを受信すると、それに応じて直ぐにクライアント11にレスポンスIPパケットを送信する。そして、クライアント11は、サーバ12からのレスポンスIPパケットを受信すると、その受信時刻t2を計測する。
【0043】
次に、ステップS12では、クライアント11とサーバ12との間をIPパケットが往復するのに必要な往復伝搬遅延時間の実測値xを算出する処理が行われる。往復伝搬遅延時間の実測値xは、上述の受信時刻t2から送信時刻t1を減算することによって算出される(x=t2−t1)。本実施例では、オペレーティングシステム(OS)にLinuxを使用してレスポンスIPパケットの受信時刻の計測に、マイクロ秒の精度で時刻を計測できるgettimeofday関数を利用しており、秒の表現にlong型の変数(tv_sec)、マイクロ秒の表現に(tv_usec)を用いている。尚、他のオペレーティングシステム(OS)を使用する場合は、マイクロ秒の精度で時刻を計測できる関数を使用する。
【0044】
ステップS13では、往復伝搬遅延時間の実測値xをクライアント11内に予め設定されている往復伝搬遅延時間記憶領域14に記憶する処理が行われる。図5は、往復伝搬遅延時間記憶領域14を図式化したものである。往復伝搬遅延時間記憶領域14は、往復伝搬遅延時間の実測値xを記憶可能な記憶枠を予め設定された個数だけ一列に並べた構造を有している(図5(a)参照)。そして、新たな往復伝搬遅延時間の実測値xが算出されると、各記憶枠に既に記憶されている実測値xを、全体で左側に向かって1枠ずつシフト移動させ、最左端の記憶枠内の実測値xを破棄し、新たに算出された実測値xを、最右端の記憶枠に記憶させるように構成されている(図5(b)参照)。尚、往復伝搬遅延時間記憶領域14の記憶枠の個数は、後述するARモデルのモデル数と同じ個数(k個)に設定されている。
【0045】
ステップS14では、往復伝搬遅延時間記憶領域14の全ての記憶枠に往復伝搬遅延時間の実測値xが記憶されているか否かが判断され、記憶されていない場合(NO)には、ステップS11に戻り、全ての記憶枠に記憶されている(YES)と判断されるまで、ステップS11〜ステップS14までの処理を繰り返す。これにより、往復伝搬遅延時間記憶領域14には、所定個数分(K個分)の往復伝搬遅延時間の実測値xが記憶される。
【0046】
次に、ステップS15では、所定時刻iにおける往復伝搬遅延時間の予測値x’iを算出する処理が行われる。往復伝搬遅延時間の予測値x’iは、過去に計測し、往復伝搬記憶領域14に記憶されている往復伝搬遅延時間の実測値(xi−k、xi−k+1、…、xi−1)に基づいて算出される。ここでは、離散系の時系列モデルとして時系列解析の代表的なモデルである、ARモデル(自己回帰モデル)を利用して、往復伝搬遅延時間の予測値x’iを算出する。
【0047】
ARモデルは、時系列の現時点における値が、自らの過去の時点での値の線形結合によって表されるモデルである。対象とする時系列をxtとすると、ARモデルは、次式(1)で表される。
【0048】
【数1】
式(1)で、xt−iは、xtよりi個だけ過去の時刻の実測値である。また、etは、tの時点におけるモデル化の誤差であり、この値が0であれば誤差がないことになる。そして、ai(i=1、2、…、k)は、式(1)を表す自己回帰係数である。
【0049】
図6は、1次のARモデルを示すものである。xtは、図に示すように1次遅れを持つフィードバック制御系の出力である。尚、図中のz−1は、遅れの演算子である。このARモデルを推定するためには、式(1)の自己回帰係数aiを推定する必要がある。本実施例では、以下の方法によって式(1)の自己回帰係数aiを推定している。
【0050】
まず、式(1)の両辺にxt−lを乗算して平均をとると次式(2)の関係式が成り立つ。
【0051】
【数2】
【0052】
ここで、rlは、期待値の関数であり、xt、xt−lの積の平均で表される。予め(r0、r1、…、rk)をそれぞれ計算しておく。式(2)において、l=1、2、…、k)を考えると、以下の方程式が導かれる。
【0053】
【数3】
【0054】
尚、このk次の連立方程式は、Yule−Walkerの方程式という。自己回帰係数aiは式(3)を解くことによってその推定値が求められる。そして、この自己回帰係数aiからモデルの推定および、往復伝搬遅延時間の予測値x’iを算出することができる。
【0055】
次に、ステップS16では、所定時刻iにおいて、実際にクライアント11とサーバ12との間でIPパケットを往復させ、クライアント11におけるIPパケットの送信時刻と受信時刻Tiを計測する処理が行われる。そして、その送信時刻と受信時刻Tiから、所定時刻iにおける往復伝搬遅延時刻の実測値xiを算出する処理が行われる。
【0056】
ステップS17では、所定時刻iにおけるレスポンスIPパケットの予測受信時刻T’iを算出する処理が行われる。予測受信時刻T’iは、ステップS16で計測したリクエストIPパケットの送信時刻に、ステップS15で算出した往復伝搬遅延時間の予測値x’iを加算することによって求めることができる(予測受信時刻T’i=リクエストIPパケットの送信時刻+往復伝搬遅延時間の予測値x’i)。
【0057】
ステップS18では、ステップS16で計測した実際の受信時刻Tiと、ステップS17で算出した予測受信時刻T’iとの誤差diを算出する処理が行われる。この誤差diは、予測受信時刻T’iから受信時刻Tiを減算して、その絶対値をとることによって、求められる(di=|T’i−Ti|)。
【0058】
ステップS19では、乱数として実用的で性質が良いものを得るべく、誤差diの一部を乱数として取り出す処理が行われる。具体的には、まず、10進数で得られた誤差diを2進数に変換し、その2進数に変換した数値の最下位の1ビットを取得して乱数に用いる。例えば、誤差diが9マイクロ秒であった場合(0.0009秒)、この「9」(10進表記)を2進変換すると「1001」となる。この「1001」の最下位の1ビット、すなわち「1」を取得して乱数に用いる。尚、下位1ビットを乱数に用いた理由については後述する。
【0059】
ステップS20では、ステップS16で算出した所定時刻iにおける往復伝搬遅延時間の実測値xiを往復伝搬遅延時間記憶領域14に記憶させることによって、往復伝搬遅延時間記憶領域14の記憶内容を更新する処理が行われる。そして、ステップS20での処理が終了すると再びステップS15に戻り、ステップS15からステップS20までの処理を繰り返し行う。これにより、乱数列を得ることができる。
【0060】
本実施例の場合、誤差diの下位何ビットを利用するのが最適化なのかについて実験を行った。そして、誤差diの最下位1ビットのみを利用した場合に、特に性質が良く実用的な乱数が得られるとの結果を得た。以下に、その実験内容及び実験結果について説明する。
【0061】
実験に使用したコンピュータは、CPU:Pentium(登録商標)3(1GHz)、メモリ:256MB、OS:RedHat Linux 7.2、であり、レスポンスIPパケットの受信時刻の測定には、gettimeofday関数を利用した。実験は、LAN上の2台のコンピュータ間で行い、クライアント11とサーバ12との間のパケット往復時間を往復伝搬遅延時間xtとして測定し、予測受信時刻T’iと実際の受信時刻Tiとの差の絶対値をとった値diを誤差とした場合のネットワーク環境について行った。
【0062】
まず、取得した誤差diを2進表記した場合に、下位何ビットまでが乱数として使用できるかを考察すべく、取得した誤差の有効桁数を調べた。尚、誤差の有効桁数とは、取得した誤差を2進表記した場合の系列長さをいう。例えば、得られた誤差が9マイクロ秒であった場合(0.0009秒)、この「9」(10進表記)を2進変換すると「1001」となり、この数値の有効桁数は4桁である。
【0063】
図7は、上述の乱数生成方法によって106(1000000)回の誤差を取得して2進数の有効桁数の分布を調べた表である。このとき使用したARモデルの次数は10であり、実験は、10回行い、その平均を示している。表1の桁数は、2進数に変換した場合の有効桁数であり、個数は、1000000回の中で当該桁数に当てはまった回数である。この表から、桁数が1〜8ビットまでの誤差が全体の約90%を占めることがわかる。したがって、誤差diの有効桁数は、8ビット以下であると考えられる。
【0064】
そこで次に、誤差の下位1ビットのみを乱数として利用した場合と、下位2ビットまでを乱数として利用した場合について、それぞれNISTとDIEHARDという2種類の検定実験を行った。但し、誤差の下位2ビットを利用する方法では、誤差の有効桁数が2(10進数で2か3)の場合には下位から2ビット目のビットが1となってしまうために、有効桁数が2の場合には誤差の下位1ビットのみを使用し下位2ビット目は使用しないこととした。
【0065】
NISTとは、物理乱数及び疑似乱数生成器からの出力データについて乱数性のテストを行うツールであり、16項目からのテストからなる統計のパッケージである。NISTについては、http://crsc.nist.gov/rug.に詳しく説明されている。尚、図8は、本検定に利用したNISTのパラメータを示す表である。各種テストを行うことによって出力されたp−valueが0<p−value<1を満たす場合に、そのテスト項目をパスしたとみなしている。
【0066】
一方、DIEHARDは、フロリダ州立大学で開発された乱数検定用プログラムであり、15項目のテストを行う。この15項目のテストを行うことによって出力されたp−valueが「0<p−value<1」を満たし、KSTESTが「0<KSTEST<1」を満たす場合に、そのテスト項目をパスしたとみなしている。DIEHARDについては、http://stat.fsu.edu/geo/diehard.htmlに詳しく説明されている。
【0067】
誤差の下位1ビットのみを乱数として利用した場合でNISTの検定を実験1、DIEHARDの検定を実験3、誤差の下位2ビットまでを乱数として利用した場合でNISTの検定を実験2、DIEHARDの検定を実験4として実験を行ったところ、図9に示す実験結果が得られた。
【0068】
これによれば、下位1ビットのみから得られた乱数列においては、全ての検定項目に合格することができたが、下位2ビットまでを乱数とした場合、NIST、DIEHARDともにいくつかの検定項目が不合格となった。図10は、検定に不合格となった項目を示す表である。この実験結果から、特に、誤差の最下位1ビットのみを利用した場合に、性質が良く実用的な乱数が得られることがわかる。
【0069】
上述の実施例では、ARモデルのモデル数、すなわち、往復伝搬遅延時刻記憶領域14の記憶枠数を10に設定した場合を例に説明したが、この記憶枠数をコンピュータの特性に応じて、ある範囲で増加させることによって、乱数の性質をさらに向上させることができ、より真性乱数に近い乱数を生成することができる。
【0070】
また、実施例では、予測受信時刻T’iと実際の受信時刻Tiとから誤差diを算出する場合を例に説明したが、往復伝搬遅延時間の予測値x’iと実測値xiとから算出しても良い。
【0071】
更に、実施例では、クライアントサーバシステムの場合を例に説明したが、クライアント11とクライアント11、サーバ12とサーバ12など、コンピュータとコンピュータをネットワークで接続したものであればよい。また、ネットワーク環境もIPネットワーク13に限定されるものではなく、他のプロトコルを利用したネットワークであっても良い。
【0072】
また、実施例では、クライアント11にインストールされるコンピュータソフトウエアプログラムの場合を例に説明したが、その一部或いは前部をハードウエアによって構成し、乱数生成装置としても良い。
【0073】
(第2の実施の形態)
図11は、第2の実施の形態を説明する図であり、コンピュータの構成を示す図である。コンピュータ20は、入力装置21と、出力装置22と、主記憶装置23と補助記憶装置24を備えた記憶装置25と、演算装置26と制御装置27を備えた処理装置28の4つの構成要素によって構成されている。
【0074】
本実施の形態における乱数生成方法は、1台のコンピュータ20内で、そのコンピュータ20にインストールされたコンピュータソフトウエアプログラムによって実現されるものであり、処理装置28から記憶装置25に対して読み込みや書き込みなどのアクセスを行い、そのアクセス時間を予測し、実際のアクセス時間との誤差を用いて乱数を生成するものである。
【0075】
具体的には、図12のフローチャートを用いて以下に説明する。図12は、第2の実施の形態における乱数生成方法を説明するフローチャートである。先ず、ステップS21では、処理装置から記憶装置に対して、Read(読み込み)、Write(書き込み)、Update(更新)、Delete(削除)などのアクセスを行った場合にそのアクセス開始からアクセス終了までのアクセス時間を予測する。このアクセス時間を予測する方法は、例えば、過去に実際に計測したデータに基づいて予測してもよく、また、記憶装置の容量などの種々のパラメータに基づいて予測してもよい。
【0076】
そして、ステップS22では、実際に処理装置28から記憶装置25にアクセスを行い、そのアクセス時間を計測する。実際のアクセス時間は、処理装置28が記憶装置25に対してアクセスを開始した時点と、記憶装置25へのアクセスを完了した時点とを計測することで、求めることができる。
【0077】
それから、ステップS23では、予測したアクセス時間と実際に計測したアクセス時間との誤差を算出する。この誤差の算出は、予測したアクセス時間から計測したアクセス時間を減算し、その絶対値をとることによって求めることができる。
【0078】
そして、ステップS24では、その誤差を使って乱数を生成する。コンピュータは、入力装置21、出力装置22、処理装置28、記憶装置25など複数の装置が接続され、これらの装置間で種々の信号が送受信されており、また、処理装置28では種々の処理が実行されている。したがって、例えば処理装置28から記憶装置25に同じアクセスを行った場合でも、そのタイミングによってズレを生じ、同一のアクセス時間となることは現実的にはあり得ない。また、人為的に種々の処理を実行させた場合であっても、そのアクセスを実行するプログラムから見ると、記憶装置25に対する1回の書き込み時間や読み出し時間は、ある程度の幅で変化するだけで、0.01秒が10時間になるような極端な変化は生じない。
【0079】
したがって、予測したアクセス時間と計測したアクセス時間との間には、必ず所定範囲内の誤差が発生し、その誤差は、予測不可能であり、偶然性及び非再現性を有する。したがって、この誤差をそのまま乱数として使用することができ、更に実用的で性質の良い乱数を得るべく、その誤差の一部を乱数として使用してもよい。
【0080】
上述の乱数生成方法によれば、処理装置28から記憶装置25に対するアクセス時間を予測し、実際に処理装置28から記憶装置25にアクセスを行ってそのアクセス時間を計測し、予測したアクセス時間と計測したアクセス時間との誤差を乱数源とするので、コンピュータ内部におけるアクセス時間の不規則性を利用して、予測不可能性、偶然性、及び非再現性を有する乱数を容易に生成することができる。
【0081】
次に、第2の実施の形態における具体的な実施例について以下に説明する。
【0082】
図13は、本実施例におけるコンピュータの構成を説明する図である。本実施例におけるコンピュータ30は、コンピュータ本体31、キーボード及びマウス(入力装置)32、ディスプレイ(出力装置)33を備えており、コンピュータ本体内31には、制御装置と演算装置を備えた中央演算処理装置を構成するCPU34と、主記憶装置を構成するROMやRAM等のメモリ35と、補助記憶装置を構成するハードディスク36が設けられている。そして、本実施例における乱数生成用コンピュータプログラムがインストールされている。尚、本実施例では、CPU34とハードディスク36が共通のコンピュータ本体31内に組み込まれた場合を例に説明するが、ハードディスク36をコンピュータ本体31の外に置いた、いわゆる外付けの場合であってもよい。
【0083】
図14は、乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。まず最初に、ステップS31〜ステップS34によって、アクセス時間の予測値y’iを算出するために必要な初期値の設定処理を行う。
【0084】
ステップS31では、CPU34がハードディスク36にアクセスを開始したアクセス開始時刻t1と、CPU34がハードディスク36へのアクセスを終了したアクセス終了時刻t2を計測する処理が行われる。
【0085】
ここで、CPU34は、ハードディスク36に対して所定の命令やデータの読み込み等を要求する信号を送信し、その信号を送信した時刻をアクセス開始時刻t1として計測する。ハードディスク36は、CPU34からのアクセス要求を受けると、該当する命令やデータを読み出して、直ぐにCPU34に送信する。CPU34は、ハードディスク36から送られてきた命令やデータを受信し、その受信を完了した時刻をアクセス終了時刻t2として計測する。
【0086】
ステップS32では、アクセス時間の実測値yを算出する処理が行われる。アクセス時間の実測値yは、上述のアクセス終了時刻t2からアクセス開始時刻t1を減算することによって算出される(y=t2−t1)。
【0087】
ステップS33では、アクセス時間の実測値yをメモリ35内に予め設定されているアクセス時間記憶領域に記憶する処理が行われる。アクセス時間記憶領域の構造については、第1の実施の形態における往復伝搬遅延時間記憶領域14と同様であるので、その詳細な説明を省略する。
【0088】
ステップS34では、アクセス時間記憶領域の全ての記憶枠にアクセス時間の実測値yが記憶されているか否かが判断され、記憶されていない場合(NO)には、ステップS31に戻り、全ての記憶枠に記憶されている(YES)と判断されるまで、ステップS31〜ステップS34までの処理を繰り返す。これにより、アクセス時間記憶領域には、所定個数分(K個分)のアクセス時間の実測値yが記憶される。
【0089】
次に、ステップS35では、所定時刻iにおけるアクセス時間の予測値y’iを算出する処理が行われる。アクセス時間の予測値y’iは、メモリ35のアクセス時間記憶領域に記憶されたアクセス時間の実測値(yi−k、yi−k+1、…、yi−1)に基づき、ARモデルを利用して算出される。尚、ARモデルについては、第1の実施の形態と同様であるので、その詳細な説明を省略する。
【0090】
ステップS36では、所定時刻iにおいて、実際にCPU34からハードディスク36にアクセスを行い、そのアクセス開始時刻と、アクセス終了時刻Tiを計測する処理が行われる。そして、そのアクセス開始時刻とアクセス終了時刻Tiから、所定時刻iにおけるアクセス時間の実測値yiを算出する。
【0091】
ステップS37では、アクセス終了予測時刻T’iを算出する処理が行われる。アクセス終了予測時刻T’iは、ステップS36で計測したアクセス開始時刻に、ステップS35で算出したアクセス時間の予測値y’iを加算することによって求めることができる(アクセス終了予測時刻T’i=アクセス要求信号の送信開始時刻+アクセス時間の予測値y’i)。
【0092】
ステップS38では、ステップS36で計測したアクセス終了時刻Tiと、ステップS37で算出したアクセス終了予測時刻T’iとの誤差diを算出する処理が行われる。この誤差diは、アクセス終了予測時刻T’iからアクセス終了時刻Tiを減算して、その絶対値をとることによって求められる(di=|T’i−Ti|)。
【0093】
ステップS39では、乱数として実用的で性質が良いものを得るべく、誤差diの一部を乱数として取り出す処理が行われる。具体的には、まず、10進数で得られた誤差diを2進数に変換し、その2進数に変換した数値の最下位の1ビットを取得して乱数に用いる。例えば、誤差diが9マイクロ秒であった場合(0.0009秒)、この「9」(10進表記)を2進変換すると「1001」となる。この「1001」の最下位の1ビット、すなわち「1」を取得して乱数に用いる。
【0094】
ステップS40では、ステップS36で算出した所定時刻iにおけるアクセス時間の実測値yiをアクセス時間記憶領域に記憶させることによって、アクセス時間記憶領域の記憶内容を更新する処理が行われる。そして、ステップS40での処理が終了すると再びステップS35に戻り、ステップS35からステップS40までの処理を繰り返し行う。これにより、乱数列を得ることができる。
【0095】
上述の実施例では、アクセス終了予測時刻T’iとアクセス終了時刻Tiとから誤差diを算出する場合を例に説明したが、アクセス時間の予測値y’iと実測値yiとから算出しても良い。また、実施例では、記憶手段の例としてハードディスク36の場合を例に説明したが、他の記憶手段であってもよい。
【0096】
(第3の実施の形態)
本実施の形態における乱数生成方法は、コンピュータに所定のプログラム命令を実行させ、コンピュータがそのプログラム命令の実行を開始してから終了するまでの命令処理時間を予測し、実際の命令処理時間との誤差を用いて乱数を生成するものである。
【0097】
具体的には、図15のフローチャートを用いて以下に説明する。図15は、第3の実施の形態における乱数生成方法を説明するフローチャートである。先ず、ステップS41では、所定のプログラム命令をコンピュータに実行させた場合に、そのプログラム命令の実行を開始してから終了するまでの処理時間を予測する。予測する方法は、例えば、過去に実際に計測した処理時間に基づいて予測してもよく、また、実行するプログラム命令の種類などの種々のパラメータに基づいて予測してもよい。また、所定のプログラム命令は、例えばコンピュータに1000までの中での素数を求めさせる素数計算処理命令などが挙げられる。
【0098】
そして、ステップS42では、実際にそのプログラム命令をコンピュータに実行させ、命令処理時間を計測する。実際の命令処理時間は、コンピュータがそのプログラム命令の処理を開始した時刻と、処理を終了した時刻とを計測することで求めることができる。
【0099】
それから、ステップS43では、予測した命令処理時間と実際に計測した命令処理時間との誤差を算出する。この誤差の算出は、予測した命令処理時間から実際に計測した命令処理時間を減算し、その絶対値をとることによって求めることができる。
【0100】
そして、ステップS44では、その誤差を使って乱数を生成する。コンピュータがプログラム命令を実行する場合には、複数の機械命令や主記憶装置を使用するため、コンピュータの状況によって、単位時間当たりにコンピュータが処理できる仕事量(スループット)が異なる。したがって、所定のプログラム命令を実行した場合でも、そのタイミングによって処理離間が異なり、同一の時間となることは現実的にはあり得ない。また、人為的にコンピュータの状況を変化させた場合であっても、そのプログラム命令を実行するプログラムから見ると、ある程度の幅で変化するだけで、0.01秒が10時間になるような極端な変化は生じない。
【0101】
したがって、予測した命令処理時間と実際に計測した命令処理時間との間には、必ず所定範囲内の誤差が発生し、その誤差は、予測不可能であり、偶然性及び非再現性を有する。したがって、この誤差をそのまま乱数として使用することができ、また、更に実用的で性質の良い乱数を得るべく、乱数源として、その誤差の一部を乱数として使用してもよい。
【0102】
上述の乱数生成方法によれば、コンピュータによる所定のプログラム命令の処理時間を予測し、実際に計測した命令処理時間との誤差を乱数源とするので、コンピュータの状況に応じた命令処理時間の不規則性を利用して、予測不可能性、偶然性、及び非再現性を有する乱数を容易に生成することができる。
【0103】
次に、第3の実施の形態における具体的な実施例について以下に説明する。
【0104】
本実施例における乱数生成用コンピュータプログラムは、実行可能な状態でコンピュータにインストールされている。尚、コンピュータの構成については、第2の実施の形態における実施例の場合と同様であるので、その詳細な説明を省略する。
【0105】
図16は、乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。まず最初に、ステップS51〜ステップS54によって、命令処理時間の予測値z’iを算出するために必要な初期値の設定処理を行う。
【0106】
ステップS51では、プログラム命令の単位であるソフトウエア命令の処理をコンピュータが開始した命令処理開始時刻t1と、コンピュータがソフトウエア命令の処理を終了した命令処理終了時刻t2の計測が行われる。ソフトウエア命令の処理は、本実施例では、コンピュータに1000までの中での素数を求めさせる素数計算処理が設定されている。
【0107】
ステップS52では、命令処理時間の実測値zを算出する。命令処理時間の実測値zは、上述の命令処理終了時刻t2から命令処理開始時刻t1を減算することによって算出される(z=t2−t1)。
【0108】
ステップS53では、命令処理時間の実測値zをメモリ内に予め設定されている命令処理時間記憶領域に記憶する処理が行われる。命令処理時間記憶領域の構造については、第1の実施の形態における往復伝搬遅延時間記憶領域14と同様であるので、その詳細な説明を省略する。
【0109】
ステップS54では、命令処理時間記憶領域の全ての記憶枠に命令処理時間の実測値zが記憶されているか否かが判断され、記憶されていない場合(NO)には、ステップS51に戻り、全ての記憶枠に記憶されている(YES)と判断されるまで、ステップS51〜ステップS54までの処理を繰り返す。これにより、処理時間記憶領域には、所定個数分(K個分)の命令処理時間の実測値zが記憶される。
【0110】
次に、ステップS55では、所定時刻iにおける命令処理時間の予測値z’iを算出する処理が行われる。命令処理時間の予測値z’iは、命令処理時間記憶領域に記憶された命令処理時間の実測値(zi−k、zi−k+1、…、zi−1)に基づき、ARモデルを利用して算出される。尚、ARモデルについては、第1の実施の形態と同様であるので、その詳細な説明を省略する。
【0111】
ステップS56では、所定時刻iにおいて、実際にソフトウエア命令をコンピュータに処理させ、コンピュータがその処理を開始した命令処理開始時刻と、処理を終了した命令処理終了時刻Tiを計測する処理が行われる。そして、その命令処理開始時刻と命令処理終了時刻Tiから、所定時刻iにおける命令処理時間の実測値ziを算出する。
【0112】
ステップS57では、命令処理終了予測時刻T’iを算出する処理が行われる。命令処理終了予測時刻T’iは、ステップS56で計測した命令処理開始時刻に、ステップS55で算出した命令処理時間の予測値z’iを加算することによって求めることができる(命令処理終了時刻T’i=命令処理開始時刻+命令処理時間の予測値z’i)。
【0113】
ステップS58では、ステップS56で計測した命令処理終了時刻Tiと、ステップS57で算出した命令処理終了予測時刻T’iとの誤差diを算出する処理が行われる。この誤差diは、命令処理終了予測時刻T’iから命令処理終了時刻Tiを減算して、その絶対値をとることによって、求められる(di=|T’i−Ti|)。
【0114】
ステップS59では、乱数として実用的で性質が良いものを得るべく、誤差diを乱数源として用い、誤差diの一部を乱数として取り出す処理が行われる。具体的には、まず、10進数で得られた誤差diを2進数に変換し、その2進数に変換した数値の最下位の1ビットを取得して乱数に用いる。例えば、誤差diが9マイクロ秒であった場合(0.0009秒)、この「9」(10進表記)を2進変換すると「1001」となる。この「1001」の最下位の1ビット、すなわち「1」を取得して乱数に用いる。
【0115】
ステップS60では、ステップS56で算出した所定時刻iにおける命令処理時間の実測値ziを命令処理時間記憶領域に記憶させることによって、命令処理時間記憶領域の記憶内容を更新する処理が行われる。そして、ステップS60での処理が終了すると再びステップS55に戻り、ステップS55からステップS60までの処理を繰り返し行う。これにより、乱数列を得ることができる。
【0116】
上述の実施例では、命令処理終了予測時刻T’iと命令処理終了時刻Tiとから誤差diを算出する場合を例に説明したが、命令処理時間の予測値z’iと実測値ziとから算出しても良い。
【0117】
尚、本発明は、上述の実施の形態に限定されるものではなく、本発明の趣旨を逸脱しない範囲で種々の変更が可能である。
【0118】
【発明の効果】
以上説明したように、本発明による乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータネットワークシステムによれば、第1の通信装置と第2の通信装置との間のパケット往復時間を予測し、実際に計測したパケット往復時間との誤差を乱数源とするので、コンピュータネットワークのトラフィックの不確実性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を容易に生成することができる。
【0119】
また、他の発明による乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータによれば、処理装置から記憶装置へのアクセス時間を予測し、実際に計測したアクセス時間との誤差を乱数源として用いるので、アクセス時間の不規則性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を1台のコンピュータ内で容易に生成することができる。
【0120】
更に他の発明による乱数生成方法及び乱数生成用コンピュータプログラム及びコンピュータによれば、コンピュータによるプログラム命令の命令処理時間を予測し、実際に計測した命令処理時間との誤差を乱数源として用いるので、コンピュータの状況に応じた命令処理時間の不規則性を利用して、予測不可能性、偶然性及び非再現性を有する乱数を1台のコンピュータ内で容易に生成することができる。
【図面の簡単な説明】
【図1】本実施の形態を説明する全体構成図である。
【図2】本実施の形態における乱数生成方法を説明するフローチャートである。
【図3】本実施例の全体構成図である。
【図4】乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。
【図5】クライアント内に設定される往復伝搬遅延時間記憶領域を図式化したものである。
【図6】1次のARモデルを示すものである。
【図7】誤差の2進数の有効桁数の分布を調べた表である。
【図8】本検定に利用したNISTのパラメータを示す表である。
【図9】実験結果を説明する表である。
【図10】不合格となった項目を示す表である。
【図11】第2の実施の形態を説明する図である。
【図12】第2の実施の形態における乱数生成方法を説明するフローチャートである。
【図13】本実施例におけるコンピュータの構成を説明する図である。
【図14】乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。
【図15】第3の実施の形態における乱数生成方法を説明するフローチャートである。
【図16】乱数生成用コンピュータプログラムによる乱数の生成方法を説明するフローチャートである。
【符号の説明】
1 第1の通信装置
2 第2の通信装置
3 コンピュータネットワーク
10 クライアントサーバシステム
11 クライアント
12 サーバ
13 LAN
14 往復伝搬遅延時間記憶領域
20 コンピュータ
21 入力装置
22 出力装置
23 主記憶装置
24 補助記憶装置
25 記憶装置
26 演算装置
27 制御装置
28 処理装置
30 コンピュータ
31 コンピュータ本体
32 キーボード&マウス(入力装置)
33 ディスプレイ(出力装置)
34 CPU(中央演算処理装置)
35 メモリ(主記憶装置)
36 ハードディスク[0001]
TECHNICAL FIELD OF THE INVENTION
The present invention relates to a random number generation method, a random number generation computer program, and the like, and relates to a random number generation method for generating a random number used as a seed used in a field requiring a random number, such as a session key or a one-time password. The present invention relates to a computer program for generating random numbers and the like.
[0002]
[Prior art]
2. Description of the Related Art Conventionally, when performing wired or wireless information communication, information is encrypted and transmitted so that the contents do not leak to a third party. The private key used for encryption must be randomly generated and unpredictable.
[0003]
In the case of password authentication for identifying a user, the secret key is generated by the user by himself / herself. On the other hand, the encryption key such as an ordinary encryption application, SSL (Secure Sockets Layer), and IPsec (IP Security Protocol) is used. In the case of the encrypted communication protocol, the user is not directly involved in the generation of the secret key, but is generated automatically by software.
[0004]
In the case of an encryption application or an encryption communication protocol, the software performs a predetermined arithmetic process on an input bit pattern called a seed to generate a random number, and generates a secret key based on the random number. I have. The input bit pattern uses a part of the host name of the server, the date, the time, and the like. The calculation of the random number is performed by using an algorithm such as SHA-1, MD5, MDC2, MD2 or UNIX (registered). (Trademark), the system function (r) attached to Linux and the like are used.
[0005]
Further, there has been proposed a device that includes a timer and a storage unit that stores a part of the random number, and that generates a random number using a count value of the timer and data of the storage unit when the random number is generated (for example, see Patent Document 1). .
[0006]
[Patent Document 1]
JP 2000-242470 A
[0007]
[Problems to be solved by the invention]
If the software generates a secret key based on a certain rule, there is a risk that an attacker using the rule may guess the secret key. Therefore, seeds for generating a secret key need to be coincidental, unpredictable, and non-reproducible.
[0008]
However, as described above, a well-known algorithm is used for the calculation of the random number, and a part of the host name of the server, the date, and the time are used. (Regularity) appears, is predictable, reproducible and poor in chance. For this reason, the secret key may be decrypted, and there is a problem in security.
[0009]
Conventionally, a method of using a physical random number in order to safely create a seed is known. However, a special device is required to generate the physical random number, and such a special device is required for each terminal. Is difficult in practice.
[0010]
The present invention has been made in view of the above points, and provides a random number generation method and a random number generation method capable of generating a random number satisfying randomness, unpredictability, and non-reproducibility from a computer device normally used. It is an object to provide a computer program for use, a computer network system, and a computer.
[0011]
[Means for Solving the Problems]
According to the first aspect of the present invention, there is provided a random number generating method which is required for predetermined data to reciprocate between a first communication device and a second communication device interconnected by a computer network. It is characterized in that a random data round-trip time is predicted, and a random number is generated using an error from the actually measured data round-trip time.
[0012]
According to a second aspect of the present invention, there is provided a random number generation method for estimating a packet round trip time required for a packet to make a round trip between a first communication device and a second communication device interconnected by a computer network. A packet round trip time prediction step, a packet round trip time measuring step of measuring the actual packet round trip time by reciprocating a packet between the first communication device and the second communication device, and the predicted packet round trip time were measured. An error calculation step for calculating an error from the packet round trip time and a random number generation step for generating a random number using the error are provided.
[0013]
According to a third aspect of the present invention, in the random number generating method according to the second aspect, the packet round trip time prediction step predicts a packet round trip time based on a packet round trip time measured in the past.
[0014]
According to a fourth aspect of the present invention, in the random number generating method according to the second or third aspect, the random number generating step converts the error into a binary number and converts the least significant bit of the numerical value converted into the binary number into a random number. It is characterized by being used for.
[0015]
A computer program for generating a random number according to
[0016]
A computer network system according to a sixth aspect of the present invention predicts a packet round trip time required for a packet to make a round trip between a first communication device and a second communication device interconnected by a computer network. , A packet is reciprocated between the first communication device and the second communication device, an actual packet round trip time is measured, and an error between the predicted packet round trip time and the measured packet round trip time is calculated. It is characterized in that a random number is generated using an error.
[0017]
According to the random number generation method, the random number generation computer program and the computer network system described in
[0018]
According to a seventh aspect of the present invention, in a computer having a processing device and a storage device, a random number generation method predicts an access time required to access the storage device from the processing device; An access time measuring step of measuring an actual access time by causing the apparatus to access, an error calculating step of calculating an error between the predicted access time and the measured access time, and a random number generation generating a random number using the error And step.
[0019]
According to an eighth aspect of the present invention, in the random number generating method according to the seventh aspect, the access time prediction step predicts the access time based on the access time measured in the past.
[0020]
According to a ninth aspect of the present invention, in the random number generating method according to the seventh or eighth aspect, the random number generating step converts the error into a binary number and converts the least significant one bit of the binary number into a random number. It is characterized by being used for.
[0021]
A computer program for generating a random number according to the invention according to
[0022]
A computer according to
[0023]
According to the random number generation method, the random number generation computer program, and the computer according to
[0024]
According to a twelfth aspect of the present invention, there is provided a random number generation method, comprising: a processing time estimating step of estimating a processing time required for a computer to execute a predetermined program; The method includes a processing time measuring step of measuring, an error calculating step of calculating an error between the predicted processing time and the measured processing time, and a random number generating step of generating a random number using the error.
[0025]
According to a thirteenth aspect of the present invention, in the random number generation method according to the twelfth aspect, the processing time prediction step predicts a processing time based on a processing time measured in the past.
[0026]
According to a fourteenth aspect of the present invention, in the random number generating method according to the twelfth or thirteenth aspect, the random number generating step converts the error into a binary number and converts the least significant one bit of the binary number into a random number. It is characterized by being used for.
[0027]
A computer program for generating a random number according to the invention of claim 15 includes a processing time prediction procedure for predicting a processing time required for the computer to process the predetermined program, and an actual process for causing the computer to process the predetermined program. Causing the computer to execute a processing time measurement procedure for measuring time, an error calculation procedure for calculating an error between the predicted processing time and the measured processing time, and a random number generation procedure for generating a random number using the error. It is characterized by the following.
[0028]
The computer according to
[0029]
According to the random number generation method, the random number generation computer program and the computer according to
[0030]
BEST MODE FOR CARRYING OUT THE INVENTION
Next, an embodiment of the present invention will be described with reference to the drawings.
[0031]
(First Embodiment)
FIG. 1 is an overall configuration diagram for explaining the first embodiment. The
[0032]
Specifically, this will be described below with reference to the flowchart of FIG. FIG. 2 is a flowchart illustrating a random number generation method according to the first embodiment.
[0033]
First, in step S1, a packet round trip time at a predetermined time is predicted. For example, the prediction method may be based on the packet round-trip time actually measured in the past, or may be based on various parameters such as the connection status of other terminals and the utilization rate of the
[0034]
Then, in step S2, the actual packet round trip time at a predetermined time is measured. For the measurement, for example, a request packet and a response packet are used. The request packet is, for example, when the request packet is transmitted from the first communication device to the second communication device, the
[0035]
Then, in step S3, an error between the predicted packet round trip time and the actually measured packet round trip time is calculated. This error can be calculated by subtracting the actually measured packet round trip time from the predicted packet round trip time and taking the absolute value thereof.
[0036]
Then, in step S4, a random number is generated using the error. In a
[0037]
According to the above-described random number generation method, a packet round trip time between the
[0038]
Next, a specific example of the first embodiment will be described below.
[0039]
FIG. 3 is an overall configuration diagram of the present embodiment. In the figure,
[0040]
FIG. 4 is a flowchart illustrating a method of generating random numbers by a computer program for generating random numbers.
[0041]
First, in steps S11 to S14, the predicted value x ′ of the round-trip propagation delay time is calculated. i Is performed to set an initial value necessary for calculating.
[0042]
In step S11, a process of reciprocating an IP packet between the
[0043]
Next, in step S12, a process of calculating an actually measured value x of the round-trip propagation delay time required for the IP packet to reciprocate between the
[0044]
In step S13, a process of storing the measured value x of the round-trip propagation delay time in the round-trip propagation delay
[0045]
In step S14, it is determined whether or not the measured value x of the round-trip propagation delay time is stored in all the storage frames of the round-trip propagation delay
[0046]
Next, in step S15, the predicted value x ′ of the round-trip propagation delay time at the predetermined time i i Is calculated. Predicted value x 'of round-trip propagation delay time i Is the measured value (x) of the round-trip propagation delay time measured in the past and stored in the round-trip
[0047]
The AR model is a model in which values at the present time in a time series are represented by a linear combination of values at the past in the time series. X is the time series of interest t Then, the AR model is expressed by the following equation (1).
[0048]
(Equation 1)
In equation (1), x t-i Is x t It is an actual measurement value of i times earlier in time. Also, e t Is the modeling error at time t. If this value is 0, there is no error. And a i (I = 1, 2,..., K) are auto-regression coefficients representing the equation (1).
[0049]
FIG. 6 shows a first-order AR model. x t Is an output of a feedback control system having a first-order lag as shown in FIG. In addition, z in the figure -1 Is the delay operator. In order to estimate this AR model, the auto-regression coefficient a of equation (1) i Needs to be estimated. In this embodiment, the autoregression coefficient a of the equation (1) is calculated by the following method. i Is estimated.
[0050]
First, x on both sides of equation (1) tl Are multiplied and averaged, the following equation (2) holds.
[0051]
(Equation 2)
[0052]
Where r l Is a function of the expected value, x t , X tl It is expressed as the average of the product of In advance (r 0 , R 1 , ..., r k ) Is calculated in advance. Considering l = 1, 2,..., K) in equation (2), the following equation is derived.
[0053]
[Equation 3]
[0054]
The k-th simultaneous equation is referred to as a Yule-Walker equation. Autoregression coefficient a i Is estimated by solving equation (3). And this autoregressive coefficient a i From the model and the predicted value x 'of the round-trip propagation delay time i Can be calculated.
[0055]
Next, in step S16, at a predetermined time i, the IP packet is actually reciprocated between the
[0056]
In step S17, the predicted reception time T ′ of the response IP packet at the predetermined time i i Is calculated. Predicted reception time T ' i Is the predicted value x ′ of the round trip propagation delay time calculated in step S15 at the transmission time of the request IP packet measured in step S16. i (Predicted reception time T ′ i = Request IP packet transmission time + Round trip propagation delay time predicted value x ' i ).
[0057]
In step S18, the actual reception time T measured in step S16 i And the predicted reception time T ′ calculated in step S17 i Error d i Is calculated. This error d i Is the predicted reception time T ′ i From reception time T i Is subtracted and its absolute value is obtained (d i = | T ' i -T i |).
[0058]
In step S19, in order to obtain a practical random number with good properties, the error d i Is extracted as a random number. Specifically, first, an error d obtained in a decimal number i Is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is obtained and used as a random number. For example, the error d i Is 9 microseconds (0.0009 second), this "9" (in decimal notation) is converted to "1001". The least significant bit of “1001”, that is, “1” is obtained and used as a random number. The reason for using the lower one bit for the random number will be described later.
[0059]
In step S20, the measured value x of the round-trip propagation delay time at the predetermined time i calculated in step S16 i Is stored in the round-trip propagation delay
[0060]
In the case of the present embodiment, the error d i An experiment was conducted on how many lower-order bits are used for optimization. And the error d i When only the least significant bit is used, a practical random number with particularly good properties can be obtained. Hereinafter, the contents and results of the experiment will be described.
[0061]
The computer used for the experiment was a CPU: Pentium (registered trademark) 3 (1 GHz), a memory: 256 MB, and an OS: RedHat Linux 7.2, and a gettimeofday function was used to measure the reception time of a response IP packet. . The experiment was performed between two computers on the LAN, and the packet round trip time between the
[0062]
First, the obtained error d i In binary notation, the number of significant digits of the obtained error was examined in order to consider how many lower bits can be used as a random number. The number of significant digits of the error refers to the sequence length when the obtained error is represented in binary. For example, if the obtained error is 9 microseconds (0.0009 seconds), when this "9" (decimal notation) is converted into binary, it becomes "1001", and the number of significant digits of this numerical value is 4 digits. is there.
[0063]
FIG. 7 shows that 10 6 10 is a table obtained by acquiring (1,000,000) times of errors and examining the distribution of the number of significant digits of a binary number. The order of the AR model used at this time is 10, the experiment is performed 10 times, and the average is shown. The number of digits in Table 1 is the number of significant digits when converted to a binary number, and the number is the number of times corresponding to the number of digits out of 1,000,000. From this table, it can be seen that an error of 1 to 8 bits occupies about 90% of the whole. Therefore, the error d i Is considered to be 8 bits or less.
[0064]
Therefore, next, two types of test experiments, NIST and DIEHARD, were performed for the case where only the lower 1 bit of the error was used as a random number and the case where the lower 2 bits were used as a random number. However, in the method using the lower 2 bits of the error, when the number of significant digits of the error is 2 (2 or 3 in decimal number), the second bit from the lower bit becomes 1, so that When the number is 2, only the lower 1 bit of the error is used and the lower 2 bits are not used.
[0065]
The NIST is a tool for performing a randomness test on output data from a physical random number and a pseudo random number generator, and is a statistical package including tests from 16 items. For NIST, see http: // crsc. nest. gov / rug. Is described in detail. FIG. 8 is a table showing NIST parameters used for the main test. When the p-value output by performing various tests satisfies 0 <p-value <1, it is considered that the test item has passed.
[0066]
DIEHARD, on the other hand, is a random number test program developed at Florida State University, and tests 15 items. If the p-value output by performing the test of these 15 items satisfies “0 <p-value <1” and KSTEST satisfies “0 <KSTEST <1”, it is considered that the test item has passed. ing. For DIEHARD, see http: // stat. fsu. edu / geo / diehard. html.
[0067]
[0068]
According to this, in the random number sequence obtained from only the lower one bit, all the test items were able to pass, but when the lower two bits were random numbers, several test items were used for both NIST and DIEHARD. Was rejected. FIG. 10 is a table showing items that failed the test. From this experimental result, it can be seen that particularly when only the least significant bit of the error is used, a practical random number having good properties can be obtained.
[0069]
In the above-described embodiment, the case where the number of models of the AR model, that is, the number of storage frames of the round-trip propagation delay
[0070]
In the embodiment, the predicted reception time T ′ i And the actual reception time T i And the error d i Has been described as an example, but the predicted value x ′ of the round-trip propagation delay time has been described. i And measured value x i And may be calculated from
[0071]
Furthermore, in the embodiment, the case of the client-server system has been described as an example, but any computer-to-computer connection, such as the
[0072]
Further, in the embodiment, the case of the computer software program installed in the
[0073]
(Second embodiment)
FIG. 11 is a diagram illustrating the second embodiment, and is a diagram illustrating a configuration of a computer. The
[0074]
The random number generation method according to the present embodiment is realized in one
[0075]
Specifically, this will be described below using the flowchart of FIG. FIG. 12 is a flowchart illustrating a random number generation method according to the second embodiment. First, in step S21, when an access such as Read (read), Write (write), Update (update), and Delete (delete) is performed from the processing device to the storage device, from the start of access to the end of access. Predict access time. The method of estimating the access time may be based on, for example, data actually measured in the past, or may be based on various parameters such as the capacity of the storage device.
[0076]
In step S22, the
[0077]
Then, in step S23, an error between the predicted access time and the actually measured access time is calculated. This error can be calculated by subtracting the measured access time from the predicted access time and taking its absolute value.
[0078]
Then, in step S24, a random number is generated using the error. The computer is connected to a plurality of devices such as an
[0079]
Therefore, an error within a predetermined range always occurs between the predicted access time and the measured access time, and the error is unpredictable and has randomness and non-reproducibility. Therefore, this error can be used as a random number as it is, and a part of the error may be used as a random number in order to obtain a more practical random number with good properties.
[0080]
According to the above-described random number generation method, the access time from the
[0081]
Next, a specific example of the second embodiment will be described below.
[0082]
FIG. 13 is a diagram illustrating a configuration of a computer according to the present embodiment. The
[0083]
FIG. 14 is a flowchart illustrating a method of generating random numbers by the computer program for generating random numbers. First, at steps S31 to S34, the predicted access time y ' i Is performed to set an initial value necessary for calculating.
[0084]
In step S31, the access start time t at which the
[0085]
Here, the
[0086]
In step S32, a process of calculating the actual measured value y of the access time is performed. The actual measured value y of the access time is the access end time t described above. 2 Access start time t 1 (Y = t 2 -T 1 ).
[0087]
In step S33, a process of storing the actual measured value y of the access time in an access time storage area preset in the
[0088]
In step S34, it is determined whether or not the actual measured value y of the access time is stored in all the storage frames of the access time storage area. If the measured value is not stored (NO), the process returns to step S31, and all the storages are performed. Steps S31 to S34 are repeated until it is determined that the information is stored in the frame (YES). As a result, the access time storage area stores a predetermined number (K) of access time actually measured values y.
[0089]
Next, in step S35, the predicted value y ′ of the access time at the predetermined time i is i Is calculated. Access time prediction value y ' i Is the actually measured access time (y) stored in the access time storage area of the
[0090]
In step S36, at a predetermined time i, the
[0091]
In step S37, the predicted access end time T ′ i Is calculated. Access end predicted time T ' i Is the predicted access time y ′ calculated at step S35 at the access start time measured at step S36. i (The estimated access end time T ′). i = Transmission start time of access request signal + Predicted value y 'of access time i ).
[0092]
In step S38, the access end time T measured in step S36 i And the predicted access end time T ′ calculated in step S37 i Error d i Is calculated. This error d i Is the predicted access end time T ′ i To access end time T i Is subtracted, and its absolute value is obtained (d i = | T ' i -T i |).
[0093]
In step S39, in order to obtain a practical random number with good properties, the error d i Is extracted as a random number. Specifically, first, an error d obtained in a decimal number i Is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is obtained and used as a random number. For example, the error d i Is 9 microseconds (0.0009 second), this "9" (in decimal notation) is converted to "1001". The least significant bit of “1001”, that is, “1” is obtained and used as a random number.
[0094]
In step S40, the actual measured value y of the access time at the predetermined time i calculated in step S36 i Is stored in the access time storage area, thereby performing a process of updating the storage content of the access time storage area. When the process in step S40 ends, the process returns to step S35 again, and the processes from step S35 to step S40 are repeatedly performed. Thereby, a random number sequence can be obtained.
[0095]
In the above-described embodiment, the predicted access end time T ′ i And access end time T i And the error d i Has been described as an example, but the predicted access time y ′ i And measured value y i And may be calculated from Further, in the embodiment, the case of the
[0096]
(Third embodiment)
The random number generation method according to the present embodiment causes a computer to execute a predetermined program instruction, predicts an instruction processing time from when the computer starts executing the program instruction to when the program instruction ends, and calculates a difference between the actual instruction processing time and the actual instruction processing time. A random number is generated using the error.
[0097]
Specifically, this will be described below with reference to the flowchart in FIG. FIG. 15 is a flowchart illustrating a random number generation method according to the third embodiment. First, in step S41, when a predetermined program instruction is executed by a computer, a processing time from the start of the execution of the program instruction to the end thereof is predicted. The prediction method may be based on, for example, a processing time actually measured in the past, or may be based on various parameters such as a type of a program instruction to be executed. Further, the predetermined program instruction includes, for example, a prime number calculation processing instruction for causing a computer to calculate a prime number up to 1000.
[0098]
In step S42, the computer actually causes the computer to execute the program instruction, and measures the instruction processing time. The actual instruction processing time can be obtained by measuring the time when the computer starts processing the program instruction and the time when the processing ends.
[0099]
Then, in step S43, an error between the predicted instruction processing time and the actually measured instruction processing time is calculated. This error can be calculated by subtracting the actually measured instruction processing time from the predicted instruction processing time and taking its absolute value.
[0100]
Then, in step S44, a random number is generated using the error. When a computer executes a program instruction, a plurality of machine instructions and a main storage device are used. Therefore, the amount of work (throughput) that the computer can process per unit time varies depending on the state of the computer. Therefore, even when a predetermined program instruction is executed, the processing interval differs depending on the timing, and it is practically impossible to have the same time. Further, even when the computer situation is changed artificially, from the point of view of the program that executes the program instruction, an extreme change such that 0.01 second becomes 10 hours only by a certain degree of change. No significant change occurs.
[0101]
Therefore, an error within a predetermined range always occurs between the predicted instruction processing time and the actually measured instruction processing time, and the error is unpredictable and has randomness and non-reproducibility. Therefore, this error can be used as a random number as it is, and a part of the error may be used as a random number as a random number source in order to obtain a more practical and good random number.
[0102]
According to the random number generation method described above, the processing time of a predetermined program instruction by the computer is predicted, and an error from the actually measured instruction processing time is used as a random number source. Using the regularity, random numbers having unpredictability, randomness, and non-reproducibility can be easily generated.
[0103]
Next, a specific example of the third embodiment will be described below.
[0104]
The computer program for generating a random number in this embodiment is installed in a computer in an executable state. Since the configuration of the computer is the same as that of the example in the second embodiment, a detailed description thereof will be omitted.
[0105]
FIG. 16 is a flowchart illustrating a method of generating random numbers by the computer program for generating random numbers. First, at steps S51 to S54, the predicted value z ′ of the instruction processing time is calculated. i Is performed to set an initial value necessary for calculating.
[0106]
In step S51, an instruction processing start time t at which the computer starts processing of a software instruction which is a unit of a program instruction. 1 And an instruction processing end time t at which the computer has finished processing the software instruction. 2 Is measured. In this embodiment, a prime number calculation process for causing the computer to calculate a prime number up to 1000 is set for the processing of the software instruction.
[0107]
In step S52, an actual measurement value z of the command processing time is calculated. The actually measured value z of the instruction processing time is the instruction processing end time t described above. 2 To instruction processing start time t 1 (Z = t) 2 -T 1 ).
[0108]
In step S53, a process of storing the actually measured value z of the command processing time in a command processing time storage area preset in the memory is performed. The structure of the instruction processing time storage area is the same as that of the round-trip propagation delay
[0109]
In step S54, it is determined whether or not the actual measurement value z of the instruction processing time is stored in all the storage frames of the instruction processing time storage area. If not (NO), the process returns to step S51, and Steps S51 to S54 are repeated until it is determined that the information is stored in the storage frame (YES). As a result, a predetermined number (K) of actually measured values z of the command processing time are stored in the processing time storage area.
[0110]
Next, in step S55, the predicted value z ′ of the instruction processing time at the predetermined time i is i Is calculated. Instruction processing time prediction value z ' i Is the actual measured value of the instruction processing time stored in the instruction processing time storage area (z i-k , Z i−k + 1 , ..., z i-1 ) Is calculated using an AR model. The AR model is the same as in the first embodiment, and a detailed description thereof will be omitted.
[0111]
In step S56, at a predetermined time i, the computer actually causes the computer to process the software instruction, and the instruction processing start time at which the computer starts the processing and the instruction processing end time T at which the processing ends. i Is measured. Then, the instruction processing start time and the instruction processing end time T i From the actual measured value z of the instruction processing time at the predetermined time i. i Is calculated.
[0112]
In step S57, the instruction processing end predicted time T ′ i Is calculated. Instruction processing end predicted time T ' i Is the predicted value z ′ of the command processing time calculated in step S55 at the command processing start time measured in step S56. i (Instruction processing end time T ′). i = Instruction processing start time + instruction processing time predicted value z ' i ).
[0113]
In step S58, the command processing end time T measured in step S56 i And the predicted instruction processing end time T ′ calculated in step S57. i Error d i Is calculated. This error d i Is the instruction processing end predicted time T ′ i From instruction processing end time T i Is subtracted and its absolute value is obtained (d i = | T ' i -T i |).
[0114]
In step S59, in order to obtain a practical random number with good properties, the error d i Is used as a random number source, and the error d i Is extracted as a random number. Specifically, first, an error d obtained in a decimal number i Is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is obtained and used as a random number. For example, the error d i Is 9 microseconds (0.0009 second), this "9" (in decimal notation) is converted to "1001". The least significant bit of “1001”, that is, “1” is obtained and used as a random number.
[0115]
In step S60, the measured value z of the instruction processing time at the predetermined time i calculated in step S56 i Is stored in the instruction processing time storage area, thereby performing processing for updating the storage content of the instruction processing time storage area. When the processing in step S60 ends, the process returns to step S55, and the processing from step S55 to step S60 is repeatedly performed. Thereby, a random number sequence can be obtained.
[0116]
In the above-described embodiment, the instruction processing end predicted time T ′ i And instruction processing end time T i And the error d i Has been described as an example, but the predicted value z ′ of the instruction processing time has been described. i And the measured value z i And may be calculated from
[0117]
Note that the present invention is not limited to the above-described embodiment, and various changes can be made without departing from the spirit of the present invention.
[0118]
【The invention's effect】
As described above, according to the random number generation method, the random number generation computer program, and the computer network system of the present invention, the packet round trip time between the first communication device and the second communication device is predicted, and Since the error from the measured packet round trip time is used as a random number source, random numbers having unpredictability, randomness and non-reproducibility can be easily generated by using the uncertainty of the traffic of the computer network.
[0119]
According to the random number generation method, the random number generation computer program, and the computer according to the other invention, the access time from the processing device to the storage device is predicted, and an error from the actually measured access time is used as a random number source. By utilizing the irregularity of the access time, random numbers having unpredictability, randomness and non-reproducibility can be easily generated in one computer.
[0120]
According to the random number generation method, the random number generation computer program, and the computer according to still another aspect of the present invention, an instruction processing time of a program instruction by the computer is predicted, and an error from an actually measured instruction processing time is used as a random number source. Utilizing the irregularity of the instruction processing time according to the situation, random numbers having unpredictability, chance and non-reproducibility can be easily generated in one computer.
[Brief description of the drawings]
FIG. 1 is an overall configuration diagram illustrating an embodiment.
FIG. 2 is a flowchart illustrating a random number generation method according to the present embodiment.
FIG. 3 is an overall configuration diagram of the present embodiment.
FIG. 4 is a flowchart illustrating a method of generating random numbers by a computer program for generating random numbers.
FIG. 5 schematically shows a round-trip propagation delay time storage area set in a client.
FIG. 6 shows a first-order AR model.
FIG. 7 is a table showing the distribution of the number of significant digits of a binary number of an error.
FIG. 8 is a table showing NIST parameters used in this test.
FIG. 9 is a table illustrating experimental results.
FIG. 10 is a table showing failed items.
FIG. 11 is a diagram illustrating a second embodiment.
FIG. 12 is a flowchart illustrating a random number generation method according to the second embodiment.
FIG. 13 is a diagram illustrating a configuration of a computer according to the present embodiment.
FIG. 14 is a flowchart illustrating a method of generating random numbers by a computer program for generating random numbers.
FIG. 15 is a flowchart illustrating a random number generation method according to the third embodiment.
FIG. 16 is a flowchart illustrating a method of generating random numbers by a computer program for generating random numbers.
[Explanation of symbols]
1 First communication device
2 Second communication device
3 Computer network
10 Client server system
11 clients
12 servers
13 LAN
14 Round-trip propagation delay time storage area
20 computers
21 Input device
22 Output device
23 Main storage device
24 Auxiliary storage device
25 Storage device
26 arithmetic unit
27 Control device
28 Processing equipment
30 Computer
31 Computer
32 Keyboard & Mouse (Input device)
33 Display (output device)
34 CPU (Central Processing Unit)
35 memory (main storage)
36 Hard Disk
Claims (16)
前記第1の通信装置と前記第2の通信装置との間で前記パケットを往復させて実際のパケット往復時間を計測するパケット往復時間計測ステップと、
前記予測したパケット往復時間と前記計測したパケット往復時間との誤差を算出する誤差算出ステップと、
前記誤差を用いて乱数を生成する乱数生成ステップと、
を有することを特徴とする乱数生成方法。A packet round trip time estimating step for estimating a packet round trip time required for a packet to make a round trip between a first communication device and a second communication device interconnected by a computer network;
A packet reciprocating time measuring step of reciprocating the packet between the first communication device and the second communication device to measure an actual packet reciprocating time;
An error calculation step of calculating an error between the predicted packet round trip time and the measured packet round trip time,
A random number generation step of generating a random number using the error,
A random number generation method comprising:
過去に計測したパケット往復時間に基づいてパケット往復時間時間を予測することを特徴とする請求項2に記載の乱数生成方法。The packet round trip time prediction step includes:
3. The random number generation method according to claim 2, wherein the packet round trip time is predicted based on the packet round trip time measured in the past.
前記誤差を2進数に変換し、該2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする請求項2または3に記載の乱数生成方法。The random number generation step includes:
4. The random number generating method according to claim 2, wherein the error is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is used as a random number.
前記第1の通信装置と前記第2の通信装置との間で前記データを往復させて実際のデータ往復時間を計測するデータ往復時間計測手順と、
前記予測したデータ往復時間と前記計測したデータ往復時間との誤差を算出する誤差算出手順と、
前記誤差を用いて乱数を生成する乱数生成手順と、
をコンピュータに実行させるための乱数生成用コンピュータプログラム。A data round-trip time prediction procedure for predicting a round-trip time required for predetermined data to reciprocate between a first communication device and a second communication device interconnected by a computer network;
A data round trip time measuring procedure for measuring the actual data round trip time by reciprocating the data between the first communication device and the second communication device;
An error calculation procedure for calculating an error between the predicted data round trip time and the measured data round trip time,
A random number generation procedure for generating a random number using the error,
Is a computer program for generating random numbers for causing a computer to execute.
前記第1の通信装置と前記第2の通信装置との間で前記パケットを往復させて実際のパケット往復時間を計測し、
前記予測したパケット往復時間と前記計測したパケット往復時間との誤差を算出し、
前記誤差を用いて乱数を生成することを特徴とするコンピュータネットワークシステム。Predicting the packet round trip time required for a packet to make a round trip between a first communication device and a second communication device interconnected by a computer network;
Reciprocating the packet between the first communication device and the second communication device to measure an actual packet round trip time,
Calculate the error between the predicted packet round trip time and the measured packet round trip time,
A computer network system, wherein a random number is generated using the error.
前記処理装置から前記記憶装置にアクセスするのに必要なアクセス時間を予測するアクセス時間予測ステップと、
前記処理装置から前記記憶装置にアクセスさせて実際のアクセス時間を計測するアクセス時間計測ステップと、
前記予測したアクセス時間と前記計測したアクセス時間との誤差を算出する誤差算出ステップと、
前記誤差を用いて乱数を生成する乱数生成ステップと、
を有することを特徴とする乱数生成方法。In a computer having a processing device and a storage device,
An access time prediction step of predicting an access time required to access the storage device from the processing device;
An access time measuring step of measuring the actual access time by allowing the processing device to access the storage device;
An error calculation step of calculating an error between the predicted access time and the measured access time,
A random number generation step of generating a random number using the error,
A random number generation method comprising:
過去に計測したアクセス時間に基づいてアクセス時間を予測することを特徴とする請求項7に記載の乱数生成方法。The access time prediction step includes:
The random number generation method according to claim 7, wherein the access time is predicted based on the access time measured in the past.
前記誤差を2進数に変換し、該2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする請求項7または8に記載の乱数生成方法。The random number generation step includes:
9. The random number generation method according to claim 7, wherein the error is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is used as a random number.
前記処理装置から前記記憶装置にアクセスするのに必要なアクセス時間を予測するアクセス時間予測手順と、
前記処理装置から前記記憶装置にアクセスさせて実際のアクセス時間を計測するアクセス時間計測手順と、
前記予測したアクセス時間と前記計測したアクセス時間との誤差を算出する誤差算出手順と、
前記誤差を用いて乱数を生成する乱数生成手順と、
を実行させるための乱数生成用コンピュータプログラム。A computer having a processing device and a storage device,
An access time prediction procedure for predicting an access time required to access the storage device from the processing device;
An access time measurement procedure for measuring the actual access time by allowing the processing device to access the storage device,
An error calculation procedure for calculating an error between the predicted access time and the measured access time,
A random number generation procedure for generating a random number using the error,
Computer program for generating random numbers for executing
前記処理装置から前記記憶装置にアクセスするのに必要なアクセス時間を予測し、前記処理装置から前記記憶装置にアクセスさせて実際のアクセス時間を計測し、前記予測したアクセス時間と前記計測したアクセス時間との誤差を算出し、前記誤差を用いて乱数を生成することを特徴とするコンピュータ。In a computer having a processing device and a storage device,
Estimate the access time required to access the storage device from the processing device, measure the actual access time by allowing the processing device to access the storage device, the predicted access time and the measured access time And calculating a random number by using the error.
前記コンピュータに前記所定のプログラムを処理させて実際の処理時間を計測する処理時間計測ステップと、
前記予測した処理時間と前記計測した処理時間との誤差を算出する誤差算出ステップと、
前記誤差を用いて乱数を生成する乱数生成ステップと、
を有することを特徴とする乱数生成方法。A processing time estimating step of estimating a processing time required for the computer to process the predetermined program;
A processing time measuring step of measuring the actual processing time by causing the computer to process the predetermined program;
An error calculation step of calculating an error between the predicted processing time and the measured processing time,
A random number generation step of generating a random number using the error,
A random number generation method comprising:
過去に計測した処理時間に基づいて処理時間を予測することを特徴とする請求項12に記載の乱数生成方法。The processing time prediction step includes:
The random number generation method according to claim 12, wherein the processing time is predicted based on the processing time measured in the past.
前記誤差を2進数に変換し、該2進数に変換した数値の最下位の1ビットを乱数に用いることを特徴とする請求項12または13に記載の乱数生成方法。The random number generation step includes:
14. The random number generation method according to claim 12, wherein the error is converted into a binary number, and the least significant bit of the numerical value converted into the binary number is used as a random number.
前記コンピュータに前記所定のプログラムを処理させて実際の処理時間を計測する処理時間計測手順と、
前記予測した処理時間と前記計測した処理時間との誤差を算出する誤差算出手順と、
前記誤差を用いて乱数を生成する乱数生成手順と、
をコンピュータに実行させるための乱数生成用コンピュータプログラム。A processing time estimation procedure for estimating the processing time required for the computer to process the predetermined program;
A processing time measurement procedure for measuring the actual processing time by causing the computer to process the predetermined program;
An error calculation procedure for calculating an error between the predicted processing time and the measured processing time,
A random number generation procedure for generating a random number using the error,
Is a computer program for generating random numbers for causing a computer to execute.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002381727A JP2004206025A (en) | 2002-10-30 | 2002-12-27 | Random number generating method, computer program for random number generation, computer network system, and computer |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2002315329 | 2002-10-30 | ||
JP2002381727A JP2004206025A (en) | 2002-10-30 | 2002-12-27 | Random number generating method, computer program for random number generation, computer network system, and computer |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2004206025A true JP2004206025A (en) | 2004-07-22 |
Family
ID=32828233
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2002381727A Pending JP2004206025A (en) | 2002-10-30 | 2002-12-27 | Random number generating method, computer program for random number generation, computer network system, and computer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2004206025A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007072731A (en) * | 2005-09-06 | 2007-03-22 | Chiba Univ | Random number generation system, random number generation method and random number generation program |
JP2008058514A (en) * | 2006-08-30 | 2008-03-13 | Brother Ind Ltd | Communication equipment and program |
US8572142B2 (en) | 2010-11-03 | 2013-10-29 | General Electric Company | Method, device and computer program product for random number generation in a meter |
US11080020B2 (en) | 2019-04-26 | 2021-08-03 | Megachips Corporation | Information processing device and random number generating method |
-
2002
- 2002-12-27 JP JP2002381727A patent/JP2004206025A/en active Pending
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007072731A (en) * | 2005-09-06 | 2007-03-22 | Chiba Univ | Random number generation system, random number generation method and random number generation program |
JP2008058514A (en) * | 2006-08-30 | 2008-03-13 | Brother Ind Ltd | Communication equipment and program |
JP4725462B2 (en) * | 2006-08-30 | 2011-07-13 | ブラザー工業株式会社 | Communication apparatus and program |
US8572142B2 (en) | 2010-11-03 | 2013-10-29 | General Electric Company | Method, device and computer program product for random number generation in a meter |
US11080020B2 (en) | 2019-04-26 | 2021-08-03 | Megachips Corporation | Information processing device and random number generating method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Ambrosin et al. | On the feasibility of attribute-based encryption on internet of things devices | |
JP7033120B2 (en) | Methods and systems for quantum key distribution based on trusted computing | |
US6678707B1 (en) | Generation of cryptographically strong random numbers using MISRs | |
US20030037079A1 (en) | True random number generator and entropy calculation device and method | |
JP7399975B2 (en) | Multi-source entropy randomness aggregation and distribution network | |
CN111158613B (en) | Data block storage method and device based on access heat and storage equipment | |
Abbott et al. | On the unpredictability of individual quantum measurement outcomes | |
JP2005526299A (en) | Method and apparatus for generating a random bit string using an environmental sensor | |
CN108139889A (en) | Pseudo-random number sequence is generated by the non-linear mixing of multiple auxiliary pseudo-random number generator | |
AU2021200062B2 (en) | Systems and computer-implemented methods for generating pseudo random numbers | |
Baybulatov et al. | Control system availability assessment via maximum delay calculation | |
Gammel | Hurst’s rescaled range statistical analysis for pseudorandom number generators used in physical simulations | |
JP2004206025A (en) | Random number generating method, computer program for random number generation, computer network system, and computer | |
US9928370B2 (en) | Communication device, communication method, computer program product, and communication system | |
US6317499B1 (en) | Storage device random bit generator | |
CA3011477A1 (en) | Method, system, and device for selecting a winner of a raffle based on content from raffle tickets | |
CN113228022B (en) | Analysis query response system, analysis query response method, and recording medium | |
JP2005508539A (en) | System and method for assigning engine measurement metrics to a computer system | |
JP2014095966A (en) | Information processor, information processing method and program | |
RU2577201C2 (en) | Method for generating a random number using a computer (variants) | |
JP7116722B2 (en) | Methods for checking the availability and integrity of distributed data objects | |
Darir et al. | ProbFlow: Using Probabilistic Programming in Anonymous Communication Networks. | |
JP4689539B2 (en) | Data processing apparatus and method | |
US9281943B1 (en) | Defending against factoring by collision | |
JP2010231528A (en) | Calculation device, calculation method and program for calculating secrecy evaluation value |