CN113157250A - True random number generation method based on power supply - Google Patents

True random number generation method based on power supply Download PDF

Info

Publication number
CN113157250A
CN113157250A CN202110569608.6A CN202110569608A CN113157250A CN 113157250 A CN113157250 A CN 113157250A CN 202110569608 A CN202110569608 A CN 202110569608A CN 113157250 A CN113157250 A CN 113157250A
Authority
CN
China
Prior art keywords
random number
microcontroller
data
unit
power
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110569608.6A
Other languages
Chinese (zh)
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.)
Guangdong Beibeidian Technology Co ltd
Original Assignee
Guangdong Beibeidian Technology 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 Guangdong Beibeidian Technology Co ltd filed Critical Guangdong Beibeidian Technology Co ltd
Priority to CN202110569608.6A priority Critical patent/CN113157250A/en
Publication of CN113157250A publication Critical patent/CN113157250A/en
Pending legal-status Critical Current

Links

Images

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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • Computational Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Computer Hardware Design (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

A power-based true random number generation method adopts an upper computer, a microcontroller and a power module as random number generation tools, wherein the upper computer is internally provided with an instruction unit, a formatting unit and a data receiving and transmitting unit, and the microcontroller is internally provided with a data processing unit and a data transmission unit; setting an input pin of the microcontroller to an input mode and connecting with a power supply S1; s2, sending the number N of the random numbers to be collected by the operator to the microcontroller; s3, the microcontroller calls an internal analog-to-digital conversion module to acquire the voltage value of the power input pin and record time; s4, the data processing unit sends the recording time and the difference value; and S5, formatting the difference to obtain random numbers meeting the requirements, and sending the random numbers to required equipment to complete the generation and collection of the random numbers. The invention simplifies the hardware structure, reduces the cost, obtains the true random number by collecting the power supply change value as the random number by the microcontroller, and has larger practical application value.

Description

True random number generation method based on power supply
Technical Field
The invention relates to the technical field of information security, in particular to a true random number generation method based on a power supply.
Background
In the prior art, random numbers generated by a random generator are widely used in various fields. For example, the lottery industry, generates winning numbers by means of random numbers; in addition, the random number has many applications in information security and password products, such as generating dynamic passwords and dynamic certificate signatures, and the like, thereby greatly ensuring information security and the like.
At present, there are three main methods for generating random numbers, namely manual method, mathematical method and physical method. Wherein, the manual method is the method for generating true random at the earliest, and usually the method of shaking dice and drawing lots is adopted to determine the random number; however, as the application scale is enlarged, the random number generation scale is also enlarged, so people manually make a random number table to obtain random numbers, the table contains thousands of pre-generated true random numbers, and the method can obtain random numbers, but has low efficiency, so the application is limited. The second method is mathematical, which is also the most widely used method at present, and in the application, a certain distribution of random numbers are generated on a computer by a mathematical method, and the generated random numbers are generated according to a known algorithm and are not true random numbers, so the random numbers generated in the way are called pseudo-random numbers, and the pseudo-random numbers have the defects of periodicity and predictability, are difficult to ensure the safety of information encryption, and have limitations in application. The third method is a physical method, i.e. a computer is connected with a physical device, and the physical process is converted into a random number, for example, the random number is generated by the change of chaotic laser, but the method has high technical requirements on operators, and has high cost and no popularization value. In summary, it is necessary to provide a method for generating true random numbers based on a physical method with low technical requirements and low cost.
Disclosure of Invention
In order to overcome the defects that the safety of information encryption is difficult to ensure, the technical requirements on operators are high, the cost is high, the popularization value is not high, and the application is limited in the three methods for generating the random number, the invention provides hardware for generating the random number by using a microcontroller and an upper computer, and the method has the advantages of low cost, convenience in use and low requirements on the operators.
The technical scheme adopted by the invention for solving the technical problems is as follows:
a power-based true random number generation method is characterized in that an upper computer, a microcontroller and a power module are adopted as random number generation tools, the upper computer is internally provided with an instruction unit, a formatting unit and a data receiving and transmitting unit, and the microcontroller is internally provided with a data processing unit and a data transmission unit; the command unit, the formatting unit and the data receiving and transmitting unit are application software installed in an upper computer, and the data processing unit and the data transmission unit are application software installed in a microcontroller; the method for generating the true random number based on the power supply comprises the following steps that S1, an operator sets an input pin of the microcontroller into an input mode and is connected with the power supply, and the signal output end of an analog-to-digital conversion module of the microcontroller is connected with the signal input end of an upper computer through a data line; s2, when an operator needs to generate a true random number, the instruction unit sends a random number generation instruction, and the instruction unit of the upper computer sends the number N of the random numbers which the operator needs to collect to the data processing unit of the microcontroller; s3, when the data processing unit of the microcontroller receives the data of the number N of the random numbers sent by the upper computer, the microcontroller calls the internal self analog-to-digital conversion module to firstly collect the power input pin P for one timeinputVoltage value of (1), noted as V0Then at fixed time intervals TsPost-acquisition input pin PinputThe voltage values, in turn denoted V1,V2,L,VNThe data processing unit calculates the difference value of the collected voltage every two times as ri=Vi-Vi-11,2, N, recording the current time as Ti1,2, N; s4 the data processing unit records the time Ti1,2, N and the difference riThe N is sent to an upper computer data receiving and sending unit through a data transmission unit to be received and then processed in the next step; s5, the operator receives the difference r from the upper computeriN is formatted by a formatting unit according to its own needs to obtain a random number R meeting the requirementsiAnd the data receiving and transmitting unit sends the random number to required equipment to complete the generation and collection of the random number.
Further, in S1, P of the microcontrollerinputPinIs a data input pin.
Further, the microcontroller is a single chip microcomputer module of a model STM32F103C8T 6.
Further, in said S3, V0Is the voltage value collected; t issIs the acquisition time interval; n is the voltage value acquired for N times; r isiIs the difference between adjacent collected voltages; t isiIs riThe calculated system time.
Further, in the S4, TiIs riA calculated system time; r isiIs the difference between adjacent acquisition voltages.
Further, in the S5, riIs the difference between adjacent collected voltages; riIs riAnd (5) processing the data.
The invention has the beneficial effects that: in the invention, the microcontroller, the power module and the upper computer are combined by utilizing the characteristic of thermal noise generated by power generation and ADC (analog-to-digital conversion) technology, so that the hardware structure is greatly improved and simplified, the cost is reduced, in the application, the characteristic that the power voltage is changed by utilizing the thermal noise generated by the power when the power is electrified is used as a basis under the combined action of the upper computer, the microcontroller, the power module and related software units, the microcontroller acquires the power change value as a random number through the analog-to-digital conversion module, and further the true random number is obtained, so that the improvement of the production efficiency is realized, the method has a large practical application value, and can be widely applied to the fields of data encryption, secret communication and the like. Based on the above, the invention has good application prospect.
Drawings
FIG. 1 is a block diagram of the hardware architecture of the present invention.
Fig. 2 is a block diagram of the inventive workflow.
Detailed Description
As shown in fig. 1 and 2, a power supply-based true random number generation method adopts an upper computer, a microcontroller (a single chip microcomputer module of model STM32F103C8T 6) and a direct current power supply module as tools for generating random numbers, wherein the upper computer is internally provided with an instruction unit, a formatting unit and a data transceiver unit, and the microcontroller is internally provided with a data processing unit and a data transmission unit; the instruction unit, the formatting unit and the data receiving and transmitting unit are application software installed in an upper computer, and the data processing unit and the data transmission unit are application software installed in a microcontroller.
Referring to fig. 1 and 2, the method for generating a power-based true random number according to the present invention includes steps of setting a pin of a microcontroller to an input mode and connecting the pin to a positive electrode of a power supply, and outputting a signal output terminal of an analog-to-digital conversion module of the microcontroller (the analog-to-digital conversion module of the microcontroller mainly functions to collect a pin P when necessary) S1inputThe analog voltage signal is converted into a digital signal) and the signal input end of the upper computer are connected through a data line (the microcontroller supplies power through a power module); s2, when an operator needs to generate a true random number, the instruction unit sends a random number generation instruction, and the instruction unit of the upper computer sends the number N of the random numbers which the operator needs to collect to the data processing unit of the microcontroller; s3, when the data processing unit of the microcontroller receives the data of the number N of the random numbers sent by the upper computer, the microcontroller calls an internal analog-to-digital conversion module (ADC) to collect the pin P of the primary power input firstlyinput(i.e., data input pin) voltage value, denoted as V0(value of collected voltage) and then every fixed time Ts(acquisition time interval) post-acquisition input pin PinputThe voltage values, in turn denoted V1,V2,L,VN(voltage values acquired for N times), the data processing unit calculates the difference value of the acquired voltage for every two times as ri=Vi-Vi-1i=1,2,...,N(riDifference of adjacent collected voltages), recording the current time as Ti i=1,2,...,N(TiIs riCalculated system time); s4 the data processing unit records the time Ti i=1,2,...,N(TiIs riCalculated system time) and the difference rii=1,2,...,N(riThe difference value of adjacent collected voltages) is transmitted to an upper computer data transceiver unit through a data transmission unit and then is received by the upper computer data transceiver unit to be processed in the next step; s5, the operator receives the difference r by the upper computeri i=1,2,...,N(riDifference of adjacent collected voltages) rootThe random number R meeting the requirement is obtained by formatting processing through a formatting unit according to the self requirementii=1,2,...,N(RiIs riProcessed data), and the data transceiver unit sends the random number to the required equipment to complete the generation and collection of the random number.
As shown in fig. 1 and 2, the invention is based on the principle of uncertainty of heisenberg, and mainly utilizes the principle that thermal noise generated when a power supply is electrified is disordered movement of atoms and cannot predict the value of the next moment, so that data obtained by collecting the thermal noise is true random numbers. In the invention, the microcontroller, the power module and the upper computer are combined by utilizing the characteristic of thermal noise generated by power generation and ADC (analog-to-digital conversion) technology, so that the hardware structure is greatly improved and simplified, the cost is reduced, in the application, the characteristic that the power voltage is changed by utilizing the thermal noise generated by the power when the power is electrified is used as a basis under the combined action of the upper computer, the microcontroller, the power module and related software units, the microcontroller acquires the power change value as a random number through the analog-to-digital conversion module, and further the true random number is obtained, so that the improvement of the production efficiency is realized, the method has a large practical application value, and can be widely applied to the fields of data encryption, secret communication and the like. The method overcomes the defects that the safety of information encryption is difficult to ensure, the technical requirements on operators are high, the cost is high, the popularization value is not high, and the application is limited in the prior art.
While there have been shown and described what are at present considered the fundamental principles and essential features of the invention and its advantages, it will be apparent to those skilled in the art that the invention is not limited to the details of the foregoing illustrative embodiments, but is capable of other specific forms without departing from the spirit or essential characteristics thereof. The present embodiments are therefore to be considered in all respects as illustrative and not restrictive, the scope of the invention being indicated by the appended claims rather than by the foregoing description, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
Furthermore, it should be understood that although the present description refers to embodiments, the embodiments do not include only one independent technical solution, and such description is only for clarity, and those skilled in the art should take the description as a whole, and the technical solutions in the embodiments may be appropriately combined to form other embodiments that can be understood by those skilled in the art.

