Practical Entropy Accumulation for Random Number Generators with Image Sensor-Based Quantum Noise Sources

The efficient generation of high-quality random numbers is essential in the operation of cryptographic modules. The quality of a random number generator is evaluated by the min-entropy of its entropy source. The typical method used to achieve high min-entropy of the output sequence is an entropy accumulation based on a hash function. This is grounded in the famous Leftover Hash Lemma, which guarantees a lower bound on the min-entropy of the output sequence. However, the hash function-based entropy accumulation has slow speed in general. For a practical perspective, we need a new efficient entropy accumulation with the theoretical background for the min-entropy of the output sequence. In this work, we obtain the theoretical bound for the min-entropy of the output random sequence through the very efficient entropy accumulation using only bitwise XOR operations, where the input sequences from the entropy source are independent. Moreover, we examine our theoretical results by applying them to the quantum random number generator that uses dark shot noise arising from image sensor pixels as its entropy source.


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 X be the corresponding output sequence, then the entropy accumulation can be expressed as X = H(X).
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 m/n 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.

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 rot (α,n) 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.   • Λ (l) 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].

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. 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 sensorbased 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.

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: • Z n m : Direct product of n copies of the group Z m . Note that the bitwise XOR operation corresponds to the + operation over Z n 2 . • F (Z n m ) : the space of all complex valued functions on Z n m . • Γ (l) = ∑ l j=1 Y j , where Y j ∈ Z n 2 is the n-bit random variable that represents the input sequence.
We show that as the number of input sequences required to generate one output sequence, represented by l, approaches infinity, H min (D Γ (l) ) converges to n. Furthermore, we provide the optimal value of l necessary to surpass the specified min-entropy α(< n). First, we provide a solution for the case n = 1 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 D Γ (l) , complex linear operations must be performed on the function values of D Y j . For example, suppose Let us calculate D Γ (3) , which suffices to show the complexity of computation.
From the above calculations, we derive two features. First, to calculate one function value of D Γ (l) , we must sum 2 (l−1)n terms. That is, to calculate the first l − 1 terms x 1 , x 2 , · · · x l−1 could be any value and the last term x l is automatically determined by equation Because there is 2 n choices respectively, the total terms would be 2 (l−1)n ; however, it is difficult to calculate. Second, as l grows, D Γ (l) tends to uniform distribution. The distance between the original distribution D and the uniform distribution I with respect to infinite norm D − I ∞ of above example is 1 8 .
However, we can observe that D Γ (3) − I ∞ is 1 128 . 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 n = 1 Let us consider the relatively simple case of n = 1 and Y j following an independent and identical distribution (IID). In this case, all Y j follow the same distribution D(= D Y j ) and a recursive relationship Γ (j+1) = Γ (j) ⊕ Y j+1 is established. Thus, we can express D Γ (j+1) (1) 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, D Γ (j+1) (1) in (2) can be interpreted as a point where , 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]. [16]). Let Y 1 , Y 2 , · · · , Y l be independent one-bit random variables, and let Γ (l) := ∑ l j=1 Y j . Then,
This equation cannot be applied when n is greater than 2. When n = 2 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.

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.
For the entropy accumulation problem of interest, m = 2. Using the language of convolution, 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.
A Discrete Fourier Transform is the mapping from F (Z n m ) to F (Z n m ). In fact, this transform is one-to-one mapping. Proposition 1 supports this.
We define φ t : Z n m → Z m as: Then, φ t is a homomorphism : As t = 0, φ −1 t (0) = Z n m . Therefore, for every s ∈ Z m , φ −1 t (s) contains the same number of elements. Let the number of elements be N, then The last equality holds because each e − 2πi m s is the root of the complex equation z m − 1 = 0.
Lemma 2. Let f be the element in F (Z n m ) and f be the Fourier Transform function. Then, Proposition 1. Let f and g be the elements of F (Z n m ). If f = g, f = g.

