JP3606418B2 - Random number generator - Google Patents
Random number generator Download PDFInfo
- Publication number
- JP3606418B2 JP3606418B2 JP04936997A JP4936997A JP3606418B2 JP 3606418 B2 JP3606418 B2 JP 3606418B2 JP 04936997 A JP04936997 A JP 04936997A JP 4936997 A JP4936997 A JP 4936997A JP 3606418 B2 JP3606418 B2 JP 3606418B2
- Authority
- JP
- Japan
- Prior art keywords
- random number
- bit
- number generation
- generation device
- data
- 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.)
- Expired - Fee Related
Links
Images
Description
【0001】
【発明の属する技術分野】
本発明は乱数生成装置に関し、特にチャレンジとレスポンスによる機器間の認証に用いられるチャレンジデータを生成する装置に関する。
【0002】
【従来の技術】
通信路を介して接続されている2つの機器間の認証方法として、国際標準規格ISO/IEC9798−2に記載される暗号技術を用いた一方向認証方法が通常よく利用されている。
証明される機器を証明者、証明者を認証する機器を認証者と称すると、この認証方法は証明者が認証鍵と呼ばれる認証者と同じ秘密のデータを持つことを、その鍵自身を知らせることなく認証者に対して証明することを基本としている。そのためにまず認証者があるデータ(チャレンジデータ)を選びこれを証明者に対して投げかける。これに対し証明者がある暗号変換を保有し前記認証鍵を用いて前記チャレンジデータを暗号化する。このように暗号化されたデータをレスポンスとして認証者に対して返す。このレスポンスを受信した認証者は前記暗号変換の逆変換である復号変換と認証鍵を共有しており、このレスポンスを前記認証鍵を用いて前記復号変換によって復号する。この結果が前記チャレンジデータと一致すれば証明者が正当であると認証する。
【0003】
この認証方法におけるチャレンジデータは、比較的長いビット長(nビット:現在のところ60ビット以上)のデータであり、できるだけ2^n(2のn乗)通りの値をランダムに取りうることが必要である。これは、機器間の通信路を監視(盗聴)してすべてのチャレンジとレスポンスの組み合わせをテーブルに搾取し、以降のチャレンジに対する偽のレスポンスとして利用するという攻撃(以下、「テーブル攻撃」と呼ぶ。)に対抗するためである。
<第1の従来例>
チャレンジデータを生成する方法の一例は、カウンタを用いる方法である。nビットのカウンタを設け、認証のたびにこれをカウントアップして用いる。この方法の利点は、カウンタが継続して動作するかぎりは、チャレンジデータが各認証毎に異なることが保証されており、例え機器間の通信路を監視していたとしても、過去の情報を次のチャレンジに対するレスポンス偽造に悪用できないことである。しかし、この方法を安全にするためにはnビットもの長いビット長のカウンタが必要である。また実際の機器に適用する場合には、カウンタを電源をオフにしても内容が消去しないように実現する必要がある。
<第2の従来例>
また、チャレンジデータの別の生成方式の例が、特許公開公報H8−292931号に示されている。この方法ではカウンタをフリーランで動作させておき、認証の際に固定の乱数生成演算プログラムで変換して用いる。実際の機器間の認証が、ランダムなタイミングに行われることを利用した方法である。この方法を用いるとカウンタが電源オフでリセットされても、使用するタイミングが任意(ランダム)ならば第1の従来例に比べチャレンジデータとして取りうる値の種類が多くなる。
【0004】
しかし、この場合であってもカウンタはnビットの長さを有する必要がある。カウンタが短かければ、カウンタの出力として何度も同じ値が出力されて、前記テーブル攻撃が成立してしまうからである。
<第3の従来例>
また、第2の従来例におけるカウンタを、例えば符号理論におけるM系列を生成する線形フィードバックシフトレジスタ(LFSR)に置き換える方法も考えられる。M系列とLFSRについては、例えば今井秀樹著「符号理論」電子情報通信学会編1990に詳しく説明されている。LFSRをフリーランで動作させておき、認証の際にこれを止めて、その状態から必要とされるビット長のチャレンジデータを出力するという方法である。
【0005】
これにより、第2の従来例におけるカウンタと異なり、LFSRの内部を秘密にすることで、次のチャレンジデータを予測することすら困難になり安全性が向上する。
しかしながら、2^n通りのチャレンジデータを生成するにはnビット以上のLFSRが必要になる。LFSRの取りうる値の種類の数は乱数生成装置の出力nビットの取りうる値の種類の数になるからである。例えば、20ビットのLFSRの出力が80ビットである場合、この出力の取りうる値の種類の数は、2^80ではなく、2^20にしかならない。チャレンジデータが2^80通りの値を取るためには、80ビットのLFSRを備える必要がある。
【0006】
【発明が解決しようとする課題】
以上説明したように、上記従来技術では、2^n通りの値をランダムにとり得るチャレンジデータを生成するには、nビットのカウンタや乱数生成手段が必要とされる。つまり、認証に適した安全なチャレンジデータを生成するには大きな規模のハードまたはソフトが必要になる。そのために、製品のコンパクト化や認証用回路のLSI化等が妨げられる。
【0007】
そこで、本発明はかかる点に鑑みてなされたものであり、小規模で実現することができるチャレンジデータ生成用の乱数生成装置を提供することを目的とする。
なお、ここでの「乱数」は、次のチャレンジデータが予測できないことを必要としない。チャレンジデータができるだけ多くの値を取りうること(最大2^n通り)が重要である。具体的には、以下の条件を満たす乱数生成装置を提供することを目的とする。
(1) nビットからなる出力データが、2^n通りの値を取りうる。
(2) 小さなハードウェアで実現できる。
(3) あるチャレンジデータから次のチャレンジデータが予測されないほうが望ましい。また出力値から乱数生成装置の内部が解析されないほうが望ましい。
【0008】
【課題を解決するための手段】
上記目的を達成するために、本発明はnビットの乱数を生成する乱数生成装置であって、前記乱数を保持するためのnビットの保持手段と、nより小さいkビットの乱数を生成する乱数生成手段と、新たな乱数を生成する旨の指示を受けると前記乱数生成手段により生成されたkビットの乱数の少なくとも一部を前記保持手段のnビットの一部に格納すると共に前記保持手段の残る部分には前記保持手段に保持されていた直前の乱数を再利用した値を格納する格納手段と、前記格納手段により前記保持手段に格納された値を新たな乱数として出力する出力手段とを備えることを特徴とする。
【0009】
これにより、2^n通りのチャレンジデータを生成する乱数生成装置が小規模な回路で実現される。
ここで、前記乱数生成手段をkビットのフリーランカウンタとしたり、前記保持手段をシフトレジスタ等の先入れ先だし方式のキューバッファとしたり、前記保持手段に格納する乱数の桁数を可変としたり、前記乱数生成手段により生成された乱数に対して一定の変換を施した後に前記保持手段に格納したり、前記直前の乱数に対して一定の変換を施した後に再利用したり、前記保持手段に格納された値に対して一定の変換を施したものを新たな乱数として出力したりすることもできる。
【0010】
これにより、よりコンパクトな乱数生成装置の実現が可能となったり、次に生成される乱数の秘匿度が増したりする。
【0011】
【発明の実施の形態】
以下、本発明に係る乱数生成装置について図面を用いて詳細に説明する。
(実施の形態1)
図1は、実施形態1における乱数生成装置の構成を示すブロック図である。
本乱数生成装置は、64ビットのチャレンジデータを生成する乱数生成装置であり、制御部10、カウンタ11及4個のシフトレジスタ12a〜12dから構成される。
【0012】
カウンタ11は、端子C15をMSB、端子C0をLSBとする16ビットのフリーランカウンタであり、電源が投入された時から一定周波数で自ら1ずつインクリメントしている。
4個のシフトレジスタ12a〜12dは、いずれも並列出力端子を有する16ビットのシフトレジスタであり、クロック端子に1個のクロック信号が入力されると右に1ビットシフトする。これらは、直列に接続されて64ビットのシフトレジスタ、即ち、先入れ先だし方式のキューバッファを構成し、ここにチャレンジデータを保持する。なお、シフトレジスタ12aは、カウンタ11の出力C0〜C15と接続された並列入力端子を有し、セット信号が入力されるとその瞬間におけるカウンタ11のカウント値C0〜C15を取り込む。
【0013】
制御部10は、新たなチャレンジデータを生成するための制御を行うものであり、その要求を外部から受けたり、セット信号をシフトレジスタ12aに出力したり、クロック信号を4個のシフトレジスタ12a〜12dに出力したりする。
次に、以上のように構成された本乱数生成装置の動作について説明する。
図2は、制御部10の動作を示すフローチャートである。
【0014】
制御部10は、外部から新たなチャレンジデータを要求する旨の信号を受けると(ステップS20)、4個のシフトレジスタ12a〜12dそれぞれに16個のクロック信号を出力する(ステップS21)。その結果、4個のシフトレジスタ12a〜12dに格納されていた64ビットのチャレンジデータは、右に16ビットシフトする。つまり、旧チャレンジデータの上位48ビットR16〜R63が下位に16ビットだけシフトし新チャレンジデータの下位48ビットR0〜R47に移動する。
【0015】
続いて、制御部10は、シフトレジスタ12aにセット信号を出力する(ステップS22)。その結果、セット信号が出力された瞬間におけるカウンタ11の値がシフトレジスタ12aに並列入力される。つまり、このカウンタの値が新チャレンジデータの上位16ビットR48〜R63となる。
以上のようにして、本乱数生成装置は、カウンタ11からの新たな値を上位16ビットとし、直前のチャレンジデータの上位48ビットを下位48ビットとする64ビットの新たなチャレンジデータを生成する。
【0016】
なお、本乱数生成装置は機器間の認証がランダムな時間に行われることを利用したものである。つまり、チャレンジデータの要求が任意の(ランダムな)タイミングで発生するため、カウンタ11からシフトレジスタ12aに並列入力される値は2^16通りの値をとり得る。そして、他のシフトレジスタ12b〜12dに格納されている値は過去にシフトレジスタ12aに格納されていた値であることを考慮すると、これら全体の64ビットのシフトレジスタ12a〜12dは、2^64通りの値をとり得る。
【0017】
また、4個のシフトレジスタ12a〜12dは、チャレンジデータの生成のためだけでなく、本装置の出力用レジスタとしての機能も兼用している。
従って、本装置は実質的には1個の16ビットカウンタ11だけを用いて64ビットのチャレンジデータを生成する乱数生成装置である、と言うことができる。これにより、小さなハードウェア規模で大きな乱数を生成する装置が実現される。
(実施の形態2)
次に、実施の形態2に係る乱数生成装置について説明する。
【0018】
本実施形態は、実施形態1と同様に64ビットのチャレンジデータを生成する乱数生成装置であるが、常に上位16ビットを固定的に更新した実施形態1と異なり、更新する上位ビット数を可変とすることを特徴とする。実施形態1と相違する点を中心に説明する。
図3は、実施形態2に係る乱数生成装置の構成を示すブロック図である。実施形態1の乱数生成装置と同一の構成要素11、12a〜12dには同一の符号を付けている。
【0019】
本乱数生成装置は、実施形態1に更に1個のシフトレジスタ12eを追加し、実施形態1の制御部10を新たな制御部13に替えたものである。
新たなシフトレジスタ12eは、実施形態1のシフトレジスタ12aと同一機能を有し、実施形態1における4個のシフトレジスタ12a〜12dの上位桁に直列に接続され、セット信号が入力されるとカウンタ11からのカウント値が並列入力される。
【0020】
制御部13は、実施形態1の制御部10が有する機能に加えて有効桁検出部13aを有している。この有効桁検出部13aは、制御部10がセット信号を発した時におけるカウンタ11のカウント値(これは同時にシフトレジスタ12eに並列入力される値に等しい)の有効桁数を検出する。ここで、有効桁とは、リーディングゼロを除く桁をいい、例えば、カウント値が”0001011100101101”である場合には上位3桁のリーディングゼロを除く13桁が有効桁となる。
【0021】
この制御部10は、新たなチャレンジデータの要求を受けるごとに常に16個のクロック信号を発した実施形態1と異なり、有効桁検出部13aにより検出された有効桁数だけのクロック信号を発する。
図4は、制御部10の動作を示すフローチャートである。
外部より新たなチャレンジデータの要求を受けると(ステップS30)、まず、シフトレジスタ12eにセット信号を発する(ステップS31)。その結果、カウンタ11からの16ビットのカウント値は、シフトレジスタ12eに並列入力されると同時に、有効桁検出部13aにも取り込まれる。
【0022】
そして、有効桁検出部13aはそのカウント値の有効桁数を検出する(ステップS32)。
最後に、制御部10は、有効桁検出部13aが検出した有効桁数だけのクロック信号を6個のシフトレジスタ12a〜12eに出力する(ステップS33)。その結果、4個のシフトレジスタ12a〜12dに格納されていた旧チャレンジデータは、そのクロック数に相当する桁数だけ右にシフトされ、新たなチャレンジデータとなる。
【0023】
このように、本実施形態に係る乱数生成装置によれば、旧チャレンジデータの上位に格納される新たなカウント値の桁数が可変(ランダム)であるため、その桁数が固定である実施形態1に比べ、新たなチャレンジデータの予測はより困難になる。
(実施の形態3)
次に、実施の形態3に係る乱数生成装置について説明する。
【0024】
本実施形態は、実施形態1と同様に64ビットのチャレンジデータを生成する乱数生成装置であるが、旧チャレンジデータの上位桁にフリーランカウンタからのカウント値をそのまま入力した実施形態1と異なり、そのカウント値に対して変換を施した後に入力することを特徴とする。
図5は、実施形態3に係る乱数生成装置の構成を示すブロック図である。カウンタ11は実施形態1と同一の機能を有する。
【0025】
データ変換器15は、セット信号が入力されるとその瞬間におけるカウンタ11のカウント値を取り込み、一定の変換を施す。
図6は、このデータ変換器15の変換ロジックの一例を示す図である。
データ変換器15は、鍵データ記憶部1520と15個の排他的論理和部1500〜1515から構成され、入力されたカウント値C0〜15と鍵データ記憶部1520に予め格納された16ビットの秘密鍵データF0〜F15とをビット毎に排他的論理和をとり、その結果を新たな16ビットデータD0〜D15として出力する。
【0026】
4個のレジスタ16a〜16dはそれぞれ16ビット並列入出力のレジスタであり、これらは64ビットのチャレンジデータを保持するためのものであり、パイプラインを構成している。つまり、1個のクロック信号が入力されると、上段のレジスタ(又はデータ変換器15)の値を取り込む。即ち、データ変換器15と4個のレジスタ16a〜16dからなる合計80ビットの保持手段は、一度に16ビットだけ下位にシフトする80ビットのシフトレジスタを構成していると言える。
【0027】
制御部14は、実施形態1の制御部10に相当するものであり、以下の制御を行う。
外部から新たなチャレンジデータを要求する旨の信号を受けると、まず、データ変換器15にセット信号を出力する。その結果、セット信号が出力された瞬間におけるカウンタ11の値がデータ変換器15に取り込まれ、変換が施される。
【0028】
次に、制御部14は、4個のレジスタ16a〜16dに1個のクロック信号を出力する。その結果、4個のレジスタ16a〜16dは、それぞれ直前の上段のデータ変換器15及びレジスタ16a〜16cに格納されていた16ビットデータを取り込む。
これによって、フリーランカウンタ11からのカウント値はデータ変換器15において変換された後に新チャレンジデータの上位16ビットR48〜R63に格納され、旧チャレンジデータの上位48ビットR16〜R63が下位に16ビットだけシフトされて新チャレンジデータの下位48ビットR0〜R47に移動し、その結果、4個のレジスタ16a〜16dに新たなチャレンジデータR0〜R63が生成される。
【0029】
以上のように、実施形態1では旧チャレンジデータを要求した時から新チャレンジデータを要求するまでの時間(フリーランカウンタ11でのインクリメント数)が分かると新チャレンジデータの上位16ビットに格納される値が判明してしまう弱点があったが、本実施形態ではカウンタ11とレジスタ16aとの間に秘密のデータ変換器15が挿入されているために、その値の予測はより困難なものとなる。
(実施の形態4)
次に、実施の形態4に係る乱数生成装置について説明する。
【0030】
本実施形態は、実施形態3と同様に4個の16ビットレジスタ16a〜16dを用いて64ビットのチャレンジデータを生成する乱数生成装置であるが、カウンタ11と最上段のレジスタ16aとの間に変換器を挿入するのではなく、各レジスタ16a〜16d間に変換器を挿入したことを特徴とする。
図7は、実施形態4に係る乱数生成装置の構成を示すブロック図である。
【0031】
実施形態3と異なり、各16ビットレジスタ16a〜16dの間にデータ変換器17a〜17cが挿入され、直列に接続されている。
各データ変換器17a〜17cは、例えば図6に示される変換ロジックを有するものである。
上記4個のレジスタ16a〜16dと3個のデータ変換器17a〜17cは、4段のパイプラインを構成する。即ち、最上段がレジスタ16aとデータ変換器17aとの組であり、第2段がレジスタ16bとデータ変換器17bとの組であり、第3段がレジスタ16cとデータ変換器17cとの組であり、最下段がレジスタ16dである。
【0032】
制御部18は、外部から新たなチャレンジデータを要求する旨の信号を受けると、4個のレジスタ16aに1個のクロック信号を出力する。
その結果、4個のレジスタ16a〜16dはそれぞれ上段のカウンタ11及びデータ変換器17a〜17cからの値を取り込み、その直後にデータ変換器17a〜17cはそれぞれ上段のレジスタ16a〜16cに取り込まれた新たな値を変換する。
【0033】
このようにして、本乱数生成装置では、外部から新たなチャレンジデータを要求する旨の信号が入力されると、フリーランカウンタ11のカウント値が新チャレンジデータの上位16ビットR48〜R63に格納され、旧チャレンジデータの上位48ビットR16〜R63が16ビット単位で変換が施された後に下位に16ビットだけシフトされて新チャレンジデータの下位48ビットR0〜R47に移動し、その結果、4個のレジスタ16a〜16dに新たなチャレンジデータR0〜R63が生成される。
【0034】
以上のように、本実施形態の乱数生成装置は、実施形態1の場合と同様に新たなチャレンジデータを生成する際には旧チャレンジデータの上位48ビットを再利用しているが、16ビット単位で変換を施した後に新チャレンジデータの一部としているので、新チャレンジデータを見ただけでは直前のチャレンジデータが再利用されているとは分かりにくくなっている。
【0035】
なお、本実施形態の3個のデータ変換器17aはいずれも同一の変換ロジックを有したが異なるものであってもよい。これにより、新チャレンジデータの予測をさらに困難なものとすることができる。
(実施の形態5)
次に、実施の形態5に係る乱数生成装置について説明する。
【0036】
本実施形態は、実施形態3と同様に4段のパイプライン(4個の16ビットレジスタ16a〜16d)からなる乱数生成装置であるが、カウンタ11と最上段のレジスタ16aとの間に変換器を挿入するのではなく、各レジスタ16a〜16dの出力に変換器を置いたことを特徴とする。
図8は、実施形態5に係る乱数生成装置の構成を示すブロック図である。
【0037】
カウンタ11、制御部18及び4個のレジスタ16a〜16dは実施形態4のものと同一である。
データ変換器19は、入力された64ビットデータに一定の変換を施し新たな64ビットデータとして出力するものであり、例えば図6に示されるようなデータ変換器15を64ビットに拡張した構成を有する。但し、入力データを16ビット単位のブロックに分割したときに、各ブロックに対する変換が相異なるように、秘密鍵データを設定している。
【0038】
制御部18は、外部から新たなチャレンジデータを要求する旨の信号を受けると、4個のレジスタ16aに1個のクロック信号を出力する。
その結果、4個のレジスタ16a〜16dはそれぞれ上段のカウンタ11及びレジスタ16a〜16cからの値を取り込む。つまり、フリーランカウンタ11のカウント値がレジスタ16aに格納され、3個のレジスタ16b〜16dにはそれぞれ上段のレジスタ16a〜16cの値が格納される。
【0039】
そして、4個のレジスタ16aに格納された新たな64ビットデータは、データ変換器19において変換が施され、新たな64ビットのチャレンジデータとなる。
このように、本実施形態の乱数生成装置は、原理的には実施形態1の乱数生成装置の出力に対して更に秘密の変換を行うデータ変換器19を付加した構成を有するものであり、新たなチャレンジデータの予測は更に困難となる。
【0040】
なお、上記実施形態1〜5の乱数生成装置は、いずれも16ビットのフリーランカウンタ11を備える64ビットのチャレンジデータを生成するものであったが、本発明はこのような数値に限定されるものではない。例えば、32ビットのフリーランカウンタを備える512ビットのチャレンジデータを生成する乱数生成装置とすることもできる。
【0041】
また、フリーランカウンタ11を16ビットの乱数生成装置に置き換えることもできる。例えば第3の従来例のLFSRで実現してもよい。本発明は、フリーランカウンタを用いることを要旨とするのではなく、小さいビット数の乱数を生成する装置を用いてその乱数よりも大きいビット数の乱数を生成することを要旨とするからである。
【0042】
また、本発明は、論理回路を用いたハードウェアにより実現することができるだけでなく、ソフトウェアにより実現することもできるのは言うまでもない。
また、実施形態2の乱数生成装置は、カウント値の有効桁数だけ旧チャレンジデータを右にシフトしたが、シフトする桁数を可変にする方法としてはこの方法に限られず、例えば、カウント値と一定のハッシュ関数から得られるハッシュ値をシフトする桁数とすることもできる。
【0043】
また、実施形態4のデータ変換器17a〜17cは独立した別個のものであっても共通する1個のものであってもよい。変換ロジックは同じであるが、各鍵データ記憶部に格納しておく秘密鍵データだけをそれぞれ異なるものとすることもできる。
さらに、実施形態3〜5におけるデータ変換器15、17a〜17c、19は、図6に示されたような排他的論理和を行うものに限られず、例えば、ビット置換を行うための配線だけからなるものとすることもできる。これにより、回路のコンパクト化や処理の高速化が可能となる。
【0044】
【発明の効果】
以上の説明から明らかなように、本発明はnビットの乱数を生成する乱数生成装置であって、前記乱数を保持するためのnビットの保持手段と、nより小さいkビットの乱数を生成する乱数生成手段と、新たな乱数を生成する旨の指示を受けると前記乱数生成手段により生成されたkビットの乱数の少なくとも一部を前記保持手段のnビットの一部に格納すると共に前記保持手段の残る部分には前記保持手段に保持されていた直前の乱数を再利用した値を格納する格納手段と、前記格納手段により前記保持手段に格納された値を新たな乱数として出力する出力手段とを備えることを特徴とする。
【0045】
つまり、直前の乱数を再利用することで新たな乱数の一部としているので、実質的にnより小さいkビットの乱数生成手段によってnビットもの長い乱数を生成することが可能となる。これにより、チャレンジデータ生成用の乱数生成装置を小規模で実現することが可能となる。
ここで、前記乱数生成手段をkビットのフリーランカウンタとし、前記格納手段は前記指示を受けた時における前記乱数生成手段のカウント値を前記保持手段に格納するとすることもできる。
【0046】
これにより、kビットの乱数生成手段をコンパクトなものとすることができる。
また、前記保持手段をシフトレジスタ等の先入れ先だし方式のキューバッファとし、前記格納手段は前記乱数生成手段により生成された乱数を前記保持手段に格納するとすることもできる。
【0047】
これにより、前記再利用を簡易な回路で実現することが可能となる。
また、前記格納手段が前記保持手段に格納する乱数の桁数を可変とすることもできる。例えば、乱数のうち有効桁の部分のみを格納する等である。
これにより、フリーランカウンタが作動した時間が分かった場合であっても次の乱数の予測が困難となる。
【0048】
また、前記格納手段は前記乱数生成手段により生成された乱数に対して一定の変換を施した後に前記保持手段に格納したり、前記保持手段においてシフトされるkビットデータに対して一定の変換を施した後にシフトさせたり、前記出力手段は前記保持手段に格納された値に対して一定の変換を施した後に新たな乱数として出力したりすることもできる。
【0049】
これにより、直前の乱数に基づいて次の乱数を予測することが困難となり、その秘匿度が増す。
よって、本発明により、小規模の構成で大きな桁数の乱数を生成することができる乱数生成装置が実現され、特にチャレンジ・レスポンス型の機器間認証におけるランダムなチャレンジデータの生成に好適であり、その実用的価値は大きい。
【図面の簡単な説明】
【図1】本発明の実施形態1における乱数生成装置の構成を示すブロック図である。
【図2】図1に示された制御部10の動作を示すフローチャートである。
【図3】本発明の実施形態2における乱数生成装置の構成を示すブロック図である。
【図4】図3に示された制御部13の動作を示すフローチャートである。
【図5】本発明の実施形態3における乱数生成装置の構成を示すブロック図である。
【図6】図5に示されたデータ変換器15の構成を示すブロック図である。
【図7】本発明の実施形態4における乱数生成装置の構成を示すブロック図である。
【図8】本発明の実施形態5における乱数生成装置の構成を示すブロック図である。
【符号の説明】
10 制御部
11 フリーランカウンタ
12a〜12e シフトレジスタ
13、14、18 制御部
13a 有効桁検出部
15、17a〜17c、19 データ変換器
1500〜1515 排他的論理和部
1520 鍵データ記憶部
16a〜16d レジスタ[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a random number generation device, and more particularly to a device that generates challenge data used for authentication between devices using a challenge and a response.
[0002]
[Prior art]
As an authentication method between two devices connected via a communication path, a one-way authentication method using an encryption technique described in the international standard ISO / IEC 9798-2 is usually used.
When a certified device is called a prover and a device that authenticates a prover is called a certifier, this authentication method informs the key itself that the prover has the same secret data as the certifier called the authentication key. It is based on proof to the certifier. For this purpose, first, the certifier selects some data (challenge data) and throws it to the prover. On the other hand, the prover possesses a certain cryptographic conversion and encrypts the challenge data using the authentication key. The encrypted data is returned to the authenticator as a response. The authenticator who has received this response shares the authentication key with the decryption conversion which is the reverse conversion of the encryption conversion, and decrypts the response by the decryption conversion using the authentication key. If this result matches the challenge data, the prover is authenticated as valid.
[0003]
The challenge data in this authentication method is data of a relatively long bit length (n bits: currently 60 bits or more), and it is necessary to be able to take 2 ^ n (2 to the power of n) values as randomly as possible. It is. This is an attack (hereinafter referred to as “table attack”) in which a communication path between devices is monitored (wiretapping) and all combinations of challenges and responses are exploited in a table and used as a fake response to subsequent challenges. ).
<First Conventional Example>
An example of a method for generating challenge data is a method using a counter. An n-bit counter is provided, which is counted up and used for every authentication. The advantage of this method is that as long as the counter continues to operate, the challenge data is guaranteed to be different for each authentication. It cannot be abused to counterfeit the response to the challenge. However, in order to secure this method, a counter having a bit length as long as n bits is required. Further, when applied to an actual device, it is necessary to realize that the contents are not erased even if the counter is turned off.
<Second Conventional Example>
An example of another generation method of challenge data is shown in Japanese Patent Publication No. H8-292931. In this method, the counter is operated in a free run, and is converted and used by a fixed random number generation calculation program during authentication. This is a method utilizing the fact that authentication between actual devices is performed at random timing. If this method is used, even if the counter is reset when the power is turned off, if the timing of use is arbitrary (random), more types of values can be taken as challenge data than in the first conventional example.
[0004]
However, even in this case, the counter needs to have a length of n bits. This is because if the counter is short, the same value is output many times as the counter output, and the table attack is established.
<Third conventional example>
Further, a method of replacing the counter in the second conventional example with a linear feedback shift register (LFSR) that generates an M-sequence in code theory, for example, can be considered. The M series and the LFSR are described in detail, for example, in Hideki Imai, “Code Theory”, edited by the Institute of Electronics, Information and Communication Engineers 1990. This is a method in which the LFSR is operated in a free run, this is stopped at the time of authentication, and challenge data having a required bit length is output from that state.
[0005]
Thereby, unlike the counter in the second conventional example, by keeping the inside of the LFSR secret, it is difficult to predict the next challenge data, and the safety is improved.
However, in order to generate 2 ^ n kinds of challenge data, an LFSR of n bits or more is required. This is because the number of possible value types of the LFSR is the number of possible value types of the output n bits of the random number generation device. For example, when the output of a 20-bit LFSR is 80 bits, the number of types of values that can be taken by this output is not 2 ^ 80 but only 2 ^ 20. In order for the challenge data to take 2 ^ 80 values, it is necessary to provide an 80-bit LFSR.
[0006]
[Problems to be solved by the invention]
As described above, in the above prior art, an n-bit counter and random number generating means are required to generate challenge data that can take 2 ^ n values randomly. In other words, large-scale hardware or software is required to generate secure challenge data suitable for authentication. This hinders product downsizing and authentication circuit LSIs.
[0007]
Therefore, the present invention has been made in view of such a point, and an object thereof is to provide a random number generation device for generating challenge data that can be realized on a small scale.
The “random number” here does not require that the next challenge data cannot be predicted. It is important that the challenge data can take as many values as possible (maximum 2 ^ n ways). Specifically, it aims at providing the random number generator which satisfy | fills the following conditions.
(1) Output data consisting of n bits can take 2 ^ n values.
(2) It can be realized with small hardware.
(3) It is desirable that the next challenge data is not predicted from one challenge data. It is desirable that the inside of the random number generator is not analyzed from the output value.
[0008]
[Means for Solving the Problems]
In order to achieve the above object, the present invention provides a random number generator for generating an n-bit random number, which holds the random number. n-bit Generated by the holding means, a random number generating means for generating a k-bit random number smaller than n, and an instruction to generate a new random number. k-bit random number At least part of Of the holding means n-bit The storage means for storing in part and storing the value obtained by reusing the last random number held in the holding means in the remaining part of the holding means, and the value stored in the holding means by the storage means Output means for outputting as a new random number.
[0009]
Thus, a random number generation device that generates 2 ^ n kinds of challenge data is realized with a small circuit.
Here, the random number generation means is a k-bit free-run counter, the holding means is a first-in first-out queue buffer such as a shift register, or the number of random digits stored in the holding means is variable. The random number generated by the random number generation means is stored in the holding means after being subjected to a certain conversion, reused after being subjected to a certain conversion on the immediately preceding random number, the holding means It is also possible to output a value obtained by performing a certain conversion on the value stored in, as a new random number.
[0010]
As a result, a more compact random number generation device can be realized, or the confidentiality of the next generated random number can be increased.
[0011]
DETAILED DESCRIPTION OF THE INVENTION
Hereinafter, a random number generation device according to the present invention will be described in detail with reference to the drawings.
(Embodiment 1)
FIG. 1 is a block diagram illustrating a configuration of a random number generation device according to the first embodiment.
The random number generation device is a random number generation device that generates 64-bit challenge data, and includes a
[0012]
The
Each of the four
[0013]
The
Next, the operation of the random number generation device configured as described above will be described.
FIG. 2 is a flowchart showing the operation of the
[0014]
When receiving a signal requesting new challenge data from the outside (step S20), the
[0015]
Subsequently, the
As described above, the random number generation device generates 64-bit new challenge data in which the new value from the
[0016]
Note that this random number generation device utilizes the fact that authentication between devices is performed at random times. That is, since a challenge data request is generated at an arbitrary (random) timing, the value input in parallel from the
[0017]
Further, the four
Therefore, it can be said that this apparatus is a random number generation apparatus that generates 64-bit challenge data using only one 16-
(Embodiment 2)
Next, a random number generation device according to Embodiment 2 will be described.
[0018]
The present embodiment is a random number generation device that generates 64-bit challenge data as in the first embodiment. However, unlike the first embodiment in which the upper 16 bits are constantly updated, the number of upper bits to be updated is variable. It is characterized by doing. The description will focus on the differences from the first embodiment.
FIG. 3 is a block diagram illustrating a configuration of the random number generation device according to the second embodiment. The
[0019]
In the random number generation device, one shift register 12e is further added to the first embodiment, and the
The new shift register 12e has the same function as the
[0020]
The control unit 13 includes an effective
[0021]
Unlike the first embodiment in which the
FIG. 4 is a flowchart showing the operation of the
When a new challenge data request is received from the outside (step S30), first, a set signal is issued to the shift register 12e (step S31). As a result, the 16-bit count value from the
[0022]
Then, the valid
Finally, the
[0023]
As described above, according to the random number generation device according to the present embodiment, the number of digits of the new count value stored above the old challenge data is variable (random), and therefore the number of digits is fixed. Compared to 1, prediction of new challenge data becomes more difficult.
(Embodiment 3)
Next, a random number generation device according to Embodiment 3 will be described.
[0024]
This embodiment is a random number generation device that generates 64-bit challenge data as in the first embodiment, but unlike the first embodiment in which the count value from the free-run counter is directly input to the upper digits of the old challenge data, The count value is inputted after being converted.
Figure 5 These are block diagrams which show the structure of the random number generator which concerns on Embodiment 3. FIG. The
[0025]
When the set signal is input, the
FIG. 6 is a diagram illustrating an example of the conversion logic of the
The
[0026]
Each of the four
[0027]
The
When a signal for requesting new challenge data is received from the outside, first, a set signal is output to the
[0028]
Next, the
As a result, the count value from the
[0029]
As described above, in the first embodiment, when the time from when the old challenge data is requested to when the new challenge data is requested (increment number in the free-run counter 11) is known, it is stored in the upper 16 bits of the new challenge data. Although there is a weak point that the value is known, in this embodiment, since the
(Embodiment 4)
Next, a random number generation device according to Embodiment 4 will be described.
[0030]
The present embodiment is a random number generation device that generates 64-bit challenge data using four 16-
FIG. 7 is a block diagram illustrating a configuration of a random number generation device according to the fourth embodiment.
[0031]
Unlike the third embodiment,
Each of the
The four
[0032]
When receiving a signal for requesting new challenge data from the outside, the
As a result, the four
[0033]
In this way, in this random number generation device, when a signal for requesting new challenge data is input from the outside, the count value of the free-
[0034]
As described above, the random number generation device of the present embodiment reuses the upper 48 bits of the old challenge data when generating new challenge data as in the case of the first embodiment. Since it is part of the new challenge data after the conversion in, it is difficult to understand that the previous challenge data is reused just by looking at the new challenge data.
[0035]
Note that the three
(Embodiment 5)
Next, a random number generation device according to Embodiment 5 will be described.
[0036]
The present embodiment is a random number generation device including four stages of pipelines (four 16-
FIG. 8 is a block diagram illustrating a configuration of a random number generation device according to the fifth embodiment.
[0037]
The
The
[0038]
When receiving a signal for requesting new challenge data from the outside, the
As a result, the four
[0039]
The new 64-bit data stored in the four
As described above, the random number generation device according to the present embodiment has a configuration in which the
[0040]
The random number generation devices according to the first to fifth embodiments generate 64-bit challenge data including the 16-bit free-
[0041]
The free-
[0042]
It goes without saying that the present invention can be realized not only by hardware using a logic circuit but also by software.
In addition, the random number generation device of the second embodiment has shifted the old challenge data to the right by the number of significant digits of the count value. However, the method of changing the number of digits to be shifted is not limited to this method. The hash value obtained from a certain hash function may be the number of digits to be shifted.
[0043]
In addition, the
Furthermore, the
[0044]
【The invention's effect】
As is apparent from the above description, the present invention is a random number generation device for generating an n-bit random number, which holds the random number. n-bit Generated by the holding means, a random number generating means for generating a k-bit random number smaller than n, and an instruction to generate a new random number. k-bit random number At least part of Of the holding means n-bit The storage means for storing in part and storing the value obtained by reusing the last random number held in the holding means in the remaining part of the holding means, and the value stored in the holding means by the storage means Output means for outputting as a new random number.
[0045]
That is, since the immediately preceding random number is reused as a part of a new random number, a random number as long as n bits can be generated by a k-bit random number generating means substantially smaller than n. This makes it possible to realize a random number generator for generating challenge data on a small scale.
Here, the random number generation means may be a k-bit free-run counter, and the storage means may store the count value of the random number generation means when the instruction is received in the holding means.
[0046]
Thereby, the k-bit random number generation means can be made compact.
The holding means may be a first-in first-out queue buffer such as a shift register, and the storage means may store the random number generated by the random number generation means in the holding means.
[0047]
Thereby, the reuse can be realized with a simple circuit.
Further, the number of random numbers stored in the holding unit by the storage unit may be variable. For example, only the significant digit portion of the random number is stored.
This makes it difficult to predict the next random number even when the time when the free-run counter is activated is known.
[0048]
The storage means performs constant conversion on the random number generated by the random number generation means, and then stores the random number in the holding means, or performs constant conversion on k-bit data shifted in the holding means. The output means can also shift the value, or the output means can perform a certain conversion on the value stored in the holding means and output it as a new random number.
[0049]
This makes it difficult to predict the next random number based on the immediately preceding random number and increases the degree of secrecy.
Therefore, according to the present invention, a random number generation device capable of generating a random number having a large number of digits with a small configuration is realized, and is particularly suitable for generating random challenge data in challenge-response type inter-device authentication. Its practical value is great.
[Brief description of the drawings]
FIG. 1 is a block diagram illustrating a configuration of a random number generation device according to a first embodiment of the present invention.
FIG. 2 is a flowchart showing an operation of the
FIG. 3 is a block diagram showing a configuration of a random number generation device according to Embodiment 2 of the present invention.
4 is a flowchart showing the operation of the control unit 13 shown in FIG.
FIG. 5 is a block diagram showing a configuration of a random number generation device according to Embodiment 3 of the present invention.
6 is a block diagram showing a configuration of the
FIG. 7 is a block diagram showing a configuration of a random number generation device according to Embodiment 4 of the present invention.
FIG. 8 is a block diagram illustrating a configuration of a random number generation device according to a fifth embodiment of the present invention.
[Explanation of symbols]
10 Control unit
11 Free run counter
12a to 12e shift register
13, 14, 18 Control unit
13a Effective digit detector
15, 17a-17c, 19 Data converter
1500 to 1515 Exclusive OR part
1520 Key data storage unit
16a-16d registers
Claims (9)
前記乱数を保持するためのnビットの保持手段と、
nより小さいkビットの乱数を生成する乱数生成手段と、
新たな乱数を生成する旨の指示を受けると前記乱数生成手段により生成されたkビットの乱数の少なくとも一部を前記保持手段のnビットの一部に格納すると共に前記保持手段の残る部分には前記保持手段に保持されていた直前の乱数を再利用した値を格納する格納手段と、
前記格納手段により前記保持手段に格納された値を新たな乱数として出力する出力手段と
を備えることを特徴とする乱数生成装置。A random number generator for generating an n-bit random number,
N-bit holding means for holding the random number;
random number generating means for generating a k-bit random number smaller than n;
When an instruction to generate a new random number is received, at least a part of the k-bit random number generated by the random number generation unit is stored in a part of the n bits of the holding unit, and the remaining part of the holding unit Storage means for storing a value obtained by reusing the immediately preceding random number held in the holding means;
A random number generation device comprising: output means for outputting a value stored in the holding means by the storage means as a new random number.
前記格納手段は前記指示を受けた時における前記乱数生成手段のカウント値を前記保持手段に格納する
ことを特徴とする請求項1記載の乱数生成装置。The random number generating means is a k-bit free-run counter;
The random number generation device according to claim 1, wherein the storage unit stores the count value of the random number generation unit when the instruction is received in the holding unit.
前記格納手段は前記乱数生成手段により生成された乱数を前記保持手段に格納する
ことを特徴とする請求項2記載の乱数生成装置。The holding means is a first-in first-out queue buffer,
3. The random number generation device according to claim 2, wherein the storage unit stores the random number generated by the random number generation unit in the holding unit.
ことを特徴とする請求項3記載の乱数生成装置。4. The random number generation device according to claim 3, wherein the number of digits of random numbers stored in the storage unit by the storage unit is variable.
ことを特徴とする請求項4記載の乱数生成装置。5. The random number generation device according to claim 4, wherein the storage unit stores a significant digit portion of the random numbers generated by the random number generation unit in the holding unit.
ことを特徴とする請求項1記載の乱数生成装置。2. The random number generation device according to claim 1, wherein the storage means stores a predetermined conversion on the random number generated by the random number generation means and then stores the random number in the holding means.
前記格納手段は前記乱数生成手段により生成されたkビットの乱数を前記保持手段に格納すると共にシフトされるkビットデータに対して一定の変換を施した後にシフトさせる
ことを特徴とする請求項1記載の乱数生成装置。The holding means is a register that shifts in units of k bits;
2. The storage unit stores the k-bit random number generated by the random number generation unit in the holding unit and shifts the k-bit data to be shifted after performing certain conversion on the shifted k-bit data. The random number generator described.
ことを特徴とする請求項1記載の乱数生成装置。2. The random number generation device according to claim 1, wherein the output means outputs a new random number after performing a certain conversion on the value stored in the holding means.
請求項1に記載の乱数生成装置により生成されるnビットの新たな乱数をチャレンジデータとし、前記チャレンジデータを用いてチャレンジ−レスポンス方式により相手の正当性を認証するA new n-bit random number generated by the random number generation device according to claim 1 is used as challenge data, and the authenticity of the other party is authenticated by a challenge-response method using the challenge data.
ことを特徴とする認証装置。An authentication apparatus characterized by that.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP04936997A JP3606418B2 (en) | 1997-03-04 | 1997-03-04 | Random number generator |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP04936997A JP3606418B2 (en) | 1997-03-04 | 1997-03-04 | Random number generator |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPH10247140A JPH10247140A (en) | 1998-09-14 |
| JP3606418B2 true JP3606418B2 (en) | 2005-01-05 |
Family
ID=12829120
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP04936997A Expired - Fee Related JP3606418B2 (en) | 1997-03-04 | 1997-03-04 | Random number generator |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP3606418B2 (en) |
Families Citing this family (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6883717B1 (en) * | 2004-04-14 | 2005-04-26 | International Business Machines Corporation | Secure credit card employing pseudo-random bit sequences for authentication |
| JP4734089B2 (en) | 2005-10-27 | 2011-07-27 | 日立オートモティブシステムズ株式会社 | Car terminal |
| JP5171420B2 (en) * | 2008-06-18 | 2013-03-27 | ルネサスエレクトロニクス株式会社 | Pseudo random number generator |
| JP5786705B2 (en) * | 2011-12-23 | 2015-09-30 | 株式会社オートネットワーク技術研究所 | Control device |
| US9182943B2 (en) * | 2013-03-08 | 2015-11-10 | Qualcomm Incorporated | Methods and devices for prime number generation |
| JP6617556B2 (en) | 2013-07-04 | 2019-12-11 | 凸版印刷株式会社 | Device and authentication system |
-
1997
- 1997-03-04 JP JP04936997A patent/JP3606418B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JPH10247140A (en) | 1998-09-14 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7659837B2 (en) | Operation processing apparatus, operation processing control method, and computer program | |
| EP1821196B1 (en) | Method and apparatus for seeding a cryptographic random number generator | |
| KR100377172B1 (en) | Key Scheduller of encryption device using data encryption standard algorithm | |
| JPH10322327A (en) | Encryption communication system | |
| Sleem et al. | TestU01 and Practrand: Tools for a randomness evaluation for famous multimedia ciphers | |
| JP2011103686A (en) | Method for making secure electronic entity with encrypted access | |
| WO2005073842A1 (en) | Pseudo random number generation device and pseudo random number generation program | |
| JP2005107078A (en) | Encryption processing system, encryption processing method, and computer program | |
| JP2002032018A (en) | Ciphering device using standard algorithm for ciphering data | |
| JP3586475B2 (en) | Method and circuit device for generating pseudo-random number sequence | |
| JP6287785B2 (en) | Cryptographic processing apparatus, cryptographic processing method, and program | |
| WO2022029443A1 (en) | Method and apparatus for reducing the risk of successful side channel and fault injection attacks | |
| RU2141729C1 (en) | Method for encrypting of binary data units | |
| JP3606418B2 (en) | Random number generator | |
| EP1351430A1 (en) | Expansion key generating device, encryption device and encryption system | |
| KR101136973B1 (en) | device and method for offering integrated security | |
| Turan et al. | Statistical analysis of synchronous stream ciphers | |
| JP2004054128A (en) | Encrypting system | |
| JP2005134478A (en) | Encryption processing device, encryption processing method, and computer program | |
| RU2188513C2 (en) | Method for cryptographic conversion of l-bit digital-data input blocks into l-bit output blocks | |
| JP2002217898A (en) | Pseudo random number generating system | |
| JP2006025366A (en) | Encryption apparatus and semiconductor integrated circuit | |
| JP4857230B2 (en) | Pseudorandom number generator and encryption processing device using the same | |
| JP2005031471A (en) | Encryption processing device and encryption processing method | |
| JP2003084668A (en) | Random number generating device, random number generating method and random number generating program |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20040415 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20040420 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20040621 |
|
| 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: 20040928 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20040930 |
|
| R150 | Certificate of patent or registration of utility model |
Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20071015 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20081015 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091015 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20091015 Year of fee payment: 5 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20101015 Year of fee payment: 6 |
|
| LAPS | Cancellation because of no payment of annual fees |