CN112306455B - Random number generation method, generator, and computer readable storage medium for electronic device - Google Patents

Random number generation method, generator, and computer readable storage medium for electronic device Download PDF

Info

Publication number
CN112306455B
CN112306455B CN202010225334.4A CN202010225334A CN112306455B CN 112306455 B CN112306455 B CN 112306455B CN 202010225334 A CN202010225334 A CN 202010225334A CN 112306455 B CN112306455 B CN 112306455B
Authority
CN
China
Prior art keywords
entropy
entropy source
data
sample data
queue
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
CN202010225334.4A
Other languages
Chinese (zh)
Other versions
CN112306455A (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.)
Shenzhou Rongan Digital Technology Beijing Co ltd
Original Assignee
Shenzhou Rongan Digital Technology Beijing Co ltd
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 Shenzhou Rongan Digital Technology Beijing Co ltd filed Critical Shenzhou Rongan Digital Technology Beijing Co ltd
Priority to CN202010225334.4A priority Critical patent/CN112306455B/en
Publication of CN112306455A publication Critical patent/CN112306455A/en
Application granted granted Critical
Publication of CN112306455B publication Critical patent/CN112306455B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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
    • G06F7/588Random number generators, i.e. based on natural stochastic processes

Abstract

The embodiment of the application provides a random number generation method and a random number generator, and relates to the technical field of computer application. The method comprises the following steps: collecting entropy source sample data from a plurality of entropy sources; processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively; extracting data from each entropy source queue and performing corresponding processing; and outputting the random number of the processed data according to a preset output mode. The method and the device solve the problems of unstable entropy source, large memory consumption and low safety of the application end of the device.

Description

