JP6678926B2 - Random number generation device, random number generation method, and random number generation program - Google Patents

Random number generation device, random number generation method, and random number generation program Download PDF

Info

Publication number
JP6678926B2
JP6678926B2 JP2016133851A JP2016133851A JP6678926B2 JP 6678926 B2 JP6678926 B2 JP 6678926B2 JP 2016133851 A JP2016133851 A JP 2016133851A JP 2016133851 A JP2016133851 A JP 2016133851A JP 6678926 B2 JP6678926 B2 JP 6678926B2
Authority
JP
Japan
Prior art keywords
random number
function
approximation function
number generation
candidate 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.)
Active
Application number
JP2016133851A
Other languages
Japanese (ja)
Other versions
JP2018005702A (en
Inventor
裕貴 太中
裕貴 太中
良範 青野
良範 青野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
National Institute of Information and Communications Technology
Original Assignee
NEC Corp
National Institute of Information and Communications Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp, National Institute of Information and Communications Technology filed Critical NEC Corp
Priority to JP2016133851A priority Critical patent/JP6678926B2/en
Publication of JP2018005702A publication Critical patent/JP2018005702A/en
Application granted granted Critical
Publication of JP6678926B2 publication Critical patent/JP6678926B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、離散ガウス分布に従う乱数を生成する、乱数生成装置、乱数生成方法、および乱数生成プログラムに関する。   The present invention relates to a random number generation device, a random number generation method, and a random number generation program that generate random numbers that follow a discrete Gaussian distribution.

まず、離散ガウス分布を定義する。実数の集合に属する実数値sにより定まる函数

Figure 0006678926
として、整数の集合に属する整数値uを確率
Figure 0006678926
で出力した分布を、分散値がsの離散ガウス分布と呼ぶ。ここで、πは円周率を表し、expは自然対数の底を表す。 First, the discrete Gaussian distribution is defined. A function determined by the real value s belonging to the set of real numbers
Figure 0006678926
Where the probability u is an integer value u belonging to the set of
Figure 0006678926
The distribution output by is called a discrete Gaussian distribution with variance s. Here, π represents the pi and exp represents the base of the natural logarithm.

この離散ガウス分布に従って生成された乱数は、格子暗号に用いられる(例えば、非特許文献1参照)。格子暗号は耐量子暗号として期待され、計算効率が良く、機能性の高い暗号スキームとして研究されている暗号システムである。   Random numbers generated according to this discrete Gaussian distribution are used for lattice cryptography (see Non-Patent Document 1, for example). Lattice cryptography is a cryptographic system that is expected as quantum resistant cryptography, and is being studied as a cryptographic scheme with high computational efficiency and high functionality.

離散ガウス分布は全ての整数値を取りうる確率分布である。離散ガウス分布を格子暗号として用いる場合、次のように、分布の出力する整数値の範囲を、自然数の集合に属する、セキュリティパラメータnに依存する形で制限する事で、確率変数の生成を効率化する事が多い。つまり、

Figure 0006678926
として
Figure 0006678926
を離散ガウス分布の出力範囲とする。分布が出力する整数の範囲をこのように制限しても、格子暗号の安全性に影響を与えないことが知られている。 The discrete Gaussian distribution is a probability distribution that can take all integer values. When a discrete Gaussian distribution is used as a lattice cipher, the random variable range can be efficiently generated by limiting the range of integer values output by the distribution in a form that depends on the security parameter n, which belongs to the set of natural numbers, as follows. It often turns into. That is,
Figure 0006678926
As
Figure 0006678926
Let be the output range of the discrete Gaussian distribution. It is known that limiting the range of integers output by the distribution does not affect the security of lattice cryptography.

正規化定数Wを

Figure 0006678926
と定義するとき、分布が出力する整数の範囲を上述のように制限した離散ガウス分布は、
Figure 0006678926
とおき、このΨ(x)を用いて、整数の集合に属する整数値uを確率Ψ(u)で出力する。 Normalization constant W
Figure 0006678926
, The discrete Gaussian distribution that limits the range of integers output by the distribution as described above is
Figure 0006678926
Then, using this Ψ (x), the integer value u belonging to the set of integers is output with probability Ψ (u).

そこで本明細書では、以下「離散ガウス分布」といったら、分布が出力する整数の範囲が

Figure 0006678926
であり、整数の集合に属する整数値uを確率Ψ(u)で出力する確率分布を指すものとする。 Therefore, in this specification, the range of integers output by the distribution is referred to as “discrete Gaussian distribution” below.
Figure 0006678926
And the probability distribution that outputs the integer value u belonging to the set of integers with probability ψ (u).

また、函数

Figure 0006678926
を、「離散ガウス分布を定める函数」と呼ぶことにする。 Also, the function
Figure 0006678926
Will be called a "function that determines the discrete Gaussian distribution".

離散ガウス分布に従う乱数生成方法として、累積法と棄却サンプル法との二つが知られている。ここでは、離散ガウス分布を定める函数をφ(x)とし、分布の生成範囲を

Figure 0006678926
とする。 As a random number generation method according to the discrete Gaussian distribution, two methods are known: a cumulative method and a rejection sampling method. Here, the function that determines the discrete Gaussian distribution is φ (x), and the generation range of the distribution is
Figure 0006678926
And

まず累積法について、非特許文献2の記載に基づいて説明する。図7に示すように、この非特許文献2に開示された、第1の関連技術に係る離散ガウス分布に従う乱数生成装置200は、記憶装置210と、探索器220と、一様乱数生成器230とから成る。   First, the cumulative method will be described based on the description in Non-Patent Document 2. As shown in FIG. 7, the random number generation device 200 according to the first related technique disclosed in Non-Patent Document 2 that follows the discrete Gaussian distribution is a storage device 210, a searcher 220, and a uniform random number generation device 230. It consists of and.

このような構成を有する、第1の関連技術の離散ガウス分布に従う乱数生成装置200は、次のように動作する。   The random number generation device 200 according to the discrete Gaussian distribution of the first related technique having such a configuration operates as follows.

まず、乱数生成装置200は、値

Figure 0006678926
を事前計算し、記憶装置210に記憶しておく。次に、一様乱数生成器230が実数値x∈[0,1]を出力する。一様乱数生成器230から出力された、実数の集合に属する実数値xは、探索器220に送られる。 First, the random number generation device 200
Figure 0006678926
Is calculated in advance and stored in the storage device 210. Next, the uniform random number generator 230 outputs a real value xε [0,1]. The real number x belonging to the set of real numbers output from the uniform random number generator 230 is sent to the searcher 220.

探索器220は、記憶装置210に記憶されている値から、φ(z - 1)≦x≦φ(z)なる、整数の集合に属する整数値zを二分探索し、符号sign=±を一様に選び、整数の集合に属する

Figure 0006678926
を出力する。
以上が累積法による離散ガウス分布に従う乱数生成方法である。 The searcher 220 searches the values stored in the storage device 210 for an integer value z, which belongs to a set of integers, φ (z-1) ≦ x ≦ φ (z), and divides the sign sign = ± by one. And belong to a set of integers
Figure 0006678926
Is output.
The above is the random number generation method according to the discrete Gaussian distribution by the cumulative method.

累積法では記憶装置210に記憶するデータ

Figure 0006678926
の数がtσに比例する。よって、累積法は、メモリ量が制限された装置上で、分散値σの大きい離散ガウス分布を生成することができないという問題がある。分散σは既存の格子暗号では大きな値になっている。具体的なメモリ量は、たとえば、非特許文献3では、下記の表1のようになっている。 Data stored in the storage device 210 in the cumulative method
Figure 0006678926
The number of is proportional to tσ. Therefore, the cumulative method has a problem in that it is not possible to generate a discrete Gaussian distribution with a large variance value σ on a device with a limited amount of memory. The variance σ has a large value in the existing lattice cryptography. In the non-patent document 3, for example, the specific memory amount is as shown in Table 1 below.

Figure 0006678926
Figure 0006678926

格子暗号は、RSA(Rivest-Shamir-Adleman)方式をはじめとした周知の暗号方式も計算量が少ない為、センサ機器や携帯電話のような計算資源や記憶容量が小さいデバイスでの利用が期待されている。しかしながら、格子暗号のサブルーチンである離散ガウス分布の生成に累積法を用いた場合、累積法で必要とするデータの保存に多くの記憶容量を使ってしまう。そのため、格子暗号をこのようなデバイスでは利用できなくなってしまう。   Lattice cryptography is also expected to be used in devices with small computing resources and storage capacity, such as sensor devices and mobile phones, because well-known cryptographic methods such as the RSA (Rivest-Shamir-Adleman) method have a small amount of calculation. ing. However, when the cumulative method is used to generate the discrete Gaussian distribution, which is a subroutine of lattice cryptography, a large storage capacity is used to store the data required by the cumulative method. Therefore, the lattice cipher cannot be used in such a device.

次に、棄却サンプル法について説明する。棄却サンプル法は離散ガウス分布に限らず、任意の離散型確率分布に従った乱数を生成する際に適応できるものである。そこで、まず一般の離散型確率分布に従った確率変数Xに対する棄却サンプル法を、非特許文献4にしたがって説明する。その後で、離散ガウス分布に従った乱数を生成する棄却サンプル法について説明する。   Next, the rejection sampling method will be described. The rejection sampling method is applicable not only to the discrete Gaussian distribution but also to the generation of random numbers according to any discrete probability distribution. Therefore, first, a rejection sampling method for a random variable X according to a general discrete type probability distribution will be described according to Non-Patent Document 4. After that, the reject sampling method for generating random numbers according to the discrete Gaussian distribution will be described.

離散型確率分布p(X=xi)に従う乱数を、棄却サンプル法を利用して生成するには、以下のようにする。 To generate random numbers that follow the discrete probability distribution p (X = x i ) using the reject sampling method, do the following.

まず、すべてのxに対して、t(xi)≧p(xi)を満足する函数t(x)で、函数t(x)を効率的に計算できるものを準備し、正規化をおこなったr(x)=t(x)/Σt(xi)とおく。 First, for all x i , prepare a function t (x) satisfying t (x i ) ≧ p (x i ) that can efficiently calculate the function t (x), and normalize it. Let r (x) = t (x) / Σt (x i ) performed.

次の手順により、確率変数Xに対する離散型分布p(X=xi)(確率分布函数)に従う乱数の棄却サンプル法を行う。
(Step 1) 確率分布函数rをもつ乱数Yを生成する。
(Step 2) Yとは独立に区間[0,1]の一様乱数Uを発生させる。
(Step 3) U≦p(Y)/t(Y)を満たす場合は乱数としてX=Yとする。満たさない場合は(Step1)にもどる。
By the following procedure, the random sampling rejection method according to the discrete distribution p (X = x i ) (probability distribution function) for the random variable X is performed.
(Step 1) Generate a random number Y with probability distribution function r.
(Step 2) Generate a uniform random number U in the interval [0,1] independently of Y.
(Step 3) When U ≦ p (Y) / t (Y) is satisfied, X = Y is set as a random number. If not satisfied, return to (Step 1).

次に離散ガウス分布に従う乱数を生成する方法を、非特許文献5に基づいて説明する。なお、非特許文献5に開示された方法を、後述する本発明のそれと比較するため、非特許文献5に開示された方法を実現するための装置構成についても付記する。   Next, a method of generating random numbers according to the discrete Gaussian distribution will be described based on Non-Patent Document 5. In addition, in order to compare the method disclosed in Non-Patent Document 5 with that of the present invention described later, a device configuration for realizing the method disclosed in Non-Patent Document 5 will be additionally described.

非特許文献5では、上述した棄却サンプル法を函数t(x)が恒等的に1である場合に対して適応したものである。   In Non-Patent Document 5, the above rejection sampling method is applied to the case where the function t (x) is identity 1.

図8に示すように、この非特許文献5に開示された、第2の関連技術に係る離散ガウス分布に従う乱数生成装置300は、棄却判定器310と、乱数生成器320と、出力装置330とからなる。このような構成を有する、第2の関連技術の離散ガウス分布に従う乱数生成装置300は次のように動作する。   As shown in FIG. 8, a random number generation device 300 according to the second related technique disclosed in Non-Patent Document 5 that follows the discrete Gaussian distribution includes a rejection determination unit 310, a random number generation unit 320, and an output unit 330. Consists of. The random number generation device 300 according to the discrete Gaussian distribution of the second related technology having such a configuration operates as follows.

すなわち、乱数生成器320が、整数の集合に属する

Figure 0006678926
の範囲で、整数の集合に属する一様乱数u1(整数値)を生成する。次に、乱数生成器320は、[0,φ(0)]の範囲で、実数の集合に属する実数値乱数u2を生成する。 That is, the random number generator 320 belongs to a set of integers.
Figure 0006678926
Generates a uniform random number u 1 (integer value) belonging to the set of integers in the range. Next, the random number generator 320 generates a real number random number u 2 belonging to the set of real numbers in the range of [0, φ (0)].

次に、整数の集合に属する一様乱数u1と実数の集合に属する実数値乱数u2とが棄却判定器310に入力される。棄却判定器310は、φ(u1)と実数の集合に属するu2とを比較し、u2≦φ(u1)なら整数の集合に属するu1を出力する。 Next, the uniform random number u 1 belonging to the set of integers and the real number random number u 2 belonging to the set of real numbers are input to the rejection decision unit 310. Rejection determiner 310 compares φ (u 1 ) with u 2 belonging to the set of real numbers, and outputs u 1 belonging to the set of integers if u 2 ≦ φ (u 1 ).

そうでなければ、乱数生成装置300は、最初のステップに戻り、同じ操作をやり直す。   Otherwise, the random number generation device 300 returns to the first step and repeats the same operation.

以上が棄却サンプル法による離散ガウス分布に従う乱数生成方法である。この棄却サンプル法に関する課題は、棄却されるごとにガウス分布関数を計算しなければならないので、計算効率がわるくなる点である。   The above is the random number generation method according to the discrete Gaussian distribution by the rejection sample method. The problem with this rejected sampling method is that the Gaussian distribution function has to be calculated each time it is rejected, so the calculation efficiency becomes poor.

また、本発明に関連する先行技術文献(特許文献)も知られている。   Further, prior art documents (patent documents) related to the present invention are also known.

例えば、特許文献1は、秘密鍵共有の暗号システムに用いられる相関乱数を発生する相関乱数発生装置を開示している。この特許文献1に開示された相関乱数発生装置は、駆動用不規則信号発生部と、駆動用不規則信号伝送部と、第1乱数発生部と、第2乱数発生部とから構成される。第1乱数発生部は、乱数用不規則信号生成部と、パラメータ値生成部と、量子化部とを含んで構成される。また、第2乱数発生部も、乱数用不規則信号生成部と、パラメータ値生成部と、量子化部とを含んで構成される。量子化部は、乱数用不規則信号を量子化して離散化された乱数を出力する。   For example, Patent Document 1 discloses a correlation random number generation device that generates a correlation random number used in a secret key sharing cryptosystem. The correlated random number generating device disclosed in Patent Document 1 includes a driving irregular signal generating unit, a driving irregular signal transmitting unit, a first random number generating unit, and a second random number generating unit. The first random number generation unit includes an irregular signal generation unit for random numbers, a parameter value generation unit, and a quantization unit. The second random number generator also includes an irregular signal generator for random numbers, a parameter value generator, and a quantizer. The quantizer quantizes the random signal for random number and outputs a discretized random number.

特許文献2は、得られる計算結果の精度を保証する損失分布計算システムを開示している。指定された頻度分布の累積分布函数をPf(・)と書くこととする。また、Pf(・)の確率函数(確率質量函数)をpf(・)と書くことにする。指定された規模分布の累積分布函数をPs(・)と書くこととする。また、Ps(・)が離散分布の場合は、その確率函数(確率質量函数)をps(・)、Psが連続分布の場合は、その確率密度関数をPs(・)と書くことにする。損失分布計算システムは、頻度分布蓄積手段と、規模分布蓄積手段と、規模分布離散化手段と、離散化規模分布蓄積手段とを含む。入力された頻度分布の情報は、頻度分布蓄積手段に蓄積される。規模分布離散化手段は、規模分布蓄積手段に蓄積されている規模分布Ps(・)に対して、上側離散化、または下側離散化、またはその両方をおこない、上側離散化規模分布Us(・)、または下側離散化規模分布Ds(・)、またはその両方を生成し、離散化規模分布蓄積手段に蓄積する。   Patent Document 2 discloses a loss distribution calculation system that guarantees the accuracy of the obtained calculation result. The cumulative distribution function of the specified frequency distribution will be written as Pf (·). Also, the probability function (probability mass function) of Pf (•) will be written as pf (•). The cumulative distribution function of the specified scale distribution is written as Ps (·). If Ps (·) is a discrete distribution, its probability function (probability mass function) is ps (·), and if Ps is a continuous distribution, its probability density function is Ps (·). The loss distribution calculation system includes frequency distribution accumulating means, scale distribution accumulating means, scale distribution discretizing means, and discretized scale distribution accumulating means. The input frequency distribution information is stored in the frequency distribution storage means. The size distribution discretization means performs an upper discretization, a lower discretization, or both on the size distribution Ps (•) stored in the size distribution storage means, and an upper discretized scale distribution Us (•). ), Or the lower discretized scale distribution Ds (·), or both of them, and accumulates them in the discretized scale distribution accumulating means.

