How random this numbers look,


Here the system I used to get them, first pick the seed,


then add the value of the 2nd number to the 1st and write it between them and the 3rd to 2nd and write it between them and etc.


and repeat again 2nd to 1st etc. to get more numbers.


last step double each number 1>2 5>20 etc.


Is it random or not because I want to use as a one time pad. so is it random even if you know how I generate them?


Your example is not at all random and is dangerous for the application you mention.

Perhaps you should look at the following methods of verifying the quality of random numbers. It is a difficult and very important topic in such things as simulations and cryptography.

Here are some of the test suites: PractRand, TestU01, RaBiGeTe, DIEHARD, DIEHARDER (search Google).

Additionally, you might want to read the TestU01 paper that describes the difficulties.

Lastly, you might want to have a look at:







Maybe if you could describe what you are looking for these for in more detail, we could provide more guidance (if it is a One-Time-Pad, you need a high entropy quality source and that is as hard as it gets).

Enjoy -A

  • $\begingroup$ thanks for the links, gona read and study them and back again soon. $\endgroup$ – illsecure Dec 11 '12 at 7:28

Every manually generated number is not random. Computers generate mostly using modulo arithmetic (at their core), so called pseudo-random numbers. Good algorithms are well-understood. I suggest you pick one (eg, Wikipedia) if you care about 'good' properties. Your algorithm only generates a one-time number in a deterministic way, with a length that is constructed to be what you make it. So by no reasonable definition it is random. While pseudorandom algorithms also deterministically determine a sequence of pseudo-random numbers, at least it is a 'random-looking' sequence. In your case, you could just write your result down and say 'it looks random."

  • $\begingroup$ understood, thanks $\endgroup$ – illsecure Dec 11 '12 at 7:26

If you want to generate real random number then you must use current time as a variable and do some operation with them. But still they have a algorithm. A random number is free from algorithm


As pointed out above by @gnometorule, if you generate a number using an algorithm, it is not going to be random. Instead, you need to look at pseudorandom numbers. There are interesting ways to understand pseudorandom generators in the context of computational complexity. Very loosely speaking, if ahead of time you define your resources for determining whether some string of numbers is random (say you are allowed to use polynomial-time computable functions), then you can create a pseudorandom generator that produces strings that are impossible to distinguish from true random strings under these constraints. This is sometimes known as "computational indistinguishability".

You can read more about this in Oded Goldreich's book: A Primer on Pseudorandom Generators (MR2677397) or in the paper by Goldreich, Goldwasser, and Micali, "How to construct random functions" or in various other places...


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.