Random number generation method, generator, and computer readable storage medium for electronic device
Technical Field
The present application relates to the field of computer application technologies, and in particular, to a random number generation method, a generator, and an electronic device computer readable storage medium.
Background
Nowadays, with the rapid development of the mobile internet, daily digital application devices such as mobile phones and computers are increasingly important in life. People not only browse web pages and search materials, but also do daily activities such as shopping, transaction payment and the like in the process of using the equipment, and meanwhile, a large amount of user privacy information is also stored in the equipment. Therefore, people have increasingly strong knowledge of personal information security.
User personal information is typically stored at the application device side by means of encryption algorithms or the like, so many applications require highly secure random number generators, such as password generators, games, folder encryption, security protocols, etc.
At present, the design difficulty of the random number generator at the application equipment end is that the entropy source is unstable, the safety and the performance are difficult to balance, and the like. The mobile phone equipment has larger differentiation, and different mobile phone configurations, different systems and different authority grants all bring difficulties to the design of the random number generator at the mobile phone end.
Disclosure of Invention
The application provides a random number generation method, a random number generator and an electronic device computer readable storage medium, which can solve the problems of unstable entropy source, large memory consumption and low safety of an application end of the device.
In a first aspect, a method of random number generation is provided, the method comprising:
collecting entropy source sample data from a plurality of entropy sources;
processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively;
extracting data from each entropy source queue and performing corresponding processing;
and outputting the random number of the processed data according to a preset output mode.
In a second aspect, a random number generator is provided, where the random number generator includes a processing module, an extracting module, and an output module, which are configured to implement operations corresponding to the random number generating method in the first aspect. The random number generator includes:
a processing module for collecting entropy source sample data from a plurality of entropy sources; processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively;
the extraction module is used for extracting data from each entropy source queue and carrying out corresponding processing;
and the output module is used for outputting the processed data into random numbers according to a preset output mode.
In a third aspect, an electronic device is provided, including an entropy source processor, a hybrid extractor, and an outputter, where the entropy source processor, the hybrid extractor, and the outputter may implement the method for generating random numbers shown in the first aspect of the present application.
In a fourth aspect, there is provided a computer-readable storage medium having stored thereon a computer program which, when executed, implements the random number generation method of the first aspect of the present application.
The beneficial effects that this application provided technical scheme brought are:
in the scheme, the data are randomly from multiple kinds of entropy sources, so that the sources of the entropy sources are enriched, and the problems of single operation environment and unstable entropy sources caused by single entropy sources in the prior art are solved; meanwhile, the entropy source sample data is correspondingly processed, so that the memory capacity of the corresponding entropy source data can be reduced, and in the scheme, the processed entropy source data is subjected to subsequent operation; instead of directly acquiring data from the entropy source and directly performing subsequent operations without any processing in the prior art, the memory consumption can be reduced after the entropy source sample data is processed in the scheme. In addition, in the scheme, the sampling data, the processing data and the final random number output are all independently operable parts, so that the method is suitable for multi-thread or multi-core computing environments and can improve the operation capability.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments of the present application will be briefly described below.
Fig. 1 is a schematic flow chart of a method for generating random numbers according to an embodiment of the present application;
fig. 2 is a schematic flow chart of extracting data in a random number generation method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating a specific method for obtaining an entropy source sample according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a random number generator according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of a data processing method according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein the same or similar reference numerals refer to the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the drawings are exemplary only for the purpose of illustrating the present application and are not to be construed as limiting the invention.
As used herein, the singular forms "a", "an", "the" and "the" are intended to include the plural forms as well, unless expressly stated otherwise, as understood by those skilled in the art. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. The term "and/or" as used herein includes all or any element and all combination of one or more of the associated listed items.
For the purpose of making the objects, technical solutions and advantages of the present application more apparent, the embodiments of the present application will be described in further detail below with reference to the accompanying drawings.
Several terms which are referred to in this application are first introduced and explained:
hardware device data refers to sample data derived from a hardware device randomly selected from, but not limited to, several of the following: for example, acceleration sensor sample data, gyroscope sample data, image sensor sample data, microphone sample data, WIFI intensity sample data, and the like.
System random event data refers to data derived from system events randomly selected from but not limited to: system interrupt time data, disk access time data, etc.
User behavior data refers to, but is not limited to, randomly selected data derived from user behavior: APP start time and process number, click event time and PIN code entry time.
The primary processing tool of the processing module is a disclosed randomness extractor.
The main processing tool of the extraction module is a secure hash function, and the output length is set to be N.
The main processing tool of the output module is a safe packet encryption algorithm, and the key length and the packet length are set as M.
Entropy source sample data refers to data sampled from an entropy source.
The entropy source block data refers to data after processing the entropy source samples.
The entropy source queue means that a queue container is arranged for each type of entropy source, and is used for storing entropy source block data, and the entropy source block data which is firstly put into the entropy source queue can be called by the extraction module.
The entropy value count indicates the amount of entropy value contained in the entropy source block data.
The minimum entropy rate is the ratio of the minimum entropy value of an entropy source to the amount of bits required to represent the sample.
The design difficulty of the conventional random number generator at the application equipment end is instability caused by the single entropy source, and the problems of difficulty in balancing safety and performance and the like. The difference of application devices also causes various difficulties in the generation of random numbers, such as mobile phones, different brands of mobile phones have larger differentiation due to different manufacturers, and different mobile phone configurations, different systems and different authority grants all bring difficulties to the design of random number generators at the mobile phone end.
The following is a description of specific examples:
in one embodiment of the application, the general steps of the provided embodiment of the invention are that data acquired from various entropy sources need to be processed and output through three steps of a processing module, an extracting module and an output module, so that the variety of the entropy sources is enriched in the process, and different processing methods are selected according to sample data of different entropy sources; meanwhile, the storage amount of the corresponding entropy source data is reduced, and the problem of large memory consumption caused by low minimum entropy rate is solved; the specific steps are as shown in figure 1,
step S11, collecting entropy source sample data from a plurality of entropy sources;
in particular, a wide variety of entropy sources may be collected from the application device, such as in a cell phone, including, but not limited to, hardware device data, system random event data, user behavior data, and the like.
Step S12, processing the entropy source sample data, and storing the processing result into entropy source queues corresponding to the entropy sources respectively, wherein the specific mode of the step is as follows:
if the minimum entropy of entropy source sample dataIf the rate is greater than or equal to the first preset value, executing step S13; otherwise, executing step S14; wherein the first preset value selects a fraction between 0 and 1, for example, the first preset value is
Step S13, the entropy source sample data is used as first entropy source sample data to be stored in an entropy source queue corresponding to an entropy source, and the entropy value count of first entropy source block data corresponding to the first entropy source sample data is assigned as the minimum entropy value of the entropy source;
step S14, if the minimum entropy rate of the entropy source sample data is smaller than a first preset value, processing according to a first preset processing mode; the specific steps include:
taking the entropy source sample data as second entropy source sample data;
processing the second entropy source sample data by adopting a BIW/Zuckerman randomness extractor to obtain second entropy source block data;
if the entropy value count of the second entropy source block data is equal to a second preset value, starting a new entropy source block data processing; the second predetermined value is K, k=32; otherwise, executing the step S15;
step S15, when the entropy value count of the second entropy source block data is not equal to a second preset value, the second entropy source sample data is directly stored in an entropy source queue, and the second entropy source block data is waited to be called by the extraction module or is continuously processed after more entropy source sample data exist;
s16, extracting data from each entropy source queue and performing corresponding processing; the specific process comprises the following steps:
in the step, data are extracted from each entropy source queue through an extraction module and are correspondingly processed, an operation function used by the extraction module in the process is a safe hash function, the input end of the operation function is provided with a mixed queue and an accumulated entropy value queue, and the output end of the operation function is provided with an output buffer queue. As shown in fig. 2, a specific process of extracting data in a random number generation method is as follows:
step S21, after traversing each entropy source queue, the extraction module extracts corresponding data from each entropy source queue according to a first preset extraction mode, and stores the extracted data into a mixed queue;
the first preset extraction method in this step refers to: extracting the appointed number of entropy source block data from each entropy source queue when traversing each entropy source queue in turn; the sum of entropy values of a specified number of entropy source block data is not smaller than a third predetermined value, for example:
the extraction module sequentially traverses and accesses the front w of the jth entropy source queue every time when accessing each entropy source queue j The entropy source block data are put into a mixing queue, and corresponding entropy value counts are deleted; wherein w is j Specifying the amount of entropy source block data;
w j to make the entropy source queue front w j The sum of the entropy values of the entropy source block data is greater than or equal to a third predetermined valueIs a minimum integer of (a). Wherein R is the sum of the total entropy values of all entropy source queues, and the specific algorithm is as follows:
let the total entropy value of each entropy source queue be r 1 ,r 2 ,r 3 ,. then r=r 1 +r 2 +r 3
Extracting data segments meeting the requirements from the mixed queue according to a second preset extraction mode; the specific process comprises a step S22 and a step S23;
step S22, after finishing one traversal access, pushing the value of the last position of the mixed queue into the accumulated entropy value queue;
the accumulated entropy value queue is used for storing a position mark, the position mark is used for indicating the position where the entropy value accumulated by the entropy source block data in the mixed queue reaches the multiple of a fourth preset value N, the first value of the accumulated entropy value queue stores the position where the entropy value accumulated by the entropy source block data in the mixed queue value is N, the second value stores the position where the entropy value accumulated by the entropy source block data in the mixed queue is 2N, and so on.
Step S23, the extraction module puts the data segments meeting the requirements into an output buffer queue;
the data segment is the data corresponding to the position mark from the top data in the mixed queue to the accumulated entropy value queue.
The extraction module uses a secure hash function to operate the segment of data and then puts the segment of data into an output cache queue. And finally, popping up the first value of the accumulated entropy value queue, and subtracting the value from other values.
And S17, outputting the random number by the output module according to the preset output mode from the data processed by the extraction module.
The output module has three preset output modes, mainly comprising:
the first is a direct output mode, after the output module receives the random number calling request and waits for the output queue to reach the random number of the request, the output module directly takes out the corresponding amount of data from the output buffer queue.
The second mode is a pseudo-random number output mode, the output module takes out two M long data segments from the output buffer queue, the length of M can be 128 bits or 256 bits, the M can be set according to actual needs, the M can be used as a secret key and an initial vector of a safe block cipher function respectively, and the block cipher function outputs a required number of random numbers in a counter mode.
And thirdly, a mixed output mode, wherein the output process of the mode is that an output module reserves 2M data at the bottom of an output buffer queue as a key and an initial vector of a block cipher function respectively. The method comprises the steps of directly outputting the rest data in a cache queue, using a block cipher function to operate and output in a counter mode, and repeating the process until the random number required by a request is reached after each group of random numbers are output by the block cipher function.
Because mobile phones become indispensable terminal equipment for people's life in real life at present, for convenience of understanding, in this embodiment of the present application, the mode of acquiring entropy source sample data by using acceleration sensors and gyroscopes in hardware equipment of the mobile phones is introduced by using the mobile phones as specific examples. In an alternative embodiment of the present application, a flowchart of a specific method for obtaining entropy source samples is shown in fig. 3, and specific application processing of various types of entropy source sample data in a mobile phone is as follows:
step S31, collecting sample data;
for any entropy source, assuming that the entropy value of each entropy source sample data is delta, collecting 3 i The entropy source sample data, i is such thatThe smallest positive integer, where K is a constant value, may be a positive integer of 23 or 64.
Step 32, converting each sample data into an integer of 32 bits according to a rule; in this step, an acceleration sensor and a gyroscope are taken as examples to be introduced:
converting each axis of the acceleration sensor or gyroscope sample to a k=32 bit integer data, then each acceleration sensor or gyroscope sample can be converted to 3 k=32 bit integers;
whereas for other hardware devices, each sample is directly converted to a k=32 bit integer.
Step S33, processing the converted sample data to obtain entropy source sample data; the method comprises the following steps:
and (3) forming a set by every three adjacent integers of the integer sequence obtained in the step S32, multiplying the first two numbers in each set, adding the third number, and finally modulo P to obtain an integer. P is prime and is greater than k=32 bits, e.g. 2ζ2+2ζ3+1; let three of the sets be { a, b, c }, the calculation process be (a×b+c) mod p. Through the process, a new integer sequence with the number being one third of that of the original sequence is obtained;
and step S34, repeating the process iteratively to finally obtain an integer, and putting the last 32 bits of the integer into a corresponding entropy source queue as entropy source sample data.
According to the technical scheme provided by the embodiment of the application, the entropy source sample data is correspondingly processed, so that the storage amount of the corresponding entropy source data can be reduced, and the memory consumption is reduced.
As shown in fig. 4, an embodiment of the present application provides a random number generator including a processing module 41, an extracting module 42, and an output module 43, wherein,
a processing module 41 for collecting entropy source sample data from a plurality of entropy sources; processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively;
an extracting module 42, configured to extract data from each entropy source queue and perform corresponding processing;
and an output module 43, configured to output the processed data as a random number according to a preset output mode.
In the random number generator provided by the embodiment of the application, the data collected by the processing module 41 are randomly from multiple kinds of entropy sources, so that the sources of the entropy sources are enriched, and the problems of single operation environment and unstable entropy sources caused by single entropy sources in the prior art are solved; meanwhile, the entropy source sample data is correspondingly processed, so that the memory capacity of the corresponding entropy source data can be reduced, and in the scheme, the processed entropy source data is subjected to subsequent operation; instead of directly acquiring data from the entropy source and directly performing subsequent operations without any processing in the prior art, the memory consumption can be reduced after the entropy source sample data is processed in the scheme. In addition, in the present embodiment, the processing module 41 is used for sampling data, the extracting module 42 is used for processing data, and the final output module 43 is used for outputting random numbers, which are all independently executable parts, so that the method is suitable for multi-thread or multi-core computing environments, and the running capability can be improved.
Further, in the process of processing the entropy source sample data and storing the processing result in the entropy source queues corresponding to the entropy sources respectively, the processing module 41 is further configured to:
if the minimum entropy rate of any entropy source sample data is not smaller than a first preset value, storing any entropy source sample data as first entropy source sample data into an entropy source queue corresponding to any entropy source, and assigning the entropy value count of first entropy source block data corresponding to the first entropy source sample data as the minimum entropy value of any entropy source.
Further, in the process of processing the entropy source sample data and storing the processing result in the entropy source queues corresponding to the entropy sources respectively, the processing module 41 is further configured to:
if the minimum entropy rate of any entropy source sample data is smaller than a first preset value, taking any entropy source sample data as second entropy source sample data, and processing the second entropy source sample data by adopting a BIW/Zuckerman randomness extractor to obtain second entropy source block data;
and when the entropy value count of the second entropy source block data is smaller than a second preset value, storing the second entropy source block data in any entropy source queue.
Further, as shown in fig. 5, in the process of extracting data from each entropy source queue and performing corresponding processing, the extracting module 42 further includes a packet mixing queue 51, an accumulated entropy value queue 52, and an output buffer queue 53, where,
after traversing each entropy source queue, the extraction module 42 extracts corresponding data from each entropy source queue according to a first preset extraction mode, and stores the extracted data into the mixing queue 51;
according to a second preset extraction mode, extracting data segments meeting the requirements from the mixing queue 51;
further, the output buffer queue 53 outputs the random number according to a preset output mode.
Further, in extracting corresponding data from each entropy source queue according to the first preset extraction manner, the extracting module 42 is further configured to:
extracting the appointed number of entropy source block data from each entropy source queue when traversing each entropy source queue in turn; the sum of entropy values of the specified number of entropy source block data is not smaller than a third predetermined value.
Further, in the process of extracting the data segment meeting the requirement from the mixing queue 51 according to the second preset extraction manner, the extracting module 42 is further configured to:
extracting top data in the mixed queue to a data segment corresponding to the position identifier according to the position identifier in the accumulated entropy value queue 52; the location identifier is used for indicating a location in the mixing queue where a group of data with the accumulated entropy value of the entropy source block data reaching a fourth predetermined value is located.
The random number generator provided by the application is applicable to a multi-thread or multi-core computing environment, and the processing module 41 samples data, the processing module 42 processes the data and the final output module 43 outputs the random number which can be independently operated.
As shown in fig. 6, an electronic device is provided in an embodiment of the present application, where the electronic device includes: an entropy source processor 61, an extraction module 62 and an outputter 63; wherein the entropy source processor 61 is connected to the extraction module 62, and the extraction module 62 is connected to the output 63;
the entropy source processor 61 may be a hardware device data processor, a system random event data processor, a user behavior data processor, or any combination thereof, which may implement processing of entropy source sample data.
The electronic device includes, but is not limited to, any terminal device such as a mobile phone, a tablet computer, a computer, and the like.
The embodiment of the application provides a computer readable storage medium, and a computer program is stored on the computer readable storage medium, so that when the computer program runs on a device such as a computer or a mobile phone, the device such as the computer or the mobile phone can execute corresponding content in the embodiment of the method. Compared with the prior art, the method for generating the random number has the advantages that stability, safety and parallel effect are greatly improved.
In the embodiment provided by the application, the data are randomly from multiple kinds of entropy sources, so that the sources of the entropy sources are enriched, and the problems of single operation environment and unstable entropy sources caused by single entropy sources in the prior art are solved; meanwhile, the entropy source sample data is correspondingly processed, so that the memory capacity of the corresponding entropy source data can be reduced, and in the scheme, the processed entropy source data is subjected to subsequent operation; instead of directly acquiring data from the entropy source and directly performing subsequent operations without any processing in the prior art, the memory consumption can be reduced after the entropy source sample data is processed in the scheme. In addition, in the scheme, the sampling data, the processing data and the final random number output are all independently operable parts, so that the method is suitable for multi-thread or multi-core computing environments and can improve the operation capability.
It should be understood that, although the steps in the flowcharts of the figures are shown in order as indicated by the arrows, these steps are not necessarily performed in order as indicated by the arrows. The steps are not strictly limited in order and may be performed in other orders, unless explicitly stated herein. Moreover, at least some of the steps in the flowcharts of the figures may include a plurality of sub-steps or stages that are not necessarily performed at the same time, but may be performed at different times, the order of their execution not necessarily being sequential, but may be performed in turn or alternately with other steps or at least a portion of the other steps or stages.
The foregoing is only a partial embodiment of the present invention, and it should be noted that it will be apparent to those skilled in the art that modifications and adaptations can be made without departing from the principles of the present invention, and such modifications and adaptations are intended to be comprehended within the scope of the present invention.

