Generating Random Numbers

In the previous post where I shared my code for OTP cipher, I have used a function which gave me a random bit. Now the question here is how random that bit is? So for that lets have a look at how computers generate the random numbers. (Well luck is not as random as you think!!)

Now before we start discussing about how computer generates a random number lets look at a very fundamental problem. Computers are specifically and carefully programmed to eliminate randomness in results. So how could a computer possibly generate a random number?

Well there are two types of random numbers:
1) Pseudo-Random Numbers
2) True-Random Numbers


Pseudo-Random Numbers are generated by using an algorithm so the results appear random even though they aren’t. For most applications of random numbers pseudo randomness is sufficient.

While on the other hand True random numbers are generated by observing some outside data, like Current CPU fan speed or Memory occupied in the storage device, which is not predictable. The results might still be biased but they’re not generated by deterministic algorithms

Since much of the hole concept of Cryptography depends on a secure random algorithm to generate a random key, if a generator can be made predictable, it can be used as a backdoor by an attacker to break the encryption.


Now the question is, The random generator used in our cipher can be predicted? Well the answer is No. We used the random generator for every single bit which kind of makes it in-predictable.

Comments

Post a Comment

Popular Posts