特開2008−070636号公報JP, 2008-070636, A 国際公開第2011/037169号International Publication No. 2011/037169

Regev “On lattices, learning with errors, random linear codes, and cryptography ”, STOC 2005, ACM (2005), 84-93Regev “On lattices, learning with errors, random linear codes, and cryptography”, STOC 2005, ACM (2005), 84-93 Chris Peikert “An efficient and parallel Gaussian Sampler for lattices. ” , CRYPTO, 2010, pages 80-97Chris Peikert “An efficient and parallel Gaussian Sampler for lattices.”, CRYPTO, 2010, pages 80-97 DWARAKANATH , GALBRAITH “Sampling From Discrete Gaussians for Lattice-Based Cryptography on a Constrained Device ”DWARAKANATH, GALBRAITH “Sampling From Discrete Gaussians for Lattice-Based Cryptography on a Constrained Device” 四辻哲章 “計算機シュミレーションのための確率分布乱数生成法 ” 92ページ~93ページTetsuaki Shitsuji “Probability Distribution Random Number Generation Method for Computer Simulation” Page 92-93 Craig Gentry, Chris Peikert , Vinod Vaikuntanathan “ How to Use a Short Basis: Trapdoors for Hard Lattices and New Cryptographic Constructions ”, STOC, 2008, pages 197-206Craig Gentry, Chris Peikert, Vinod Vaikuntanathan “How to Use a Short Basis: Trapdoors for Hard Lattices and New Cryptographic Constructions”, STOC, 2008, pages 197-206