Proof.
We assume that f = g. Then, holds for every x ∈ Z n m 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 F (Z n m ). Then, f * g = f g.

Proof.
By the definitions of convolution and Discrete Fourier Transform, To intuitively determine why Γ (l) 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 Z n m . Then, For all t ∈ Z n m , I(t) = δ t,0 . The symbols δ t,0 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 (a) : Proof of (b) : Proof of (c): We know from part (a) that I(0) = 1. For the remaining t = 0, The last equality is based on Lemma 1.
converges to δ ,t,0 as l increases. Since the Discrete Fourier Transform is a one-to-one function by Proposition 1, we can infer that D Γ (l) converges to I as l increases.

Main Theorem
In the previous subsection, we confirmed that D Γ (l) 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 Y j and a value for l such that D Γ (l) achieves a specific min-entropy. The following theorem is one of the main results of our study: Note that the condition for n-bit random variables Y 1 , Y 2 , · · · Y l 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 f ∈ L(Z n 2 ), we have This is obtained from Lemma 2 with m = 2. Using the function φ t of Lemma 2, (3) and (4) can be written as We apply (5) From Theorems (2) and (7), Therefore, The final approximation is based on the Taylor theorem.

Applying Theorem 1 to Image Sensor-Based RNG
In this section, we describe the process of applying Theorem 1 to an image sensorbased 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.

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.

