Random Numbers Generation (RNG)

RNG Coin
5 min readFeb 23, 2019

--

What is random numbers

Computers generate random number for everything from cryptography to video games and gambling. There are two categories of random numbers — “true” random numbers and pseudorandom numbers — and the difference is important for the security of encryption systems.

What Random Numbers Are Used For

Random numbers have been used for many thousands of years. Whether it’s flipping a coin or rolling a dice, the goal is to leave the end result up to random chance. Random number generators in a computer are similar — they’re an attempt to achieve an unpredictable, random result.

RNG Coin was created was created by a group of cryptography enthusiasts to utilize this science to secure encrypted data and ensure decentralized randomization for the gaming, blockchain storage and data security segments.

The RNG concept was created from advanced, built-in cryptography functions and algorithms to generate completely random sequences of numbers. The sources of algorithms are coin based encryption methods and similar to the ones made popular by its predecessors; bitcoin, litecoin, etc. While these sources are not the most sophisticated sources of RNG, it still serves as an excellent example of the working decentralized automation of RNG.

The RNG is derived from the following functions:

1) Time_Stamp_Counter (​https://en.wikipedia.org/wiki/Time_Stamp_Counter​)
2) Coin integrated SSL library (​https://www.openssl.org/docs/man1.0.2/crypto/RAND_add.html​)
3)​ ​Linux “getrandom” function (​http://man7.org/linux/man-pages/man2/getrandom.2.html​)
4) RDRAND (​http://www.felixcloutier.com/x86/RDRAND.html​)​

The random numbers can be generated by inserting the command prompt: “rngcoin-cli getrandomnumber” or “./rngcoin-cli getrandomnumber”. This will signal the return of a string of randomly generated numbers and characters in hexadecimal. However, it could be converted to ​any requested/required digit.

Example of a random generated number:

2852bb123e55b7fc09accdb8df161850dfcd7f7a

Every time when you enter the following command “./rngcoin-cli getrandomnumber” in your command prompt you always receive unique numbers. Is these numbers unpredictable? Answer is no. This algorithm is too weak because of very predictable incoming seeds of RNG and also very weak algorithms of RNG itself. RNG Coin is working diligently to develop and integrate updated versions of random number generation algorithms. We have developed a powerful, built-in RNG tool which interacts with RNG Coin.

Our New RNG Concept:
Our new concept will integrate the usage of ​two proven and reliable random number generation algorithms into RNG Coin.

The image above shows a list of commonly used algorithms for generating random numbers. The is also which also known as; “Pseudorandom number generator” (PNGR) (​https://en.wikipedia.org/wiki/Pseudorandom_number_generator​) The next step will be the integration of the “Fisher-Yates Shuffle” algorithm into the coin. The algorithm will be useful for mixing/generating decks, and for mixing generated random numbers. RNG Coin developers are also planning to integrate the “PCG Family” and the “ChaCha20” algorithms into our RNG process.

We are also planning to integrate additional sources of RNG which are based solely on the blockchain. This could involve the usage of random transaction hash numbers, blocks nonce number, random block numbers, current
PoS/PoW difficulty, coin quantity, the number of transactions currently stored in any random block, inputs/outputs of a random block, last confirmed block address, transaction tx id, the Merkle root, and/or many others. The blockchain itself has the ability to serve as its own source of RNG, as it contains countless sources to gather information from. Developing these functions are much more complex than simply embedding a code. There is a complete integration process needed to ensure all algorithms are interacting with the coin locally via the command line, in addition to remotely using RPC.

New Functionality Concepts
Note: Some of these new innovations and/or options are not ​fully
​ approved by our development team just yet. As we are still in the development stages of our project, portions of code are subject to revision and/or change before the process is completed.

The list of new development functions could be better explained by the new commands. Below you may find the list commands and an explanation for each:

./rngcoin-cli getrandomnumber -pcgfamily -250

This command signifies the request for a chain of 250 symbols using the “PCG Family” algorithm.

./rngcoin-cli getrandomnumber -pcgfamily -250 R9mbKLPHcNT29vgQ2rgEHU2AwMgTiTy11w 0.01

This command signifies the request for a chain of 250 symbols using the “PCG Family” algorithm, while also specifying the address where it will be sent via the comment attachment, as well as the transaction amount.

./rngcoin-cli getrandomnumber -mix -pcgfamily -chacha -300

This command signifies the request for a chain of 300 symbols using the “PCG Family” ​and the “ChaCha20” algorithm separately. We are then combining those strings of numbers to create a new/unique string of 300 random numbers/symbols.

./rngcoin-cli getrandomnumber -mix -pcgfamily -chacha -300 R9mbKLPHcNT29vgQ2rgEHU2AwMgTiTy11w 0.01

This command performs the same function as the previous command, while also specifying the address where the numbers will be sent via comment attachment, and the amount.

./rngcoin-cli getrandomnumber -pcgfamily -deck -1

This command will generate a full 52 card mixed deck, utilizing the “Fisher-Yates Shuffle”. (Shuffling of the generated deck is default function)

./rngcoin-cli getrandomnumber -pcgfamily -400 –shuffle

The command requests the generation the chain of 400 random numbers/symbols using the “PCG Family”, and also shuffling it.

./rngcoin-cli getrandomnumber -mix -pcgfamily -chacha -deck -4 R9mbKLPHcNT29vgQ2rgEHU2AwMgTiTy11w 0.01

This command generates a randomized 4 decks of 52 cards, while shuffling via “Fisher-Yates”. It then uses the “PCG Family” and “ChaCha20” algorithms separately to mix both strings of numbers. It also specifies specifies the address where this generated numbers will be sent via comment attachment, as well as the amount of the transaction.

./rngcoin-cli getrandomnumber –bchain -400

This command generates a random string of 400 symbols using random numbers/symbols obtained from the blockchain. The incoming seeds will be requested from integrated algorithms via “PCG Family” and “ChaCha20” method.

./rngcoin-cli getrandomnumber –d

This command generates a string of random numbers using the current integrated algorithm.

Additional RNG methods and command prompts are also currently under development. By specifying the details of the desired RNG content, we can request to generate numbers, letters, symbols and/or mixed components. Additional methods of transferring PRNG’s using public and private encryption keys, and the exchange of these keys will be described in another article.

Be sure to stay connected in order to remain up-to-date on all of the exciting innovations and new developments of RNG Coin!

--

--

RNG Coin

RNG Coin is a peer-to-peer cryptocurrency and open source software project.