離散ガウス分布に従う乱数生成方法には、上述したように、累積法と棄却サンプル法とがあるが、以下に、それぞれの課題を順番に述べる。   As described above, the random number generation method according to the discrete Gaussian distribution includes the cumulative method and the reject sample method, and the respective problems will be described in order below.

累積法に関しての問題点は、記憶領域が限られた装置上で、分散値の大きい離散ガウス分布に従う乱数を生成することが、非効率的にしか生成できないということである。その理由は、記憶領域が限られた装置では記憶領域に記憶すべき値

Figure 0006678926
をすべて記憶することができないからである。 The problem with the accumulation method is that it is inefficient to generate random numbers that follow a discrete Gaussian distribution with a large variance on a device with a limited storage area. The reason is that the value that should be stored in the storage area in a device with a limited storage area.
Figure 0006678926
Because it cannot remember all.

棄却サンプル法に関しての問題点は、離散ガウス分布に従う乱数の生成速度が遅い点である。その理由は、棄却されるごとにガウス分布函数を計算しなければならないので、計算効率がわるくなるからである。   A problem with the rejected sampling method is that the generation rate of random numbers that follow the discrete Gaussian distribution is slow. The reason is that the Gaussian distribution function has to be calculated each time it is rejected, and the calculation efficiency becomes poor.

尚、特許文献1は、与えられた確率分布にしたがって乱数を生成する装置を開示しているにすぎない。   Note that Patent Document 1 merely discloses a device that generates a random number according to a given probability distribution.

特許文献2は、規模分布に対して、上側離散化規模分布、または下側離散化規模分布、またはその両方を生成する技術的思想を開示しているに過ぎない。   Patent Document 2 merely discloses a technical idea of generating an upper discretized scale distribution, a lower discretized scale distribution, or both with respect to the scale distribution.

本発明の目的は、上述したいずれかの課題を解決する、乱数生成装置、乱数生成方法、および乱数生成プログラムを提供することにある。   An object of the present invention is to provide a random number generation device, a random number generation method, and a random number generation program that solve any of the problems described above.

本発明の乱数生成装置は、与えられた確率分布にしたがって乱数を生成する乱数生成装置であって、乱数データを生成する乱数生成器と;前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算部と;前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する第一評価部と;を備えることを特徴とする。   A random number generation device of the present invention is a random number generation device that generates random numbers according to a given probability distribution, and a random number generator that generates random number data; and a cumulative distribution function of the probability distribution above and below, respectively. One of the upper approximation function and the lower approximation function of the sandwiched form is possessed as the first approximation function, and the first rounding value obtained by taking the integer rounding by applying the inverse function of the first approximation function to the random number data A candidate calculator that calculates and outputs the first rounded value as output candidate data; owns the other of the upper approximation function and the lower approximation function as a second approximation function, receives the output candidate data, and outputs the random number. The inverse function of the second approximation function is applied to the data, a second rounding value obtained by taking integer rounding is calculated, it is determined whether the second rounding value is equal to the output candidate data, and the Rounding value When equal to said output candidate data, the first evaluation portion outputs the output candidate data as said random number; characterized in that it comprises a.

本発明の乱数生成方法は、与えられた確率分布にしたがって乱数を生成する乱数生成方法であって、乱数生成器が、乱数データを生成し;候補計算部が、前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力し;第一評価部が、前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する、ことを特徴とする。   The random number generation method of the present invention is a random number generation method for generating random numbers according to a given probability distribution, in which a random number generator generates random number data; a candidate calculation unit calculates a cumulative distribution function of the probability distribution. One of the upper approximation function and the lower approximation function sandwiched between the upper side and the lower side, respectively, is possessed as the first approximation function, and the inverse function of the first approximation function is applied to the random number data to obtain an integer rounding. A first rounding value to be calculated and output the first rounding value as output candidate data; the first evaluation unit owns the other of the upper approximation function and the lower approximation function as a second approximation function, and The output candidate data is received, the inverse function of the second approximation function is applied to the random number data, the second rounding value obtained by taking the integer rounding is calculated, and whether the second rounding value is equal to the output candidate data. Determine whether or not When serial second rounding value is equal to the output candidate data, and outputs the output candidate data as said random number, characterized in that.

本発明の乱数生成プログラムは、コンピュータを、確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、乱数生成器から生成された乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算手段;および前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記確率分布にしたがった乱数として出力する第一評価手段;として機能させる。   The random number generation program of the present invention possesses a computer, as a first approximation function, one of an upper approximation function and a lower approximation function that sandwich a cumulative distribution function of a probability distribution between the upper side and the lower side, respectively. A candidate calculation means for applying an inverse function of the first approximate function to the generated random number data to calculate a first rounded value obtained by rounding the integer, and outputting the first rounded value as output candidate data; and Owning the other of the upper approximation function and the lower approximation function as a second approximation function, receiving the output candidate data, applying the inverse function of the second approximation function to the random number data, and obtaining an integer rounding. The second rounded value is calculated, it is determined whether the second rounded value is equal to the output candidate data, when the second rounded value is equal to the output candidate data, the output candidate data, First evaluation means for outputting as a random number in accordance with the serial probability distribution; function as.

本発明によれば、記憶領域が限られた装置上においても、分散値の大きい離散ガウス分布に従う乱数を効率的に生成することができる。   According to the present invention, it is possible to efficiently generate random numbers that follow a discrete Gaussian distribution with a large variance even on a device with a limited storage area.

本発明の第1の実施形態に係る乱数生成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the random number generation apparatus which concerns on the 1st Embodiment of this invention. 図1に示した乱数生成装置に使用される、候補計算部の構成を示すブロック図である。3 is a block diagram showing a configuration of a candidate calculation unit used in the random number generation device shown in FIG. 1. FIG. 図1に示した乱数生成装置に使用される、第一評価部の構成を示すブロック図である。FIG. 3 is a block diagram showing a configuration of a first evaluation unit used in the random number generation device shown in FIG. 1. 図1に示した乱数生成装置に使用される、第二評価部の構成を示す図である。It is a figure which shows the structure of the 2nd evaluation part used for the random number generation apparatus shown in FIG. 第1の実施形態に係る乱数生成装置の動作を示す流れ図である。3 is a flowchart showing an operation of the random number generation device according to the first exemplary embodiment. 本発明の第2の実施改訂に係る乱数生成装置の第二評価部の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the 2nd evaluation part of the random number generation apparatus which concerns on the 2nd implementation revision of this invention. 第1の関連技術に係る離散ガウス分布に従う乱数生成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the random number generation device which follows the discrete Gaussian distribution which concerns on a 1st related technique. 第2の関連技術に係る離散ガウス分布に従う乱数生成装置の構成を示すブロック図である。It is a block diagram which shows the structure of the random number generator which follows the discrete Gaussian distribution which concerns on 2nd related technology.

[本発明の問題解決手法]
本発明は、格子暗号及び署名に用いる、制限された装置上における離散ガウス分布に従う乱数を生成する、乱数生成装置、乱数生成方法、および乱数生成プログラムである。
[Problem solving method of the present invention]
The present invention is a random number generation device, a random number generation method, and a random number generation program for generating random numbers according to a discrete Gaussian distribution on a restricted device used for lattice cryptography and signature.

まず、本発明の理解を容易にするために、離散ガウス分布に対する累積分布函数を用いて、以下のようにして離散ガウス分布に従う乱数を生成できることについて述べる。
(Step1)実数値一様乱数u∈[0,1]をとる。
(Step2)実数値一様乱数uに対し、離散ガウス分布の累積分布函数の逆函数を作用させ、整数丸めを取る。
(Step3)符号(±)を一様に選び、(Step2)で得た値に付け、出力する。
First, in order to facilitate understanding of the present invention, it will be described that random numbers according to a discrete Gaussian distribution can be generated as follows by using a cumulative distribution function for the discrete Gaussian distribution.
(Step 1) Take a real-valued uniform random number u ∈ [0,1].
(Step2) The real-valued uniform random number u is subjected to the inverse function of the cumulative distribution function of the discrete Gaussian distribution, and the integer rounding is performed.
(Step3) Select the sign (±) uniformly, attach it to the value obtained in (Step2), and output it.

以上で述べた方法により、原理的には離散ガウス分布に従う乱数を生成できる。しかしながら、離散ガウス分布の累積分布函数

Figure 0006678926
の逆函数を効率的に計算するのは困難であるので、上述した方法をそのまま用いる事はできない。 By the method described above, it is possible in principle to generate random numbers that follow a discrete Gaussian distribution. However, the cumulative distribution function of the discrete Gaussian distribution
Figure 0006678926
Since it is difficult to efficiently calculate the inverse function of, the above method cannot be used as it is.

そこで、函数

Figure 0006678926
の逆函数を効率的に求める一手法として、整数の集合に属する定義域
Figure 0006678926
の値を記憶領域に保存し、これらを用いて函数Ψの逆函数を求める、というものがある。この方法を用いれば、φ(k)を求めるのに必要な計算時間が省略できるので、函数Ψの逆函数を効率的に求めることができる。 So the function
Figure 0006678926
As a method for efficiently finding the inverse function of, the domain belonging to the set of integers
Figure 0006678926
There is a method in which the value of is stored in a storage area and the inverse function of the function Ψ is obtained using these. By using this method, the calculation time required to obtain φ (k) can be omitted, so that the inverse function of the function Ψ can be efficiently obtained.

しかしながら、この手法を用いるには、φ(k)の値全てを記憶領域に保存しなければならない。本発明の目的は、記憶領域が限られた装置上においても分散値の大きい離散ガウス分布に従う乱数を生成する事にあるので、この手法では問題が解決されない。   However, to use this method, all values of φ (k) must be stored in the storage area. Since the object of the present invention is to generate a random number according to a discrete Gaussian distribution with a large variance even on a device with a limited storage area, this method does not solve the problem.

