Talk:Cryptography/Random number generation

From Wikibooks, the open-content textbooks collection

Jump to: navigation, search

Contents

[edit] Why

This page should open with an explanation of why encryption specifically depends on the use of random numbers. And not how it depends on them.

A counterexample could be explored, such as use of an an OTP whereby a certain key is chosen (or calculated) for a plaintext that is designed to yield the ciphertext of 11111111.....(length of plaintext). No random numbers are used here, and the OTP still provides perfect encryption. Even though an obvious reason this might not work is that the key cannot be preexchanged (if that is necessary), that does not explain why random numbers are necessitated by cryptography. Poppafuze 05:59, 22 October 2006 (UTC)

[edit] Request for graphs

If anyone with access to Maple, Mathematica, etc. could make graphs of all the functions used in the article -- that is, arctan(x), (1/2) + (1/π) * arctan(x), f(x)=x^(3/2), and f(x)=x^2+c -- and place them in logically, I would really appreciate it. It's late now, so I'm stopping for the night, but I would like to add (or like someone to add) a section on using modular groups to generate random numbers. Unforunately, those two methods of random number generation are the only two that I'm familiar with, but if anyone is familiar with more, please feel free to add them. --Iamunknown 06:49, 24 Nov 2004 (UTC)

[edit] Newton's method

Moved from Cryptography/Random number generation

Why don't the Wikipedia:Pseudorandom number generator and http://c2.com/cgi/wiki?PseudoRandomNumberGenerator articles mention this "Newton's method on a non-converging function" pseudo-random number generator?

I moved the following "Newton's Method" method of generating "random" numbers to the talk page, because I suspect it is *not* a good method of generating pseudorandom numbers. I would be fascinated to know why anyone thinks it is a good method. --DavidCary 06:44, 8 October 2007 (UTC)

[edit] Using Newton's Method and Arctangent

First, remember that the arctangent function is defined for all x in the reals, and is mapped for all f(x) less than π/2 but greater than the -π/2.

{arctan(x) ∈ R: -π/2 < x < π/2} (1)

One common trait of random number generators is a domain mapped to all reals greater than or equal to 0 but less than or equal to 1. To do so, we take the arctangent function, and modify it:

0 < 1/2 + (1/π)*arctan(x) < 1 (2)

Now, the graph of this particular function reveals a smooth, continuous function defined for all reals. This function does not generate pseudorandom numbers by itself. It merely scales them to any number mapped greater than or equal to 0 but less than or equal to 1. (Note: although it is beyond the scope of this text, probability theory shows that this function, with well-formed input, indeed converges to a set with a standard distribution.)

The most used input for this modified arctangent function such that it is a useful stochastic process is, surprisingly, Newton's method for any function that does not converge.

\left |\frac{f(x)f'(x)}{\left[f'(x)\right]^2}\right| < 1 (3)
Condition for convergence for Newton's method


For any value of a function that the condition for convergence for Newton's method fails, the value x resultant from each successive iteration of Newton's method is completely independent (logistically speaking) from the number previously! And when that number is fed into our modified arctangent function, it is mapped to any real greater than or equal to 0 and less than or equal to 1!

[edit] Note

Some functions are more suitable choices for our purposes than others. For example, |f(xi+1)|>|f(xi)| for each iteration of the function f(x)=x3/2. One choice often used is the function f(x)= x2+c where c>0.