Claims (7)

1. A method of generating random numbers, the method comprising:
collecting entropy source sample data from a plurality of entropy sources;
processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively;
extracting data from each entropy source queue and performing corresponding processing;
outputting the random number of the processed data according to a preset output mode;
the processing the entropy source sample data and storing the processing result into entropy source queues corresponding to the entropy sources respectively comprises the following steps:
if the minimum entropy rate of any entropy source sample data is not smaller than a first preset value, storing the any entropy source sample data as first entropy source sample data into an entropy source queue corresponding to any entropy source, and assigning the entropy value count of first entropy source block data corresponding to the first entropy source sample data as the minimum entropy of any entropy source;
if the minimum entropy rate of any entropy source sample data is smaller than a first preset value, taking any entropy source sample data as second entropy source sample data, and processing the second entropy source sample data by adopting a BIW/Zuckerman randomness extractor to obtain second entropy source block data;
and when the entropy value count of the second entropy source block data is not equal to a second preset value, storing the second entropy source block data in any entropy source queue.
2. The method of claim 1, wherein said extracting data from said respective entropy source queues and processing accordingly comprises:
traversing each entropy source queue, extracting corresponding data from each entropy source queue according to a first preset extraction mode, and storing the extracted data into a mixed queue;
extracting data segments meeting the requirements from the mixing queue according to a second preset extraction mode;
the outputting the random number of the processed data according to a preset output mode comprises the following steps:
and outputting the random number of the data segment according to a preset output mode.
3. The method of claim 2, wherein extracting the corresponding data from each entropy source queue according to the first predetermined extraction manner comprises:
extracting the appointed number of entropy source block data from each entropy source queue when traversing each entropy source queue in turn; the sum of entropy values of the specified number of entropy source block data is not smaller than a third predetermined value.
4. The method of claim 2, wherein said extracting the satisfactory data segment from the mixing queue according to the second predetermined extraction method comprises:
extracting top data in the mixed queue to a data segment corresponding to the position identifier; the location identification is used for indicating a group of data where the accumulated entropy value of the entropy source block data reaches a fourth preset value in the mixing queue.
5. A random number generator, the random number generator comprising:
a processing module for collecting entropy source sample data from a plurality of entropy sources; processing the entropy source sample data, and storing processing results into entropy source queues corresponding to the entropy sources respectively;
the extraction module is used for extracting data from each entropy source queue and carrying out corresponding processing;
the output module is used for outputting the processed data into a random number according to a preset output mode;
the processing module processes the entropy source sample data and stores processing results into entropy source queues corresponding to the entropy sources respectively, and the processing module comprises:
if the minimum entropy rate of any entropy source sample data is not smaller than a first preset value, storing the any entropy source sample data as first entropy source sample data into an entropy source queue corresponding to any entropy source, and assigning the entropy value count of first entropy source block data corresponding to the first entropy source sample data as the minimum entropy of any entropy source;
if the minimum entropy rate of any entropy source sample data is smaller than a first preset value, taking any entropy source sample data as second entropy source sample data, and processing the second entropy source sample data by adopting a BIW/Zuckerman randomness extractor to obtain second entropy source block data;
and when the entropy value count of the second entropy source block data is not equal to a second preset value, storing the second entropy source block data in any entropy source queue.
6. An electronic device comprising an entropy source processor, a hybrid extractor and an outputter, wherein the entropy source processor, the hybrid extractor and the outputter are capable of implementing the random number generation method of any of claims 1-4.
7. A computer readable storage medium, characterized in that the computer readable storage medium has stored thereon a computer program which, when executed, implements the random number generation method of any of claims 1-4.
CN202010225334.4A 2020-03-26 2020-03-26 Random number generation method, generator, and computer readable storage medium for electronic device Active CN112306455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010225334.4A CN112306455B (en) 2020-03-26 2020-03-26 Random number generation method, generator, and computer readable storage medium for electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010225334.4A CN112306455B (en) 2020-03-26 2020-03-26 Random number generation method, generator, and computer readable storage medium for electronic device

