HomePROBABILITYRNG, PRNG, CSPRNG |...

RNG, PRNG, CSPRNG | cryptographically secure pseudorandom

Most random number generators are pseudorandom number generators (PRNGs). The distinction may be pedantic or crucial, depending on context. In the context of cryptography, it’s critical.

For this post, RNG will mean a physical, true random number generator.

A PRNG may be suitable for many uses—Monte Carlo simulation, numerical integration, game development, etc.—but not be suitable for cryptography. A PNRG which is suitable for cryptography is called a CSPRNG (cryptographically secure pseudorandom number generator).

A PRNG may have excellent statistical properties, and pass standard test suites for random number generators, and yet be insecure. The output of an insecure generator may have no statistical regularities, and yet have regularities that a sneaky cryptanalyst can exploit. For example, the popular Mersenne Twister is fine for simulations but its output can be predicted after a relatively short run. The prediction depends on a clever set of calculations that would be unnatural from a statistical perspective, which is why its statistical performance is better than its cryptographic performance.

CSPRNGs tend to be much slower than PRNGs, so you pay for security. And for a non-cryptographic application this cost isn’t worth it.

In general, statistical tests give necessary but not sufficient conditions for a PRNG to be a CSPRNG. If a PRNG fails statistical tests, it has some sort of regularity that potentially could be exploited by cryptanalysis. I had to tell a client once that although his PRNG passed the standard statistical tests, I was pretty sure I could break the cryptographic system he wanted to use it in. This news was not well received.

RNG, PRNG, CSPRNG | cryptographically secure pseudorandom

I suspect that a physical RNG with good statistical properties will have good cryptographic properties as well, contrary to the usual case. Cloudflare famously uses lava lamps to generate random bits for TLS keys. Cryptanalysts have exploited minor flaws in PRNGs, and so the lava lamps give Cloudflare one less thing to worry about. (I’m sure they still have plenty else to worry about.)

A physical RNG might fail statistical tests. For example, maybe the physical process is truly random but biased. Or maybe the process of turning physical phenomena into numbers introduces some bias. But it’s hard to imagine that an RNG could have a clean bill of statistical health and yet have a cryptographically exploitable weakness. It’s conceivable that a statistically impeccable physical RNG might have some unforeseen exploitable regularity, but this seems highly doubtful.

Related posts

Most Popular

More from Author

Google Forms for Formative Assessment in Math Class

Cheers to a new school year that will be unlike any...

2nd Grade Subtraction Worksheet | Subtraction of 2-Digit Numbers

In 2nd grade subtraction worksheet we will solve the problems on subtraction...

S01 overview – Intellectual Mathematics

Galileo is the most overrated figure in the history of science....

Digital SAT Math Problems and Solutions (Part

Problem 1 :Store A sells raspberries for $5.50 per pint and...

- A word from our sponsors -

Read Now

Google Forms for Formative Assessment in Math Class

Cheers to a new school year that will be unlike any school year before!I know that all of us are looking at new and different plans...hybrid/synchronous/asynchronous/ fully in person/fully remote...the list goes on.   I have spent a considerable amount of time trying to figure out how I...

2nd Grade Subtraction Worksheet | Subtraction of 2-Digit Numbers

In 2nd grade subtraction worksheet we will solve the problems on subtraction of 2-digit numbers (without Regrouping), subtraction of numbers with regrouping, subtracting 1-digit number from 2-digit number with regrouping, subtracting 2-digit number with regrouping, checking subtraction with addition, subtraction is reverse of addition, addition and subtraction together, estimating the difference and...

S01 overview – Intellectual Mathematics

Galileo is the most overrated figure in the history of science. That is the thesis of Season 1 of my podcast, which consists of the following 18 episodes. Galileo bad, Archimedes good Galileo’s bumbling attempts at determining the area of the cycloid suggests a radical new interpretation of...

Digital SAT Math Problems and Solutions (Part

Problem 1 :Store A sells raspberries for $5.50 per pint and blackberries for $3.00 per pint. Store B sells raspberries for $6.50 per pint and blackberries for $8.00 per pint. A certain purchase of raspberries and blackberries would cost $37.00 at store A or $66.00 at store B. How many...

How To Find The Factors Of 20: A Simple Way

The factors of 20 are the numbers 1, 2, 4, 5, 10, 20, -1, -2, -4, -5, -10, and -20. As you can see, the total number of factors 20 has is 12. Make the following observations!The numbers 1, 2, 4, 5, 10, 20 are called positive factors of...

Addition & Subtraction Together |Combination of addition & subtraction

We will solve the different types of problems involving addition and subtraction together. To show the problem involving both addition and subtraction, we first group all the numbers with ‘+’ and ‘-‘ signs. We find the sum of the numbers with ‘+’ sign and similarly the sum of all the...

Two Back to School Ideas for Digital Classrooms

 Yep, it's a school year like no other.  If you're like me, you have some very specific back to school routines...you buy the new school supplies, you get your kids a new backpack, you prepare your bulletin boards.  There are even back to school activities that I...

Digital SAT Math Problems and Solutions (Part

Problem 1 :Each face of a fair 14-sided die is labeled with a number from 1 through 14, with a different number appearing on each face. If the die is rolled one time, what is the probability of rolling a 2? Solution : https://www.youtube.com/watch?v=PC0RAjG6Zb8 Problem 2 :A printer produces posters...

Percent of Increase Word Problems

Hello and welcome! We're focusing today on a fascinating mathematical topic: percent of increase word problems. We've got some exciting scenarios to consider and we'll walk through these calculations together. It'll be as simple as counting 1, 2, 3. Let's start! Before we start, let's be clear on...

Societal role of geometry in early civilisations – Intellectual Mathematics

Podcast: DownloadIn ancient Mesopotamia and Egypt, mathematics meant law and order. Specialised mathematical technocrats were deployed to settle conflicts regarding taxes, trade contracts, and inheritance. Mathematics enabled states to develop civil branches of government instead of relying on force and violence. Mathematics enabled complex economies in which...

Sub Plans for High School Math Class – Webquests are Perfect!

Distance learning ... hybrid learning ... asynchronous learning ...   we're all learning different terms right now!  Here is a type of activity would be great in any of these settings...Webquests!I have used these types of activities in my classroom for a number of years.  I enjoy using...

Digital SAT Math Problems and Solutions (Part

Problem 1 :A neighborhood consists of a 2-hectare park and a 35-hectare residential area. The total number of trees in the neighborhood is 3,934. The equation 2x + 35y = 3,934 represents this situation. Which of the following is the best interpretation of x in this context? A) ...