Experimentation Process for Entropy Accumulation
Before describing the entropy accumulation experiments, we use the following notation: • W i : 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." 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 Y j by concatenating four 2-bit datasets W 4j−3 , W 4j−2 , W 4j−1 , W 4j , and Y j becomes an input sequence. This process is shown in Figure 7. After setting Y j , we select the XOR operation iteration number (l − 1) and accumulate Γ (l) k in the entropy pool. This process is illustrated in Figure 8.
The number l is determined using Theorem 1. After collecting Γ (l) k (1 ≤ k ≤ 1,000,000) in the entropy pool, we use [17] to verify the min-entropy.

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. 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. 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,p = 1/256. Usingp, we obtain H min = 7.94. Therefore, it is reasonable for the lower bound of the min-entropy to not exceed 7.94. [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.

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.

Applying Theorem 1 to Input Sequences
In this subsection, we use Theorem 1 and obtain l. Instead of directly applying Theorem 1 to Y j , we employ a "divide and conquer" approach to compute the total minentropy. Before explaining this strategy, note that each W i 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 Y j is constructed by concatenating four independent entropy sources. Γ (l) k is generated by considering the XOR of l instances in Y j . Therefore, if we break down Γ (l) k into two bits, then Γ (l) k can be considered as four concatenations of the XOR of l instances of W i . This can be expressed by the following formula: The four parts of Γ k . To apply Theorem 1, the following two conditions must be satisfied. The first pertains to the independence of W i . The second condition states that the value of ω should exceed zero. For the first condition, we established that each W i 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 W i 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 D W i min 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 0.075. From Theorem 1, the inequality provides the number l necessary for the min-entropy of each 2-bit segment of Γ (l) k to exceed 1.965.
From the last inequality, we can conclude that if we use 15 XOR operations to create Γ

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 l = 1, 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 H min (D W i ) is 1.2344, and the lower bound of H min (D Y j ) created by concatenating the four D W i 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 minentropy measured by the most common value estimation method becomes the final minentropy 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 l = 1, 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 l = 1 to l = 2. This is because the output sequence follows the IID track if l ≥ 2.

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.

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. [3,19] The Leftover Hash Lemma is a theorem that ensures the conversion of a low minentropy 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 X be random variables that take values in same set. The statistical distance between two probability distributions D X and D X is defined as Definition 4 (2-universal hash family). Let Y be a random variable uniformly distributed over S.
A family { f s : T → V} s∈S 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 { f s : T → V} s∈S 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 U S×V be the uniform distribution on S × V. Then,

Corollary 1.
Under the same assumptions, we obtain that Proof. Let U V be the uniform distribution on V. By triangle inequality and Leftover Hash Lemma, The last approximation is due to Taylor expansion at x = 1 |V| .
The Leftover Hash Lemma is effective in generating high-quality output sequences in the following situations: When H min (X) is smaller than |T|.
When H min (X) is significantly larger than |V|. (iii) When |S| is substantially smaller than |V|.
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. This implies that if we have a low quality entropy source with a min-entropy of 550 out of 900, and a 2universal hash family of size 2 30 , we can leverage a 30-bit random number generator to produce nearly random 100-bit numbers. [19,20] IDQ QRNG uses an m × n 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

Slow-Refresh of IDQ QRNG
The min-entropy per bit of the quantum entropy source (which corresponds to H min (X) in our notation) is not disclosed. However, according to [19], the value is designed to be set to 2 −100 . The random matrix is generated only once, and the mn elements that make up this matrix are generated using a 1-bit random number generator mn 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.

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 X i 's (1 ≤ i ≤ 5) by using the entropy accumulation of IDQ QRNG, then although for each 1 ≤ i ≤ 5, H min (X i ) = m − , it does not always satisfy that H min (X 1 X 2 X 3 X 4 X 5 ) = 5(m − ). Therefore, the matrix should be updated whenever a new output sequence is generated in order to properly apply the Leftover Hash Lemma.

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 2 −100 [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.

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 Y j . 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.

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.
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].

Windows RNG Entropy Accumulation without 2-Monotone Condition
Theorem 2 provides a min-entropy lower bound for Λ (l) π 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 Y j by concatenating four 2-bit entropy sources: W 4j−3 , W 4j−2 , W 4j−1 , W 4j . We used this method only for experimental verification (SP-800-90b requires at least 8-bit data), and H min (Γ (l) ) was theoretically calculated by adding the four min-entropy values of the 2-bit segment of Γ (l) (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 D W i 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 W i 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 W 1 and W 2 that follow a 2-monotone distribution. The probability distribution of W 1 W 2 , created by concatenating the two entropy sources, is shown in Figure 14.  If we consider {4i − 3, 4i − 2, 4i − 1, 4i} as one group, there are four groups and the overall shape of D W 1 W 2 is similar to that of D W 1 . However, the shape of each group's graph is similar to D W 2 . 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 Y j 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 W 1 W 2 passes through an S-box S in Table 3, D S(W 1 W 2 ) 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, D W 1 W 2 has a minimum value at x = 15 and the second-smallest value at x = 3. 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. Table 3. 4-bit S-box, which is used with W 1 W 2 to create monotone distribution. 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.

Applying Theorem 2
In this subsection, we determine the number l required for Λ (l) π to exceed a minentropy of 7.86-bit per 8-bit by applying Theorem 2 to S(Y j ). 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 D Y j .
To apply Theorem 2, the first step is obtaining H min (D S(Y j ) ); as the S-box does not change the min-entropy, H min (D Y j ) is used instead. Using [17] to estimate H min (D Y j ) requires 1,000,000 pieces of Y j , which is practically impossible. Therefore, we set k = 4.9378, which is the lower bound of H min (D Y j ), estimated using 2000 pieces of W i data, as mentioned in Section 3.5. Note that the estimated min-entropy at l = 1 in Table 1 of Section 3.5 and the previously estimated min-entropy have explicitly different estimation targets.
With k = 4.9378, k = k 2 = 2. If we set π = rot (2,8) , the covering number m = C π,k becomes four, which is the minimum value of every possible π. Thus, we opted to use rot (2,8) as a bit permutation for the entropy accumulation. Considering these considerations, l can be calculated as follows: That is, if we assume l = 14 to create Λ (l) π , H min (D Λ (l) π ) will exceed the value 7.86.
In Section 3.4, we observed that our theory yields l = 16. 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.

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 l = 16.
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.

Data Availability Statement:
The data presented in this study are available on request from the corresponding author.

Conflicts of Interest:
The authors declare no conflict of interest.