Publications (2)

Publication Number Publication Date
CN112306455A CN112306455A (en) 2021-02-02
CN112306455B true CN112306455B (en) 2024-02-06

Family

ID=74336747

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010225334.4A Active CN112306455B (en) 2020-03-26 2020-03-26 Random number generation method, generator, and computer readable storage medium for electronic device

Country Status (1)

Country Link
CN (1) CN112306455B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096598A2 (en) * 2006-02-22 2007-08-30 Qinetiq Limited Apparatus and method for generating random numbers
CN104298485A (en) * 2014-10-17 2015-01-21 飞天诚信科技股份有限公司 Method for generating random numbers satisfying security strength requirements
CN105027073A (en) * 2013-03-12 2015-11-04 高通股份有限公司 Interrupt driven hardware random number generator
CN105765600A (en) * 2013-12-23 2016-07-13 英特尔公司 Techniques and architecture for anonymizing user data
CN108491184A (en) * 2018-03-16 2018-09-04 数安时代科技股份有限公司 Entropy source acquisition method, computer equipment and the storage medium of randomizer
CN108874366A (en) * 2018-09-06 2018-11-23 西南大学 A kind of high-speed physical randomizer based on chaotic laser light entropy source
CN110462582A (en) * 2017-03-30 2019-11-15 硅存储技术股份有限公司 The system and method for generating random number based on Nonvolatile memory unit array

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7930332B2 (en) * 2007-03-23 2011-04-19 Microsoft Corporation Weighted entropy pool service
US8682948B2 (en) * 2011-01-06 2014-03-25 Microsoft Corporation Scalable random number generation
US8843539B2 (en) * 2012-05-08 2014-09-23 Caringo, Inc. Generation of seed value for pseudo random number generator
US9658832B2 (en) * 2015-05-18 2017-05-23 Red Hat Israel, Ltd. Multi-factor entropy sourcing for random number generators

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2007096598A2 (en) * 2006-02-22 2007-08-30 Qinetiq Limited Apparatus and method for generating random numbers
CN105027073A (en) * 2013-03-12 2015-11-04 高通股份有限公司 Interrupt driven hardware random number generator
CN105765600A (en) * 2013-12-23 2016-07-13 英特尔公司 Techniques and architecture for anonymizing user data
CN104298485A (en) * 2014-10-17 2015-01-21 飞天诚信科技股份有限公司 Method for generating random numbers satisfying security strength requirements
CN110462582A (en) * 2017-03-30 2019-11-15 硅存储技术股份有限公司 The system and method for generating random number based on Nonvolatile memory unit array
CN108491184A (en) * 2018-03-16 2018-09-04 数安时代科技股份有限公司 Entropy source acquisition method, computer equipment and the storage medium of randomizer
CN108874366A (en) * 2018-09-06 2018-11-23 西南大学 A kind of high-speed physical randomizer based on chaotic laser light entropy source

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于孪生光束的量子随机数发生器;张强;《中国优秀硕士学位论文全文数据库》;A005-24 *