そこで本発明では、函数Ψの逆函数Ψ−1(u)を以下のアイデアに基づいて、記憶領域をさほど消費することなく、分散値の大きい離散ガウス分布に従う乱数を効率的に生成することができるサンプル法を実現する。ここで、上付き文字−1又は{-1}は、逆函数を意味する。 Therefore, in the present invention, based on the following idea, the inverse function Ψ −1 (u) of the function Ψ can efficiently generate random numbers that follow a discrete Gaussian distribution with a large variance value, without consuming much storage space. Realize a possible sampling method. Here, the superscript -1 or {-1} means an inverse function.

[A,Cの性質]
まず、離散ガウス分布に対する累積分布函数Ψ(x)を上下にはさむ。すなわち、実数xを定義域に持つ実数値函数A(x),C(x)として、以下の性質1〜4を満たすものを選ぶ:
性質1. 全ての非負実数xに対し、A(x)≧Ψ(x)≧C(x)
性質2. yに対する実数値函数A(y)の逆函数A−1(y)の整数丸めの値と、yに対する実数値函数C(y)の逆函数C−1(y)の整数丸めの値とは、多くのyに関して一致する。(性質1より、これらのyに対しては逆函数Ψ−1(y)の整数丸めの値も逆函数A−1(y)の整数丸めの値と一致する。)
性質3. Aの逆函数は効率的に計算できる。
性質4. 次のいずれかの性質が満たされている:
i. Cの逆函数が効率的に計算できる。
ii. Cが効率的に計算できる。
[Characteristics of A and C]
First, the cumulative distribution function Ψ (x) for the discrete Gaussian distribution is sandwiched above and below. That is, as the real-valued functions A (x) and C (x) having the real number x in the domain, ones satisfying the following properties 1 to 4 are selected:
Property 1. For all non-negative real numbers x, A (x) ≧ Ψ (x) ≧ C (x)
Property 2. What is the integer rounding value of the inverse function A -1 (y) of the real-valued function A (y) for y and the integer rounding value of the inverse function C -1 (y) of the real-valued function C (y) for y , Many y match. (From Property 1, for these y, the integer rounding value of the inverse function Ψ −1 (y) also matches the integer rounding value of the inverse function A −1 (y).)
Property 3. The inverse function of A can be calculated efficiently.
Property 4. One of the following properties is met:
i. The inverse function of C can be calculated efficiently.
ii. C can be calculated efficiently.

以下、函数A(x)およびC(x)を、それぞれ、上側近似函数および下側近似函数と呼ぶことにする。   Hereinafter, the functions A (x) and C (x) will be referred to as the upper approximation function and the lower approximation function, respectively.

本発明では,これらの函数を用いる事で,前述したStep1, 2, 3を以下のように改良する。   In the present invention, the above-mentioned Steps 1, 2, and 3 are improved as follows by using these functions.

まず(Step 1)では前述したのと同様、実数値一様乱数u∈[0,(1/2)]をとる。   First, in (Step 1), a real-valued uniform random number u ∈ [0, (1/2)] is taken as described above.

次にStep 2では、函数Ψの逆函数Ψ−1(u)を直接計算する代わりに、函数Aの逆函数A−1(u)を計算する。性質1により、逆函数A−1(u)は効率的に計算でき、しかも性質2により、多くのuに対し、逆函数A−1(u)の整数丸めの値は逆函数Ψ−1(u)の整数丸めの値に等しい。 Next, in Step 2, instead of directly calculating the inverse function Ψ −1 (u) of the function Ψ, the inverse function A −1 (u) of the function A is calculated. Due to Property 1, the inverse function A −1 (u) can be calculated efficiently, and due to Property 2, for many u, the value of the integer rounding of the inverse function A −1 (u) is the inverse function Ψ −1 ( equals the integer rounded value of u).

これは、すなわち、本発明では、多くのuに対し、函数Ψの逆函数Ψ−1(u)の整数丸めを効率的に計算できる事を意味する。 This means that in the present invention, the integer rounding of the inverse function Ψ −1 (u) of the function Ψ can be efficiently calculated for many u.

(Step 1)で得た乱数uに対し、A−1(u)=Ψ−1(u)が実際に成立する事を確認するための十分条件として、本発明では、逆函数A−1(u)の整数丸めの値と逆函数C−1(u)の整数丸めの値とが一致している事を確認する。 As a sufficient condition for confirming that A −1 (u) = Ψ −1 (u) is actually established for the random number u obtained in (Step 1), in the present invention, the inverse function A −1 ( Confirm that the integer rounding value of u) and the integer rounding value of the inverse function C −1 (u) match.

性質1より、これらが一致していれば、逆函数A−1(u)の整数丸めの値は逆函数Ψ−1(u)の整数丸めの値に等しいので、逆函数A−1(u)に(Step 3)の符号をつけた値を出力値とする。 From Property 1, if they match, the value of the integer rounding of the inverse function A −1 (u) is equal to the value of the integer rounding of the inverse function Ψ −1 (u), so the inverse function A −1 (u The value obtained by adding the sign of (Step 3) to () is used as the output value.

ここで、逆函数A−1(u)の整数丸めの値(第一丸め値)と逆函数C−1(u)の整数丸めの値(第二丸め値)とが一致している事を確認する方法には2通りある。 Here, the value of the integer rounding of the inverse function A −1 (u) (first rounding value) and the value of the integer rounding of the inverse function C −1 (u) (second rounding value) match. There are two ways to confirm.

第一の方法は、函数Cの逆函数C−1(u)を計算し、逆函数A−1(u)の整数丸めの値(第一丸め値)と逆函数C−1(u)の整数丸めの値(第二丸め値)とを直接比較する、というものである。この方法は、逆函数C−1(u)の計算を伴うので、性質4.iが成立している場合に効率的に実行できる方法である。 The first method computes the inverse function C −1 (u) of the function C, and calculates the integer rounding value (first rounding value) of the inverse function A −1 (u) and the inverse function C −1 (u). It directly compares the integer rounded value (second rounded value). Since this method involves calculation of the inverse function C −1 (u), the property 4. This is a method that can be executed efficiently when i holds.

第二の方法は、iを逆函数A{-1}(u)の整数丸めの値(第一丸め値)としたときに、C(i-(1/2))を計算して、uと比較し、C(i-(1/2))≦uなら逆函数A{-1}と逆函数C{-1}の整数丸めの値は一致する、というものである。これは、(i-(1/2))≦C{-1}(u)より、

Figure 0006678926
から分かる。 The second method computes C (i- (1/2)) when u is the integer rounding value (first rounding value) of the inverse function A {-1} (u), and u Compared with, if C (i- (1/2)) ≤ u, then the integer rounding values of the inverse function A {-1} and the inverse function C {-1} are the same. From (i- (1/2)) ≤ C {-1} (u),
Figure 0006678926
I understand from.

この方法は函数C(u)の計算を伴うので、性質4.iiが成立している場合に効率的に実行できる方法である。   Since this method involves calculation of the function C (u), the property 4. This is a method that can be efficiently executed when ii holds.

また、函数Aの逆函数A−1(u)の整数丸めの値(第一丸め値)と函数Cの逆函数C−1(u)の整数丸めの値(第二丸め値)とが一致していないケースでは、本発明では函数Ψの逆函数Ψ−1(u)を直接求め、そこに(Step 3)の符号をつけたものを出力値とする。 In addition, the integer rounding value of the inverse function A −1 (u) of the function A (first rounding value) and the integer rounding value of the inverse function C −1 (u) of the function C (second rounding value) are the same. In the case where this is not done, in the present invention, the inverse function Ψ −1 (u) of the function Ψ is directly obtained, and the value with the sign of (Step 3) is taken as the output value.

ここで、函数ΨのΨ−1(u)の計算は効率的ではないので、このケースでは計算時間を要する事になる。しかしながら、性質2により、そもそもこのケースが起こることはめったにないので、本発明が必要とする計算時間の期待値は小さくてすむ。 Here, since the calculation of Ψ −1 (u) of the function Ψ is not efficient, the calculation time is required in this case. However, due to the nature 2, this case rarely occurs in the first place, and therefore the expected value of the calculation time required by the present invention can be small.

上側近似函数A(x)と下側近似函数C(x)の具体的な形に関しては、後述する[発明の実施の形態]で述べる。   Specific forms of the upper approximation function A (x) and the lower approximation function C (x) will be described in [Embodiment of the Invention] below.

なお、上側近似函数A(x)はどのように求めても良いが、たとえば上側近似函数A(x)をテイラー展開し、必要な有効数字を得るのに十分な項までを計算することで求める事ができる。下側近似函数C(x)、逆函数A−1(u)、逆函数C−1(u)も同様である。 The upper approximation function A (x) may be obtained by any method, for example, by performing Taylor expansion of the upper approximation function A (x) and calculating up to sufficient terms to obtain the necessary significant figures. I can do things. The same applies to the lower approximation function C (x), the inverse function A −1 (u), and the inverse function C −1 (u).

本発明では、上側近似函数A(x)と下側近似函数C(x)(ないしその逆函数)を計算するのに必要となるデータ(たとえばこれらの函数のテイラー展開の最初の数項の係数)のみを記憶領域に保存しておけば良い。したがって、本発明を用いれば、記憶容量が少ない装置上で、離散ガウス分布に従う乱数を効率的に発生することができる。   In the present invention, the data needed to compute the upper approximation function A (x) and the lower approximation function C (x) (or its inverse) are the coefficients of the first few terms of the Taylor expansion of these functions. ) Only should be saved in the storage area. Therefore, according to the present invention, it is possible to efficiently generate random numbers according to the discrete Gaussian distribution on a device with a small storage capacity.

