The tested operating environment(s) are listed below:
- Ubuntu 20.04.1 LTS
To install all required dependencies, execute the bash installation script (from the project's root directory):
./install.sh
NodeJS is also required for executing the EarthCoin blockchain, and can be installed with the following:
apt-get install nodejs
Earthcam-TRNG is being utilized in a simple blockchain application, courtesy of Alfrick Opidi, known as Earthcoin.
Images from around the world are scraped, permuted, and combined to create a series of random bytes.
The bytes are then fed into the blockchain application in the form of a nonce (number used once) for SHA256 hash generation.
The process described above can be executed with the following command (may take ~1 minute for execution to complete):
node blockchain/main.js
The image scraper uses OpenCV and Streamlink to establish a connection with multiple sources like EarthCam and YouTube. From this, a multitude of streams are looked at, and the current frame of that stream is grabbed and passed to the rest of the pipeline.
The following images show images taken from the corresponding streams here.
Shibuya, Japan | Las Vegas, U.S.A |
---|---|
![]() |
![]() |
The image scrambler permutes every pixel of the provided images (down to the individual RGB values).
An example of an image before and after scrambling is provided below.
Source Image | Shuffled Image |
---|---|
![]() |
![]() |
![]() |
![]() |
After xoring the scrambled images, the resulting image is measured in terms of entropy. Specifically the R, G, and B channels of the image are measured for entropy separately and averaged to generate a single output value. If the image contains enough entropy, the image is converted to a series of bytes (to be used elsewhere).
The histogram below showcases the frequency of byte values taken from images processed through the entire system.
The system's entire architecture can be seen in the following image.
- opencv-python (4.5.1.48)
- streamlink (2.0.0)
- numpy (1.20.1)
- pandas (1.2.3)
- scipy (1.6.1)