Claims (6)

1. A power-based true random number generation method is characterized in that an upper computer, a microcontroller and a power module are adopted as random number generation tools, the upper computer is internally provided with an instruction unit, a formatting unit and a data receiving and transmitting unit, and the microcontroller is internally provided with a data processing unit and a data transmission unit; the command unit, the formatting unit and the data receiving and transmitting unit are application software installed in an upper computer, and the data processing unit and the data transmission unit are application software installed in a microcontroller; the method for generating the true random number based on the power supply comprises the following steps that S1, an operator sets an input pin of the microcontroller into an input mode and is connected with the power supply, and the signal output end of an analog-to-digital conversion module of the microcontroller is connected with the signal input end of an upper computer through a data line; s2, when an operator needs to generate a true random number, the instruction unit sends a random number generation instruction, and the instruction unit of the upper computer sends the number N of the random numbers which the operator needs to collect to the data processing unit of the microcontroller; s3, when the data processing unit of the microcontroller receives the data of the number N of the random numbers sent by the upper computer, the microcontroller calls the internal self analog-to-digital conversion module to firstly collect the power input pin P for one timeinputVoltage value of (1), noted as V0Then at fixed time intervals TsPost-acquisition input pin PinputThe voltage values, in turn denoted V1,V2,L,VNThe data processing unit calculates the difference value of the collected voltage every two times as ri=Vi-Vi-11,2, N, recording the current time as Ti1,2, N; s4 the data processing unit records the time Ti1,2, N and the difference riAfter the data transmission unit sends the data to the upper computer data transceiver unit for receiving, the data transmission unit transmits the data to the upper computer 1,2Carrying out next step processing; s5, the operator receives the difference r from the upper computeriN is formatted by a formatting unit according to its own needs to obtain a random number R meeting the requirementsiAnd the data receiving and transmitting unit sends the random number to required equipment to complete the generation and collection of the random number.
2. The power-based true random number generating method of claim 1, wherein in S1, P of the microcontrollerinputThe pin is a data input pin.
3. The power-based true random number generation method of claim 1, wherein the microcontroller is a single chip module of model number STM32F103C8T 6.
4. The power-based true random number generation method of claim 1, wherein in S3, V0Is the voltage value collected; t issIs the acquisition time interval; n is the voltage value acquired for N times; r isiIs the difference between adjacent collected voltages; t isiIs riThe calculated system time.
5. The power-based true random number generation method of claim 1, wherein in S4, T isiIs riA calculated system time; r isiIs the difference between adjacent acquisition voltages.
6. The power-based true random number generation method of claim 1, wherein in S5, r isiIs the difference between adjacent collected voltages; riIs riAnd (5) processing the data.
CN202110569608.6A 2021-05-25 2021-05-25 True random number generation method based on power supply Pending CN113157250A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110569608.6A CN113157250A (en) 2021-05-25 2021-05-25 True random number generation method based on power supply

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110569608.6A CN113157250A (en) 2021-05-25 2021-05-25 True random number generation method based on power supply

Publications (1)

Publication Number Publication Date
CN113157250A true CN113157250A (en) 2021-07-23

Family

ID=76877832

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110569608.6A Pending CN113157250A (en) 2021-05-25 2021-05-25 True random number generation method based on power supply

Country Status (1)

Country Link
CN (1) CN113157250A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008146526A (en) * 2006-12-13 2008-06-26 Le Tekku:Kk Physical random number generator and physical random number generation circuit
CN101512480A (en) * 2006-09-11 2009-08-19 Gsip有限责任公司 Random number generators
JP2011238268A (en) * 2011-07-08 2011-11-24 Le Tech Co Ltd Physical random number generation device and circuit
CN106354476A (en) * 2016-10-20 2017-01-25 浙江神州量子网络科技有限公司 Laser phase fluctuation-based quantum random number generator and quantum random number generation method
CN112181363A (en) * 2020-10-19 2021-01-05 北京安石科技有限公司 Master control system with embedded quantum random number generator and generation system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101512480A (en) * 2006-09-11 2009-08-19 Gsip有限责任公司 Random number generators
JP2008146526A (en) * 2006-12-13 2008-06-26 Le Tekku:Kk Physical random number generator and physical random number generation circuit
JP2011238268A (en) * 2011-07-08 2011-11-24 Le Tech Co Ltd Physical random number generation device and circuit
CN106354476A (en) * 2016-10-20 2017-01-25 浙江神州量子网络科技有限公司 Laser phase fluctuation-based quantum random number generator and quantum random number generation method
CN112181363A (en) * 2020-10-19 2021-01-05 北京安石科技有限公司 Master control system with embedded quantum random number generator and generation system

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
叶世芬;李晓明;沈海斌;: "真随机数发生器的容差分析", 江南大学学报(自然科学版), no. 06 *
吴港生;吴龟灵;邹卫文;陈建平;: "光模数转换系统中数据存储与传输", 光通信技术, no. 03 *
张宏伟: "《PLC电气控制技术》", 30 September 2018, 中国矿业大学出版社, pages: 338 - 341 *
聂友奇;张军;: "实用化量子随机数发生器研究进展", 信息安全研究, no. 01 *
陈天宇;马原;荆继武;朱双怡;: "振荡采样型真随机数发生器的健壮性研究", 信息安全学报, no. 03 *

