1. Introduction
A random number generator (RNG) is an important component of cryptographic systems used by cryptographic modules to generate random numbers. Random numbers are used for various purposes including the generation of cryptographic keys, and their significance has been increasingly highlighted, particularly with the recent emergence of quantum key distribution [
1].
An RNG can be divided into three main processes: digitization, entropy accumulation, and pseudo random number generation (PRNG). Digitization is the process of converting entropy sources into binary data. We call the converted binary data the “input sequence”. Typically, the input sequence has a low min-entropy. Entropy accumulation is the process of transforming input sequences into data with high min-entropy. We denote the input sequence that has undergone the entropy accumulation process as the “output sequence”. PRNG is composed of deterministic algorithms, such as block ciphers or hash functions, and it assumes the output sequence as input and then outputs the final “random number”. The operation of the RNG is illustrated in
Figure 1.
Although unpredictable random numbers can be generated using a digitized entropy source, this is impractical in cryptographic systems because of the significant amount of time required. The PRNG was used to address this limitation. A PRNG produces the same output with the same input. This implies that the generated random numbers are not unpredictable. However, the PRNG can generate multiple random numbers in a short time because the length of the output is longer than the length of the input. Therefore, if the length of the input of the PRNG is small but random, the output of the PRNG provides good random numbers. Consequently, the high min-entropy of the input sequence can be observed as an important factor in constructing an RNG.
In the process of entropy accumulation, an accumulation function H is a transformation from an input sequence to an output sequence. Let X be an input sequence and be the corresponding output sequence, then the entropy accumulation can be expressed as .
On the other hand, Dodis et al. [
2] have proposed that the entropy accumulation is divided into two types depending on the characteristics of the accumulation function
H. The first type is called “Slow-Refresh”, which is characterized by a high computational complexity of
H leading to slower accumulation speed but results in a long output sequence. The second type, so called “Fast-Refresh”, features a lower computational complexity of
H leading to faster accumulation speed but results in a short output sequence.
Traditional hash function-based entropy accumulation is categorized as Slow-Refresh due to its relatively slow accumulation speed. However, this method is widely utilized because of the theoretical foundation provided by the Leftover Hash Lemma [
3]. The Leftover Hash Lemma ensures the lower bound of min-entropy for the output sequence, where a low min-entropy input sequence passes through a hash function
H randomly selected from a universal hash family.
There are two major considerations in the Slow-Refresh process, which are the construction of a universal hash family and the random selection of a hash function from the uniformly distributed universal hash family. However, constructing a universal hash family is not a trivial task. One example satisfying an appropriate property is the family of the Hankel matrix [
4]. If a Hankel matrix is randomly selected from the uniformly distributed family, and an
n-bit input sequence is processed through this selected matrix, then the resulting
m-bit output sequence will have a sufficient min-entropy. Similarly, a universal hash family can also be constructed by using Toeplitz matrices [
5,
6].
In such a matrix-based universal hash family, the matrices typically used have input bit-lengths larger than the output bit-lengths, and the ratio approaches 1 as n increases. Thus, the size of the matrix must be sufficiently large in order to minimize the lost bits. However, this leads to a high computational complexity, that is, this method falls under the Slow-Refresh category, and Slow-Refresh may not always be suitable in practical situations that require rapid entropy accumulation. Therefore, in this work, we focus on Fast-Refresh, which is clearly described in the next subsection.
1.1. Related Works
One of the typical examples of Fast-Refresh without a hash function is Microsoft Windows RNG [
7]. Windows RNG uses only the bitwise XOR operation and bit permutation
for the entropy accumulation. In particular, if we employ the following notation, the entropy accumulation operation of Windows RNG can be depicted as shown in
Figure 2.
: n-bit input sequences.
, is one-to-one.
, .
, ).
Figure 3 is an example of the
operation on an 8-bit input sequence.
,
Windows RNG accumulates output sequences relatively quickly in an entropy pool because it uses bit permutations and bitwise XOR operations without employing hash functions. Despite these advantages, it has not been proven whether the entropy accumulation of Windows RNG guarantees a lower bound for the min-entropy of the output sequence, as does the Leftover Hash Lemma when using a hash function. Therefore, it has been challenging to consider this method of secure entropy accumulation. However, recent research presented at Crypto 2021 analyzed Microsoft Windows RNG. In [
2], the security of Windows RNG was analyzed by providing the number of iterations of bit permutation and bitwise XOR to surpass an arbitrary min-entropy under three conditions. First, the input sequences must be independent. Second, the probability distribution of input sequences must follow the “2-monotone distribution”. Third, the “covering number” of the bit permutation must be finite. In [
2], it was claimed that the three conditions just mentioned are easy to satisfy. However, satisfying these conditions may be challenging for hardware entropy sources rather than software entropy sources, particularly when managing multiple entropy sources. The first and third conditions are easily satisfied, as in the case of Windows RNG. The second condition may seem easy to achieve, but it is challenging. Therefore, to handle entropy sources other than Windows, a more relaxed condition is required than that presented in [
2].
1.2. Our Contributions
The contributions of this paper can be summarized into three main aspects. First, we provide Fast-Refresh that does not require hash functions and uses only bitwise XOR operations to generate output sequences. In particular, if we employ the following notation, the proposed entropy accumulation can be depicted as shown in
Figure 4.
: n-bit input sequences.
.
This method requires only two conditions for the input sequences, making it relatively easier to satisfy than Windows RNG entropy accumulation.
Second, we establish a min-entropy lower bound for a secure random number generator and demonstrate that our entropy accumulation successfully surpasses this lower bound when applied to our RNG. We used quantum random number generators (QRNGs) as an entropy source. QRNGs utilize several quantum phenomena to generate high-quality random numbers [
8,
9,
10].
The first published QRNG was based on radioactive decay. This emerged as the need for random number generators increased alongside the rise of computer simulations in the late 20th century. QRNGs with radioactive decay utilize the random behavior of particles emitted from radioactive materials. This method is still in use today, and, along with methods using the photon, it is one of the most common QRNG [
8]. There are various quantum phenomena used for quantum random number generation. For example, the study in [
9] uses the interference of photons to generate random numbers. Another example from [
11] involves the use of tunneling signals in silicon diodes for random number generation. Furthermore, the work in [
12] employs short laser pulses with quantum random phases to generate random numbers.
In this paper, we use the image sensor-based QRNG of [
13]. The image sensor-based QRNG generates random numbers using dark shot noise. Dark shot noise is a fluctuation of small current that flows through the pixels of the image sensor even when they do not receive light. It is known that the number of electrons follows the Poisson distribution [
14,
15]. For this reason, we utilize optical black pixels (OBP) of the image sensor, which do not receive light, as the entropy source. Furthermore, because each pixel outputs dark shot noise independently, all the entropy sources can be considered independent of each other.
Third, we conduct a comparative analysis of our proposed entropy accumulation with other entropy accumulations. The examples chosen for comparison are the Slow-Refresh used in IDQ QRNG and the Fast-Refresh of Windows RNG. When comparing with the Slow-Refresh, we focus on the theoretical differences in the accumulation mechanisms between ours and the IDQ QRNG. Under the view point of Fast-Refresh, we compare efficiency of ours with Windows RNG by evaluating the iteration number of operations.
The remainder of this paper is organized as follows. In
Section 2, we describe the theoretical background and propose our main theorem, which guarantees the lower bound of min-entropy of the output sequence. In
Section 3, we describe the process of applying the theory outlined in
Section 2 to an image sensor-based QRNG. We establish a min-entropy lower bound based on three standards and provide experimental results demonstrating that the output sequences generated by applying our theory to the input sequences have a min-entropy higher than the established lower bound. In
Section 4, we compare our entropy accumulation with other entropy accumulations. The first comparison is with Slow-Refresh of IDQ QRNG. We describe the theoretical background of Slow-Refresh and the Leftover Hash Lemma and explain the operation of IDQ QRNG. Then, we present two limitations of IDQ QRNG and describe the differences between IDQ QRNG and our entropy accumulation. The second comparison is with Fast-Refresh of Windows RNG. We compare the iteration number
l, which is obtained when applying each entropy accumulation. The iteration number of Windows RNG is calculated using the theory in [
2]. Note that without some additional components, the theory in [
2] cannot be directly applied.
Section 5 is the conclusion.
2. Theoretical Background and Main Theorem
In this section, we describe the theoretical background of entropy accumulation using only the XOR operation. In particular, we use the following notation:
: Direct product of n copies of the group . Note that the bitwise XOR operation corresponds to the + operation over .
: the space of all complex valued functions on .
, where is the n-bit random variable that represents the input sequence.
, .
, .
: probability distribution of the random variable X.
. implies the min-entropy of .
We show that as the number of input sequences required to generate one output sequence, represented by l, approaches infinity, converges to n. Furthermore, we provide the optimal value of l necessary to surpass the specified min-entropy . First, we provide a solution for the case and explain why this solution is inappropriate for the general n-bit case. Thereafter, we provide a general solution using a Discrete Fourier Transform and Convolution.
First, we show why the problem we are trying to solve is challenging. The difficult point of our problem is that in order to determine the value of
, complex linear operations must be performed on the function values of
. For example, suppose
,
are independent and
are identical to the distribution
D. The distribution
D is determined as
. Let us calculate
, which suffices to show the complexity of computation.
From the above calculations, we derive two features. First, to calculate one function value of
, we must sum
terms. That is, to calculate
the first
terms
could be any value and the last term
is automatically determined by equation
. Because there is
choices respectively, the total terms would be
; however, it is difficult to calculate. Second, as
l grows,
tends to uniform distribution. The distance between the original distribution
D and the uniform distribution
I with respect to infinite norm
of above example is
. However, we can observe that
is
. As
l grows, the terms that should be computed to calculate the function value grow rapidly; consequently, the impact of one function value will decrease. Although this phenomenon seems natural, still, the following questions remain: Under what conditions does this convergence happen? How about the convergence rate? How can we prove the related results?
2.1. Entropy Accumulation with
Let us consider the relatively simple case of
and
following an independent and identical distribution (IID). In this case, all
follow the same distribution
and a recursive relationship
is established. Thus, we can express
based on the following relationship:
(2) is derived based on the property that the sum of two bits resulting in 1 can be obtained by adding 1 and 0, or 0 and 1. Moreover,
in (2) can be interpreted as a point where
and
are internalized into
. Because
and
are symmetric about
, the condition
causes the convergence of
to
(i.e., the maximum possible entropy) as
j increases.
Figure 5 illustrates the scenario.
A more specific formula exists to accurately illustrate this situation. The following lemma, often referred to as the “Piling Up Lemma,” further details this [
16].
Fact 1 (Piling Up Lemma [
16])
. Let be independent one-bit random variables, and let . Then, Because for each j, converges to 0 and converges to 1/2 as l approaches infinity.
This equation cannot be applied when n is greater than 2. When or more, the probability that each bit produces 0 or 1 converges to 1/2; however, we cannot sum up the min-entropies of each position to calculate the total min-entropy because it is allowed only when all bits are independent of each other. Therefore, a new method is required for addressing these problems.
2.2. Convolution and Discrete Fourier Transform
In this subsection, we describe techniques applicable in the special case where n equals 1, as well as in more general cases. First, we reformulated the problem using the concept of convolution.
Definition 1 (Convolution)
. The Convolution of is defined as For the entropy accumulation problem of interest, . Using the language of convolution, (1) becomes . The entropy accumulation problem is reduced to a problem of handling this convolution. Fortunately, there exists a mathematical concept, the “Fourier Transform”, that harmonizes well with convolution.
Definition 2 (Discrete Fourier Transform)
. The Discrete Fourier Transform of is defined as A Discrete Fourier Transform is the mapping from to . In fact, this transform is one-to-one mapping. Proposition 1 supports this.
Lemma 1. If , .
Proof. First, note that
We define
as:
Then,
is a homomorphism:
As
,
. Therefore, for every
,
contains the same number of elements. Let the number of elements be
N, then
The last equality holds because each
is the root of the complex equation
. □
Lemma 2. Let f be the element in and be the Fourier Transform function. Then, Proof. By Lemma 1,
if
. Therefore,
□
Proposition 1. Let f and g be the elements of . If , .
Proof. We assume that
. Then,
holds for every
from Lemma 2.
□
The following theorem asserts that the convolution product of functions is represented as a multiplication in the transformed space. This plays a significant role in proving our main theorem.
Proposition 2. Let f and g be the elements of . Then, .
Proof. By the definitions of convolution and Discrete Fourier Transform,
□
To intuitively determine why converges to a uniform distribution, we must understand both the properties of the Discrete Fourier Transform applied to the distribution and the Discrete Fourier Transform of a uniform distribution.
Proposition 3. Let D be an arbitrary probability distribution and I be a uniform distribution of . Then,
- (i)
For all .
- (ii)
.
- (iii)
For all .
The symbols denote the Kronecker delta. The Kronecker delta is defined as 1 when t is zero vector and 0 for all other t.
Proof. Proof of (c): We know from part (a) that
. For the remaining
,
The last equality is based on Lemma 1. □
From Proposition 2, we have . By Proposition 3, , whereas for , the value of approaches 0 as l increases. Specifically, converges to as l increases. Since the Discrete Fourier Transform is a one-to-one function by Proposition 1, we can infer that converges to I as l increases.
2.3. Main Theorem
In the previous subsection, we confirmed that converges to a uniform distribution I as l increases. In this subsection, we present a solution to the entropy accumulation problem based on this approach. Specifically, we aim to find a condition for the random variable and a value for l such that achieves a specific min-entropy. The following theorem is one of the main results of our study:
Theorem 1. Let be independent n-bit random variables, and . We define . Then, Note that the condition for n-bit random variables is not an IID. Because the above theorem only requires the independence of random variables without the condition of identical distribution, it can be effectively applied when using parallel entropy sources. We provide the proof of Theorem 1.
Proof. For any function
, we have
This is obtained from Lemma 2 with
. Using the function
of Lemma 2, (3) and (4) can be written as
We apply (5) to each
with
. Because
and
,
From Theorems (2) and (7),
Therefore,
The final approximation is based on the Taylor theorem. □
3. Applying Theorem 1 to Image Sensor-Based RNG
In this section, we describe the process of applying Theorem 1 to an image sensor-based random number generator. First, we describe the process of generating the input sequences from the entropy sources of the image sensor. Subsequently, we verify whether the generated input sequences satisfy the assumptions of Theorem 1. Next, we establish the lower bound for the min-entropy, which is considered secure based on three standards. Then, we provide the theoretical number of iterations required to achieve a min-entropy higher than the established lower bound. Furthermore, we validate our theory using experimental results. Finally, we estimate the entropy accumulation speed based on frames per second (FPS) of the image sensors used. Thereafter, we compare and analyze the random number generation speed of our system with that of the ID Quantique’s QRNG chip.
3.1. Image Sensor-Based RNG
We use the ‘PV 4209K’ image sensor, which utilizes 11,520 optical black pixels (OBP) as physical entropy sources. Each OBP of the image sensor transmits 2-bit data to a PC. The PC sequentially stores the 2-bit data transmitted by the multiple OBPs. See
Figure 6.
3.2. Experimentation Process for Entropy Accumulation
Before describing the entropy accumulation experiments, we use the following notation:
: A random variable corresponding to the 2-bit data of the i-th optical black pixel (OBP). “If the value of i reaches the last pixel (11,520), the next value of i refers to the first pixel.”
For example, if , , , , becomes .
. This refers to the k-th output sequence, which is generated by adding (XOR) l input sequences.
To experimentally validate entropy accumulation, we utilized the verification method outlined in [
17]. Ref. [
17] is a min-entropy estimation tool, which estimates the min-entropy of output sequences by collecting 1,000,000
n-bit output sequences. However, there is a requirement that the value of
n must be at least 8. Therefore, to satisfy this condition, we created new 8-bit data
by concatenating four 2-bit datasets
,
,
,
, and
becomes an input sequence. This process is shown in
Figure 7.
After setting
, we select the XOR operation iteration number (
) and accumulate
in the entropy pool. This process is illustrated in
Figure 8.
The number
l is determined using Theorem 1. After collecting
1,000,000) in the entropy pool, we use [
17] to verify the min-entropy.
3.3. Setting Lower Bound of Min-Entropy
We provide three evaluation criteria that can be used to determine the lower bound of the min-entropy, which a true random number generator must exceed, acquired through the entropy accumulation process.
3.3.1. Maximum Value of the Most Common Value Estimate
In [
17], when the output sequences are determined to follow the IID, the Most Common Value Estimate is assumed to be the min-entropy of the output sequences [
17]. However, there is an upper bound on the min-entropy value in the Most Common Value Estimate. Regardless of the output sequences used for the test, this upper bound cannot be exceeded. The Most Common Value Estimate estimates the min-entropy as described in Algorithm 1.
Algorithm 1 Most Common Value Estimate |
Input: , L: length of S, Output: min-entropy of dataset - 1:
Calculate the mode of S. We denote this value by - 2:
- 3:
- 4:
|
To compute the upper bound of the Most Common Value Estimate for an 8-bit dataset S, where the length of S is 1,000,000, the mode of S should be one. That is, . Using , we obtain . Therefore, it is reasonable for the lower bound of the min-entropy to not exceed 7.94.
3.3.2. True Random 8-Bit in [17]
Ref. [
17] provides True Random Data in 1-bit, 4-bit, and 8-bit units as samples for evaluating min-entropy. From
Figure 9, it can be confirmed that the min-entropy of true random 8-bit data in [
17] is approximately 7.86.
3.3.3. Criterion of Min-Entropy by BSI AIS 20/31 [18]
The Federal Office for Information Security in Germany (Bundesamt für Sicherheit in der Informationstechni, BSI) asserts in the AIS 20/31 document that the output sequences of a cryptographic random number generator should have a min-entropy of 0.98 per bit. In the case of 8-bit data, 7.84 becomes the lower bound of entropy.
From the three criteria mentioned above, we have chosen 7.86 as the min-entropy lower bound. This value, which is smaller than 7.94 and more stringent than 7.84, appears to be a valid choice for the lower bound.
3.4. Applying Theorem 1 to Input Sequences
In this subsection, we use Theorem 1 and obtain l. Instead of directly applying Theorem 1 to , we employ a “divide and conquer” approach to compute the total min-entropy. Before explaining this strategy, note that each can be regarded as an independent random variable. This assumption is reasonable because all pixels can be considered independent entropy sources.
Because we conducted the experiment with eight bits,
n must be eight when applying Theorem 1. However, this results in the following problem: the required number
l is exceedingly large. To address this issue, we exploit the fact that
is constructed by concatenating four independent entropy sources.
is generated by considering the XOR of
l instances in
. Therefore, if we break down
into two bits, then
can be considered as four concatenations of the XOR of
l instances of
. This can be expressed by the following formula:
The four parts of
are independent of each other. Therefore, we calculated the total min-entropy by individually determining the min-entropy for each of the four parts and then summing them up. If the min-entropy of each 2-bit segment of
is greater than 1.965,
will be greater than 7.86. Theorem 1 is applied to the four 2-bit segments of
. To apply Theorem 1, the following two conditions must be satisfied. The first pertains to the independence of
. The second condition states that the value of
should exceed zero. For the first condition, we established that each
could be regarded as an independent random variable. For the second condition, we can estimate the value of
by analyzing the probability distribution of the data transmitted by each OBP. We constructed the probability distribution of each
using 2-bit data transmitted by each of the 11,520 OBPs over 2000 transmissions. From the obtained distribution, we can confirm that the value of
is greater than 0.075 for all
i.
Figure 10 illustrates the probability distribution of four randomly selected OBPs. It can be observed that each number has appeared at least 150 times.
Therefore, we estimate that
is at least
. From Theorem 1, the inequality
provides the number
l necessary for the min-entropy of each 2-bit segment of
to exceed 1.965.
From the last inequality, we can conclude that if we use 15 XOR operations to create , exceeds 7.86.
3.5. Experimental Result
We describe the experimental validation of the results in
Section 3.4. We predicted that through 15 XOR operations for entropy accumulation, more than 7.86-bit of entropy per 8-bit would be guaranteed. Upon conducting actual experiments, it was confirmed that even with only four XOR operations, more than 7.86 min-entropy per 8-bit was accomplished.
Table 1 presents the experimental results.
The experimental results are analyzed as follows. When , it refers to the case where the XOR operation is not used, and the min-entropy per 8-bit is 3.305, which is lower than the min-entropy calculated based on the probability distribution of the 2-bit from the pixels.
Min-entropy depends on the maximum value of the probability distribution function. By observing the 2-bit probability distribution, we confirmed that the maximum value of the probability distribution function was 0.425. This can also be confirmed from
Figure 10, where all the numbers (0, 1, 2, 3) in the four randomly selected distributions do not exceed 850. Therefore, when calculating the min-entropy of 2-bit, the lower bound of
is 1.2344, and the lower bound of
created by concatenating the four
is 4.9378.
The min-entropy estimated through the probability distribution is lower than that estimated by [
17] because of the conservative measurement method of [
17]. In [
17], it is determined whether the output sequence follows the IID track or the non-IID track before measuring min-entropy. If the output sequence follows the IID track, the min-entropy measured by the most common value estimation method becomes the final min-entropy of the output sequence. However, if the output sequence follows the non-IID track, the smallest value among the min-entropies measured by the other 10 methods, including the Most Common Value Estimate, becomes the final min-entropy of the output sequence. For
, it was confirmed that the original output sequence followed a non-IID track. Therefore, the min-entropy value estimated by [
17] was smaller than that calculated based on the probability distribution.
As the value of l increases, it can be observed that the increment of min-entropy decreases. This is because the maximum possible min-entropy value is 7.94, and as it approaches this number, the amount of min-entropy that can be increased by increasing the number of XOR operations becomes small. The greatest change in the min-entropy value occurs when l changes from to . This is because the output sequence follows the IID track if .
4. Comparing with Other Entropy Accumulations
In this section, we compare and analyze the entropy accumulation we developed with other entropy accumulations. The first comparison is with the Slow-Refresh used in IDQ QRNG. The second comparison target is the Fast-Refresh of Windows RNG. In comparing with the Slow-Refresh, we focus on the differences in the accumulation mechanism. In comparing with the Fast-Refresh, the analysis is carried out by calculating the iteration number of operations of Fast-Refresh in our experimental environment.
4.1. Comparing with the Slow-Refresh of IDQ QRNG
IDQ QRNG uses matrix multiplication as the entropy accumulation function [
19,
20]. For the analysis of this method, we first explain the theoretical background of entropy accumulation and the “Leftover Hash Lemma” and then explain the entropy accumulation of IDQ QRNG. We also check whether the entropy accumulation of IDQ QRNG meets the conditions of the Leftover Hash Lemma. Lastly, we summarize the differences between our entropy accumulation and that of IDQ QRNG.
4.1.1. Leftover Hash Lemma [3,19]
The Leftover Hash Lemma is a theorem that ensures the conversion of a low min-entropy input sequence into a high min-entropy output sequence. In order to state the Leftover Hash Lemma, we need two key concepts: the 2-universal hash family and statistical distance.
Definition 3 (Statistical distance)
. Let X and be random variables that take values in same set. The statistical distance between two probability distributions and is defined as Definition 4 (2-universal hash family)
. Let Y be a random variable uniformly distributed over S. A family of hash functions is called 2-universal if for any distinct inputs Based on these definitions, we can state the Leftover Hash Lemma.
Fact 2 (Leftover Hash Lemma)
. Let be the 2-universal hash family. Let X and Y be independent random variables, where Y is uniformly distributed over S, and X takes values in T. Let be the uniform distribution on S × V. Then, Corollary 1. Under the same assumptions, we obtain that Proof. Let
be the uniform distribution on
V. By triangle inequality and Leftover Hash Lemma,
The last approximation is due to Taylor expansion at
. □
The Leftover Hash Lemma is effective in generating high-quality output sequences in the following situations:
- (i)
When is smaller than .
- (ii)
When is significantly larger than .
- (iii)
When is substantially smaller than .
The key point here is the last condition. To generate output sequences using the Leftover Hash Lemma, a hash function must be uniformly selected from the 2-universal hash family. This means that random numbers are required to generate random numbers. If the size of the 2-universal hash family is small, a large amount of random numbers can be generated using a small amount of random numbers. Therefore, constructing a 2-universal hash family of small size is the key point in the use of the Leftover Hash Lemma.
Example 1. Suppose that , , , , , then by Corollary 1, . This implies that if we have a low quality entropy source with a min-entropy of 550 out of 900, and a 2-universal hash family of size , we can leverage a 30-bit random number generator to produce nearly random 100-bit numbers.
4.1.2. Slow-Refresh of IDQ QRNG [19,20]
IDQ QRNG uses an
random matrix as the entropy accumulation function. This function transforms an input sequence of length
m into an output sequence of length
n. It can also be readily proven that this collection of matrices forms a 2-universal hash family [
4]. Using the notation from the Leftover Hash Lemma, this can be represented as
The min-entropy per bit of the quantum entropy source (which corresponds to
in our notation) is not disclosed. However, according to [
19], the
value is designed to be set to
. The random matrix is generated only once, and the
elements that make up this matrix are generated using a 1-bit random number generator
times. The 1-bit random number generator creates a single bit by collecting multiple bits from the digitized entropy source and performing an XOR operation. The more bits that are XORed, the higher the min-entropy of the generated 1-bit. This can be confirmed through the Piling Up Lemma.
Figure 11 illustrates the entropy accumulation of IDQ QRNG.
4.1.3. Limitations of IDQ QRNG Entropy Accumulation Model
At first glance, the entropy accumulation model of IDQ QRNG seems to generate random numbers based on the Leftover Hash Lemma, but this model has two inherent limitations.
The first point concerns the safety of the 1-bit random number generator used to create the random matrix. This generator should output 0 and 1 with a probability of 1/2. However, the min-entropy of the entropy source used in IDQ QRNG and the iteration number of XOR operations are not specified, which makes it impossible to confirm whether the random matrix was uniformly generated.
The second point is that the random matrix is generated just one time in IDQ QRNG, but this implementation seems an incomplete application of the Leftover Hash Lemma. If the random matrix is continuously used, the condition of independence between the consecutive m-bit output sequences is compromised. Thus, in this case, it is impossible to obtain the overall entropy of long output sequence by the Leftover Hash Lemma. For example, if we generate m-bit output sequences ’s () by using the entropy accumulation of IDQ QRNG, then although for each , , it does not always satisfy that . Therefore, the matrix should be updated whenever a new output sequence is generated in order to properly apply the Leftover Hash Lemma.
4.1.4. Differences between IDQ QRNG and Our Entropy Accumulation
The simple characteristic distinguishing Fast-Refresh from Slow-Refresh is the length of the input sequence. In our entropy accumulation, we generate the output sequence by XORing five 8-bit input sequences, that is, the total length of the input sequence is 40-bit with the 8-bit length output sequence. However, IDQ QRNG uses the input sequence of 1024-bit or 2048-bit, and the output sequences of 768-bit or 1792-bit, respectively [
19]. The reason for such a long length of the input sequence is to adjust the
of the Leftover Hash Lemma to about
[
19].
The bit loss rate is another characteristic distinguishing Fast-Refresh from Slow-Refresh. In our entropy accumulation process, 32-bit are discarded from 40-bit of input sequence, resulting in a bit loss rate of 80%. On the other hand, in the IDQ QRNG entropy accumulation process, 256-bit are discarded from 1024-bit or 2048-bit of input sequence, resulting in bit loss rates of 25% or 12.5%, respectively. Through this, we can see that the Slow-Refresh handles a large number of bits at once but has a relatively low loss rate. However, a low bit loss rate results in a decrease in operation speed. The major differences are shown in
Table 2.
4.2. Comparing with the Fast-Refresh of Windows RNG
We have already described how Fast-Refresh of Windows RNG works in the introduction. Hence, we describe the entropy accumulation theory in [
2] and calculate the number of operations that must be iterated when applying it to the input sequence
. First, we describe the 2-monotone distribution and the covering number, which are essential concepts in [
2]. Thereafter, we present Theorem 5.2 of [
2] (which is the main result of [
2]) with our notation.
Next, we explain why [
2] cannot be directly applied to our entropy accumulation model and suggest an additional S-box operation as a solution. With this additional operation, we can apply Theorem 5.2 of [
2] and overcome the limitations of the original theory. Finally, we provide the theoretical number of operations necessary to guarantee a min-entropy of 7.86 per 8-bit when Theorem 5.2 of [
2] is applied to the RNG.
4.2.1. Main Results of [2]
The covering number is used to measure the efficiency of the permutations used in entropy accumulation. The efficiency of entropy accumulation increased as the covering number of permutations decreased.
Definition 5 (Covering number)
. For a permutation , and an integer , the is the smallest natural number m such thatIf no such m exists, then ; Figure 12 shows the calculation of the number of coverings.
One special property of an entropy source in [
2] is 2-monotone distribution. The definition is as follows:
Definition 6 (2-monotone distribution). The probability distribution of an n-bit random variable X follows a 2-monotone distribution if its domain can be divided into two disjoint intervals, where is a monotone function.
A 2-monotone distribution has at least one inflection point (peak), because it is divided into two monotonic intervals.
Based on these definitions, we can state Theorem 5.2 of [
2].
Theorem 2 (Theorem 5.2 of [
2])
. Suppose that for independent n-bit random variables , the probability distributions have a min-entropy of at least and follow a 2-monotone distribution. Let be a permutation and be a covering number where . Let . Then, for any , One can easily observe that as n increased, converged to n.
4.2.2. Windows RNG Entropy Accumulation without 2-Monotone Condition
Theorem 2 provides a min-entropy lower bound for with only three restrictions. The conditions under which the input sequences are independent, and the covering number of permutations is finite, are relatively easy to satisfy. However, it is challenging to satisfy the condition that all input sequences follow a 2-monotone distribution. In particular, for the image sensor entropy sources used, input sequences that follow a 2-monotone distribution are unattainable.
We generated
by concatenating four 2-bit entropy sources:
. We used this method only for experimental verification (SP-800-90b requires at least 8-bit data), and
was theoretically calculated by adding the four min-entropy values of the 2-bit segment of
(see
Section 3.4). However, if we apply Theorem 2 to our input sequences, we cannot use the divide-and-conquer approach. This is because while
definitely satisfies a 2-monotone (as can be observed in
Figure 10), Theorem 2 requires input sequences with a min-entropy of two or more. Note that the 2-bit entropy sources
cannot achieve this condition. For this reason, when applying Theorem 2 to our input sequences, we must use the concatenation method for theoretical, rather than experimental, reasons. However, if the input sequences are processed in a concatenated manner, it is impossible to satisfy the 2-monotone assumption. We explain this using a 4-bit example.
Figure 13 represents the probability distribution of 2-bit entropy sources
and
that follow a 2-monotone distribution. The probability distribution of
, created by concatenating the two entropy sources, is shown in
Figure 14.
If we consider
as one group, there are four groups and the overall shape of
is similar to that of
. However, the shape of each group’s graph is similar to
. The shape of such a concatenated distribution tends to become more complex as the entropy sources become more concatenated. Therefore, inevitably, the distribution of the input sequences assumes a shape that is far from a 2-monotone. However, if
passes through a “good” S-box, the data can be transformed to follow a 2-monotone distribution (in particular, a monotone distribution). For example, if
passes through an S-box
S in
Table 3,
follows a monotone distribution. This is illustrated in
Figure 15. The method for creating such
S is simple. After obtaining the distribution of concatenated data, arrange the distribution values in ascending order and input the elements of the domain that provide the distribution values into the S-box in order. For example, as shown in
Figure 14,
has a minimum value at
and the second-smallest value at
. If
x values are arranged in this manner, they become 15, 3, 12, 7,⋯, 2, 6, and 10. Inputting these in sequence into the S-box creates
S results in
Table 3.
Although we provide an example of transforming 4-bit data created by concatenating two 2-bit entropy sources, this method can be applied to arbitrary
n-bit data. With this method, even if the input sequences do not follow the 2-monotone distribution, Theorem 2 can be applied. However, memory is required to store the S-box, and the accumulation speed can be reduced owing to additional operations. Additionally, significant amounts of meaningful data may be required to estimate the distribution.
Figure 16 illustrates the Windows RNG entropy accumulation process using an additional S-box.
4.2.3. Applying Theorem 2
In this subsection, we determine the number l required for to exceed a min-entropy of 7.86-bit per 8-bit by applying Theorem 2 to . We did not conduct actual experiments because of the numerous S-boxes that needed to be implemented and the vast amount of data required to estimate .
To apply Theorem 2, the first step is obtaining
; as the S-box does not change the min-entropy,
is used instead. Using [
17] to estimate
requires 1,000,000 pieces of
, which is practically impossible. Therefore, we set
, which is the lower bound of
, estimated using 2000 pieces of
data, as mentioned in
Section 3.5. Note that the estimated min-entropy at
in
Table 1 of
Section 3.5 and the previously estimated min-entropy have explicitly different estimation targets. With
,
. If we set
, the covering number
becomes four, which is the minimum value of every possible
. Thus, we opted to use
as a bit permutation for the entropy accumulation. Considering these considerations,
l can be calculated as follows:
That is, if we assume to create , will exceed the value 7.86.
In
Section 3.4, we observed that our theory yields
. Although Theorem 2 may yield slightly superior results, the difference is insignificant. Considering the time consumed for the additional S-box and bit permutations and the storage space for S-boxes, we can conclude that our entropy accumulation provides more practical results.
5. Conclusions
The contributions of our study can be summarized as follows. First, we have proposed entropy accumulation of the Fast-Refresh type, which is composed of bitwise XOR alone without hash functions, and have proved the theorem that requires only the independence without identical distribution condition of input sequences.
Second, we have established 7.86 as the lower bound for the min-entropy per 8-bit, which was considered secure based on the three benchmarks. To surpass this lower bound, our proposed theory yielded iteration number .
We have implemented an actual RNG to verify the theory. Our experimental results have indicated that if we use XOR operations just four times, the generated output sequences exceeded the lower bound. The entropy source used in this experiment is an image sensor PV 4209 K. This entropy source is a QRNG that utilizes dark shot noise to generate random numbers. The most important property of our entropy source is the independence of pixels. Since each piece of 2-bit data from pixels is considered as an independent random variable, we can apply the main theorem to obtain the lower bound of the min-entropy.
Finally, we have compared our entropy accumulation with two types of entropy accumulations, which are Slow-Refresh of IDQ QRNG and Fast-Refresh of Windows RNG.
As a further study, we would like to consider various entropy accumulations that have more general and practical applications than our proposed Fast-Refresh mechanism.