Moving to Secure Random Numbers

Recent editions of this book used Java’s Random class to obtain “random” values. This class produced deterministic values that could be predicted by malicious programmers. SecureRandom objects produce nondeterministic random numbers that cannot be predicted.

Deterministic random numbers have been the source of many software security breaches. Most programming languages now have library features similar to Java’s SecureRandom class for producing nondeterministic random numbers to help prevent such problems. From this point forward in the text, when we refer to “random numbers” we mean “secure random numbers.”

Get Java™ How To Program (Early Objects), Tenth 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.