Similar Documents

Publication Publication Date Title
CN102637122B (en) The parity of physically based deformation noise generates method and the system thereof of true random number
CN105915343B (en) A kind of offline Activiation method of registration user and system
CN103294938B (en) Access request verification method and system, authorization message generation method, hardware device
CN110286878B (en) True random number generator and generating method for MCU random interval conversion bridge voltage
CN106940903A (en) Work attendance method, device and system
CN111818078B (en) Weighing data safe transmission method and system based on environmental factors
CN110969423A (en) Management system and management method of science and technology sharing platform
CN111800266A (en) Off-line sharing equipment control system and method based on real-time reference
CN103427801B (en) A kind of method and device producing real random code based on backward Rayleigh scattering
CN110034928B (en) Electric energy metering information transmission device and method
CN113157250A (en) True random number generation method based on power supply
CN100435089C (en) Device and method for producing true random codes
CN108171487A (en) A kind of project of transmitting and converting electricity design review system
CN116933057A (en) Photoplethysmogram signal recognition system, method and computer device
CN107040619A (en) The generation of hardware exclusive identification code and management system and method
CN111027050A (en) Underwater equipment credibility authentication system and method for seabed observation network based on PUF
CN109782148B (en) Signal processing device and signal processing method based on semiconductor superlattice device
CN111190860B (en) Configuration method and device of database
CN114640459A (en) Information security defense method for transformer substation measurement and control and PMU device
CN107608657A (en) It is a kind of based on when width conversion adjustable true random number generation system
CN111222883A (en) Multi-point metering system based on block chain technology and implementation method
CN212727071U (en) Real-time information acquisition and release equipment based on block chain
CN112181363A (en) Master control system with embedded quantum random number generator and generation system
CN112328207B (en) True random number generator based on singlechip random source working parameters and generating method
CN104536721A (en) Multichannel true random number sequence generation method and device based on super-bright light-emitting diode

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