From the course: C Standard Library

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Random number generation

Random number generation - C Tutorial

From the course: C Standard Library

Start my 1-month free trial

Random number generation

- [Instructor] Random number generation is a big thing in computer science, and to be fair, generating truly random numbers is a challenge in real computers because of their deterministic nature. This means that computer-generated sequences are predictable. An example where this is important is data encryption, which often relies on random numbers to produce keys that grant access to the encrypted data. If these keys were generated by a known computer-based random number generator, someone could figure out the algorithm and perform a so-called random number generator attack. However, there are pseudo random number sequences that computers can generate based on a special number known as a random seed. This seed serves as an index for a big collection of number sequences. The sequence generated by a seed of, say, four, will always produce the same numbers. Now the security lies in producing the seed, and so a common practice is to get this number from what is regarded as a random…

Contents