The present invention relates generally to a random number generating circuit, and more particularly, to a circuit for generating a seed number and a method for generating the seed number.
A random number generator refers to a computational or physical device for generating a sequence of numbers in a pattern that is not easily discernable, so that the sequence can be treated as being random. Random number generators may generally be divided into pseudo-random number generators and hardware random number generators. A pseudo-random number generator often includes software routines implementing algorithms instead of hardware devices for producing random numbers, which are not truly random outputs. Given the original state (seed state) of a pseudo-random number generator, and the implementation of the algorithm employed by the generator, the randum outputs produced by the pseudo-random number generator are predictable, i.e. not random. In other words, if two random number generators operating under the same algorithm are seeded with the same seed value, both generators will produce the same sequence of numbers. On the other hand, a hardware random number generator includes an apparatus or device for generating random numbers from a physical process that, in theory, is unpredictable. In the hardware random number generator, the seed value, which determines a sequence of numbers to be produced, is generally random.
Examples of the invention may provide a circuit and a method for generating a random seed value, which in turn may be used as a base for generating a sequence of random numbers.
Examples of the invention may provide a random number circuit that comprises an oscillator capable of generating a clock signal including a sequence of clocking pulses at a center frequency, the clock signal having a frequency offset from the center frequency, a reset circuitry capable of generating a reset signal indicating a transition from a first state to a second state, an initial value generator capable of generating an initial value, and a counter coupled to at least one of the oscillator, the reset circuitry, and the initial value generator and capable of receiving at least one of the clock signal, the reset signal, and the initial value, the counter capable of generating a random number, the random number being dependent on at least one of the frequency offset, a timing of the transition, and the initial value.
Examples of the invention may also provide a random number circuit that comprises a device capable of providing a first voltage, an oscillator capable of generating a clock signal including a sequence of clocking pulses at a center frequency, the clock signal having a frequency offset from the center frequency, a charge pump capable of generating a second voltage being an integer multiple of the first voltage, a reset circuitry capable of generating a reset signal, the reset signal transitioning from a first state to a second state once the second voltage reaches a predetermined voltage level, an initial value generator capable of generating an initial value, and a counter capable of counting the number of clocking pulses starting from the initial value in response to the clock signal, and generating a random number in response to the transitioning of the reset signal.
Some examples of the invention may also provide a random number circuit that comprises a first random number generator capable of generating a first random number comprising an oscillator capable of generating a clock signal including a sequence of clocking pulses, a reset circuitry capable of generating a reset signal indicating a transition from a first state to a second state, an initial value generator capable of generating an initial value, and a counter capable of generating the first random number in response to the clock signal, the reset signal and the initial value, and a second random number generator receiving the first random number capable of generating a second random number.
Examples of the invention may also provide a method for generating a random number that comprises providing a first voltage, generating a clock signal including a sequence of clocking pulses, generating a second voltage being an integer multiple of the first voltage, generating a reset signal including a first state and a second state, transitioning the reset signal from one of the first and second states to the other of the first and second states once the second voltage reaches a predetermined voltage level, generating an initial value, and counting the number of clocking pulses starting from the initial value in response to the clock signal, and generating the random number in response to the transitioning of the reset signal.
Examples of the invention may also provide a method for generating a random number that comprises generating a clock signal including a sequence of clocking pulses, generating a reset signal indicating a transition from a first state to a second state, generating an initial value, generating a first random number in response to the clock signal, the reset signal and the initial value, and generating a second random number using the first random number as a seed number.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the invention, as claimed.
The foregoing summary, as well as the following detailed description of the invention, will be better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there are shown in the drawings examples consistent with the invention. It should be understood, however, that the invention is not limited to the precise arrangements and instrumentalities shown.
In the drawings:
Reference will now be made in detail to the present embodiments of the invention, examples of which are illustrated in the accompanying drawings. Wherever possible, the same reference numbers will be used throughout the drawings to refer to the same or like portions.
The charge pump 13 includes but is not limited to a conventional switched capacitor multi-stage structure comprising a plurality of capacitors (not shown) and switches controlled under clocks of inverted phases. Specifically, the charge pump 13 adds voltages on capacitors charged by the supply voltage from the power supply 11 in response to the clock signal from the oscillator 12. The charge pump 13 provides an output voltage which is an integer multiple of the supply voltage. The regulator 14 regulates the output voltage from the charge pump with respect to a predetermined voltage level. In one example, a regulated charge pump is used to replace the charge pump 13 and the regulator 14. The regulated charge pump includes, for example, a voltage multiplier module to pull up the supply voltage provided from the power supply 11, and a regulator module to then maintain the output voltage sent from the voltage multiplier module with respect to the predetermined voltage level.
The reset circuit 15 provides a reset signal to the counter 17. In one example, the reset signal is kept at a logic low state if the regulated voltage from the regulator 14 does not reach the predetermined voltage level, and is transitioned to a logic high state once the regulated voltage reaches the predetermined voltage level. The transition of the reset signal “latches” the counter 17. That is, in response to a transition of the reset signal from logic low to logic high, the counter 17 provides a count having been counted since the clock signal is provided to the counter 17. In some examples, the counter 17 does not need to provide a count until the reset signal is transitioned from a logic high state to a logic low state. Since the time the regulated voltage reaches the predetermined voltage level is not certain, the time the counter 17 is latched and hence the count provided is not certain, either. The count serves as a random number (RN) of the random number generator 10, which may be used as an initial value, i.e., a seed number, for a pseudo random number generator. In one example, the random number RN has a 16-bit bandwidth, resulting in a 16-bit random number generator 10.
The initial value generator 16 provides an initial value to the counter 17, from which the random number RN is counted. The initial value is provided at substantially the time as the clock signal is provided to the counter 17. In one example, the initial value has a 16-bit bandwidth, resulting in a 16-bit random number generator 10. As a result, the count or the random number RN provided by the counter 17 is dependent on at least one of the frequency offset (FOFFSET) due to the oscillator 12, the transition time (TRESET) of the reset circuit 15, and the initial value (INIV) of the initial value generator 16, as may be derived from the mathematical function below.
RN=f(FOFFSET, TRESET, INIV)
Furthermore, the random number RN is indirectly dependent on the charging efficiency of the charge pump 13, the predetermined voltage level selected, and the process parameters or conditions regarding the manufacturing of the initial value generator 16. Therefore, the random number RN is not predictable.
In some examples, the oscillator 12 may include a crystal oscillator, which allows a relatively low tolerance so that the effect on the resultant random number RN due to the frequency offset can be negated. For example, the oscillator 12 may provide the clock signal at a precise frequency of 10 MHz. The random number RN in the present example is expressed in a function below.
RN=g(
In some examples, the time period to reset the counter 17 may be a constant, regardless of whether the output voltage from the regulator 14 equals the predetermined voltage level. For example, the counter 17 is reset once every second. The random number RN in the present example is expressed in the function below.
RN=h(FOFFSET,
In one example, the initial value can be a predetermined value, for example, a full-zero or full-one output such that the effect on the resultant random number RN due to the randomness in each of the bits is negated. The random number RN in the present example is expressed in a function below.
RN=p(FOFFSET, TRESET,
In the RFID industry, the traffic between an RFID device and a reader may suffer from a phenomenon called “tag collision”, which may occur when plural RFID tags communicate with one reader at substantially the same time. A solution to solve the problem is to provided a random number generator in the RFID device for generating a random number. By distinguishing among the random numbers provided by the plural RFID devices, the reader is able to match a specific ID information with a specific random number at a specific time slot. However, as noted above, a conventional random number generator like a pseudo random number generator may often provide a number that is predictable and is not quite random. Consequently, the tag collision may not be alleviated.
Referring again to
The RFID device 30 further includes a demodulation circuit 58 electrically connected to the rectifier 51 and the regulator 54 for providing the command (CMD). The seed number SN and the command CMD are sent to the digital module 32 illustrated in
It will be appreciated by those skilled in the art that changes could be made to one or more of the examples described above without departing from the broad inventive concept thereof. It is understood, therefore, that this invention is not limited to the particular examples disclosed, but it is intended to cover modifications within the scope of the present invention as defined by the appended claims.
Further, in describing certain illustrative examples of the present invention, the specification may have presented the method and/or process of the present invention as a particular sequence of steps. However, to the extent that the method or process does not rely on the particular order of steps set forth herein, the method or process should not be limited to the particular sequence of steps described. As one of ordinary skill in the art would appreciate, other sequences of steps may be possible. Therefore, the particular order of the steps set forth in the specification should not be construed as limitations on the claims. In addition, the claims directed to the method and/or process of the present invention should not be limited to the performance of their steps in the order written, and one skilled in the art can readily appreciate that the sequences may be varied and still remain within the spirit and scope of the present invention.
Number | Date | Country | Kind |
---|---|---|---|
094146632 | Dec 2005 | TW | national |