上では、性質1〜性質4を満たす函数A, Cを用いる事で本発明を実現したが、性質3および性質4の代わりに、以下の性質5および性質6を満たす函数A, Cを用いても、本発明を実現できる。
性質5. Cの逆関数は効率的に計算できる。
性質6. 次のいずれかの性質が満たされている:
i. Aの逆関数が効率的に計算できる。
ii. Aが効率的に計算できる。
In the above, the present invention is realized by using the functions A and C that satisfy the properties 1 to 4, but instead of the properties 3 and 4, the functions A and C that satisfy the following properties 5 and 6 are used. Can realize the present invention.
Property 5. The inverse function of C can be calculated efficiently.
Property 6. One of the following properties is met:
i. The inverse function of A can be calculated efficiently.
ii. A can be calculated efficiently.

性質5および性質6は、性質3および性質4においてAとCを入れ替えたものである。よって、前述した本発明のアイデアでAとCとを入れ替えれば、性質5および性質6を満たすAとCに対しても、本発明を適応できる。   Property 5 and property 6 are obtained by replacing A and C in property 3 and property 4. Therefore, if A and C are interchanged in the above-described idea of the present invention, the present invention can be applied to A and C satisfying the properties 5 and 6.

以上のようにして、本発明の目的を達成することができる。具体的な方法については、後述する実施の形態に記載する。   As described above, the object of the present invention can be achieved. A specific method will be described in the embodiments described later.

次に、本発明の効果について説明する。   Next, the effect of the present invention will be described.

第1の効果は、メモリ量、すなわち記憶容量が制限された装置上においても、離散ガウス分布に従う乱数を生成できる点にある。   The first effect is that random numbers that follow a discrete Gaussian distribution can be generated even on a device with limited memory capacity, that is, storage capacity.

累積法では

Figure 0006678926
の値を100bitで記憶する。 In the cumulative method
Figure 0006678926
The value of is stored in 100 bits.

棄却サンプル法では、ガウス函数の多項式近似式における係数を記憶する。   In the reject sampling method, the coefficients in the polynomial approximation formula of Gaussian function are stored.

これに対して、本発明では、ガウス函数の多項式近似式における係数、上側近似函数の逆函数、下側近似函数の逆函数の多項式近似式における係数を記憶する。   On the other hand, in the present invention, the coefficient in the polynomial approximation formula of the Gaussian function, the inverse function of the upper approximation function, and the coefficient in the polynomial approximation formula of the inverse function of the lower approximation function are stored.

このことから、本発明では、メモリ量が制限された装置上でも、分散値が大きい離散ガウス分布の生成を行うことができる。よって、本発明を格子暗号のサブルーチンと用いる事で、センサ機器や携帯電話のような計算資源や記憶容量が小さいデバイスでの利用が期待される。   Therefore, according to the present invention, it is possible to generate a discrete Gaussian distribution having a large variance even on a device with a limited amount of memory. Therefore, by using the present invention with a lattice cryptographic subroutine, it is expected to be used in a device such as a sensor device or a mobile phone having a small computational resource or storage capacity.

第2の効果は、計算効率が改善できる点にある。   The second effect is that the calculation efficiency can be improved.

累積法では、1つの出力値に対して、2分探索の計算量を必要とする。   The cumulative method requires a binary search calculation amount for one output value.

棄却サンプル法では、1つの出力値に対して、

Figure 0006678926
を必要とする。 In the rejection sampling method, for one output value,
Figure 0006678926
Need.

これに対して、本発明では、高確率で(上側近似函数の逆函数の計算)+(下側近似函数の逆函数の計算)であるので、1つの出力値に対して、効率的に乱数を生成することが期待できる。   On the other hand, according to the present invention, since the calculation of the inverse function of the upper approximation function is + (the calculation of the inverse function of the lower approximation function) with high probability, a random number can be efficiently generated for one output value. Can be expected to generate.

[発明の実施の形態]
以下、本発明の実施の形態について、図面を参照しつつ詳細に説明する。なお、同一の要素には同一の符号を付し,重複する説明を省略する場合がある。
[Embodiment of the invention]
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. In addition, the same elements may be denoted by the same reference numerals, and redundant description may be omitted.

[第1の実施形態]
[構成の説明]
図1を参照すると、本発明の第1の実施形態に係る乱数生成装置は、プログラム制御により動作するコンピュータ(中央処理装置;プロセッサ;データ処理装置)90と、一様乱数を[0.1]の範囲で生成する一様乱数生成部100と、出力装置140とを備えている。
[First Embodiment]
[Description of configuration]
Referring to FIG. 1, a random number generation device according to a first exemplary embodiment of the present invention includes a computer (central processing unit; processor; data processing device) 90 that operates under program control, and a uniform random number within a range of [0.1]. The uniform random number generation unit 100 which is generated in 1. and the output device 140 are provided.

コンピュータ90は、候補計算部110と、第一評価部120と、第二評価部130とを含む。出力装置140は符号決定部141を含む。   The computer 90 includes a candidate calculation unit 110, a first evaluation unit 120, and a second evaluation unit 130. The output device 140 includes a code determination unit 141.

ここでは、

Figure 0006678926
here,
Figure 0006678926

図2に示されるように、候補計算部110は、乱数入力部111と、上側近似逆函数計算部112とを含む。   As shown in FIG. 2, the candidate calculation unit 110 includes a random number input unit 111 and an upper approximation inverse function calculation unit 112.

図3に示されるように、第一評価部120は、候補データ入力部121と、下側近似逆函数計算部122とを含む。   As shown in FIG. 3, the first evaluation unit 120 includes a candidate data input unit 121 and a lower approximate inverse function calculation unit 122.

図4に示されるように、第二評価部130は、棄却判定部131と、乱数生成部132とを含む。   As shown in FIG. 4, the second evaluation unit 130 includes a rejection determination unit 131 and a random number generation unit 132.

図5を参照して、図1に示した乱数生成装置の動作について説明する。   The operation of the random number generation device shown in FIG. 1 will be described with reference to FIG.

一様乱数生成部100は乱数データu∈[0,(1/2)]を出力する(ステップS501)。   The uniform random number generation unit 100 outputs random number data uε [0, (1/2)] (step S501).

次に一様乱数生成部100により出力された、実数の集合に属する乱数データuは候補計算部110の乱数入力部111に送られる。   Next, the random number data u belonging to the set of real numbers output by the uniform random number generation unit 100 is sent to the random number input unit 111 of the candidate calculation unit 110.

以下に述べる候補計算部110と第一評価部120との動作において、次の二つの函数を考える。一つの函数は、離散ガウス分布の累積分布函数より真に大きい函数(以下、「上側近似函数」とよび、A(x)とおく)である。もう一方の函数は、累積分布函数より真に小さい函数(以下、「下側近似函数」とよび、C(x)とおく)である。   In the operation of the candidate calculation unit 110 and the first evaluation unit 120 described below, consider the following two functions. One function is a function that is truly larger than the cumulative distribution function of the discrete Gaussian distribution (hereinafter referred to as "upper approximation function", referred to as A (x)). The other function is a function that is truly smaller than the cumulative distribution function (hereinafter referred to as "lower approximation function", referred to as C (x)).

例えば上側近似函数として

Figure 0006678926
を考え、下側近似函数として
Figure 0006678926
を考える。 For example, as an upper approximation function
Figure 0006678926
As a lower approximation function
Figure 0006678926
think of.

以下の説明では、候補計算部110に上側近似函数が含まれ、第一評価部120に下側近似函数が含まれるとして説明する。しかしながら、候補計算部110に下側近似函数が含まれ、第一評価部120に上側近似函数が含まれるようにしてもよい。   In the following description, it is assumed that the candidate calculation unit 110 includes the upper approximation function and the first evaluation unit 120 includes the lower approximation function. However, the candidate calculation unit 110 may include the lower approximation function and the first evaluation unit 120 may include the upper approximation function.

候補計算部110の上側近似逆函数計算部112は、上側近似函数を持つ。上側近似逆函数計算部112は、乱数入力部111から受けた乱数データuに対して、上側近似函数A(u)の逆函数A{-1}(u)を計算することで、最終的に出力したい整数値(第一丸め値)の出力候補データ113として、[A{-1}(u)]と[A{-1}(u)]-1を2つ出力する(ステップS502)。 The upper approximation inverse function calculation unit 112 of the candidate calculation unit 110 has an upper approximation function. The upper approximation inverse function calculation unit 112 finally calculates the inverse function A {-1} (u) of the upper approximation function A (u) for the random number data u received from the random number input unit 111. Two [A {-1} (u)] and [A {-1} (u)]-1 are output as the output candidate data 113 of the integer value (first rounded value) to be output (step S502).

この出力候補データ113は、第一評価部120へ送られる。   The output candidate data 113 is sent to the first evaluation unit 120.

第一評価部120の下側近似逆函数計算部122は、乱数データuに対して、下側近似函数C(x)の逆函数C{-1}(u)を整数丸めした値(第二の丸め値)[C{-1}(u)]を計算した後、整数値[C{-1}(u)]と[A{-1}(u)]の値が等しいかどうかを判定する(ステップS503)。 The lower approximation inverse function calculation unit 122 of the first evaluation unit 120 rounds the inverse function C {-1} (u) of the lower approximation function C (x) to the random number data u (second value). Rounding value) [C {-1} (u)], then determine whether the integer values [C {-1} (u)] and [A {-1} (u)] are equal Yes (step S503).

ここで、[A{-1}(u)]=[C{-1}(u)]の判定方法には二種類ある。
第一の方法は、[A{-1}(u)]と[C{-1}(u)]とを計算し、一致をみる方法である。
第二の方法は、uとC([A{-1}(u)]-(1/2))との大小関係を比較して、u≧C([A{-1}(u)]-(1/2))なら[C{-1}(u)]=[A{-1}(u)]と判定でき、そうでなければ値が異なると判定する方法である。
Here, there are two types of determination methods of [A {-1} (u)] = [C {-1} (u)].
The first method is to calculate [A {-1} (u)] and [C {-1} (u)] and check the agreement.
The second method compares the magnitude relation between u and C ([A {-1} (u)]-(1/2)), and u ≥ C ([A {-1} (u)] If (-1/2)), it can be determined that [C {-1} (u)] = [A {-1} (u)], and if not, it is a method of determining that the values are different.

これら2つの方法のうちどちらの方法を選ぶかは、上側近似函数A(x)、下側近似函数C(x)の選び方による(上述した[A, Cの性質]を参照)。   Which of these two methods is selected depends on how to select the upper approximation function A (x) and the lower approximation function C (x) (see the above [property of A, C]).

この判定で、整数値[C{-1}(u)]と[A{-1}(u)]の値が等しければ、第一評価部120は、整数値[A{-1}(u)]=[C{-1}(u)]を出力装置140へ送信する。 In this determination, if the integer values [C {-1} (u)] and [A {-1} (u)] are equal, the first evaluation unit 120 determines that the integer value [A {-1} (u) )] = [C {−1} (u)] is transmitted to the output device 140.

出力装置140の符号決定部141は、符号±を決定し、[A{-1}(u)]=[C{-1}(u)]に符号をつけ出力する(ステップS504)。 The code determination unit 141 of the output device 140 determines the code ±, outputs a code by adding a code to [A {-1} (u)] = [C {-1} (u)] (step S504).

値が異なれば、第一評価部120は、整数値[A{-1}(u)]を第二評価部130へ送信する。 If the values are different, the first evaluation unit 120 transmits the integer value [A {-1} (u)] to the second evaluation unit 130.

第二評価部130の棄却判定部131は、a=[A{-1}(u)]としたとき、

Figure 0006678926
を比較し、
Figure 0006678926
a-1を出力し、そうでなければaを出力装置140へ送信する(ステップS505)。 The rejection determination unit 131 of the second evaluation unit 130, when a = [A {-1} (u)],
Figure 0006678926
Compare
Figure 0006678926
a-1 is output, and otherwise a is transmitted to the output device 140 (step S505).

出力装置140は、送られてきたデータを符号決定部141へ送信する。符号決定部141は、符号(±)を出力装置140により送られたデータにつけ、出力する(ステップS506)。   The output device 140 transmits the sent data to the code determination unit 141. The code determination unit 141 attaches a code (±) to the data sent by the output device 140 and outputs the data (step S506).

[第1の実施形態の効果の説明]
次に、本第1の実施形態の効果について説明する。
[Description of Effect of First Embodiment]
Next, the effect of the first embodiment will be described.

本第1の実施形態では、まず出力の候補を効率的に生成し、効率的かつ高確率で第一評価部120において一つに絞るというように構成されているため、効率的にサンプルできる。さらには、誤差函数の逆函数の多項式のみ記憶すればよいので、少ない記憶容量の装置上であっても離散ガウス分布に従う乱数が生成できる。   In the first embodiment, first, the output candidates are efficiently generated, and the first evaluation unit 120 efficiently and with high probability narrows down to one, so that efficient sampling can be performed. Furthermore, since only the polynomial of the inverse function of the error function needs to be stored, a random number according to the discrete Gaussian distribution can be generated even on a device with a small storage capacity.

[第2の実施形態]
[構成の説明]
次に、本発明の第2の実施形態について図面を参照して詳細に説明する。
[Second Embodiment]
[Description of configuration]
Next, a second embodiment of the present invention will be described in detail with reference to the drawings.

第2の実施形態に係る乱数生成装置は、図1乃至図4に図示した第1の実施形態に係る乱数生成装置と構成上では実質的に同一であるが、第二評価部130の動作のみが異なる。   The random number generation device according to the second embodiment is substantially the same in configuration as the random number generation device according to the first embodiment illustrated in FIGS. 1 to 4, but only the operation of the second evaluation unit 130 is performed. Is different.

[動作の説明]
次に、図6を参照して、第2の実施の形態に係る第二評価部130の動作について説明する。
[Description of operation]
Next, with reference to FIG. 6, the operation of the second evaluation unit 130 according to the second embodiment will be described.

第二評価部130は、出力候補データaを受け取り、函数φ(x+1)と函数φ(x)とを用いて、棄却サンプル法を行う。   The second evaluation unit 130 receives the output candidate data a and performs the rejection sampling method using the function φ (x + 1) and the function φ (x).

まず、乱数生成部132は、ステップS601では、0〜a-1の実数範囲で実数の集合に属する乱数u1(実数値)を生成し、さらに整数の集合に属する整数値kにおける{k+(1/2)}から乱数u1に最近の整数値kを取る。 First, in step S601, the random number generation unit 132 generates a random number u 1 (real number) belonging to the set of real numbers in the real number range of 0 to a−1, and further sets {k + ( 1/2)} takes a recent integer value k from the random number u 1 .

次に、乱数生成部132は、ステップS602では、0〜φ(0) の実数範囲で乱数u2を生成する。 Next, in step S602, the random number generation unit 132 generates a random number u 2 in the real number range of 0 to φ (0).

次に、第二評価部130の棄却判定部131は、ステップS603では、

Figure 0006678926
であるかを判定する。もし
Figure 0006678926
でない場合は、棄却判定部131は、ステップS601に戻る。もし
Figure 0006678926
であるなら、棄却判定部131は、ステップS604へ進み、
Figure 0006678926
であるか否かを判定する。もし
Figure 0006678926
であるなら、棄却判定部131はaを出力し(ステップS605)、そうでなければ、棄却判定部131は、a-1を出力する(ステップS606)。 Next, in step S603, the rejection determination unit 131 of the second evaluation unit 130
Figure 0006678926
Is determined. if
Figure 0006678926
If not, the rejection determination unit 131 returns to step S601. if
Figure 0006678926
If so, the rejection determination unit 131 proceeds to step S604,
Figure 0006678926
Is determined. if
Figure 0006678926
If it is, the rejection determination unit 131 outputs a (step S605). If not, the rejection determination unit 131 outputs a-1 (step S606).

[第2の実施形態の効果の説明]
次に、本第2の実施形態の効果について説明する。
[Explanation of Effect of Second Embodiment]
Next, the effect of the second embodiment will be described.

本第2の実施形態では、まず出力の候補を効率的に生成し、効率的かつ高確率で第一評価部において一つに絞るというように構成されているため、効率的にサンプルできる。さらには、誤差函数の逆函数の多項式のみ記憶すればよいので、少ない記憶容量の装置上であっても離散ガウス分布に従う乱数を生成することができる。   In the second embodiment, the output candidates are first efficiently generated, and the first evaluation unit is efficiently and highly probable, so that the output can be efficiently sampled. Furthermore, since only the polynomial of the inverse function of the error function needs to be stored, it is possible to generate random numbers that follow the discrete Gaussian distribution even on a device with a small storage capacity.

[発明の効果の説明]
次に、本発明の効果について説明する。
[Explanation of effects of the invention]
Next, the effect of the present invention will be described.

第1の効果は、メモリ量、すなわち記憶容量が制限された装置上においても離散ガウス分布に従う乱数を生成することができることである。
第2の効果は、計算効率を改善できることである。
The first effect is that it is possible to generate random numbers that follow a discrete Gaussian distribution even on a device with a limited memory capacity, that is, a storage capacity.
The second effect is that the calculation efficiency can be improved.

なお、本発明は、上記実施形態そのままに限定されるものではなく、実施段階ではその要旨を逸脱しない範囲で構成要素を変形して具体化できる。また、複数の構成要素の適宜な組合せにより種々の発明を形成できる。   The present invention is not limited to the above embodiments as they are, and can be embodied by modifying the constituent elements within a range not departing from the gist of the invention in an implementation stage. Further, various inventions can be formed by appropriately combining a plurality of constituent elements.

尚、乱数生成装置の各部は、ハードウェアとソフトウェアとの組み合わせを用いて実現すればよい。ハードウェアとソフトウェアとを組み合わせた形態では、RAM(random access memory)に乱数生成プログラムが展開され、該乱数生成プログラムに基づいて制御部(CPU(central processing unit))等のハードウェアを動作させることによって、各部を各種手段として実現する。また、該乱数生成プログラムは、記録媒体に記録されて頒布されても良い。当該記録媒体に記録された乱数生成プログラムは、有線、無線、又は記録媒体そのものを介して、メモリに読込まれ、制御部等を動作させる。尚、記録媒体を例示すれば、オプティカルディスクや磁気ディスク、半導体メモリ装置、ハードディスクなどが挙げられる。   Each unit of the random number generation device may be realized by using a combination of hardware and software. In a form in which hardware and software are combined, a random number generation program is developed in a RAM (random access memory), and hardware such as a control unit (CPU (central processing unit)) is operated based on the random number generation program. Each part is realized as various means. Further, the random number generation program may be recorded in a recording medium and distributed. The random number generation program recorded in the recording medium is read into the memory via a cable, wireless, or the recording medium itself, and operates the control unit and the like. Incidentally, examples of the recording medium include an optical disk, a magnetic disk, a semiconductor memory device, and a hard disk.

