Entropy source with embedded computation method for generating truly random numbers
By adjusting the period difference between identical ring oscillators and using Allan variance, the device achieves precise entropy source characterization, addressing the limitations of existing methods and enhancing random number generation precision.
Patent Information
- Application Number
- FR2022013801
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-12-19
AI Technical Summary
Existing methods for characterizing entropy sources based on ring oscillator jitter in electronic circuits require additional circuit area and suffer from imprecise frequency ratio control, leading to uncontrollable precision in truly random number generation.
A device comprising a first and second identical ring oscillator, a synchronous flip-flop, and control circuits to adjust the period difference between the oscillators, allowing for precise characterization of jitter using Allan variance without additional frequency dividers, implemented in CMOS technology on silicon-on-insulator.
Enables precise characterization of entropy sources with controlled frequency ratios, reducing circuit area requirements and improving the precision of truly random number generation.
Smart Images

Figure 00000024_0000 
Figure 00000024_0001 
Figure 00000024_0002
Abstract
Description
Title of the invention: Entropy source with embedded calculation method for the generation of truly random numbers Technical field
[0001] The present description relates generally to electronic circuits, and more particularly to the sources of entropy implemented in electronic circuits to generate random numbers. Prior art
[0002] Many electronic circuits implement a truly random number generation (TRNG) function. To do this, these circuits have a source of entropy from which random information or randomness is extracted. This random information is then used to generate truly random numbers. For example, the truly random numbers thus obtained are used to generate encryption keys, signatures, etc.
[0003] In some of the circuits described above, the source of entropy is the clock jitter of a ring oscillator. Ring oscillators are widely used due to their simplicity and the strong knowledge of their theoretical models. The uncertainty (or jitter) in the actual period of a ring oscillator output signal relative to the theoretical period of this signal is exploited as a source of randomness. This uncertainty increases with the number of accumulated periods (or equivalently the accumulation time).
[0004] The physical phenomena that cause jitter are well documented in the literature. The model generally used as a theoretical basis is that proposed by Hajimiri in the article "Jitter and phase noise in ring oscillators" in the journal IEEE J. Solid-State Circuits, vol. 34, no. 6, June 1999. This model defines the susceptibility function of the output signal of a ring oscillator to generate phase noise in the face of a disturbance. More concretely, only a disturbance occurring during the transient phases (rising or falling) of the output signal is capable of inducing phase noise in this signal. Furthermore, the model describes the effect of the different physical sources of noise on the accumulated jitter.These phenomena are divided into thermal noise from thermal agitation and low-frequency noise ("flicker" in English) induced by the charging / discharging of the gate oxide traps of metal-oxide semiconductor (MOS) transistors implementing the ring oscillator or by the diffusion of carriers in the channel of these transistors. Indeed, jitter. The accumulated noise has two regions: a region varying linearly with the variance of the jitter, which corresponds to the thermal noise, and a region varying quadratically with the variance of the jitter, which corresponds to the low-frequency noise ("flicker"). To use jitter as a source of entropy for truly random number generation, only the thermal component of the jitter remains of interest because it is the only completely random one. Indeed, the low-frequency noise component ("flicker") is not of interest because the low-frequency noise is self-correlated and detrimental to the predictability of the generated randomness.
[0005] Thus, in the circuits described above where the entropy source for generating truly random numbers is based on the jitter of a ring oscillator, it is desirable to characterize the entropy source, i.e. the jitter, to discriminate the amplitude of the thermal component of the jitter.
[0006] There are embedded methods for characterizing, in a circuit, an entropy source based on the jitter of a first ring oscillator of the circuit by using a second oscillator of the circuit which is identical to the first.
[0007] A first method consists of measuring the number of oscillations of the first ROI oscillator during Q oscillations of the second oscillator, the Q factor being obtained by means of a frequency divider. This method is presented in the article "On the assumption of mutual independence of jitter realizations in P-TRNG stochastic models", by P. Haddad, Y. Teglia, F. Bernard, and V. Fischer, presented in "Design, Automation & Test in Europe Conference & Exhibition (DATE)", in 2014, in Dresden.
[0008] The jitter is then characterized using the Allan variance, that is to say the variance calculated on the difference between two consecutive values, namely here two consecutive values available at the output of a counter clocked by the output signal of the first oscillator and reset every Q periods of the output signal of the second oscillator by the output signal of the frequency divider by Q. The use of the Allan variance makes it possible to circumvent the problems related to the convergence of the models while respecting a condition of stationarity. The Allan variance is plotted as a function of the number Q of accumulation periods and then follows a law (or curve or function) very similar to that of the model presented previously.More precisely, the Allan variance plotted as a function of the Q factor includes a linear part corresponding to the thermal noise, a quadratic part corresponding to the flicker noise, and a noise floor corresponding to the quantization noise inherent in any acquisition. By performing a quadratic regression of the plotted curve to approximate it by a function of the type o(Q)A2=aO+al.Q+a2.Q A2, with o(Q) the Allan variance as a function of the accumulation Q, it is possible to obtain the coefficients aO, al and a2 which represent the coefficients respectively for the quantization noise, for the thermal noise and for the low frequency noise ("flicker"). Obtaining the coefficients aO, al and a2 therefore amounts to characterizing the source of entropy, that is to say the jitter of the first oscillator.
[0009] However, this first method has the disadvantage that the contribution of the frequency divider circuit to the final noise is not known.
[0010] Furthermore, in this first method, the characterization of the jitter of the first oscillator is implemented by a circuit arranged next to the processing of the entropy source, which requires a significant additional surface area.
[0011] A second method consists of sampling the output signal of the first oscillator with a D-type synchronous flip-flop clocked at the frequency of the second oscillator. The output signal of the flip-flop is then a periodic signal whose average period Tm is inversely proportional to the difference between the periods of the two oscillators. More particularly, the length of the period Tm in number H of periods of the oscillator signal is such that H = T1 / (T1-T2), with T1 and T2 the average value of the periods of the first and second oscillators respectively. Then, a variance is calculated on the resultant of an EXCLUSIVE OR operation between two values of the output signal of the flip-flop separated from each other by G periods of the second oscillator.The variance as a function of G then has two parts, a part varying linearly with G, which corresponds to the thermal noise, and a part varying quadratically with G, which corresponds to the low-frequency noise ("flicker"). This method is presented in the article "Embedded Evaluation of Randomness in Oscillator Based Elementary TRNG", by V. Fischer and D. Lubicz, presented in "Advanced Information Systems Engineering", vol. 7908, Springer Berlin Heidelberg, 2014, pp. 527-543. In the same way as before, it is possible to characterize the source of entropy, therefore the jitter of the first oscillator, by performing a quadratic regression of the variance plotted as a function of G.
[0012] However, this second method has the disadvantage of being based on frequency ratios which are not controlled but undergone, and consequently the precision of this second method is low and uncontrollable between different circuits.
[0013] Furthermore, in this second method, as for the first method, the characterization of the jitter of the first oscillator is implemented by a circuit arranged next to the processing of the entropy source, which requires a significant additional surface area.
[0014] Thus, in the two known circuits and methods described above which make it possible to characterize an entropy source based on the jitter of a ring oscillator, with a view to ensuring a truly random generation of randomness, have drawbacks. This is more generally the case of the known circuits and methods making it possible to characterize, in an embedded manner, the jitter of a ring oscillator, that is to say making it possible to ca- characterize, in an embedded manner, a source of entropy. Summary of the invention
[0015] There is a need to overcome all or part of the drawbacks of known circuits and known methods implemented in these known circuits for characterizing, in an embedded manner, an entropy source when the entropy source is based on the jitter of a ring oscillator.
[0016] One embodiment overcomes all or part of the drawbacks of known circuits and known methods implemented in these known circuits for characterizing, in an embedded manner, an entropy source when the entropy source is based on the jitter of a ring oscillator.
[0017] One embodiment provides an electronic device comprising: a source of entropy including: - a first ring oscillator and a second ring oscillator identical to the first ring oscillator, and - a synchronous flip-flop configured to provide an output signal corresponding to a sampling of an output of the first oscillator at a frequency of an output of the second oscillator; a counter configured to provide, for each period of the output signal of the flip-flop, a value equal to a number of periods of the second oscillator counted during said period of the output signal of the flip-flop; a first circuit configured to modify, during a first phase, a period of at least one of the two oscillators on the basis of the values provided by the counter so that an average difference between the periods of the two oscillators is equal to a target difference; and a second circuit configured to receive the values supplied by the counter and to characterize, during a second phase and from said values, an Allan variance on the output of the counter.
[0018] According to one embodiment, the target deviation is determined at least in part by a ratio between the jitter and the period of the first oscillator and / or by a target measurement accuracy.
[0019] According to one embodiment, the two oscillators are implemented in complementary metal-oxide-semiconductor technology on a completely depleted semiconductor on insulator, preferably on completely depleted silicon on insulator.
[0020] According to one embodiment, the first circuit is configured to control back gates of at least one delay element of at least one of the two oscillators to modify the average difference between the periods of the two oscillators.
[0021] According to one embodiment, the second circuit is configured, during the character- Allan variance rization, for: calculate a first Allan variance value on several successive values provided by the counter; calculate a second Allan variance value on several sums of Kl successive values provided by the counter; receive a third theoretical Allan variance value or calculate a third Allan variance value on several sums of K2 successive values provided by the counter; and calculating three coefficients of a quadratic curve characterizing the Allan variance from at least said first, second and third Allan variance values.
[0022] According to one embodiment, the second circuit is configured to sum K successive values provided by the counter and to provide a least significant bit of said sum, K being determined by a target minimum entropy.
[0023] According to one embodiment, the device further comprises: a first alarm circuit configured to compare each value provided by the counter to a first threshold and to trigger a first alarm when said value is greater than the first threshold; and / or a second alarm circuit configured to calculate an Allan variance value from the output values of the counter and a corresponding Allan variance value using the Allan variance characterized by the second circuit, then to compare a deviation between these two calculated values to a second threshold and to trigger a second alarm if the deviation between these two calculated values is greater than the second threshold.
[0024] Another embodiment provides a method for characterizing an entropy source comprising: - a first ring oscillator and a second ring oscillator identical to the first ring oscillator, and - a synchronous flip-flop providing an output signal corresponding to a sampling of an output of the first oscillator at a frequency of an output of the second oscillator, the method comprising: providing, with a counter and at each period of the output signal of the flip-flop, a value equal to a number of periods of the second oscillator counted during said period of the output signal of the flip-flop; a first phase consisting of modifying, with a first circuit and on the basis of values provided by the counter, a period of at least one of the two oscillators so that an average difference between the periods of the two oscillators is equal to a target difference; and a second phase consisting of characterizing, by a second circuit and from the values provided by the meter, an Allan variance of the meter output.
[0025] According to one embodiment, the target deviation is determined at least in part by a ratio between the jitter and the period of the first oscillator and / or by a target measurement accuracy.
[0026] According to one embodiment, the two oscillators are implemented in complementary metal oxide semiconductor technology on a completely depleted semiconductor on insulator, preferably on a completely depleted silicon on insulator.
[0027] According to one embodiment, the first circuit controls rear gates of at least one delay element of at least one of the two oscillators to modify the average difference between the periods of the two oscillators.
[0028] According to one embodiment, the characterization of Allan variance comprises: calculating, by the second circuit, a first value of Allan variance on several successive values provided by the counter; calculate, with the second circuit, several sums of Kl successive values provided by the counter and a second Allan variance value on said several sums of Kl successive values; receive, by the second circuit, a third theoretical variance value or calculate, with the second circuit, several sums of K2 successive values provided by the counter and a third Allan variance value on said several sums of K2 successive values; and calculating, by the second circuit, three coefficients of a quadratic curve characterizing the Allan variance from at least said first, second and third Allan variance values.
[0029] According to one embodiment, the method further comprises a calculation by the second circuit of a sum of K successive values provided by the counter and a provision by the second circuit of a least significant bit of the sum, K being determined by a target minimum entropy.
[0030] According to one embodiment, the method further comprises: comparing, by a first alarm circuit, each value supplied by the meter with a first threshold and triggering, by the first alarm circuit, a first alarm if a value supplied by the meter is greater than the threshold; and / or calculating, by a second alarm circuit, an Allan variance value from the output values of the counter and a corresponding Allan variance value using the characterized Allan variance, comparing, by the second alarm circuit, a difference between the two calculated Allan variance values with a second threshold, and triggering, by the second alarm circuit, a second alarm if the difference is greater than the second threshold. Brief description of the drawings
[0031] These characteristics and advantages, as well as others, will be explained in detail in the following description of particular embodiments given without limitation in relation to the attached figures among which:
[0032] [Fig.l] represents a circuit according to an exemplary embodiment;
[0033] [Fig.2] illustrates, by means of a flowchart, an exemplary embodiment of a method for characterizing an entropy source of the circuit of [Fig.1];
[0034] [Fig.3] shows details of implementation of part of the circuit of [Fig.l] according to one embodiment;
[0035] [Fig.4] shows details of implementation of another part of the circuit of [Fig.l] according to one embodiment;
[0036] [Fig.5] represents an embodiment of an alarm circuit usable in the circuit of [Fig.l]; and
[0037] [Fig.6] shows an embodiment of another alarm circuit usable in the circuit of [Fig.l]. Description of the embodiments
[0038] The same elements have been designated by the same references in the different figures. In particular, the structural and / or functional elements common to the different embodiments may have the same references and may have identical structural, dimensional and material properties.
[0039] For the sake of clarity, only the steps and elements useful for understanding the described embodiments have been shown and are detailed. In particular, the usual methods and circuits using an entropy source for the generation of truly random numbers have not been detailed, the embodiments and variants described here being compatible with these usual methods and circuits.
[0040] Unless otherwise specified, when referring to two elements connected to each other, this means directly connected without intermediate elements other than conductors, and when referring to two elements connected (in English "coupled") to each other, this means that these two elements can be connected or be connected by means of one or more other elements.
[0041] In the following description, when reference is made to absolute position qualifiers, such as the terms "front", "back", "top", "bottom", "left", "right", etc., or relative position qualifiers, such as the terms "above", "below", "upper", "lower", etc., or to orientation qualifiers, such as the terms "horizontal", "vertical", etc., reference is made unless otherwise specified to the orientation of the figures.
[0042] Unless otherwise specified, the expressions "about", "approximately", "substantially", and "of the order of" mean to within 10%, preferably to within 5%.
[0043] It is proposed here to characterize, in an embedded manner, an entropy source based on the jitter of a first ring oscillator. For this, a device is provided comprising the first oscillator, a second oscillator identical to the first and a flip-flop sampling the output signal of the first oscillator at the frequency of the second oscillator. The device comprises a counter configured to measure the duration, in number N of periods T2 of the second oscillator, of each period T of the output signal of the flip-flop. The device further comprises a circuit configured to control, on the basis of the output values of the counter, the period T1 of the first oscillator and / or the period T2 of the second oscillator so that the average number Nm of periods T2 per period T of the output signal of the flip-flop is equal to a target value, i.e. a circuit configured to set the average period Tm of the output signal of the flip-flop to a target value.In other words, the circuit controls the difference between the value of the period T1 and the value of the period T2 to make it equal to a target difference, this target difference being determined at least in part by a ratio between the jitter of the first oscillator and its period T1 and / or by a target precision of measurement of the jitter of the first oscillator by the second oscillator. The device further comprises another circuit configured to characterize, after the period Tm has been set to the desired value, the jitter of the first oscillator from the output values of the counter. More particularly, this circuit is configured to characterize the Allan variance on the output of the counter, that is to say to calculate the coefficients b0, b1 and b2 of a quadratic regression of the Allan variance as a function of the accumulation Nm.As an example, to calculate these coefficients, the circuit uses three Allan variance values to calculate the coefficients b0, bl and b2, a first value calculated on the output values of the counter, a second value calculated from the output values of the counter, and a third theoretical value or obtained from the output values of the counter.
[0044] Fixing the value Nm, therefore the difference between the values of the periods T1 and T2, makes it possible to avoid using a frequency divider having an influence on the measurement and to control the frequency ratios implemented to characterize the source of entropy, i.e. the jitter of the ROI oscillator.
[0045] [Fig.l] illustrates, schematically and in the form of blocks, an example of an embodiment of a circuit 1.
[0046] Circuit 1 comprises two identical ring oscillators ROI and RO2. Oscillator ROI, respectively RO2, provides a periodic output signal SI, respectively S2.
[0047] The circuit 1 further comprises a synchronous flip-flop FF (flip-flop in English), for example of type D (D flip-flop in English). The FF flip-flop is configured to sample the signal S1 at the frequency of the signal S2.
[0048] In other words, the flip-flop FF is configured to update an output signal S3 at each start of a period of the signal S2 with the binary value of the signal SI, each start of a period of the signal S2 corresponding to an active edge of the signal S2, for example a rising edge. Between two successive updates of the signal S3, the signal S3 is maintained at its current value, i.e. the value taken by the signal S3 during the first of the two successive updates.
[0049] For example, the FF flip-flop comprises a data input D configured to receive the signal SI, a synchronization (timing) input CK for updates of the signal S3 configured to receive the signal S2, and an output Q configured to provide the signal S3.
[0050] The two oscillators ROI and RO2 and the flip-flop FF form an entropy source 100. The randomness extracted from the entropy source 100 is generated from the value of the period T of the signal S3. The signal S3 is a periodic signal having a mean period Tm whose mean duration Nm in number of periods of the signal S2 is inversely proportional to the difference between the periods T1 and T2, according to the formula Nm = T1 / (T1-T2). The signal S3 has an instantaneous period T which varies with the jitter of the signal SL. Thus, the measurement of the period T, that is to say of the duration of the period T, is representative of the jitter of the signal SL.
[0051] The entropy source 100 is a structure for example designated by the acronym COSO (from the English "COherent Sampling ring Ocillator"), which is used in truly random number generator circuits with a coherent sampling ring oscillator (COSO TRNG from the English "COherent Sampling ring Ocillator True Random Number Generator").
[0052] To measure the period T of the signal S3, the circuit 1 comprises a circuit (or counter) COUNTER. The circuit COUNTER is configured to provide, for each period T of the signal S3, a value N, for example in the form of a digital word, equal to the number of periods T2 of the signal S2 counted during the period T of the signal S3. In other words, the circuit COUNTER is configured to measure the duration of each period T of the signal S3 in number N of periods T2 of the signal S2.
[0053] By way of example, the COUNTER circuit comprises a reset input receiving the signal S3, a synchronization input C receiving the signal S2 and an output O providing the counted values N. At each start of period T2 of the signal S2, for example at each rising edge of the signal S2, the COUNTER circuit increments the current counting value by one unit. At each start of period T of the signal S3, for example at each rising edge of the signal S3, the COUNTER circuit resets the current counting value to zero. Preferably, the value N available at the output of the COUNTER circuit, on the output O, is updated from the current counting value at each start of period of the signal S3, just before this current value counting is reset to zero. In other words, the value N available at the output of the COUNTER circuit is updated at the start of each period T of the signal S3 with the value of the number of periods T2 of the signal S2 counted during the previous period T.
[0054] The device 1 further comprises a circuit FB CTRL. The circuit FB CTRL is configured to control or modify the period of at least one of the two oscillators ROI and RO2 so that the difference between the periods T1 and T2 is equal to a target difference. The modification of the period T1 of the oscillator ROI and / or of the period T2 of the oscillator RO2 by the circuit FB CTRL is implemented on the basis of the output values N of the circuit COUNTER. For example, for a target value Nmt of the average number of Nm of periods T2 per period T of the signal S3, if the output value N is less than Nmt, the difference between the periods T1 and T2 is reduced, and if the output value N is greater than Nmt, the difference between the periods T1 and T2 is increased.
[0055] According to one embodiment, the two oscillators ROI and RO2 are implemented in complementary metal-oxide-semiconductor (CMOS) technology on fully depleted semiconductor on insulator (FDSOI), preferably on fully depleted silicon on insulator. In such an embodiment, preferably, the modification of the period T1 of the oscillator ROI, respectively of the period T2 of the oscillator RO2, is implemented by controlling the rear gates of at least one delay element, for example an inverter, of the oscillator ROI, respectively RO2.
[0056] In alternative embodiments, whether or not the ROI and RO2 oscillators are implemented in CMOS on FDSOI, the modification of the period T1 of the ROI oscillator, respectively of the period T2 of the RO2 oscillator, is implemented differently, for example by selecting a propagation path of an oscillation from among several possible ones, or by modifying the power supply conditions of the oscillator. As an example, the article by A. Peetermans, V. Rozic, and I. Verbauwheden entitled "A Highly-Portable True Random Number Generator Based on Coherent Sampling", published in 2019 in the 29th International Conference on Field Programmable Logic and Applications (FPL) is another example of adjusting the relative periods of two ring oscillators.
[0057] However, the use of the rear gates to modulate the period of at least one of the oscillators ROI and RO2 when these are implemented in CMOS on FDSOI allows greater adjustment dynamics and better adjustment precision of the difference between the periods T1 and T2.
[0058] In the example of [Fig.l], the circuit FB CTRL controls only the period T2 of the oscillator RO2 by means of a control signal CTRL T2. In an alternative embodiment, as illustrated by dotted lines in [Fig.l], the FB CTRL circuit controls the period Tl of the ROI oscillator by means of a CTRL TL control signal. In another variant not shown, the CTRL FB circuit controls only the period Tl of the ROI oscillator by means of the CTRL T2 signal.
[0059] In the device 1, in each of the oscillators ROI and RO2, the ratio R between the period of the oscillator and its jitter is determinable and depends on the technology for implementing the oscillators. For example, when the oscillators are implemented in CMOS on FDSOI, this ratio R is of the order of 1000. In practice, for a given technology, this ratio can be obtained by a characterization phase, for example of a plurality of circuits.
[0060] Furthermore, in the device 1, the measurement accuracy is determined by the difference between the periods T1 and T2. More concretely, the measurement accuracy is equal to 1 / Nm.
[0061] Sufficient measurement accuracy is, for example, obtained when Nm is substantially equal to R. However, in other examples, a measurement accuracy where Nm is less than R may be sufficient. The person skilled in the art is able to determine a target measurement accuracy depending on the application. For example, for two oscillators ROI and RO2 having periods T1 and T2 equal to 2 ps, to have a measurement accuracy of 1 / 1000, the difference between the periods T1 and T2 must be set by the CTRL FB circuit to 2 ns, i.e. the CTRL FB circuit must, for example, set the period of the ROI oscillator to 2.002 ns and that of the RO2 oscillator to 2.000 ns.
[0062] It is then understood that the control precision of the periods T1 and / or T2 of the oscillators by the CTRL FB circuit is determined by the target measurement precision. Taking the example case described above, for oscillators ROI and RO2 implemented in CMOS on FDSOI, the control signals CTRL T1 and CTRL T2 of the back gates must be able to be modified with a precision of the order of mV to obtain the target difference equal to 2 ns in this example.
[0063] The device 1 further comprises a PROCESS circuit. The PROCESS circuit is configured, once the average period Tm has been set by the FB CTRL circuit, to characterize or determine or discriminate the characteristics of the jitter, for example by using the Allan variance on the N output values of the COUNTER circuit from the N output values of the counter, and, more precisely, from several successive N output values of the COUNTER circuit. In practice, determining the characteristics of the jitter by using the Allan variance on the N output values of the COUNTER circuit amounts to characterizing the entropy source 100, that is to say to characterizing the jitter of the oscillator ROI. Furthermore, the characterization of the Allan variance consists of determining the coefficients bO, bl and b2 of the quadratic curve bO+bl.Q+b2.QA2 of the evolution of the Allan variance of the output values of the COUNTER circuit as a function of Q accumulation.
[0064] Indeed, the output values N of the COUNTER circuit vary around the value Nm as a function of the jitter of the ROI oscillator accumulated on Q equal to Nm periods of the signal T2, and can therefore be directly used to characterize the Allan variance on the output values N of the COUNTER circuit, that is to say to determine or calculate the coefficients bO, bl and b2.
[0065] According to one embodiment, a first Allan variance value can be calculated directly on the N outputs of the COUNTER circuit, by calculating the variance on the difference between two successive N values for a set of several successive N values. This first value corresponds to an accumulation Q equal to Nm, therefore to a first point of the quadratic curve bO + bl.Q + b2.QA2 of the evolution of the Allan variance as a function of the accumulation.
[0066] According to one embodiment, in order to calculate or determine the coefficients b0, b1 and b2, the PROCESS circuit is configured to calculate at least two other Allan variance values, or two other points, corresponding to two other accumulation Q values, from the output values N of the COUNTER circuit. The PROCESS circuit is then configured to calculate Allan variance values for any accumulation Q value equal to P.Nm, with P being a positive integer. For this, the PROCESS circuit is configured to store successive N values in successive groups of P successive N values, and to sum, in each group, the P values. The result of each sum gives a second value and the PROCESS circuit is then configured to calculate the Allan variance on these second values, the Allan variance thus calculated corresponding to an accumulation Q equal to P.Nm.Preferably, the groups of P first successive values are non-overlapping and adjacent, i.e., when P successive values are arranged in one group, the next P successive N values are arranged in the next group, and no N value is part of two groups at the same time. In this embodiment, the three Allan variance values are all derived from the N values output from the COUNTER circuit, a first Allan variance value being calculated directly on the N values (for an accumulation value Q=Nm), a second Allan variance value being calculated from the N values (using a first value Kl of the factor P, for an accumulation value Q=Kl.Nm) and a third Allan variance value being calculated from the N values (using a second value K2 of the factor P, for an accumulation value Q=K2.Nm).
[0067] As an alternative embodiment, rather than characterizing the Allan variance, i.e. calculating the coefficients b0, b1 and b2, using at least three Allan variance values calculated solely from the output values N of the COUNTER circuit as described above, the PROCESS circuit is configured to a first Allan variance value is calculated on the N outputs of the COUNTER circuit and corresponds to an accumulation Q equal to Nm, then a second Allan variance value
[0068] According to one embodiment, from at least three Allan variance values corresponding to different accumulation values Q, the PROCESS circuit is configured to calculate the coefficients b0, bl and b2.
[0069] According to one embodiment, the PROCESS circuit determines the coefficients b0, bl and b2 by calculating three Allan variance values corresponding to three different accumulation Q values including, for example, the value Q = Nm, and by solving a system of three equations with three unknowns.
[0070] According to an alternative embodiment, the PROCESS circuit determines the coefficients b0, b1 and b2 by calculating two Allan variance values corresponding to two different accumulation values Q comprising, for example, the value Q = Nm, by obtaining a third theoretical Allan variance value for a third accumulation value Q, and by solving a system of three equations with three unknowns. By way of example, this third theoretical value comes from information stored in the device 1, for example in a memory of the device 1.
[0071] According to an alternative embodiment, the PROCESS circuit determines the coefficients b0, b1 and b2 by performing a quadratic regression from more than three Allan values, each corresponding to a different accumulation value Q. These Allan variance values are all calculated by the PROCESS circuit, except, for example, one of these values which is a theoretical value directly obtained by the PROCESS circuit, for example from information stored in the device 1, for example in a memory of the device 1.
[0072] It should be noted, however, that determining the coefficients bO, bl and b2 by implementing a quadratic regression from more than three Allan variance values corresponding to different Q values is more complex and requires more computing resources than determining the coefficients bO, bl and b2 by solving a system of three equations with three unknowns using only three distinct Allan variance values.
[0073] As an example, hardware blocks (or circuits) making it possible to calculate an Allan variance value on a set of several successive values are known and presented, for example, on page 202 of the document "Characterization, evaluation and use of clock jitter as a source of randomness in data security" by EN Allini or on page 143 of the document "Characterization and modeling of random number generators in integrated circuits" by P. Haddad.
[0074] When the PROCESS circuit uses three Allan variance values calculated by the PROCESS circuit (or two Allan variance values calculated by the circuit PROCESS and a third theoretical Allan variance value obtained by the PROCESS circuit), and that these three Allan variance values correspond to accumulation Q values equal respectively to Nm, Kl.Nm and K2.Nm, preferably the coefficients Kl and K2 are chosen to have a logarithmic spread of the three accumulation Q values.
[0075] As an example, calling vl the Allan variance calculated for Q equal to Nm, v2 the Allan variance calculated for Q equal to Kl.Nm and v3 the Allan variance calculated for Q equal to K2.Nm, the system of three equations with three unknowns solved by the PROCESS circuit is the following: vl = bO + bl.Nm + b2.NmA2, v2 = bO + b 1.Kl.Nm + b2.(Kl.Nm)A2, v3 = bO + bl.K2.Nm + b2.(K2.Nm)A2.
[0076] According to one embodiment, to simplify the calculations, K2 is chosen equal to Kl squared, from which it follows that the system to be solved becomes: vl = bO + bl.Nm + b2.NmA2, v2 = bO + b 1.Kl.Nm + b2.(Kl.Nm)A2, v3 = bO + bl.KlA2.Nm + b2.(KlA2.Nm)A2.
[0077] Once the PROCESS circuit has characterized the Allan variance on the output of the COUNTER circuit, that is to say that it has determined the coefficients bO, bl and b2, the PROCESS circuit provides a PARAM output indicating the values bO, bl and b2 calculated by the PROCESS circuit.
[0078] For example, the thermal noise component S_thermique can then be calculated from the coefficients bO, bl and b2, for example using the following equation: (S_thermique / Nm)A2 = bl / Nm.
[0079] [Fig. 2] illustrates, by means of a flowchart, an exemplary embodiment of a method for characterizing the entropy source 100 of the circuit 1 of [Fig. 1], i.e. the jitter of the ROI oscillator of the circuit 1 of [Fig. 1]. Unless otherwise indicated, everything indicated in relation to [Fig. 1] applies to the method described in relation to [Fig. 2].
[0080] In a first step, or phase, 200 (block "SET Nm"), the circuit CTRL FB adapts or modifies the period of at least one of the oscillators ROI and RO2 on the basis of the output values N of the circuit COUNTER so that the difference between the periods T1 and T2 is equal to a target difference, or, in other words, so that the average duration Nm of the period T of the signal S2 in number of periods T2 of the signal S2 is equal to a target value.
[0081] Once this setting is obtained, at a following step, or phase, 202 (block "GET PARAM"), the PROCESS circuit calculates the coefficients bO, bl and b2 of the function bO + bl.Q + b2.Q describing the evolution of the Allan variance on the outputs of the circuit COUNTER as a function of the accumulation Q. The coefficients bO, bl, and b2, i.e. the PARAM output of the PROCESS circuit, characterize the Allan variance, i.e. the source of entropy 100 and therefore the jitter of the ROI oscillator.
[0082] [Fig. 3] represents details of implementation of a part of the circuit 1 of [Fig. 1] according to an embodiment, and, more particularly, details of implementation of the PROCESS circuit according to an embodiment.
[0083] In the embodiment of [Fig.3], the PROCESS circuit is configured to calculate: - a first value vl of Allan variance directly on the successive N output values of the COUNTER circuit, the value vl corresponding to an accumulation value Q equal to Nm; - a second value v2 of Allan variance from values derived from successive N values, that is to say from several sums of Kl successive N values, the value v2 then corresponding to an accumulation value Q equal to Kl.Nm; and - a third value v3 of Allan variance from other values derived from successive N values, that is to say from several sums of K2 successive N values, the value v3 then corresponding to an accumulation value Q equal to K2.Nm.
[0084] The PROCESS circuit is then configured to calculate the coefficients b0, bl and b2 characterizing the Allan variance. More particularly, the coefficients b0, bl and b2 characterize the evolution of the Allan variance as a function of the accumulation Q, that is to say that they characterize the entropy of the entropy source 100, or, in other words, the jitter of the ROI oscillator.
[0085] For this, the PROCESS circuit receives the successive N output values from the COUNTER circuit (not shown in [Fig.3]).
[0086] These successive values N are supplied to a CALC circuit of the PROCESS circuit configured to calculate, from these successive values N, a value vl of the Allan variance corresponding to an accumulation Q equal to Nm.
[0087] These successive N values are also supplied to a circuit ACC K1 of the PROCESS circuit. The circuit ACC K1 is configured to calculate several sums SUM1 of K1 successive N values. For example, the circuit ACC K1 is configured, as it receives the successive N values, to sum K1 successive values, supply a value SUM1 resulting from this summation, then to repeat this operation of summing K1 successive N values to produce a value SUM1 on each following group of K1 successive N values.
[0088] The CALC circuit receives the SUM1 values. The CALC circuit is configured to calculate, from the successive SUM1 values produced, by the ACC circuit K1, from the successive N values, a value v2 of the Allan variance corresponding to an accumulation Q equal to Kl.Nm.
[0089] The successive N values received by the PROCESS circuit are also provided to an ACC circuit K2 of the PROCESS circuit. The ACC circuit K2 is configured to calculate several sums SUM2 of K2 successive N values. For example, the ACC circuit K2 is configured, as it receives the successive N values, to sum K2 successive values, provide a SUM2 value resulting from this summation, then repeat this operation of summing K2 successive N values to produce a SUM2 value on each group of K2 successive N values following.
[0090] The CALC circuit receives the SUM2 values. The CALC circuit is configured to calculate, from the successive SUM2 values produced, by the ACC circuit K2, from the successive N values, a value v3 of the Allan variance corresponding to an accumulation Q equal to K2.Nm.
[0091] Finally, the CALC circuit is configured to calculate the coefficients b0, bl and b2 from the Allan variance values vl, v2 and v3. For example, the CALC circuit is configured to solve the system of three equations with three unknowns presented previously in relation to [Fig.l].
[0092] The PROCESS circuit, for example its CALC circuit, then provides the PARAM output indicating the value of the coefficients b0, bl and b2.
[0093] As an alternative embodiment not illustrated, when the CALC circuit is configured to calculate the value vl, the value v2 and the coefficients b0, bl and b2 from the values vl, v2 and a third value v3' where the value v3' is a theoretical Allan variance value directly supplied to the CALC circuit, the ACC circuit K2 is omitted. This simplifies the implementation of the CALC circuit but can in return introduce a measurement error in the calculation of the coefficients b0, bl and b2.
[0094] Although not illustrated here, in yet another alternative embodiment, the PROCESS circuit is configured to calculate more than three Allan variance values corresponding to different accumulation Q values, and to determine the coefficients b0, b1 and b2 from these Allan variance values by implementing quadratic regression. However, in this case, the PROCESS circuit will be more cumbersome and more complex than that of [Fig.5] or the alternative embodiment with three Allan variance values v1, v2 and v3'.
[0095] An advantage of having characterized the Allan variance is that it is then possible to determine a positive integer value K for which the accumulation Q = K.Nm of the ROI oscillator jitter is sufficient to produce a random bit with a minimum target entropy Htarget. This value K can be calculated by applying the Baudet model presented in the paper "On the Security of Oscillator-Based Random Number Generators", by M. Baudet, D. Lubicz, J. Micolod, and A. Tassiaux, published in J Cryptol, vol. 24, no. 2, pp. 398-425, Apr. 2011.
[0096] For example, it is possible to link the target minimum entropy Htaget, the factors Kl and K2, the value K and the values vl, v2 and v3 by means of the following inequality: K> ln[(l - Htarget) / 0.584].(Nm + 1). [(v2 - vl).(K2A2-l) - (v3 - vl).(KlA2-l)] / [39.478.NmA3.(kl - l).(k2 - l).(k2 - kl)]
[0097] Once this value K is fixed, to obtain a random RN bit with an entropy greater than or equal to the target entropy Htarget, it is sufficient to sum K successive N values and the RN bit is then the least significant bit of the result of this sum.
[0098] The optional step of determining the value K on the basis of a target minimum entropy Htarget, and of summing K successive values N to obtain the random bit RN is for example implemented following step 202 of [Fig.2]. This optional step is further, for example, implemented by the PROCESS circuit of circuit 1 as shown in [Fig.l] where the PROCESS circuit provides the random bit RN.
[0099] [Fig. 4] shows implementation details of another part of circuit 1 of [Fig. 1] according to one embodiment. More particularly, [Fig. 4] shows implementation details of the PROCESS circuit according to one embodiment in which the PROCESS circuit is configured to provide the RN bit corresponding to the least significant bit of the sum of K successive N values.
[0100] The PROCESS circuit then comprises an ACC K circuit. The ACC K circuit is configured to receive the successive N output values from the COUNTER circuit (not shown in [Fig.4]), to sum the K values of each set of K successive N values, and to provide the SUM result of this operation. For example, the ACC K circuit is controlled by a Kctrl signal indicating the K value to be used.
[0101] The RN bit then corresponds to the least significant bit of the SUM result. For example, the PROCESS circuit then implements a function for selecting the least significant bit of the SUM result, for example by means of an LSB circuit receiving the SUM signal and supplying the RN bit.
[0102] These details of implementation of the PROCESS circuit when the latter is configured to provide the RN bit are compatible with the details of implementation of the PROCESS circuit described in relation to [Fig.3].
[0103] Optionally, according to one embodiment, the device 1 further comprises one or more alarm circuits configured to detect one or more malfunctions of the device 1. Each step of detecting a malfunction is, for example, implemented in the method described in relation to [Fig.2], for example following step 202.
[0104] [Fig.5] represents an embodiment of an alarm circuit 500 implemented in circuit 1 of [Fig. 1].
[0105] In this embodiment, the circuit 500 (block "N > TH" in [Fig.5]) is configured to detect a blocking of the signal S3, i.e. when the signal S3 no longer varies with time periodically with an average period Tm as described previously. This situation results for example from the fact that one of the two oscillators ROI and RO2 locks onto the other of the two oscillators ROI and RO2, which leads to a signal S3 whose state is constant (high or low). This situation can also be the result of an attack on the device 1 by a hacker.
[0106] To detect such a blocking of the signal S3, the circuit 500 is configured to receive the output values N of the circuit COUNTER, and to compare each value N received to a threshold TH. The threshold is greater than the value Nm, for example at least twice greater than the value Nm. In other words, the threshold TH is determined by the target deviation used in step 200 ([Fig.2]).
[0107] If one of the received N values exceeds the threshold TH, this means that the signal S3 is in a blocking situation, and the circuit 500 is then configured to provide an alarm signal ALARM1.
[0108] For example, when an ALARM1 signal is emitted by the circuit 500, the circuit 1 is configured to reset the oscillators ROI and RO2, for example by blocking with a control signal the propagation of oscillations in these oscillators before allowing this propagation again. After such a step of resetting the oscillators ROI and RO2, at least step 200 of the method for characterizing the entropy source 100 is implemented.
[0109] [Fig.6] represents an embodiment of another alarm circuit 600 implemented in circuit 1 of [Fig.l].
[0110] In this embodiment, the circuit 600 (block "ALLAN VAR IN RANGE?" in [Fig.6]) is configured to detect a modification of the operation of the oscillators ROI and RO2 resulting, for example, from variation in operating temperature, from aging of the circuit.
[0111] For this, the circuit 600 receives the successive N output values from the COUNTER circuit, and is configured to calculate sums SUM3 of K3 successive values, and to calculate an Allan variance value v4 on the successive SUM3 values. The circuit 600 is further configured to compare the value v4 with a variance value V4 calculated from the coefficients b0, bl and b2 determined in step 200 and an accumulation value Q equal to K3.Nm. If the difference between the values v4 and V4 is greater than a threshold, this means that the operation of the oscillators ROI and RO2 has been modified since the implementation of step 200 and that the coefficients b0, bl and b2 determined during this step are no longer valid.
[0112] According to one embodiment, the value K3 is chosen equal to the value K used to generate the bit RN. This makes it possible to reuse the circuit ACC K of the circuit PROCESS, which then directly provides the SUM values. In alternative embodiments, the value K3 is different from the value K, but is preferably chosen to correspond to an accumulation value Q for which the Allan variance determined in step 200 is in the region dominated by thermal noise.
[0113] Various embodiments and variations have been described. Those skilled in the art will understand that certain features of these various embodiments and variations could be combined, and other variations will occur to those skilled in the art.
[0114] Finally, the practical implementation of the embodiments and variants described is within the reach of those skilled in the art from the functional indications given above.
Claims
Claims
1. Electronic device (1) comprising: an entropy source (100) comprising: - a first ring oscillator (ROI) and a second ring oscillator (RO2) identical to the first ring oscillator, and - a synchronous flip-flop (FF) configured to provide an output signal (S3) corresponding to a sampling of an output (SI) of the first oscillator (ROI) at a frequency of an output (S2) of the second oscillator (RO2); a counter (COUNTER) configured to provide, for each period of the output signal (S3) of the flip-flop (FF), a value (N) equal to a number of periods of the second oscillator (RO2) counted during said period of the output signal (S3) of the flip-flop (FF);a first circuit (FB CTRL) configured to modify, during a first phase (200), a period of at least one of the two oscillators (ROI, RO2) on the basis of the values (N) provided by the counter (COUNTER) so that an average difference between the periods of the two oscillators is equal to a target difference; and a second circuit (PROCESS) configured to receive the values (N) provided by the counter and to characterize, during a second phase (200) and from said values (N), an Allan variance on the output (O) of the counter.;
2. Device according to claim 1, wherein the target deviation is determined at least in part by a ratio between the jitter and the period of the first oscillator (ROI) and / or by a target measurement accuracy.
3. Device according to claim 1 or 2, in which the two oscillators (ROI, RO2) are implemented in complementary metal-oxide-semiconductor technology on a completely depleted semiconductor on insulator, preferably on completely depleted silicon on insulator.
4. Device according to claim 3, in which the first circuit (FB CTRL) is configured to control (CTRL T1, CTRL T2) back gates of at least one delay element of at least one of the two oscillators (ROI, RO2) to modify the average difference between the periods of the two oscillators.
5. Device according to any one of claims 1 to 4, in which the second circuit (PROCESS) is configured, during the characterization of the Allan variance, to: calculate a first Allan variance value on several successive values (N) provided by the counter (COUNTER); calculate (ACC Kl) a second Allan variance value on several sums (SUM1) of Kl successive values (N) provided by the counter (COUNTER); receive a third theoretical Allan variance value or calculate (ACC K2) a third Allan variance value on several sums (SUM2) of K2 successive values (N) provided by the counter; and calculate (CALC) three coefficients of a quadratic curve characterizing the Allan variance from at least said first, second and third Allan variance values.
6. Device according to any one of claims 1 to 5, in which the second circuit (PROCESS; ACC K, LSB) is configured to sum K successive values (N) provided by the counter (COUNTER) and to provide (LSB) a least significant bit (RN) of said sum (SUM), K being determined by a target minimum entropy.
7. Device according to any one of claims 1 to 6, wherein the device further comprises: a first alarm circuit (500) configured to compare each value (N) provided by the counter (COUNTER) to a first threshold and to trigger a first alarm (ALARM 1) when said value is greater than the first threshold; and / or a second alarm circuit (600) configured to calculate an Allan variance value from the output values (N) of the counter (COUNTER) and a corresponding Allan variance value using the Allan variance characterized by the second circuit (PROCESS), then to compare a difference between these two calculated values to a second threshold and to trigger a second alarm (ALARM 2) if the difference between these two calculated values is greater than the second threshold.
8. Method for characterizing an entropy source comprising: - a first ring oscillator (ROI) and a second ring oscillator (RO2) identical to the first ring oscillator, and - a synchronous flip-flop (FF) providing an output signal (S3) corresponding to a sampling of an output (SI) of the first oscillator (ROI) at a frequency of an output (S2) of the second oscillator (RO2), the method comprising: providing, with a counter (COUNTER) and at each period of the output signal (S3) of the flip-flop (FF), a value (N) equal to a number of periods of the second oscillator (RO2) counted during said period of the output signal (S3) of the flip-flop (FF); a first phase (200) consisting of modifying, with a first circuit (FB CTRL) and on the basis of values (N) provided by the counter (COUNTER), a period of at least one of the two oscillators (ROI, RO2) so that an average difference between the periods of the two oscillators (ROI, RO2) is equal to a target difference; and a second phase (202) consisting of characterizing, by a second circuit (PROCESS) and from the values (N) provided by the counter (COUNTER), an Allan variance of the output (0) of the counter (COUNTER).
9. The method of claim 8, wherein the target deviation is determined at least in part by a ratio of jitter to the period of the first oscillator (ROI) and / or by a target measurement accuracy.
10. Method according to claim 8 or 9, in which the two oscillators (ROI, RO2) are implemented in complementary metal oxide semiconductor technology on completely depleted semiconductor on insulator, preferably on completely depleted silicon on insulator.
11. A method according to claim 10, wherein the first circuit (FB CTRL) controls back gates of at least one delay element of at least one of the two oscillators (ROI, RO2) to modify the average deviation between the periods of the two oscillators.
12. Method according to any one of claims 8 to 11, in which the Allan variance characterization comprises: calculating, by the second circuit (PROCESS), a first Allan variance value on several successive values (N) provided by the counter (COUNTER); calculating, with the second circuit (PROCESS), several sums (SUM1) of Kl successive values (N) provided by the counter (COUNTER) and a second Allan variance value on said several sums (SUM1) of Kl successive values; receiving, by the second circuit (PROCESS), a third theoretical variance value or calculating, with the second circuit (PROCESS), several sums (SUM2) of K2 successive values (N) provided by the counter (COUNTER) and a third Allan variance value on said several sums (SUM2) of K2 successive values; and calculating, by the second circuit (PROCESS), three coefficients of a quadratic curve characterizing the Allan variance from at least said first, second and third Allan variance values.
13. Method according to any one of claims 8 to 12, in which the method further comprises a calculation by the second circuit (PROCESS) of a sum of K successive values (N) provided by the counter (COUNTER) and a provision by the second circuit (PROCESS) of a least significant bit (RN) of the sum (SUM), K being determined by a target minimum entropy.
14. A method according to any one of claims 8 to 13, wherein the method further comprises: comparing, by a first alarm circuit (500), each value (N) supplied by the counter with a first threshold and triggering, by the first alarm circuit (500), a first alarm (ALARM 1) if a value (N) supplied by the counter (COUNTER) is greater than the threshold; and / or calculating, by a second alarm circuit (600), an Allan variance value from the output values (N) of the counter (COUNTER) and a corresponding Allan variance value using the characterized Allan variance, comparing, by the second alarm circuit (600), a difference between the two calculated Allan variance values with a second threshold, and triggering, by the second alarm circuit (600), a second alarm (ALARM 2) if the difference is greater than the second threshold.
