rand() in c – discussion about the randomness

random

How random numbers are generated, although it is a basic thing when first read but it is really an important thing when we go into the security industry. In c programming we use srand() to get the seed which in turn generates our mathematical formula by some predictable method. Here it self we can conclude that it is not purely random.

The basic logic using here is to increase the randomness of the result we get from a mathematical formula(M1). we definitely have to use another predictable mathematical formulae(M2) to increase the randomness of M1. so the basic conclusion is how to make our predictable(M2) as unpredictable. in the Ancient times(not literally) people used time() for this purpose. but it has raised some issues like the time() value changes just for every one second, which is resolved. but how can one trust this for highly security issues.

so our people(Modern times) designed random.org which uses atmospheric noise to generate high quality random numbers. so this is how that very predictable nature of M2 has been successfully removed and how people lived happily there after.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s