上記実施の形態を別の表現で説明すれば、乱数生成装置として動作させるコンピュータを、RAMに展開された乱数生成プログラムに基づき、候補計算部110、第一評価部120、および第二評価部130として動作させることで実現することが可能である。   To describe the above-described embodiment in another way, the computer that operates as the random number generation device is based on the random number generation program loaded in the RAM, and the candidate calculation unit 110, the first evaluation unit 120, and the second evaluation unit 130. Can be realized by operating as.

また、本発明の具体的な構成は前述の実施の形態に限られるものではなく、この発明の要旨を逸脱しない範囲の変更があってもこの発明に含まれる。   Further, the specific configuration of the present invention is not limited to the above-described embodiments, and modifications within the scope of the present invention are included in the present invention.

以上、実施の形態を参照して本願発明を説明したが、本願発明は上記実施の形態に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   Although the present invention has been described with reference to the exemplary embodiments, the present invention is not limited to the above-described exemplary embodiments. Various modifications that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

上記の実施形態の一部又は全部は、以下の付記のようにも記載されうるが、以下には限られない。   The whole or part of the exemplary embodiments disclosed above can be described as, but not limited to, the following supplementary notes.

(付記1)与えられた確率分布にしたがって乱数を生成する乱数生成装置であって、
乱数データを生成する乱数生成器と、
前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算部と、
前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する第一評価部と、
を備えることを特徴とする乱数生成装置。
(Supplementary Note 1) A random number generation device for generating random numbers according to a given probability distribution,
A random number generator for generating random number data,
One of the upper approximation function and the lower approximation function sandwiching the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, is possessed as a first approximation function, and the inverse function of the first approximation function is applied to the random number data. And calculating a first rounded value obtained by taking integer rounding, and outputting the first rounded value as output candidate data,
Owning the other of the upper approximation function and the lower approximation function as a second approximation function, receiving the output candidate data, applying the inverse function of the second approximation function to the random number data, and obtaining an integer rounding. A second rounded value that is calculated to determine whether the second rounded value is equal to the output candidate data, and when the second rounded value is equal to the output candidate data, the output candidate data is the random number. The first evaluation section that outputs as
A random number generation device comprising:

(付記2)前記累積分布函数は、分散値がsの離散ガウス分布

Figure 0006678926
の累積分布函数であることを特徴とする、付記1に記載の乱数生成装置。 (Supplementary Note 2) The cumulative distribution function is a discrete Gaussian distribution with variance s.
Figure 0006678926
The random number generation device according to appendix 1, wherein the random number generation device is a cumulative distribution function of.

(付記3)前記上側近似函数は、

Figure 0006678926
であり、
前記下側近似函数は、
Figure 0006678926
であることを特徴とする、付記2に記載の乱数生成装置。 (Supplementary note 3) The upper approximation function is
Figure 0006678926
And
The lower approximation function is
Figure 0006678926
The random number generation device according to appendix 2, wherein

(付記4)前記第二丸め値が前記出力候補データに等しくないときに、棄却サンプル法を用いて前記乱数を生成する第二評価部を更に有する、付記1乃至3のいずれか1項に記載の乱数生成装置。 (Supplementary note 4) The supplementary note 4 further includes a second evaluation unit that generates the random number by using a reject sampling method when the second rounded value is not equal to the output candidate data. Random number generator.

(付記5)前記第二評価部は、前記乱数として整数ガウス値を計算する、付記4に記載の乱数生成装置。 (Supplementary note 5) The random number generation device according to Supplementary note 4, wherein the second evaluation unit calculates an integer Gaussian value as the random number.

(付記6)与えられた確率分布にしたがって乱数を生成する乱数生成方法であって、
乱数生成器が、乱数データを生成し、
候補計算部が、前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力し、
第一評価部が、前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する、
をことを特徴とする乱数生成方法。
(Supplementary note 6) A random number generation method for generating a random number according to a given probability distribution,
A random number generator generates random number data,
The candidate calculation unit has one of an upper approximation function and a lower approximation function that sandwiches the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, as the first approximation function, and the random number data includes the first approximation function. , The first rounding value obtained by taking the integer rounding, and outputting the first rounding value as output candidate data,
The first evaluation unit owns the other of the upper approximation function and the lower approximation function as a second approximation function, receives the output candidate data, and applies an inverse function of the second approximation function to the random number data, Calculating a second rounding value obtained by taking an integer rounding, determining whether the second rounding value is equal to the output candidate data, when the second rounding value is equal to the output candidate data, Output candidate data is output as the random number,
A random number generation method characterized in that.

(付記7)前記累積分布函数は、分散値がsの離散ガウス分布

Figure 0006678926
の累積分布函数であることを特徴とする、付記6に記載の乱数生成方法。 (Supplementary note 7) The cumulative distribution function is a discrete Gaussian distribution with variance s.
Figure 0006678926
7. The random number generation method according to appendix 6, characterized in that the cumulative distribution function of

(付記8)前記上側近似函数は、

Figure 0006678926
であり、
前記下側近似函数は、
Figure 0006678926
であることを特徴とする、付記7に記載の乱数生成方法。 (Supplementary Note 8) The upper approximation function is
Figure 0006678926
And
The lower approximation function is
Figure 0006678926
The random number generation method according to appendix 7, characterized in that

(付記9)前記第二丸め値が前記出力候補データに等しくないときに、第二評価部が、棄却サンプル法を用いて前記乱数を生成する、付記6乃至8のいずれか1項に記載の乱数生成方法。 (Supplementary note 9) The supplementary statement according to any one of Supplementary notes 6 to 8, wherein when the second rounded value is not equal to the output candidate data, the second evaluation unit generates the random number by using a rejection sampling method. Random number generation method.

(付記10)前記第二評価部が、前記乱数として整数ガウス値を計算する、付記9に記載の乱数生成方法。 (Supplementary note 10) The random number generation method according to supplementary note 9, wherein the second evaluation unit calculates an integer Gaussian value as the random number.

(付記11)
コンピュータを、
確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、乱数生成器から生成された乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算手段、および
前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記確率分布にしたがった乱数として出力する第一評価手段、
として機能させる乱数生成プログラム。
(Appendix 11)
Computer,
One of the upper approximation function and the lower approximation function sandwiching the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, is owned as the first approximation function, and the first approximation function is added to the random number data generated from the random number generator. Of the first rounded value obtained by taking the integer rounding, and outputting the first rounded value as output candidate data, and the upper approximation function and the lower approximation function of Owning the other as a second approximation function, receiving the output candidate data, applying the inverse function of the second approximation function to the random number data, calculating a second rounding value obtained by taking integer rounding, (1) determining whether a second rounded value is equal to the output candidate data and outputting the output candidate data as a random number according to the probability distribution when the second rounded value is equal to the output candidate data; Evaluation means,
Random number generation program to function as.

(付記12)前記累積分布函数は、分散値がsの離散ガウス分布

Figure 0006678926
の累積分布函数であることを特徴とする、付記11に記載の乱数生成プログラム。 (Supplementary Note 12) The cumulative distribution function is a discrete Gaussian distribution with a variance value of s.
Figure 0006678926
14. The random number generation program according to attachment 11, which is a cumulative distribution function of

(付記13)前記上側近似函数は、

Figure 0006678926
であり、
前記下側近似函数は、
Figure 0006678926
であることを特徴とする、付記12に記載の乱数生成プログラム。 (Supplementary note 13) The upper approximation function is
Figure 0006678926
And
The lower approximation function is
Figure 0006678926
14. The random number generation program according to attachment 12, wherein:

(付記14)前記コンピュータを、前記第二丸め値が前記出力候補データに等しくないときに、棄却サンプル法を用いて前記乱数を生成する第二評価手段として更に機能させる、付記11乃至13のいずれか1項に記載の乱数生成プログラム。 (Supplementary note 14) Any one of supplementary notes 11 to 13, further causing the computer to function as second evaluation means for generating the random number by using a rejection sampling method when the second rounded value is not equal to the output candidate data. The random number generation program according to item 1.

(付記15)前記第二評価手段は、前記乱数として整数ガウス値を計算する、付記14に記載の乱数生成プログラム。 (Supplementary Note 15) The random number generation program according to Supplementary Note 14, wherein the second evaluation means calculates an integer Gaussian value as the random number.

本発明は、格子暗号及び署名に用いる、離散ガウス分布に従う乱数の生成の用途に適用できる。   INDUSTRIAL APPLICABILITY The present invention can be applied to the application of random number generation according to a discrete Gaussian distribution used for lattice cryptography and signature.

90 コンピュータ(中央処理装置;プロセッサ;データ処理装置)
100 一様乱数生成部
110 候補計算部
111 乱数入力部
112 上側近似逆函数計算部
113 候補データ
120 第一評価部
121 候補データ入力部
122 下側近似逆函数計算部
130 第二評価部
131 棄却判定部
132 乱数生成部
140 出力装置
141 符号決定部
90 computer (central processing unit; processor; data processing unit)
100 uniform random number generation unit 110 candidate calculation unit 111 random number input unit 112 upper approximation inverse function calculation unit 113 candidate data 120 first evaluation unit 121 candidate data input unit 122 lower approximation inverse function calculation unit 130 second evaluation unit 131 rejection judgment Part 132 Random number generator 140 Output device 141 Code determiner

Claims (10)

