WO2005124537A1 - 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法 - Google Patents

乱数生成装置,生成方法,生成器評価方法、および乱数使用方法 Download PDF

Info

Publication number
WO2005124537A1
WO2005124537A1 PCT/JP2004/008611 JP2004008611W WO2005124537A1 WO 2005124537 A1 WO2005124537 A1 WO 2005124537A1 JP 2004008611 W JP2004008611 W JP 2004008611W WO 2005124537 A1 WO2005124537 A1 WO 2005124537A1
Authority
WO
WIPO (PCT)
Prior art keywords
random number
number generation
parameter
randomness
random
Prior art date
Application number
PCT/JP2004/008611
Other languages
English (en)
French (fr)
Inventor
Tomoaki Inaoka
Shunsuke Fueki
Original Assignee
Fujitsu Limited
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 Fujitsu Limited filed Critical Fujitsu Limited
Priority to EP04746113A priority Critical patent/EP1758020A4/en
Priority to JP2006514628A priority patent/JPWO2005124537A1/ja
Priority to PCT/JP2004/008611 priority patent/WO2005124537A1/ja
Publication of WO2005124537A1 publication Critical patent/WO2005124537A1/ja
Priority to US11/601,775 priority patent/US20070067375A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/58Random or pseudo-random number generators

Definitions

  • Random number generation device generation method, generator evaluation method, and random number use method
  • the present invention relates to a random number generation method, and more specifically, for example, a random number generation device which is mounted on a non-contact IC card which receives power supply in a non-contact manner and which is susceptible to external influences, and a random number generation method And so on.
  • a data processing device for an IC card to which the present invention is applied often uses random numbers.
  • IC cards are often used to authenticate individuals typified by Basic Resident Register and credit cards, etc.
  • the authentication function mainly uses public key cryptography, and random numbers are used for key generation, etc. Is done.
  • pseudo-random numbers using software have been used.In this case, depending on the method of obtaining the seed from which the random numbers are obtained, the generated random numbers may be biased, or once generated, It has been pointed out that when generating random numbers, there is a danger that the values will be predicted.
  • methods of obtaining seeds that are difficult to predict by devising a method of acquiring seeds, and mounting a random number generator using physical phenomena such as thermal noise are being studied.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 03-294987 "IC card system"
  • Patent Document 2 Japanese Unexamined Patent Application Publication No. 2002-268874 “Random number seed generation circuit, driver including the same, and SD memory card system”
  • Patent Document 3 Japanese Unexamined Patent Application Publication No. 2002-32732 ⁇ Method for obtaining pseudo-random number in portable information processing device ''
  • Patent Document 1 discloses a system that can provide a new service utilizing a security function and a memory function using an IC card configured to store a plurality of random numbers in a large-capacity nonvolatile memory. .
  • Patent Document 2 discloses that a power-on reset circuit that outputs a capture signal to a latch that latches a counter value (a number of seeds less than the count value of a counter) outputs a capture signal at a different time.
  • a random number seed generation circuit that can be different each time is disclosed.
  • Patent Document 3 discloses that a large number of random numbers generated in advance are stored in, for example, a non-volatile memory, and when the random numbers are needed, the waiting time until the random numbers are obtained by referring to the memory. Has been disclosed which can greatly reduce the random number.
  • a first object of the present invention is to provide a random number generation device that generates a random number with a secured randomness even in an environment that is easily affected by external influences, such as when mounted on a contactless IC card, And a method of generation.
  • a second object is to evaluate a random number generator that generates a random number having a relatively short bit length, such as when mounted on an IC card, and a random number generated by such a random number generator. It is to provide an effective use method.
  • a random number generation device includes a random number generation unit that generates a random number, a random number generation control unit that provides a parameter for generating a random number to the random number generation unit, and a random number generation unit that generates a random number.
  • a random number determining means for determining a numerical property, and when the random number of the generated random number does not satisfy a predetermined condition, the random number generation controlling means updates the above-mentioned parameter and sends the random number to the random number generating means. It operates to regenerate random numbers.
  • a parameter for generating a random number is read from a memory, a random number is generated using the parameter, and whether the generated random number satisfies a predetermined condition is determined. If the condition is not satisfied, the parameters for random number generation are updated, random numbers are generated using the updated parameters, and the random number generation of the generated random numbers is repeated.
  • the random number generator evaluation method of the present invention is a method for evaluating a random number generator that generates a random number having a bit number smaller than 20000 bits.
  • the random number generator generates a random number, and stores the generated random number in a memory.
  • the random number is determined for the sample of 20000 bits or more, and a random number generator is determined according to the random number determination result. Is used.
  • the random number usage method of the present invention is a method of using random numbers used in byte length units.
  • the generated random numbers are stored in a nonvolatile memory capable of reading and writing data in byte units, and the random numbers are calculated.
  • a method is used in which an unused random number of a required byte length is read from the nonvolatile memory and used. This limits the use of the same random number in hardware and reduces the risk of random number prediction.
  • FIG. 1 is a block diagram showing the principle configuration of a random number generation device according to the present invention.
  • FIG. 2 is a basic configuration block diagram of an IC card according to the present invention.
  • FIG. 3 is a block diagram showing a configuration of a first example of an IC card.
  • FIG. 4 is a block diagram showing a configuration of a second embodiment of the IC card.
  • FIG. 5 is a block diagram showing a configuration of a third embodiment of the IC card.
  • FIG. 6 is a block diagram showing a configuration of a fourth embodiment of the IC card.
  • FIG. 7 is a diagram illustrating settings of a random number generator by a random number generation control unit.
  • FIG. 8 is a diagram illustrating the meaning of correction table parameters.
  • FIG. 9 is an example of contents stored in a correction table parameter storage unit.
  • FIG. 10 is a diagram illustrating a format of a correction table parameter.
  • FIG. 11 is an explanatory diagram of a randomness determining operation by a randomness determining unit.
  • FIG. 12 is an overall flowchart of a random number generation process.
  • FIG. 13 is a diagram illustrating an evaluation method of a random number generator itself.
  • FIG. 1 is a block diagram showing the basic configuration of a random number generation device according to the present invention.
  • the random number generation device 1 includes at least a random number generation unit 2, a random number generation control unit 3, and a randomness determination unit 4.
  • the random number generation unit 2 generates a random number
  • the random number generation control unit 3 gives a parameter for generating a random number to the random number generation unit 2
  • the random number determination unit 4 generates a random number.
  • the randomness of the random number is determined.
  • the random number generation control unit 3 updates the above-described parameters and updates the random number. Causes the generator 2 to regenerate the random numbers.
  • the random number generation device 1 further includes a parameter storage unit that stores a default parameter as the above-mentioned parameter to be used for random number generation when the random number generation device 1 is started, and the random number generation control unit 3
  • the default parameters can also be given to the random number generator 2 when 1 is started.
  • the parameter storage unit stores the random number generation control unit 3 when the randomness of the random number generated using the above-described default parameter does not satisfy a predetermined condition. Update parameters to be used in updating can be further stored, and the parameter storage unit associates the generated random numbers with random number information indicating whether there is a possibility that the generated random numbers are biased toward 0 or 1. In addition to storing a plurality of update parameters, the random number determination unit 4 determines whether the random number generated as the determination result is 0 or 1. It is also possible to provide the random number generation control unit 3 with the determination information indicating whether the bias is biased, and the random number generation control unit 3 can select the update parameter stored in the parameter storage unit corresponding to the provided determination information. .
  • the random number generation control unit 3 regenerates the default parameter stored in the parameter storage unit into the random number. Can be rewritten to the parameters used for
  • the random number generation device 1 can be mounted on an IC card that receives power from the outside in a non-contact manner.
  • a parameter for random number generation is read out from the memory, a random number is generated using the parameter, and the random number generated satisfies a predetermined condition. If the condition is not satisfied, read the update parameter as a parameter for random number generation, generate a random number using the update parameter, and determine the randomness of the generated random number. Is used.
  • the random number generator evaluation method of the present invention is a method of evaluating a random number generator that generates a random number having a number of bits smaller than 20000 bits.
  • the total number of bits of random numbers stored in memory exceeds 20000 bits, randomness is determined for samples of 20000 bits or more, and random numbers are generated according to the determination result. This is to evaluate the vessel.
  • the method of using random numbers is a method of using random numbers used in byte length units, and stores the generated random numbers in a non-volatile memory capable of reading and writing data in byte units.
  • a method of reading an unused random number of a required byte length from the nonvolatile memory and using it is used.
  • FIG. 2 is a basic configuration block diagram of an IC card according to the present invention.
  • an IC card 10 includes a random number generation control unit 11 for controlling random number generation in the IC card 10, a random number generator 12 for generating random numbers, and a randomness determining unit 13 for determining the randomness of the generated random numbers.
  • An arithmetic unit that performs necessary operations using the generated random numbers, a non-volatile memory 15 that stores parameters used for random number generation, and communication with external devices to supply power.
  • a communication / power control unit 16 is provided for receiving.
  • the random number generation control unit 11 includes a default correction table parameter setting unit 20, a correction table parameter update unit 21, and a random number generator control circuit 22.
  • the nonvolatile memory (ferroelectric RAM) 15 includes a default correction table parameter storage unit 23, a correction table parameter storage unit 24, and a random number data storage unit 25.
  • the random number generation means in Claim 1 of the present invention corresponds to the random number generator control circuit 22 and the random number generator 12, and the random number generation control means includes a default correction table parameter setting unit 20 and a correction unit.
  • the parameter storage means in the claims 2 and the like corresponds to the table parameter updating unit 21 and the default correction table parameter storage unit 23 and the correction table parameter storage unit 24.
  • the random number generation by the random number generator 12 is executed using the default correction tape parameter as a parameter for random number generation. That is, the default parameter table read from the default correction table parameter storage unit 23 is set to the random number generator control circuit 22 by the default correction table parameter setting unit 20, and the random number generator 12 is set by the random number generator control circuit 22. Is controlled.
  • the randomness determining unit 13 determines whether the data indicating the randomness, for example, whether the number of appearances in a random number of 0 or 1 satisfies a predetermined condition or not.
  • the end flag is notified to the random number generation control unit 11 and the arithmetic unit 14, and the generated random number is stored in the random number data storage unit 25, and is used by the arithmetic unit 14 for the calculation as it is. You. When the condition is not satisfied, the arithmetic unit 14 and the random number generation control unit 11 are notified that the random number cannot be used, for example, by an error flag.
  • the correction table parameter update unit 21 in the random number generation control unit 11 stores the correction table parameters stored in the correction table parameter storage unit 24 in the nonvolatile memory 15 in random numbers instead of the default correction table parameters.
  • a random number is generated again by the random number generator 12 in accordance with the result, and the condition that the randomness is determined by the randomness determination unit 13 for the regenerated random number is satisfied. It is determined whether or not the random number is satisfied. If satisfied, the random number is stored in the random number data storage unit 25, and the arithmetic unit 14 executes an operation using the random number. Then, the value of the correction table parameter used for regenerating the random number is overwritten in the default correction table parameter storage unit 23 of the nonvolatile memory 15, and the default correction table parameter is updated.
  • the parameter is updated in the same manner as described above, and the operation after the random number is regenerated is executed.
  • the contents stored in the default correction table parameter storage unit 23 are overwritten and updated when a random number whose randomness satisfies the condition is generated, and the IC card is updated.
  • the updated default correction table parameters will be used for random number generation immediately after the restart.
  • FIG. 3 is a configuration block diagram of a first embodiment of the IC card. Comparing this figure with the basic configuration diagram of Fig. 2, the point that a non-contact communication unit 27 is provided instead of the power supply control unit 16 and that the random number generator 12 has a thermal noise generating element 29, an amplifier 30, and a sampling The difference is that the random number determination section 13 is configured by a counter 33, a comparison determination circuit 34, and a random number storage buffer 35.
  • the non-contact communication unit 27 communicates with the non-contact IC card reader Z writer, and at the same time, receives electromagnetic waves from the reader Z writer to generate a DC power supply for the IC card, and And power on reset signal for resetting each part. Power supply conditions are not always stable because power is supplied without contact It can be said that there is a great possibility that the randomness of the generated random numbers becomes a problem.
  • the thermal noise generating element 29, the amplifier 30, and the sampling circuit 31 constituting the random number generator 12 are controlled by a random number generator control circuit 22 in the random number generation control unit 11, and perform random number generation. The operation will be further described later.
  • the counter 33 in the randomness determining unit 13 counts the number of occurrences of 0 or 1 in the generated random number to determine the randomness of the generated random number.
  • the road 34 determines whether or not the number of appearances satisfies a predetermined condition, and the random number storage buffer 35 temporarily stores the generated random numbers. Will be further described later.
  • FIG. 4 is a configuration block diagram of a second embodiment of the IC card.
  • a contact communication power supply control section 37 is provided instead of the non-contact communication section 27 of FIG. 3 showing the first embodiment.
  • the contact communication power supply control unit 37 communicates with the contact type IC card reader / writer, receives power and clock from the reader / writer in a contact state, and receives an external reset signal. This starts the operation of the IC card. Therefore, the power supply conditions are more stable than in the first embodiment using the non-contact communication unit 27 described in FIG. May be different.
  • a combination card that can perform both contact communication and contactless communication with an IC card reader / writer, set the value of the correction table parameter according to the contact / noncontact condition. You can also.
  • FIG. 5 is a configuration block diagram of a third embodiment of the IC card.
  • the communication / power control unit 16 is the same as the basic circuit in FIG. 2, and the contact / power control unit 37 in FIG. 3 or the contact / power control unit 37 in FIG. Les ,.
  • the correction table parameter storage unit 24 provided in the nonvolatile memory 15 is replaced with a read-only memory (ROM).
  • ROM read-only memory
  • This is realized as a correction table parameter storage unit 38 inside 37, which can store many correction table parameters in a ROM with a higher degree of integration than the nonvolatile memory 15 and reduce the used capacity of the nonvolatile memory 15. It becomes possible.
  • FIG. 6 is a configuration block diagram of a fourth embodiment of the IC card.
  • the random number generator control circuit 22 controls the power supply control counter 45 for controlling the power of the random number generator, and outputs the random number output by the random number generator.
  • Output control counter 46 for control, sampling frequency setting register 47 for setting sampling frequency by sampling circuit 31 in random number generator, and regeneration flag stored when regenerating random numbers
  • the difference lies in that a regeneration flag storage unit 48 is provided, and a power supply control circuit 41 is provided inside the random number generator 12.
  • FIG. 7 is an explanatory diagram of a control method of the random number generator 12 by the random number generation control unit 11 in the fourth embodiment of FIG. 6, for example. The control operation in the figure will be described using the correction table parameters shown in FIGS.
  • a power-on reset (PONRST) signal and a clock (CLK) signal are supplied to the random number generation control unit 11 from, for example, the communication / power control unit 16 in FIG.
  • the counter 45 starts counting t as a correction table parameter input to the control register 49.
  • FIG. 8 is an explanatory diagram of correction table parameters for generating the random numbers.
  • the power supply Vr of the random number generator 12 is turned on after a lapse of time t since the power supply Vc of the IC card is turned on.
  • sampling for random number generation starts after the output of the random number generator stabilizes after a lapse of time, and the power supply Vr of the random number generator 12 starts after the sampling ends. Is turned off, and random numbers are generated with the sampling frequency for random number generation as f.
  • FIG. 9 shows a storage format of the correction table parameters stored in, for example, the correction table parameter storage unit 24 of FIG. The time t, t, and sampling
  • a plurality of sets of wave numbers f are stored.
  • FIG. 10 shows an example of the data format of the correction table parameters for one row in FIG. 9, for example. Assume that the values of time t and t in FIG. 8 are set to, for example, 10 ms, and
  • correction table parameter For example, set some frequencies such as 50kHz, 100kHz, 250kHz, If it is selected from these and combined as a correction table parameter, for example, by preparing 4 bits as a storage area for the frequency f, it is possible to set the sampling frequency in 16 steps. Assuming that the entire length of the correction table parameter storage area in FIG. 10 is 64 bits, 28 bits remain as a reserve.
  • time t and t are not sufficiently large and sampling frequency f is large.
  • the generated random numbers tend to be biased toward 0 or 1.
  • the characteristics of such a random number generator are evaluated in advance, and the characteristics of the random number generator, that is, whether the occurrence rate of 0 or 1 increases, corresponding to the set of correction table parameters stored in Fig. 9 It is effective to check in advance the characteristic information (determination information of the characteristic number) and store the determination result corresponding to the correction table parameter.
  • a correction table parameter for improving the randomness according to the randomness determination result of the generated random number. That is, when the generated random numbers are biased toward 0, the random number is regenerated by selecting a correction table parameter that increases the occurrence rate of 1.
  • the correction table parameters ie, the values of t, t, and f are
  • the count value of the counter 45 corresponds to t after the power-on reset.
  • the power of the random number generator 12 is turned on, and the output of the thermal noise generating element 29 is amplified by the amplifier 30 and supplied to the sampling circuit 31. Thereafter, when the counter 46 counts the number of times corresponding to the time t, the sampling circuit 31 starts sampling the output of the amplifier 30 and performs sampling using the frequency set by the sampling frequency setting register 47. , And the output SOUT is output to the randomness determining unit 13.
  • FIG. 11 is a block diagram for explaining the operation of the randomness determining unit 13.
  • the randomness determining unit 13 includes a random number storage buffer 35 for storing random numbers output from the random number generator 12, and a counter 33 for counting the number of generations of 0 or 1 in the output of the tongue number generator 12.
  • the output of the counter 33 is compared with the content of a register 51 provided with a comparison value for randomness determination provided from the random number generation control unit 11 to determine the randomness.
  • a judgment circuit 34 is provided. The result of the determination by the comparison and determination circuit 34 is fed back to the random number generation control unit 11 to notify whether or not the random number output from the random number generator 12 is usable.
  • a method for determining the randomness of the random number generated by the random number generator 12 will be described with reference to FIG.
  • One of the standards for determining randomness is the FIPS (Federal's Information 'Processing' Standards) 140 standard S by the National Institute of Standards and Technology. Several tests such as monobit test, poker test, runs test, and long runs test are specified as tests for determining randomness in this standard. .
  • the randomness of the generated random numbers is determined based on the concept of a monobit test as one of such tests.
  • this monobit test the number of 1s in the 20000-bit sample stream is counted, and when the number X satisfies the following equation, the test is judged to pass.
  • the length of the generated random number is at most about 1024 bits, and the 1024 bits correspond to the 20000 bits of the monobit test. Then, when the number of occurrences X of 1 or 0 in 1024 bits satisfies the following expression, it is determined that the test has passed.
  • FIG. 12 is an overall flowchart of the random number generation processing according to the present embodiment described above.
  • step S1 t, t are set as initial setting values of parameters from the default correction table parameter storage unit 23 in the nonvolatile memory 15.
  • a random number is output from the random number generator 12 in step S4, and the randomness is determined by the randomness determination unit 13 in step S5 by the method described above, and the determination result is determined by the random number generation control unit. If the result of the randomness determination is OK, the random number has not been regenerated in step S6, that is, the randomness is inappropriate when generating random numbers using default parameters, for example. Is determined, the random number is regenerated using other parameters to determine whether or not, and if so, the random number is stored in the non-volatile memory 15 in step S7 in step S7. It is stored in the unit 25, and then the processing in the IC card is continued.
  • a new parameter that is, the set value t is stored in the correction table parameter storage unit 24 in the nonvolatile memory 15 in step S8.
  • step S2 the new setting values are given to the random number generator control circuit 22 by the correction table parameter updating unit 21 in the random number generation control unit 11, and the regenerated flag storage unit 48 , A regeneration flag is set, and the processing after step S2 is performed.
  • step S6 If it is determined in step S6 that the random number has not been regenerated, that is, if the random number has not been regenerated, that is, if the random number has been regenerated, the default correction table parameter storage unit 23 of the nonvolatile memory 15 is determined in step S9. After the latest correction table parameter, that is, the correction table parameter used for generating the random number output at this time is overwritten and the regeneration flag in the regeneration flag storage unit 48 is cleared, the random number is stored in step S7. Is performed.
  • a ferroelectric memo capable of storing and erasing data in byte units
  • a memory a number of random numbers are generated in advance, the data is stored in a memory, and a storage unit of the used random numbers is made inaccessible.
  • the random number generator mounted on the IC card generates a random number of about 1024 bits as described above, whereas the random number generator specified in FIP S140 as described above
  • the randomness of a 20000-bit sample is determined, so the 1024-bit random number generation is repeated in the IC card in Fig. 13 as well, and when a total of 20000-bit random numbers are generated, The randomness is determined using 20000 bits as a sample, and the random number generator itself is evaluated using this.
  • the processing is started by, for example, issuing a command to start evaluation of the random number generator itself from the arithmetic unit 14 to the random number generation control unit 11, and the random number generation control unit 11
  • the random number generator 12 is started, and the generated random numbers are stored in the random number data storage unit 25.
  • the random number generator 12 repeats random number generation using the same parameters, and when a random number of 20000 bits or more is stored in the random number data storage unit 25, the random number determination unit 13 is activated.
  • the randomness is determined by a monobit test defined in FIPS140, or by any of a poker test, a run test, and a long run test, and the determination result is notified to the arithmetic unit 14.
  • Such an evaluation of the random number generator itself is an evaluation of a single macro of the random number generator 12 and a control / judgment circuit, and is basically a factor that may influence the random number generator from the outside, such as non-contact power supply. And the operation itself of the random number generator 12 using the default correction table parameters is evaluated.
  • the correction table parameters for example, as described with reference to FIG. 8, the time t from the rise of the card power supply to the rise of the random number generator power supply, the random number generator power supply
  • a random number can be generated using the power supply voltage of the power supply, that is, the value of the power supply voltage Vr itself as a parameter.
  • randomness is determined according to the FIPS 140 monobit test, it may be determined according to the poker test, the run test, or the long run test.
  • the default correction table parameters stored in the non-volatile memory are updated when the randomness determination result for the random number generated by updating the parameter is ⁇ K. I was supposed to. This is because the parameter corresponding to the latest communication environment is used as the default correction table parameter when starting the next random number generator.However, when the communication conditions frequently change, the default correction table parameter is used. An embodiment in which the update of the data is not performed is naturally considered.
  • the present invention can be used in all industries that use an IC card equipped with a random number generator, and is used in an environment that is easily affected by external influences, not necessarily only with an IC card. It can be used in all industries that use random number generators.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Storage Device Security (AREA)
  • Credit Cards Or The Like (AREA)

Abstract

 非接触ICカードに搭載された場合のように、外部の影響を受けやすい環境においても乱数性が確保された乱数の生成を目的とする。乱数を生成する乱数生成手段と、乱数生成手段に乱数生成用のパラメータを与える乱数生成制御手段と、生成された乱数の乱数性を判定する乱数性判定手段とを備え、生成された乱数の乱数性があらかじめ定められた条件を満足しないとき、乱数生成制御手段が乱数生成用パラメータを更新して乱数生成手段に乱数の再生成を行わせる。

Description

明 細 書
乱数生成装置、生成方法、生成器評価方法、および乱数使用方法 技術分野
[0001] 本発明は乱数の生成方式に係り、さらに詳しくは、例えば非接触で電源の供給を 受ける非接触 ICカードに搭載され、外部からの影響を受けやすい乱数生成装置、お よび乱数生成方法などに関する。
背景技術
[0002] 本発明が対象とする ICカードにおけるデータ処理装置では乱数を使用する場合が 多レ、。 ICカードは住民基本台帳やクレジットカードなどに代表される個人の認証のた めに使用されることが多ぐ認証機能では主に公開鍵暗号が使用されており、乱数が 鍵の生成などに使用される。従来は、例えばソフトウェアを使用した擬似乱数が用い られているが、この場合には乱数の元になるシードの取得方法によっては生成する 乱数に偏りが発生したり、一度生成された擬似乱数から次の乱数を生成する場合に 値が予測されてしまうというような危険性が指摘されている。そのような問題点を回避 するためにシードの取得方法を工夫して値が予測されにくくする方法や、熱雑音など の物理現象を利用した乱数生成器を搭載することなどが検討されている。
[0003] 従来の乱数生成器によって生成された乱数の乱数性評価を行う場合には、乱数生 成器単体の状態、すなわち乱数マクロのみに電源と信号を与えることによって生成さ れた乱数の乱数性が評価されてレ、た。し力、しながら乱数生成器の動作は電源電圧な どの動作条件や、サンプリング間隔などに影響され、発生する乱数に偏りが発生する こと力 sある。特に非接触 ICカードでは、電磁波によってアンテナから供給される電源 を使用するために、比較的に不安定な電源条件で動作することになり、また ICカード とカードリーダライタとの位置関係にも影響を受ける可能性がある。
[0004] その結果、単体での評価で発生する乱数の乱数性が確認された乱数生成器を使 用しても、電磁波によってアンテナから供給される電源を使用し、電源が不安定な非 接触 ICカードに搭載された状態などにおいては、乱数性が確保されているとは必ず しも判断できなレ、場合があるとレ、う問題点があった。 [0005] このような ICカードなどにおける乱数の使用について次のような従来技術がある。 特許文献 1:特開平 03— 294987号公報 「ICカードシステム」
特許文献 2 :特開 2002 - 268874号公報 「乱数シード生成回路及びこれを備えたド ライバ、並びに、 SDメモリカードシステム」
特許文献 3 :特開 2002 - 32732号公報 「可搬情報処理装置における擬似乱数取 得方法」
[0006] 特許文献 1には、大容量の不揮発性メモリに複数個の乱数を格納する構成の IC カードを用いてセキュリティ機能、およびメモリ機能を活用した新しいサービスを提供 できるシステムが開示されている。
[0007] 特許文献 2には、カウンタのカウント値ほし数シード)をラッチするラッチに対する取 込み信号を出力するパワーオンリセット回路の取込み信号の出力時点がまちまちと なるため、乱数シードを電源が投入されるたびに異なるものとできる乱数シード生成 回路が開示されている。
[0008] 特許文献 3には、あらかじめ発生させた多数の乱数を、例えば不揮発性メモリに記 憶させておき、乱数を必要とするときにメモリを参照することによって乱数を取得する までの待ち時間を大幅に短縮できる乱数取得方法が開示されている。
[0009] し力 ながらこのような従来技術においても、乱数生成器が非接触 ICカードに搭載 された場合などにおいて、外部からの影響によって生成された乱数の乱数性が充分 に確保される可能性がないという問題点を解決することはできない。
[0010] 本発明の第 1の目的は、非接触 ICカードに搭載された場合などのように、外部の影 響を受けやすい環境においても乱数性が確保された乱数を生成する乱数生成装置 、および生成方法を提供することである。
[0011] 第 2の目的は、 ICカードに搭載される場合などのように、比較的短いビット長の乱数 を生成する乱数生成器の評価方法、およびそのような乱数生成器によって生成され た乱数の効果的な使用方法を提供することである。
発明の開示
[0012] 本発明の乱数生成装置は、乱数を生成する乱数生成手段と、乱数生成手段に乱 数を生成するためのパラメータを与える乱数生成制御手段と、生成された乱数の乱 数性を判定する乱数性判定手段とを備えるものであり、生成された乱数の乱数性が あらかじめ定められた条件を満足しないとき、乱数生成制御手段が前述のパラメータ を更新して乱数生成手段に乱数の再生成を行わせるように動作する。
[0013] 本発明の乱数生成方法では、乱数生成のためのパラメータをメモリから読出し、そ のパラメータを用いて乱数を生成し、生成された乱数の乱数性があらかじめ定められ た条件を満足するか否力、を判定し、条件を満足しないとき乱数生成のためのパラメ一 タを更新し、更新されたパラメータを用いて乱数を生成し、生成された乱数の乱数性 判定以降を繰り返す方法が用いられる。
[0014] これによつて乱数性の確保された乱数の生成が可能となり、そのような乱数を用い たデータ処理が可能となる。
次に本発明の乱数生成器評価方法は、 20000ビットより小さいビット数の乱数を生 成する乱数生成器を評価する方法であり、乱数生成器による乱数生成と、生成され た乱数のメモリへの格納を繰返し、該メモリに格納された乱数の合計ビット数が 2000 0ビットを超えたとき、該 20000ビット以上のサンプノレを対象として乱数性を判定し、 該乱数性判定結果に応じて乱数生成器の評価を行う方法が用いられる。これによつ て、例えば FIPS140で規定されているような統計的判定方法を用いた乱数生成器 の評価が可能となる。
[0015] 次に本発明の乱数使用方法は、バイト長単位で使用される乱数の使用方法であり 、生成した乱数をバイト単位でのデータ読み書き可能な不揮発性メモリに格納し、乱 数を演算に使用するとき、必要なバイト長単位の未使用の乱数を該不揮発性メモリか ら読出して使用する方法が用いられる。これによつてハードウェア的に同じ乱数が使 用されることが制限され、乱数が予測される危険性を軽減することができる。
図面の簡単な説明
[0016] [図 1]本発明の乱数生成装置の原理構成ブロック図である。
[図 2]本発明における ICカードの基本的な構成ブロック図である。
[図 3]ICカードの第 1の実施例の構成を示すブロック図である。
[図 4]ICカードの第 2の実施例の構成を示すブロック図である。
[図 5]ICカードの第 3の実施例の構成を示すブロック図である。 [図 6]ICカードの第 4の実施例の構成を示すブロック図である。
[図 7]乱数生成制御部による乱数生成器の設定を説明する図である。
[図 8]補正テーブルパラメータの意味を説明する図である。
[図 9]補正テーブルパラメータ格納部の格納内容の例である。
[図 10]補正テーブルパラメータのフォーマットを説明する図である。
[図 11]乱数性判定部による乱数性判定動作の説明図である。
[図 12]乱数生成処理の全体フローチャートである。
[図 13]乱数生成器自体の評価方式を説明する図である。
発明を実施するための最良の形態
[0017] 図 1は、本発明の乱数生成装置の原理的な構成ブロック図である。同図において 乱数生成装置 1は少なくとも乱数生成部 2、乱数生成制御部 3、および乱数性判定部 4を備える。
[0018] 乱数生成部 2は乱数を生成するものであり、乱数生成制御部 3は乱数生成部 2に対 して乱数を生成するためのパラメータを与えるものであり、乱数性判定部 4は生成さ れた乱数の乱数性を判定するものである。そして乱数生成部 2によって生成された乱 数の乱数性があらかじめ定められた条件を満足しないと乱数性判定部 4によって判 定されたとき、乱数生成制御部 3は前述のパラメータを更新して乱数生成部 2に乱数 の再生成を行わせる。
[0019] 本発明においては、乱数生成装置 1の起動時に乱数生成のために使用されるべき 前述のパラメータとしてのデフォルトパラメータを記憶するパラメータ記憶部をさらに 備え、乱数生成制御部 3が乱数生成装置 1の起動時にそのデフォルトパラメータを乱 数生成部 2に与えることもできる。
[0020] またこのパラメータ記憶部は、前述のパラメータとして前述のデフォルトパラメータを 用いて生成された乱数の乱数性があらかじめ定められた条件を満たさないときに、乱 数生成制御部 3が前述のパラメータ更新において用いるべき更新用パラメータをさら に記憶することもでき、またパラメータ記憶部は生成された乱数が 0と 1のいずれに偏 る可能性があるかを示す乱数性情報に対応させて、前述の更新用パラメータを複数 個記憶するとともに、乱数性判定部 4が判定結果として生成された乱数が 0と 1のいず れに偏っているかを示す判定情報を乱数生成制御部 3に与え、乱数生成制御部 3が 与えられた判定情報に対応してパラメータ記憶部に記憶されている更新用パラメータ を選択することもできる。
[0021] さらに乱数生成部 2によって再生成された乱数の乱数性が前述の条件を満足した ときには、乱数生成制御部 3がパラメータ記憶部に格納されているデフォルトパラメ一 タを該乱数の再生成に用いられたパラメータに書き換えることもできる。
[0022] また本発明においては乱数生成装置 1は、非接触で外部から電源の供給を受ける I Cカードに搭載されることもできる。
次に本発明の乱数生成方法においては、乱数生成のためのパラメータをメモリから 読出し、そのパラメータを用いて乱数を生成し、生成された乱数の乱数性があらかじ め定められた条件を満足しているか否力、を判定し、その条件を満足しないときには乱 数生成のためのパラメータとして更新用パラメータを読出し、その更新用パラメータを 用いて乱数を生成し、生成された乱数の乱数性判定以降を繰り返す方法が用いられ る。
[0023] また本発明において乱数を生成するための計算機によって使用されるプログラムと して、乱数生成のためのパラメータをメモリから読み出す手順と、該パラメータを用い て乱数を生成する手順と、生成された乱数の乱数性があらかじめ定められた条件を 満足するか否かを判定する手順と、該条件を満足しないとき、乱数生成のためのパラ メータとして更新用パラメータを読み出す手順と、該更新用パラメータを用いて乱数 を生成し、該生成された乱数の乱数性の判定以降を繰り返す手順とを計算機に実行 させるプログラムが用いられる。
[0024] 次に本発明の乱数生成器評価方法は、 20000ビットより小さいビット数の乱数を生 成する乱数生成器の評価方法であり、乱数生成器による乱数の生成と、生成された 乱数のメモリへの格納を繰返し、メモリに格納された乱数の合計ビット数が 20000ビ ットを超えたとき、 20000ビット以上のサンプルを対象として乱数性を判定し、その判 定結果に応じて乱数生成器の評価を行うものである。
[0025] さらに本発明の乱数の使用方法は、バイト長単位で使用される乱数の使用方法で あり、生成した乱数をバイト単位でのデータ読み書きが可能な不揮発性メモリに格納 し、乱数を演算に使用するとき、必要なバイト長単位の未使用の乱数を該不揮発性メ モリから読み出して使用する方法が用いられる。
[0026] 図 2は本発明における ICカードの基本的な構成ブロック図である。同図において IC カード 10は、 ICカード 10内での乱数生成を制御する乱数生成制御部 11、乱数を生 成する乱数生成器 12、生成された乱数の乱数性を判定する乱数性判定部 13、生成 された乱数を用いて必要な演算を行う演算部 14、乱数生成に用レ、られるパラメータ などを格納する不揮発性メモリ 15、および外部機器との間の通信を行い、電力の供 給を受けるため通信 ·電源制御部 16を備えている。
[0027] 図 2において乱数生成制御部 11は、デフォルト補正テーブルパラメータ設定部 20 、補正テーブルパラメータ更新部 21、および乱数生成器制御回路 22を備えている。 また不揮発性メモリ(強誘電体 RAM) 15は、デフォルト補正テーブルパラメータ格納 部 23、補正テーブルパラメータ格納部 24、および乱数データ格納部 25を備えてい る。
[0028] ここで、本発明の請求の範囲 1における乱数生成手段は乱数生成器制御回路 22、 および乱数生成器 12に相当し、乱数生成制御手段はデフォルト補正テーブルパラメ ータ設定部 20および補正テーブルパラメータ更新部 21に相当し、また請求の範囲 2 などにおけるパラメータ記憶手段は、デフォルト補正テーブルパラメータ格納部 23お よび補正テーブルパラメータ格納部 24に相当する。
[0029] ICカード 10の起動時には、乱数生成器 12による乱数生成はデフォルト補正テープ ノレパラメータを乱数生成用のパラメータとして実行される。すなわちデフォルト補正テ 一ブルパラメータ格納部 23から読み出されたデフォルトパラメータ力 デフォルト補 正テーブルパラメータ設定部 20によって乱数生成器制御回路 22に対して設定され 、乱数生成器制御回路 22によって乱数生成器 12の動作が制御される。生成された 乱数に対しては、乱数性判定部 13によってその乱数性を示すデータ、例えば 0、ま たは 1の乱数内での出現回数が予め定められた条件を満足しているか否かが判定さ れ、満足している時には終了フラグが乱数生成制御部 11と演算部 14とに通知され、 生成された乱数は乱数データ格納部 25に格納され、そのまま演算部 14によって演 算に使用される。 [0030] 条件を満足していない時には、例えばエラーフラグによってその乱数を使用できな レ、ことが演算部 14と乱数生成制御部 11に通知される。乱数生成制御部 11内の補正 テーブルパラメータ更新部 21は、不揮発性メモリ 15内の補正テーブルパラメータ格 納部 24に格納されてレ、る補正テーブルパラメータを、デフォルト補正テーブルパラメ ータの代わりに乱数生成器制御回路 22に設定し、その結果に対応して乱数生成器 12によって再び乱数が生成され、再生成された乱数を対象として乱数性判定部 13 によって乱数性が定められた条件を満足しているか否かが判定され、満足している 場合にはその乱数は乱数データ格納部 25に格納されるとともに、演算部 14によって その乱数を使用した演算が実行される。そして乱数の再生成に使用された補正テー ブルパラメータの値が不揮発性メモリ 15のデフォルト補正テーブルパラメータ格納部 23に上書きされて、デフォルト補正テーブルパラメータの更新が行われる。
[0031] 再生成された乱数も予め定められた条件を満足しない場合には、前述と同様にパ ラメータの更新が行われ、乱数の再生成以後の動作が実行される。このように乱数の 再生成が行われる場合には、デフォルト補正テーブルパラメータ格納部 23の格納内 容は、その乱数性が条件を満足する乱数が生成された時点で上書きされて更新され 、ICカード 10の再起動後にはその更新されたデフォルト補正テーブルパラメータが 再起動直後の乱数生成に使用されることになる。なお、補正テーブルパラメータを不 揮発性メモリに格納することにより、外部からの補正テーブルパラメータの追カロ'更新 が容易に可能となる。
[0032] 図 3は ICカードの第 1の実施例の構成ブロック図である。同図を図 2の基本構成図 と比較すると通信 ·電源制御部 16の代わりに非接触通信部 27が備えられている点と 、乱数生成器 12が熱雑音発生素子 29、増幅器 30、およびサンプリング回路 31によ つて構成され、乱数性判定部 13がカウンタ 33、比較判定回路 34、および乱数格納 バッファ 35によって構成されている点が異なっている。
[0033] 非接触通信部 27は非接触 ICカードリーダ Zライタとの間で通信を行うと同時に、リ ーダ Zライタからの電磁波を受信して ICカード用の直流電源を生成し、 ICカード 10 を起動するとともに、各部のリセットを行うためのパワーオンリセット信号の生成を行う ものである。非接触で電力の供給を受けるため、電源条件が必ずしも安定ではなぐ 生成される乱数の乱数性が問題となる可能性がそれだけ大きいと言える。
[0034] 乱数生成器 12を構成する熱雑音発生素子 29、増幅器 30、およびサンプリング回 路 31は、乱数生成制御部 11内の乱数生成器制御回路 22によって制御され、乱数 発生を行うものである力 その動作についてはさらに後述する。
[0035] また乱数性判定部 13内のカウンタ 33は、生成された乱数の乱数性を判定するため に生成された乱数内の 0、または 1の出現回数をカウントするものであり、比較判定回 路 34はその出現回数が予め定められた条件を満足しているか否かを判定するもの であり、乱数格納バッファ 35は生成された乱数を一時的に格納するものである力 こ れらの動作についてもさらに後述する。
[0036] 図 4は ICカードの第 2の実施例の構成ブロック図である。同図において、第 1の実施 例を示す図 3の非接触通信部 27の代わりに、接触通信'電源制御部 37が備えられ ている点が第 1の実施例と異なっている。この接触通信'電源制御部 37は、接触型 I Cカードリーダ/ライタとの間で通信を行うと同時に、リーダ /ライタ側から接触状態 で電源とクロックの供給を受け、外部からのリセット信号を受けることによって ICカード の動作が開始される。したがって電源条件は図 3で説明した非接触通信部 27を用い る第 1の実施例におけるより安定しており、乱数生成に用いられるパラメータ、すなわ ち補正テーブルパラメータの値も第 1の実施例とは異なったものとなる可能性がある。 例えば ICカードリーダ/ライタとの間で接触通信と非接触通信の両方を行うことがで きるコンビカードの場合などは、接触/非接触の条件に応じて補正テーブルパラメ一 タの値を設定することもできる。
[0037] 図 5は ICカードの第 3の実施例の構成ブロック図である。同図において通信'電源 制御部 16は、図 2の基本回路と同様であり、図 3の非接触通信部 27、または図 4の 接触通信'電源制御部 37のレ、ずれを用いても良レ、。この第 3の実施例にぉレ、ては、 第 1、第 2の実施例とは異なり、不揮発性メモリ 15の内部に設けられていた補正テー ブルパラメータ格納部 24が、読出専用メモリ(ROM) 37の内部の補正テーブルパラ メータ格納部 38として実現されており、不揮発性メモリ 15より集積度の大きい ROM に多くの補正テーブルパラメータを格納し、不揮発性メモリ 15の使用容量を削減する ことが可能となる。 [0038] 図 6は ICカードの第 4の実施例の構成ブロック図である。同図を、例えば第 1の実施 例を示す図 3と比較すると、乱数生成器制御回路 22が乱数生成器の電源を制御す るための電源制御用カウンタ 45、乱数生成器による乱数の出力を制御するための出 力制御用カウンタ 46、乱数生成器内のサンプリング回路 31によるサンプリング周波 数を設定するためのサンプリング周波数設定レジスタ 47、および乱数の再生成を行 う時に再生成フラグが格納される再生成フラグ格納部 48を備えており、また乱数生成 器 12の内部に電源制御回路 41を備えている点が異なっている。
[0039] 図 7は、例えば図 6の第 4の実施例における、乱数生成制御部 11による乱数生成 器 12の制御方式の説明図である。同図における制御動作を図 8から図 10に示され る補正テーブルパラメータを用いて説明する。
[0040] 乱数生成制御部 11に対しては、例えば図 6の通信 ·電源制御部 16からパワーオン リセット(PONRST)信号と、クロック(CLK)信号とが与えられ、例えば 16ビットの電 源制御用カウンタ 45は、コントロールレジスタ 49に対して入力された補正テーブルパ ラメータとしての tのカウントを開台する。
0
[0041] 図 8はこの乱数生成のための補正テーブルパラメータの説明図である。同図におい て ICカードの電源 Vcが投入されてから t時間後、乱数生成器 12の電源 Vrを投入す
0
るものとし、またその電源が投入されてから、時間 の経過後に乱数生成器の出力が 安定してから乱数生成を行うためのサンプリングを開始し、そのサンプリング終了後 に乱数生成器 12の電源 Vrをオフするものとし、乱数生成のためのサンプリングの周 波数を fとして乱数を生成するものとする。
[0042] 図 9は、例えば図 2の補正テーブルパラメータ格納部 24に格納されている補正テー ブルパラメータの格納形式を示す。図 8に対応して時間 t、 t、およびサンプリング周
0 1
波数 fの組が、一般に複数組格納されている。
[0043] 図 10は図 9における、例えば 1行分の補正テーブルパラメータのデータフォーマット の例である。図 8における時間 tと tとの値を、例えば 10msに設定するものとし、クロ
0 1
ックの周波数を 3. 57MHzとすると、 tと tとに対応するカウント回数〖ま 35, 700回と
0 1
なり、 tと tとの格納領域として 16ビットずつが必要である。またサンプリング周波数と
0 1
しては、例えば 50kHz、 100kHz、 250kHzなどいくつかの周波数を設定しておき、 その中から選択して補正テーブルパラメータとして組み合わせることとすれば、例え ば周波数 fの格納領域として 4ビットを用意することにより、 16段階のサンプリング周波 数の設定が可能となる。図 10における補正テーブルパラメータの格納領域の全体の 長さを 64ビットとすれば、リザーブとして 28ビットが残される。
[0044] なお図 8において時間 t、および tが充分大きくなぐまたサンプリング周波数 fが大
0 1
きい場合などは生成される乱数が 0または 1に偏りやすくなる。このような乱数生成器 の特性を事前に評価し、図 9に格納されている補正テーブルパラメータの組に対応し て乱数生成器の特性、すなわち 0と 1のいずれの発生率が多くなるかの特性ほし数性 の判定情報)を事前に調べ、補正テーブルパラメータに対応してその判定結果を格 納しておくことが有効である。これによつて生成された乱数の乱数性判定結果に応じ て乱数性を改善するための補正テーブルパラメータの選択が可能となる。すなわち、 生成された乱数が 0に偏っていた場合には、 1の発生率が多くなる補正テーブルパラ メータを選択して乱数の再生成を行うことになる。
[0045] 図 7において補正テーブルパラメータ、すなわち t、 t、および fの値は、コントロー
0 1
ルレジスタ 49を介してそれぞれ電源制御用カウンタ 45、出力制御用カウンタ 46、サ ンプリング周波数設定レジスタ 47に与えられる。
[0046] 乱数生成器 12側ではパワーオンリセットの後にカウンタ 45のカウント値が tに相当
0 するカウント値に達した時点で乱数生成器 12の電源がオンとされ、熱雑音発生素子 29の出力が増幅器 30によって増幅され、サンプリング回路 31に与えられる。その後 カウンタ 46が時間 tに相当する回数だけカウントを行った時点でサンプリング回路 31 が増幅器 30の出力のサンプリングを開始し、サンプリング周波数設定レジスタ 47によ つて設定された周波数を用いてサンプリングを行レ、、出力 SOUTを乱数性判定部 13 に出力する。
[0047] 図 11は、乱数性判定部 13の動作を説明するためのブロック図である。乱数性判定 部 13は、乱数生成器 12から出力された乱数が格納される乱数格納バッファ 35、舌し 数生成器 12の出力のうちの 0または 1のいずれかの生成回数をカウントするカウンタ 33、カウンタ 33の出力と乱数生成制御部 11から与えられる乱数性判定のための比 較値が設定されたレジスタ 51の内容とを比較して、乱数性の判定を行うための比較 判定回路 34を備える。比較判定回路 34による判定結果は、乱数生成制御部 11に 対してフィードバックされ、乱数生成器 12から出力された乱数が使用可能か否かが 通知される。
[0048] 図 11で乱数生成器 12によって生成された乱数の乱数性判定方法について説明 する。この乱数性判定の規格の 1つとして、米国立標準技術研究所による規格 FIPS (フエデラル'インフォメーション 'プロセシング 'スタンダーズ) 140力 Sある。この規格に おける乱数性判定のためのテストとしてモノビット(monobit)テスト、ポーカー(poker )テスト、ラン(runs)テスト、ロングラン(long runs)テストなどレ、くつかのテスト方法が 規定されている。
[0049] 本実施形態では、そのようなテストの 1つとしてのモノビットテストを基準の考え方とし て、生成された乱数の乱数性を判定するものとする。このモノビットテストでは、 2000 0ビットのサンプルストリームのうちの 1の数をカウントし、その数 Xが次式を満足すると きテストに合格するものとされてレヽる。
[0050] 9654 <X< 10346
し力しながら、本実施形態のように ICカードに搭載された乱数生成器では、生成さ れる乱数の長さはせいぜい 1024ビット程度であり、この 1024ビットをモノビットテスト の 20000ビットに対応させて、 1024ビットの中の 1または 0のいずれかの発生数 Xが 次式を満足するときにテストに合格したものと判定する。
[0051] 495 <X< 529
そこで図 11におレ、て、乱数生成器 12によって生成された乱数を対象として 1または 0の数をカウンタ 33でカウントした時に、そのカウント値が比較値設定レジスタ 51に設 定されている 495から 529の間に入っていることが比較判定回路 34によって判定さ れた場合、生成された乱数が使用可能なものと判定される。
[0052] 図 12は以上で説明した本実施形態における乱数生成処理の全体フローチャート である。同図において処理が開始されると、まずステップ S1で不揮発性メモリ 15内の デフォルト補正テーブルパラメータ格納部 23からパラメータの初期設定値として t、 t
0
、および fの値が読み出され、ステップ S2で tOの設定値を用いて乱数生成器 12に 対する電源制御信号が図 7の電源制御用カウンタ 45を介して生成され、ステップ S3 で tlの設定値を用いて出力制御用カウンタ 46を介してサンプリング回路 31に対する 出力制御信号が生成され、また fの設定値を用いてサンプリング周波数設定レジスタ 47を介してサンプリング周波数制御信号が生成され、サンプリング回路 31に与えら れる。
[0053] その結果としてステップ S4で乱数生成器 12から乱数が出力され、ステップ S5で乱 数性判定部 13によって前述のような方法で乱数性が判定され、その判定結果が乱 数生成制御部 11に通知される力 乱数性判定結果が OKである場合にはステップ S 6で乱数の再生成を行っていなレ、か、すなわち例えばデフォルトのパラメータを使つ た乱数生成時に乱数性が不適切と判定され、他のパラメータを用いた乱数再生成を 行ってレ、なレ、かが判定され、行ってレ、なレ、場合にはステップ S7でその乱数が不揮発 性メモリ 15の乱数データ格納部 25に格納されて、その後 ICカードにおける処理が継 続される。
[0054] ステップ S5で乱数性判定結果が NGである場合には、ステップ S8で不揮発性メモ リ 15内の補正テーブルパラメータ格納部 24から新しいパラメータ、すなわち設定値 t
0
\ t '、 f 'が選択され、乱数生成制御部 11内の補正テーブルパラメータ更新部 21に よって乱数生成器制御回路 22に対してその新しい設定値が与えられ、また再生成フ ラグ格納部 48に再生成フラグが立てられ、ステップ S 2以降の処理が行われる。
[0055] またステップ S6で乱数の再生成を行っていないかの判定が NG、すなわち乱数の 再生成が行われている場合には、ステップ S9で不揮発性メモリ 15のデフォルト補正 テーブルパラメータ格納部 23に最新の補正テーブルパラメータ、すなわち現時点で 出力された乱数の生成に用いられた補正テーブルパラメータが上書きされて、再生 成フラグ格納部 48の再生成フラグが落とされた後、ステップ S7で乱数の格納が行わ れる。
[0056] 次に本実施形態における乱数使用方法として、例えば図 2の不揮発性メモリ 15の 乱数データ格納部 25にあらかじめ多くの乱数を格納しておき、演算に使用した乱数 は、例えば消去して、その再使用を防止し、同一の乱数が使用されることをハードウ エア的に制御する方法を用いることができる。
[0057] 不揮発性メモリ 15として、バイト単位でのデータ格納と消去が可能な強誘電体メモ リを使用し、あらかじめ多数の乱数を生成してそのデータをメモリに格納し、使用され た乱数の格納部をアクセス不可とする。すべての乱数データが使用された後に乱数 の再生成と格納を行うことにより、 ICカードの処理において乱数が予測される危険性 を低減すること力 Sできる。
[0058] 最後に本実施形態における乱数生成器自体の評価について図 13を用いて説明 する。この乱数生成器自体の評価では、前述のように ICカードに搭載された乱数生 成器が 1024ビット程度の乱数を生成するものであり、これに対して前述のように FIP S140に規定された、例えばモノビットテストでは 20000ビットのサンプルに対する乱 数性が判定されるために、図 13の ICカードにおいても 1024ビットの乱数生成を繰返 し、合計 20000ビットの乱数が生成された時点でその 20000ビットをサンプルとして 乱数性の判定を行レ、、これによつて乱数生成器自体の評価を行うものとする。
[0059] すなわち図 13において、例えば演算部 14から乱数生成制御部 11に対して乱数生 成器自体の評価の開始コマンドが発行されることで処理が開始され、乱数生成制御 部 11によってデフォルトの補正テーブルパラメータが乱数生成器制御回路 22に設 定された後に乱数生成器 12が起動され、生成された乱数は乱数データ格納部 25に 格納される。乱数生成器 12は同じパラメータを使用して乱数生成を繰返し、 20000 ビット以上の乱数が乱数データ格納部 25に格納された時点で乱数性判定部 13が起 動され、乱数性判定部 13は、例えば FIPS140に規定されているモノビットテストによ つて、あるいはポーカーテスト、ランテスト、ロングランテストのいずれかによつて乱数 性を判定し、判定結果を演算部 14に通知する。このような乱数生成器自体の評価は 、乱数生成器 12の単体マクロと制御/判定回路に対する評価であり、基本的には非 接触での電力供給など、乱数生成器が外部から影響を受ける要因を排除して行わ れ、デフォルト補正テーブルパラメータを用いた乱数生成器 12の動作自体の評価が 行われる。
[0060] 以上の説明では、補正テーブルパラメータとして、例えば図 8で説明したようにカー ド電源の立ち上がりから乱数生成器電源の立ち上がりまでの時間 t、乱数生成器電
0
源の立ち上がりから乱数生成器の動作が安定するまでの安定時間 t、および乱数を
1
取得するためのサンプリング周波数 fの 3つが規定されている力 例えば乱数生成器 の電源電圧、すなわち電源電圧 Vrの値そのものをパラメータとして乱数生成を行うこ とちできる。
[0061] また乱数性の判定については、 FIPS 140のモノビットテストに準じて判定を行うもの としたが、ポーカーテスト、ランテスト、またはロングランテストに準じた判定を行うことも できる。
[0062] さらに図 12で説明したように、不揮発性メモリに保存されているデフォルト補正テー ブルパラメータは、パラメータが更新されて生成された乱数に対する乱数性判定結果 が〇Kの時にはその更新が行われるものとした。これは最新の通信環境に対応する パラメータをデフォルト補正テーブルパラメータとして次の乱数生成器起動時に使用 するためであるが、通信条件が頻繁に変化するような使用方法などにおいては、デフ オルト補正テーブルパラメータの更新を行わない実施形態も当然考えられる。
産業上の利用可能性
[0063] 本発明は、乱数生成器が搭載された ICカードを用いる全ての産業において利用す ることが可能であり、また必ずしも ICカードだけでなぐ外部からの影響を受けやすい 環境で使用される乱数生成器を利用する全ての産業において利用可能である。

Claims

請求の範囲
[1] 乱数を生成する乱数生成手段と、
該乱数生成手段に乱数を生成するためのパラメータを与える乱数生成制御手段と、 該生成された乱数の乱数性を判定する乱数性判定手段とを備え、
生成された乱数の乱数性があらかじめ定められた条件を満足しないとき、前記乱数 生成制御手段が前記乱数生成のためのパラメータを更新して乱数生成手段に乱数 の再生成を行わせることを特徴とする乱数生成装置。
[2] 請求の範囲 1記載の乱数生成装置において、
該乱数生成装置の起動時に乱数生成のために使用されるべき前記パラメータとして のデフォルトパラメータを記憶するパラメータ記憶手段をさらに備え、
前記乱数生成制御手段が、該乱数生成器の起動時に該デフォルトパラメータを前 記乱数生成手段に与えることを特徴とする乱数生成装置。
[3] 請求の範囲 2記載の乱数生成装置において、
前記パラメータ記憶手段が、前記デフォルトパラメータを用いて生成された乱数の乱 数性が前記あらかじめ定められた条件を満足しないとき、前記乱数生成制御手段に よる前記パラメータ更新に用いられるべき更新用パラメータをさらに記憶することを特 徴とする乱数生成装置。
[4] 請求の範囲 3記載の乱数生成装置において、
前記パラメータ記憶手段が、 0と 1のいずれに乱数が偏る可能性があるかを示す乱数 性情報に対応させて前記更新用パラメータを複数個記憶するとともに、
前記乱数性判定手段が、生成された乱数が 0と 1のいずれに偏っているかを示す判 定情報を前記乱数生成制御手段に与え、該乱数生成制御手段が該与えられた判定 情報と前記乱数性情報とに対応してパラメータ記憶手段に記憶されている更新用パ ラメータを選択することを特徴とする乱数生成装置。
[5] 請求の範囲 2記載の乱数生成装置において、
前記乱数生成手段によって再生成された乱数の乱数性が前記あらかじめ定められ た条件を満足したとき、前記乱数生成制御手段が前記パラメータ記憶手段に格納さ れているデフォルトパラメータを該乱数再生成に用いられたパラメータに書き換えるこ とを特徴とする乱数生成装置。
[6] 請求の範囲 2記載の乱数生成装置において、
前記パラメータ記憶手段が不揮発性メモリによって構成されることを特徴とする乱数 生成装置。
[7] 請求の範囲 1記載の乱数生成装置において、
前記乱数の再生成が行われるとき、該再生成を示すフラグを格納する再生成フラグ 格納手段をさらに備えることを特徴とする乱数生成装置。
[8] 請求の範囲 1記載の乱数生成装置において、
前記乱数生成のためのパラメータが、前記乱数生成手段に対する電源電圧印加後 の経過時間、および乱数生成のためのサンプリングの周波数を含むことを特徴とする 乱数生成装置。
[9] 請求の範囲 1記載の乱数生成装置が、非接触で外部から電源の供給を受ける IC力 ードに搭載されることを特徴とする乱数生成装置。
[10] 乱数生成のためのパラメータをメモリから読出し、
該パラメータを用いて乱数を生成し、
該生成された乱数の乱数性があらかじめ定められた条件を満足するか否力を判定 し、
該条件を満足しないとき、乱数生成のためのパラメータとして更新用パラメータを読 出し、
該更新用パラメータを用いて乱数を再生成し、該再生成された乱数の乱数性判定 以降を繰り返すことを特徴とする乱数生成方法。
[11] 乱数を生成する計算機によって使用されるプログラムであって、
乱数生成のためのパラメータをメモリから読出す手順と、
該パラメータを用いて乱数を生成する手順と、
該生成された乱数の乱数性があらかじめ定められた条件を満足するか否力、を判定 する手順と、
該条件を満足しないとき、乱数生成のためのパラメータとして更新用パラメータを読 出す手順と、 該更新用パラメータを用いて乱数を再生成し、該再生成された乱数の乱数性判定 以降を繰り返す手順とを計算機に実行させるプログラム。
[12] 20000ビットより小さいビット数の乱数を生成する乱数生成器の評価方法であって 該乱数生成器による乱数の生成と、該生成された乱数のメモリへの格納とを繰返し 該メモリに格納された乱数の合計ビット数が 20000ビットを超えたとき、該 20000ビ ット以上のサンプルを対象として乱数性の判定を行い、
該乱数性の判定結果に応じて前記乱数生成器の評価を行うことを特徴とする乱数 生成器評価方法。
[13] バイト長単位で使用される乱数の使用方法であって、
生成した乱数をバイト単位でのデータ読み書き可能な不揮発性メモリに格納し、 乱数を演算に使用するとき、必要なバイト長単位の未使用の乱数を該不揮発性メ モリから読み出して使用することを特徴とする乱数使用方法。
[14] 請求の範囲 13記載の乱数使用方法において、
前記不揮発性メモリが強誘電体メモリによって構成されることを特徴とする乱数使用 方法。
PCT/JP2004/008611 2004-06-18 2004-06-18 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法 WO2005124537A1 (ja)

Priority Applications (4)

Application Number Priority Date Filing Date Title
EP04746113A EP1758020A4 (en) 2004-06-18 2004-06-18 RANDOM PRODUCTION DEVICE, PRODUCTION METHOD, GENERATOR EVALUATION METHOD AND USE METHOD FOR RANDOM NUMBERS
JP2006514628A JPWO2005124537A1 (ja) 2004-06-18 2004-06-18 乱数生成装置、生成方法、生成器評価方法、および乱数使用方法
PCT/JP2004/008611 WO2005124537A1 (ja) 2004-06-18 2004-06-18 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法
US11/601,775 US20070067375A1 (en) 2004-06-18 2006-11-20 Random number generation device and method, generator evaluation method and method for using random numbers

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2004/008611 WO2005124537A1 (ja) 2004-06-18 2004-06-18 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US11/601,775 Continuation US20070067375A1 (en) 2004-06-18 2006-11-20 Random number generation device and method, generator evaluation method and method for using random numbers

Publications (1)

Publication Number Publication Date
WO2005124537A1 true WO2005124537A1 (ja) 2005-12-29

Family

ID=35509884

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2004/008611 WO2005124537A1 (ja) 2004-06-18 2004-06-18 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法

Country Status (4)

Country Link
US (1) US20070067375A1 (ja)
EP (1) EP1758020A4 (ja)
JP (1) JPWO2005124537A1 (ja)
WO (1) WO2005124537A1 (ja)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013129084A1 (ja) * 2012-03-02 2013-09-06 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
WO2013129119A1 (ja) * 2012-03-02 2013-09-06 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
JP2013247439A (ja) * 2012-05-24 2013-12-09 Ntt Data Corp 鍵データ生成装置、鍵データ生成方法、及びプログラム
JP2016001466A (ja) * 2014-05-21 2016-01-07 パナソニックIpマネジメント株式会社 データ生成装置およびデータ生成方法
JP2016085774A (ja) * 2014-10-24 2016-05-19 株式会社メガチップス 記憶装置、及び記憶装置の信頼性テスト方法
JP2016085337A (ja) * 2014-10-24 2016-05-19 株式会社メガチップス 半導体装置、半導体記憶装置、及び半導体装置の信頼性テスト方法
JP2016118848A (ja) * 2014-12-19 2016-06-30 ローム株式会社 擬似乱数生成装置
JP2017508173A (ja) * 2013-12-31 2017-03-23 アイシーティーケー カンパニー リミテッド デジタル値処理装置及び方法
US10096379B2 (en) 2014-10-24 2018-10-09 Megachips Corporation Memory device and method for testing reliability of memory device
EP4033348A1 (en) 2020-12-17 2022-07-27 Fujitsu Limited Random number generation program and random number generation method, random number generation apparatus

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102005042135B3 (de) * 2005-09-05 2006-08-31 Infineon Technologies Ag Vorrichtung und Verfahren mit Computerprogramm zur Zufallszahlenerzeugung mit Schiefenregelung und algorithmischer Nachbearbeitung
US7945790B2 (en) * 2006-12-04 2011-05-17 Intel Corporation Low-cost pseudo-random nonce value generation system and method
JP2008171034A (ja) * 2007-01-05 2008-07-24 Hitachi Ltd プログラムの作成支援装置、その作成支援プログラム及びその作成支援方法
US8316069B2 (en) * 2007-10-12 2012-11-20 Sanyo Semiconductor Co., Ltd. Semiconductor integrated circuit with a random number generation circuit wherein the rise and all times are variably controlled
US8332448B2 (en) * 2007-10-12 2012-12-11 Sanyo Semiconductor Co., Ltd. Semiconductor integrated circuit having a random number and oscillator circuit for variably controlling stored data
TWI362611B (en) * 2007-12-12 2012-04-21 Phison Electronics Corp Random number generator and random number generating method thereof
US9292259B2 (en) * 2008-08-06 2016-03-22 Cassy Holdings Llc Uncertainty random value generator
KR101104985B1 (ko) * 2009-11-06 2012-01-16 양창근 난수 생성 방법 및 시스템
US10095480B2 (en) 2011-10-11 2018-10-09 Intel Corporation Automatic code generation for crowdsourced automatic data collection
KR20130080203A (ko) * 2012-01-04 2013-07-12 삼성전자주식회사 셀 상태들의 비대칭 특성을 고려한 프로그램 데이터를 생성하는 방법 및 그것을 이용한 메모리 시스템
KR101373283B1 (ko) 2012-04-23 2014-03-11 한국전자통신연구원 비휘발성 메모리를 이용한 이중 트랙 방식의 난수 발생 방법 및 이를 위한 장치
KR101443575B1 (ko) 2013-04-29 2014-09-23 한국전자통신연구원 이진 난수열을 정수 난수로 변환하는 장치 및 방법
KR101557761B1 (ko) * 2014-02-12 2015-10-06 한국전자통신연구원 실난수 발생기의 출력 수열 안정화 장치 및 방법
US10216484B2 (en) * 2014-06-10 2019-02-26 Texas Instruments Incorporated Random number generation with ferroelectric random access memory
JP2023025621A (ja) * 2021-08-10 2023-02-22 ルネサスエレクトロニクス株式会社 半導体装置および乱数の生成方法

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07182145A (ja) * 1993-12-22 1995-07-21 Ricoh Co Ltd 乱数の初期値生成装置
JP2000181686A (ja) * 1998-12-16 2000-06-30 Denso Corp 乱数発生装置とそれを備えた車両盗難防止装置
JP2000276330A (ja) * 1999-03-26 2000-10-06 Syst Kogaku Kk 故障判断機能を備えた乱数生成装置
JP2001005384A (ja) * 1999-06-24 2001-01-12 Matsushita Electric Ind Co Ltd 乱数生成方法
JP2003131867A (ja) * 2001-08-15 2003-05-09 Syst Kogaku Kk 乱数生成装置

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002268874A (ja) * 2001-03-07 2002-09-20 Toshiba Corp 乱数シード生成回路及びこれを備えたドライバ、並びに、sdメモリカードシステム
US6993543B2 (en) * 2002-04-22 2006-01-31 Koninklijke Philips Electronics N.V. Gap histogram on-line randomness test

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH07182145A (ja) * 1993-12-22 1995-07-21 Ricoh Co Ltd 乱数の初期値生成装置
JP2000181686A (ja) * 1998-12-16 2000-06-30 Denso Corp 乱数発生装置とそれを備えた車両盗難防止装置
JP2000276330A (ja) * 1999-03-26 2000-10-06 Syst Kogaku Kk 故障判断機能を備えた乱数生成装置
JP2001005384A (ja) * 1999-06-24 2001-01-12 Matsushita Electric Ind Co Ltd 乱数生成方法
JP2003131867A (ja) * 2001-08-15 2003-05-09 Syst Kogaku Kk 乱数生成装置

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP1758020A4 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2013129084A1 (ja) * 2012-03-02 2013-09-06 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
WO2013129119A1 (ja) * 2012-03-02 2013-09-06 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
JPWO2013129084A1 (ja) * 2012-03-02 2015-07-30 ソニー株式会社 情報処理装置、情報処理方法、及びプログラム
JP2013247439A (ja) * 2012-05-24 2013-12-09 Ntt Data Corp 鍵データ生成装置、鍵データ生成方法、及びプログラム
JP2017508173A (ja) * 2013-12-31 2017-03-23 アイシーティーケー カンパニー リミテッド デジタル値処理装置及び方法
JP2016001466A (ja) * 2014-05-21 2016-01-07 パナソニックIpマネジメント株式会社 データ生成装置およびデータ生成方法
JP2016085774A (ja) * 2014-10-24 2016-05-19 株式会社メガチップス 記憶装置、及び記憶装置の信頼性テスト方法
JP2016085337A (ja) * 2014-10-24 2016-05-19 株式会社メガチップス 半導体装置、半導体記憶装置、及び半導体装置の信頼性テスト方法
US10096379B2 (en) 2014-10-24 2018-10-09 Megachips Corporation Memory device and method for testing reliability of memory device
JP2016118848A (ja) * 2014-12-19 2016-06-30 ローム株式会社 擬似乱数生成装置
EP4033348A1 (en) 2020-12-17 2022-07-27 Fujitsu Limited Random number generation program and random number generation method, random number generation apparatus

Also Published As

Publication number Publication date
JPWO2005124537A1 (ja) 2008-04-17
EP1758020A1 (en) 2007-02-28
US20070067375A1 (en) 2007-03-22
EP1758020A4 (en) 2008-11-26

Similar Documents

Publication Publication Date Title
WO2005124537A1 (ja) 乱数生成装置,生成方法,生成器評価方法、および乱数使用方法
US8250288B2 (en) Flash memory storage system and controller and data protection method thereof
US7302572B2 (en) Portable information storage medium and its authentication method
JP2004206574A (ja) 携帯可能電子媒体及び携帯可能電子媒体の認証処理方法
US8112662B2 (en) Portable electronic apparatus, processing apparatus for portable electronic apparatus, and data processing method in portable electronic apparatus
US8019927B2 (en) Electronic tag system having bank status and controlling method thereof
KR101783526B1 (ko) Ic 카드, 전자 장치 및 휴대 가능 전자 장치
EP1739587A1 (en) Portable electronic apparatus and secured data output method therefor
JP5278813B2 (ja) リアルタイムクロックおよび電子機器のセキュリティ設定方法
JPWO2006018925A1 (ja) 半導体集積装置並びにそれを用いたicカード及び携帯情報端末
KR20070018986A (ko) 난수 생성 장치, 생성 방법, 생성기 평가 방법 및 난수사용 방법
JP2006195901A (ja) 半導体装置
JP2004185419A (ja) 携帯可能電子媒体と、その携帯可能電子媒体の発行システム、処理方法及び発行方法
US7107616B2 (en) Method of producing a response
CN100395771C (zh) 定制后能修改其性能的微电路卡
KR100580380B1 (ko) 스마트 카드를 이용한 지불 방법 및 그 장치
JP2000105788A (ja) 携帯可能電子装置と保護方法
US20200319667A1 (en) Method for determining the behavior of a smart card, and related server
JPH03224047A (ja) 携帯可能電子装置
CN103679981B (zh) 财务打印机及财务打印机的控制方法
JP2007072794A (ja) 携帯可能電子装置
JPH0887575A (ja) Icカード利用装置
US8521935B2 (en) Portable electronic apparatus, control method for portable electronic apparatus, and IC card
JP5293113B2 (ja) 半導体装置、半導体装置の制御方法および半導体装置の制御プログラム
JPH11328328A (ja) 無線カード

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A1

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A1

Designated state(s): BW GH GM KE LS MW MZ NA SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 2006514628

Country of ref document: JP

WWE Wipo information: entry into national phase

Ref document number: 11601775

Country of ref document: US

WWE Wipo information: entry into national phase

Ref document number: 2004746113

Country of ref document: EP

WWE Wipo information: entry into national phase

Ref document number: 1020067025746

Country of ref document: KR

NENP Non-entry into the national phase

Ref country code: DE

WWW Wipo information: withdrawn in national office

Ref document number: DE

WWP Wipo information: published in national office

Ref document number: 2004746113

Country of ref document: EP

WWP Wipo information: published in national office

Ref document number: 11601775

Country of ref document: US