Also Published As

Publication number Publication date
CN112306455A (en) 2021-02-02

Similar Documents

Publication Publication Date Title
CN107145791B (en) K-means clustering method and system with privacy protection function
EP3012754B1 (en) Searchable symmetric encryption processing system
CN103731258B (en) Generate the method and apparatus of key
Wang et al. An experimental investigation into the hash functions used in blockchains
CN110011954A (en) Biometric discrimination method, device, terminal and service server based on homomorphic cryptography
US11184163B2 (en) Value comparison server, value comparison encryption system, and value comparison method
CN111914264A (en) Index creation method and device, and data verification method and device
CN109347620B (en) Sample alignment method, system and computer readable storage medium
Huang et al. Efficiently secure data privacy on hybrid cloud
CN109934001A (en) A kind of data ciphering method based on normal cloud model
Yeoh et al. A parallelizable chaos-based true random number generator based on mobile device cameras for the android platform
CN112306455B (en) Random number generation method, generator, and computer readable storage medium for electronic device
CN107391980B (en) Login verification method, device, equipment and storage medium based on equipment data
CN111191253B (en) Data encryption combination method
CN111475690B (en) Character string matching method and device, data detection method and server
CN112468521B (en) Data processing method and device based on privacy protection and server
CN112580077B (en) Information processing method, device, equipment and storage medium
CN114357504A (en) Federal learning method based on privacy protection and related equipment
CN112468285A (en) Data processing method and device based on privacy protection and server
Kim et al. Gpu-accelerated password cracking of pdf files
CN112836078A (en) Method, device, system and storage medium for safely inquiring shortest path on graph
CN110100409B (en) Method and apparatus for generating secure hash values
CN110659490A (en) Malicious sample processing method and device, electronic equipment and storage medium
Razaque et al. Integration of CPU and GPU to accelerate RSA modular exponentiation operation
CN116680728B (en) Privacy-preserving biometric methods, systems, devices, and media

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20220113

Address after: Unit 515, floor 5, building 1, No. a 12, Zhongguancun South Street, Haidian District, Beijing 100086

Applicant after: Shenzhou Rongan digital technology (Beijing) Co.,Ltd.

Address before: Room 408, Huantai building, 12 Zhongguancun South Street, Haidian District, Beijing 100086

Applicant before: SHENZHOU RONGAN TECHNOLOGY (BEIJING) CO.,LTD.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant