Chapter 19. Random Numbers

The word random means different things to different programmers at different times. For most applications, the pseudo-random numbers provided by the C library are quite sufficient. Because they allow you to reproduce conditions if necessary (perhaps for debugging purposes), they are preferable to truly random numbers.

But certain applications, including cryptography, require truly random numbers for best results. The Linux kernel samples events from the unpredictable outside world to provide cryptographically strong random numbers.

Computers are predictable. Most of the tasks that we want computers to do are tasks in which predictability is the most important thing. Even when bugs appear in your program, you want them ...

Get Linux Application Development, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.