与えられた確率分布にしたがって乱数を生成する乱数生成装置であって、
乱数データを生成する乱数生成器と、
前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算部と、
前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する第一評価部と、
を備えることを特徴とする乱数生成装置。
A random number generation device for generating random numbers according to a given probability distribution,
A random number generator for generating random number data,
One of the upper approximation function and the lower approximation function sandwiching the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, is possessed as a first approximation function, and the inverse function of the first approximation function is applied to the random number data. And calculating a first rounded value obtained by taking integer rounding, and outputting the first rounded value as output candidate data,
Owning the other of the upper approximation function and the lower approximation function as a second approximation function, receiving the output candidate data, applying the inverse function of the second approximation function to the random number data, and obtaining an integer rounding. A second rounded value that is calculated to determine whether the second rounded value is equal to the output candidate data, and when the second rounded value is equal to the output candidate data, the output candidate data is the random number. The first evaluation section that outputs as
A random number generation device comprising:
前記累積分布函数は、分散値がsの離散ガウス分布
Figure 0006678926
の累積分布函数であることを特徴とする、請求項1に記載の乱数生成装置。
The cumulative distribution function is a discrete Gaussian distribution with variance s.
Figure 0006678926
The random number generator according to claim 1, wherein the random number generator is a cumulative distribution function of.
前記上側近似函数は、
Figure 0006678926
であり、
前記下側近似函数は、
Figure 0006678926
であることを特徴とする、請求項2に記載の乱数生成装置。
The upper approximation function is
Figure 0006678926
And
The lower approximation function is
Figure 0006678926
The random number generation device according to claim 2, wherein
前記第二丸め値が前記出力候補データに等しくないときに、棄却サンプル法を用いて前記乱数を生成する第二評価部を更に有する、請求項1乃至3のいずれか1項に記載の乱数生成装置。   The random number generation according to claim 1, further comprising a second evaluation unit that generates the random number by using a rejection sampling method when the second rounded value is not equal to the output candidate data. apparatus. 前記第二評価部は、前記乱数として整数ガウス値を計算する、請求項4に記載の乱数生成装置。   The random number generation device according to claim 4, wherein the second evaluation unit calculates an integer Gaussian value as the random number. 与えられた確率分布にしたがって乱数を生成する乱数生成方法であって、
乱数生成器が、乱数データを生成し、
候補計算部が、前記確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、前記乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力し、
第一評価部が、前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記乱数として出力する、
をことを特徴とする乱数生成方法。
A random number generation method for generating a random number according to a given probability distribution,
A random number generator generates random number data,
The candidate calculation unit has one of an upper approximation function and a lower approximation function that sandwiches the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, as the first approximation function, and the random number data includes the first approximation function. , The first rounding value obtained by taking the integer rounding, and outputting the first rounding value as output candidate data,
The first evaluation unit owns the other of the upper approximation function and the lower approximation function as a second approximation function, receives the output candidate data, and applies an inverse function of the second approximation function to the random number data, Calculating a second rounding value obtained by taking an integer rounding, determining whether the second rounding value is equal to the output candidate data, when the second rounding value is equal to the output candidate data, Output candidate data is output as the random number,
A random number generation method characterized in that.
前記累積分布函数は、分散値がsの離散ガウス分布
Figure 0006678926
の累積分布函数であることを特徴とする、請求項6に記載の乱数生成方法。
The cumulative distribution function is a discrete Gaussian distribution with variance s.
Figure 0006678926
7. The random number generation method according to claim 6, which is a cumulative distribution function of.
前記上側近似函数は、
Figure 0006678926
であり、
前記下側近似函数は、
Figure 0006678926
であることを特徴とする、請求項7に記載の乱数生成方法。
The upper approximation function is
Figure 0006678926
And
The lower approximation function is
Figure 0006678926
The random number generation method according to claim 7, wherein
前記第二丸め値が前記出力候補データに等しくないときに、第二評価部が、棄却サンプル法を用いて前記乱数を生成する、請求項6乃至8のいずれか1項に記載の乱数生成方法。   The random number generation method according to claim 6, wherein when the second rounded value is not equal to the output candidate data, the second evaluation unit generates the random number by using a rejection sampling method. . コンピュータを、
確率分布の累積分布函数をそれぞれ上側および下側で挟む形の上側近似函数および下側近似函数の一方を第一近似函数として所有し、乱数生成器から生成された乱数データに前記第一近似函数の逆函数を作用させ、整数丸めを取って得られる第一丸め値を計算し、該第一丸め値を出力候補データとして出力する候補計算手段、および
前記上側近似函数および前記下側近似函数の他方を第二近似函数として所有し、前記出力候補データを受け、前記乱数データに前記第二近似函数の逆函数を作用させ、整数丸めを取って得られる第二丸め値を計算し、前記第二丸め値が前記出力候補データに等しいか否かを判定し、前記第二丸め値が前記出力候補データに等しいときに、前記出力候補データを前記確率分布にしたがった乱数として出力する第一評価手段、
として機能させる乱数生成プログラム。
Computer,
One of the upper approximation function and the lower approximation function sandwiching the cumulative distribution function of the probability distribution on the upper side and the lower side, respectively, is owned as the first approximation function, and the first approximation function is added to the random number data generated from the random number generator. Of the first rounded value obtained by taking the integer rounding, and outputting the first rounded value as output candidate data, and the upper approximation function and the lower approximation function of Owning the other as a second approximation function, receiving the output candidate data, applying the inverse function of the second approximation function to the random number data, calculating a second rounding value obtained by taking integer rounding, (1) determining whether a second rounded value is equal to the output candidate data and outputting the output candidate data as a random number according to the probability distribution when the second rounded value is equal to the output candidate data; Evaluation means,
Random number generation program to function as.
JP2016133851A 2016-07-06 2016-07-06 Random number generation device, random number generation method, and random number generation program Active JP6678926B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2016133851A JP6678926B2 (en) 2016-07-06 2016-07-06 Random number generation device, random number generation method, and random number generation program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2016133851A JP6678926B2 (en) 2016-07-06 2016-07-06 Random number generation device, random number generation method, and random number generation program

Publications (2)

Publication Number Publication Date
JP2018005702A JP2018005702A (en) 2018-01-11
JP6678926B2 true JP6678926B2 (en) 2020-04-15

Family

ID=60946494

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2016133851A Active JP6678926B2 (en) 2016-07-06 2016-07-06 Random number generation device, random number generation method, and random number generation program

Country Status (1)

Country Link
JP (1) JP6678926B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109617679B (en) * 2018-11-29 2021-10-22 哈希未来(北京)科技有限公司 Method, system and storage medium for generating, acquiring and providing random numbers
CN113904769B (en) * 2021-12-08 2022-03-18 浙江九州量子信息技术股份有限公司 Quantum encryption-based power distribution automation reinforcement implementation method

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05216630A (en) * 1991-11-29 1993-08-27 Nec Corp Correlative random number generator
JP2000276459A (en) * 1999-03-26 2000-10-06 Fujitsu Ltd Method, device, and system for random number generation using conversion function based on learning
JP2001256076A (en) * 2000-03-08 2001-09-21 Ricoh Co Ltd Device and method for generating test data and recording medium
US20170220322A1 (en) * 2016-01-28 2017-08-03 International Business Machines Corporation Generating gaussian random numbers using inverse sampling and recurrence relationship

Also Published As

Publication number Publication date
JP2018005702A (en) 2018-01-11

Similar Documents

Publication Publication Date Title
Both et al. Decoding linear codes with high error rate and its impact for LPN security
El Bansarkhani et al. Improvement and efficient implementation of a lattice-based signature scheme
Canto Torres et al. Analysis of information set decoding for a sub-linear error weight
Cheon et al. Homomorphic encryption for arithmetic of approximate numbers
KR101273465B1 (en) Apparatus for batch verification and method using the same
US9473302B2 (en) Ciphertext processing device, ciphertext processing method, computer-readable recording medium, and information processing device
Matsumoto Relevance of hydrogen bond definitions in liquid water
US9596083B2 (en) Information processing technique for pattern matching
US11164484B2 (en) Secure computation system, secure computation device, secure computation method, and program
US9882712B2 (en) Encrypted text matching system, method, and computer readable medium
US20230038304A1 (en) Method for providing information to be stored and method for providing a proof of retrievability
JP6678926B2 (en) Random number generation device, random number generation method, and random number generation program
De Cherisey et al. On the optimality and practicability of mutual information analysis in some scenarios
US8677135B2 (en) Digital signatures with error polynomials
EP2991265B1 (en) Encrypted text matching system, method and program
Bruno et al. Cryptographic smooth neighbors
Fisch et al. Orbweaver: succinct linear functional commitments from lattices
US20200125724A1 (en) Secret tampering detection system, secret tampering detection apparatus, secret tampering detection method, and program
JP2014137474A (en) Tamper detection device, tamper detection method, and program
Bhattacharjee et al. GPU-based integrated security system for minimizing data loss in big data transmission
You et al. Single-trace fragment template attack on a 32-bit implementation of keccak
Li et al. Ciphertext-only attacks against compact-lwe submitted to nist pqc project
Oonishi et al. Improved CRT-RSA secret key recovery method from sliding window leakage
JP6532843B2 (en) Secret calculation system, first secret calculation device, second secret calculation device, secret circuit generation method, secret circuit evaluation method, program
JP6845460B2 (en) Random number generator, random number generation method, random number generation program, and auxiliary output unit used for it

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20190607

TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20200115

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20200205

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200227

R150 Certificate of patent or registration of utility model

Ref document number: 6678926

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250