Random numbers are very useful in simulation, chaos theory, game theory, information theory, pattern recognition, probability theory, quantum mechanics, statistics, and statistical mechanics. The random numbers are especially helpful in cryptography. In this work, the proposed random number generators come from white noise of audio and video (A/V) sources which are extracted from high-resolution IPCAM, WEBCAM, and MPEG-1 video files. The proposed generator applied on video sources from IPCAM and WEBCAM with microphone would be the true random number generator and the pseudorandom number generator when applied on video sources from MPEG-1 video file. In addition, when applying NIST SP 800-22 Rev.1a 15 statistics tests on the random numbers generated from the proposed generator, around 98% random numbers can pass 15 statistical tests. Furthermore, the audio and video sources can be found easily; hence, the proposed generator is a qualified, convenient, and efficient random number generator.

The security concerning the access of Cloud Database has become a significant up-to-date issue. Cryptography and network security are both fundamental components when accessing Cloud Database safely; furthermore, random numbers play an essential role in cryptography and network security. The random numbers could be generated from two major ways: true random number generators (TRNGs) and pseudo-random number generators (PRNGs). TRNGs often generate random numbers from nature phenomena such as dice, coin flipping, flip-flop circuit, oscillator, electromagnetic wave, thermal noise, and atmospheric noise. As a result, the random numbers generated from TRNGs cannot be reproduced [

Most people access Cloud storage via personal devices; Hence, to create random number generator algorithms from video [

Passing rate among VRNG, DVRNG, and pure sound.

Webcam | Ipcam | XiangSheng | 2Webcam | 2Ipcam | 2XiangSheng | Pure sound | |
---|---|---|---|---|---|---|---|

Frequency | 0.9900 | 0.9900 | 0.5900 | 1.0000 | 0.9800 | 1.0000 | 0.58 |

Block frequency | 1.0000 | 1.0000 | 0.6000 | 0.9900 | 0.9900 | 1.0000 | 0 |

Cumulative sums | 0.9900 | 0.9850 | 0.5850 | 1.0000 | 0.9750 | 1.0000 | 0.16 |

Runs | 0.9900 | 0.9900 | 0.3000 | 1.0000 | 0.9900 | 1.0000 | 0 |

Longest-run-of-ones | 0.9900 | 0.9900 | 0.5800 | 1.0000 | 0.9800 | 1.0000 | 0 |

Binary matrix rank | 0.9900 | 0.9800 | 1.0000 | 0.9900 | 1.0000 | 1.0000 | 0 |

FFT (Fourier) | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 0 |

Nonoverlapping template | 0.9886 | 0.9872 | 0.9295 | 0.9882 | 0.9897 | 0.9848 | 0 |

Overlapping template | 0.9800 | 0.9800 | 0.7000 | 0.9900 | 0.9900 | 1.0000 | 0 |

Universal statistical | 1.0000 | 1.0000 | 0.0000 | 1.0000 | 1.0000 | 1.0000 | 0 |

Approximate entropy | 0.9800 | 0.9900 | 0.7800 | 0.9900 | 1.0000 | 1.0000 | 0 |

The random excursions | 0.9853 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 1.0000 | 0 |

The random excursions variant | 1.0000 | 1.0000 | 1.0000 | 0.9769 | 0.9899 | 1.0000 | 0 |

The serial | 0.9900 | 0.9800 | 0.8500 | 0.9950 | 0.9950 | 1.0000 | 0 |

The linear complexity | 0.9800 | 0.9900 | 1.0000 | 0.9700 | 0.9700 | 1.0000 | 0 |

| |||||||

Average of above | 0.9903 | 0.9908 | 0.7276 | 0.9927 | 0.9900 | 0.9990 | 0.0493 |

Minimum of above | 0.9800 | 0.9800 | 0.0000 | 0.9700 | 0.9700 | 0.9848 | 0 |

However, passing rate of the random numbers generated from pure sound is almost zero, and using two video sources to generate random numbers is not convenient enough when compared with the random numbers generated from white noise of audio and video—Audio and Video Random Number Generator (AVRNG as short). The AVRNG requires camera and microphone to generate random numbers, which means that AVRNG could not only be applied on personal computer but also on the more and more widespread smartphone and tablet PC.

We will review related works in Section

A linear congruential random number generator [

Intel attempted to produce true random numbers by taking some of the thermal noise firstly in 1999. But, to amplify thermal noise consumes lots of power; hence, Intel turned to make a random number generator based on only digital hardware in 2008 [

In 2009, Tawfeeq proposed “A Random Number Generator Based on Single-Photon Avalanche Photodiode Dark Counts” [

In 2012, Wang et al. proposed “A Novel True Random Number Generator Based on Mouse Movement and a One-Dimensional Chaotic Map” [

Alsultanny proposed another TRNG called “Random-bit Sequence Generation from Image Data” in 2008 [

Tsai et al. proposed the random numbers generated from video [

The qualified random numbers should satisfy unpredictability. For randomness, Menezes et al. proposed five statistical tests—Frequency (Monobit) test, Serial test (two-bit test), Poker test, Runs test, and Autocorrelation test—of random sequences—in Handbook of Applied Cryptography, 1996 [

The Frequency (Monobit) Test

Frequency Test within a Block

The Runs test

Test for the longest-Run-of-Ones in a Block

The Binary Matrix Rank Test

The Discrete Fourier Transform (spectral) Test

The Non-overlapping Template Matching Test

The Overlapping Template Matching Test

Maurer’s “Universal Statistical” Test

Linear Complexity Test

The Serial test (two-bit test)

The Approximate Entropy test

The Cumulative Suns (Cusum) test

The Random Excursions test

The Random Excursions Variant test.

The above 15 statistical tests are commonly used for determining whether the random numbers possess some specific characteristics that a true random numbers could possibly exhibit. In addition, the NIST issues the 140 Publication Series to coordinate the requirements and standards for cryptographic modules. The FIPS Pub 140-1 and 140-2 were published in 1994 and 2004, respectively [

Even though random numbers that we generated from single source cannot all pass the NIST SP-800-22 Rev.1a 15 statistical tests. Consequantly this work combines audio and video to develop AVRNGs in order to take advantage of audio’s influence. In our experiments, the AVRNG with cartoon video source still cannot pass NIST SP-800-22 Rev.1a 15 statistical tests due to cartoon is artificial color. The artificial color is almost the same in the neighborhood area such as arm or face. Hence, coordinate threshold and discard threshold

Let

Initial value: the initial value can be obtained anyway. In the proposed method, we take average value of the nine pixels around the center pixel of the first frame to be the initial value. Let the coordinate of center pixel be (

Then we set the initial value. Let

Set threshold: we set

Get sound coordinate and value: sound source from mpeg1 video file is transferred to 16 bits (2 bytes) stereo format of 44.1 K sampling rate. There are 30 frames/second in a video file; hence, we could obtain around

If we get 100,000 random bits, then we let

We get

and let

If

Get one random bit:

New coordinate will be

Both

Then back to step (c) to get another random bit

Let

Figure

AVRNG with filter flowchart.

The next step is to prove that the random numbers generated from AVRNG are qualified enough. Obviously, we should apply NIST SP 800-22 Rev.1a—15 statistical tests [

First of all, we briefly describe the materials that are used for experiments. The XiangSheng is a kind of comic dialogue to entertain the audience with ridiculous stories we mentioned in Section

AVRNG with filter (XiangSheng).

AVRNG with filter | XiangSheng0 | XiangSheng1 | XiangSheng2 | XiangSheng3 | XiangSheng4 | XiangSheng5 |
---|---|---|---|---|---|---|

Frequency | 0.81 | 1 | 0.98 | 0.98 | 0.98 | 0.98 |

Block frequency | 0.98 | 0.98 | 0.99 | 1 | 1 | 0.98 |

Cumulative sums | 0.82 | 0.995 | 0.98 | 0.98 | 0.985 | 0.98 |

Runs | 0.39 | 1 | 1 | 0.99 | 0.97 | 1 |

Longest-runs-of-ones | 0.88 | 1 | 0.99 | 1 | 0.97 | 1 |

Binary matrix rank | 0.98 | 0.99 | 0.99 | 1 | 0.98 | 0.99 |

FFT (Fourier) | 1 | 1 | 1 | 1 | 1 | 1 |

Nonoverlapping template | 0.9801 | 0.989 | 0.9899 | 0.9896 | 0.9881 | 0.9893 |

Overlapping template | 0.98 | 0.98 | 0.99 | 1 | 0.98 | 1 |

Universal statistical | 1 | 1 | 1 | 1 | 1 | 1 |

Approximate entropy | 0.99 | 1 | 0.96 | 1 | 0.99 | 0.99 |

The random excursions | 1 | 0.9886 | 0.9688 | 1 | 0.9861 | 0.9772 |

The random excursions variant | 1 | 1 | 0.9931 | 1 | 1 | 1 |

The serial | 0.995 | 0.995 | 0.99 | 0.996 | 0.985 | 0.985 |

The linear complexity | 0.98 | 1 | 0.98 | 0.99 | 0.98 | 0.98 |

| ||||||

Average of above | 0.9190 | 0.9945 | 0.9868 | 0.9950 | 0.9863 | 0.9901 |

Minimum of above | 0.39 | 0.98 | 0.96 | 0.98 | 0.97 | 0.9772 |

AVRNG with filter (Cartoon).

AVRNG with filter | Cartoon0 | Cartoonl | Cartoon2 | Cartoon3 | Cartoon4 | Cartoon5 |
---|---|---|---|---|---|---|

Frequency | 0.3 | 1 | 0.99 | 1 | 0.98 | 0.98 |

Block frequency | 0.86 | 1 | 1 | 1 | 0.98 | 0.98 |

Cumulative sums | 0.275 | 1 | 0.985 | 1 | 0.985 | 0.99 |

Runs | 0.57 | 0.99 | 1 | 1 | 0.98 | 0.99 |

Longest-run-of-ones | 0.42 | 0.99 | 1 | 0.98 | 1 | 0.97 |

Binary matrix rank | 1 | 1 | 0.98 | 0.98 | 0.98 | 0.98 |

FFT (Fourier) | 1 | 1 | 1 | 1 | 1 | 1 |

Nonoverlapping template | 0.9666 | 0.9905 | 0.9893 | 0.9901 | 0.9886 | 0.989 |

Overlapping template | 0.59 | 1 | 0.99 | 1 | 0.99 | 0.98 |

Universal statistical | 0 | 1 | 1 | 1 | 1 | 1 |

Approximate entropy | 0.68 | 0.99 | 0.98 | 0.98 | 0.98 | 0.99 |

The random excursions | 0 | 0.975 | 0.9722 | 1 | 1 | 0.9922 |

The random excursions variant | 0 | 1 | 1 | 1 | 1 | 0.9969 |

The serial | 0.915 | 0.995 | 0.995 | 0.995 | 0.995 | 0.995 |

The linear complexity | 0.94 | 0.99 | 1 | 1 | 1 | 1 |

| ||||||

Average of above | 0.5678 | 0.9947 | 0.9921 | 0.9950 | 0.9906 | 0.9889 |

Minimum of above | 0 | 0.975 | 0.9722 | 0.98 | 0.98 | 0.97 |

WEBCAM image.

XiangSheng image.

Cartoon image.

The test result in XiangSheng part, minimum value of XiangSheng3, is 0.98 which is the best result of all XiangSheng test samples. We can see that, when adopting AVRNG with filter, both XiangSheng and cartoon become good enough compared with WEBCAM with microphone. From the XiangSheng0 to XiangSheng5 means XiangSheng film XOR from 0 to 5 sound points, respectively. Similarly, from the Cartoon0 to Cartoon5 means cartoon film XOR from 0 to 5 sound points, respectively. The complete results are shown in Tables

In cartoon part, minimum value of Cartoon3 is 0.98 which is the best result of all cartoon test samples. The result shows that we can generate qualified random numbers from AVRNG with filter no matter from WEBCAM, XiangSheng, or cartoon. The experimental equipment is Logitech Clear Chat Stereo headset’s microphone (100–10,000 Hz, Sensitivity −62 dBV/uBAR, −42 dBV/Pascal ±3 dB) [

In this work, the proposed AVRNG with filter could generate random numbers from WEBCAM with microphone (as TRNG) or from video file’s frame with sound (as PRNG). Furthermore, the AVRNG adopts the filter 98% random numbers generated from both XiangSheng, and cartoon film could pass 15 statistical tests. Moreover, AVRNG with or without filter takes almost the same time to generate 100,000 random bits. The result is shown in Table

Efficiency of AVRNG with/without filter (unit: second).

AVRNG | Without filter | With filter | With/Without filter |
---|---|---|---|

XiangSheng | 46.0636 | 47.1470 | 1.023 |

Cartoon | 52.5758 | 52.5658 | 0.999 |

The proposed random numbers generating method requires merely WEBCAM and microphone instead of complex equipment such as electronic circuit or oscillator to generate true random numbers. The results are principally based on personal computer; consequently, to transfer proposed algorithm upon personal devices such as tablet PC or smartphone so as to prove that these efforts can be widely applied will be the next stage. The random numbers generated from this work could be used in evolutionary algorithm [

This work was supported in part by the National Science Council under the Grants NSC 99-2221-E-037 -004 and the NSYSU-KMU under the Grants NSYSUKMU102-P001.