29
R-C-D
5y

There is a function for creating random numbers.
So with the same inputs , I must get the same output.
So it is somewhat predictable.
So it is not actually random!

Am I tight?

Comments
  • 4
    A random number generator function does not take any inputs...
  • 3
    @olback so how does it work?
    Based on time?
  • 2
    @R1100 time is not random. I don't know how they work.
  • 0
    If you need true randomness, this is what you need: https://en.m.wikipedia.org/wiki/...
  • 3
    @SanitizedOutput whell
    Many ciphers use random numbers to secure the text.
    If the number is predictable,
    The cipher is broken
  • 3
    @SanitizedOutput exactly
    But i think it will help reduce the brute force time
  • 3
    @SanitizedOutput a simple script would do that
  • 1
    @SanitizedOutput that's super easy. There are not that many milliseconds and.. You know... You can use computers to do the calculations :)
  • 3
    @irene it probably won't fully break it but it can help reduce the required time
  • 1
    First of all, I think you're tight.

    Second, people who don't believe rng is pseudo should read a bit about it, it's easier that way.

    Third, I'd like to see a truly random generator implementation that is pure software.
  • 1
    afaik linux initializes its random pool, amongst many different sources, from the nanoseconds certain boot events or interrupts took
    from then on the following randomness is generated based upon the previous one until some new randomness is available from the sources
  • 1
    The key is that the rand() function is not idempotent because it has side effects.
  • 1
    Yeah, you doing it right
  • 1
    @irene we don't need quantum computers. Just use an ADC and exploit thermal noise.
  • 1
    @olback that’s not true; the polynomial used needs a seed. Random generator are polynomials with a good distribution, they’re not random wat all but look random enough for most purposes.
  • 1
    @irene there is no hardware involved in the random generator. It is simply a mathematical function with well distributed output. If you put the same seed (starting point), you get the same output of 'random' numbers. So systems will usually use the system time and a few other variables to get the seed. You can find a lot of different polynomials source code online that will show you how it works.

    It's called a pseudo random generator because it is not random at all, but for most intents and purposes, it looks random.
  • 1
    @irene ADCs are perfectly normal in some CPUs. Besides, there is no such thing as digital on physical level. If 0 is exceptionally big, it's nearly as big as a small 1.
  • 1
    @irene For randomness, it's only the noise that's relevant. The LSB of an ADC is usually noisy anyway, no matter what you attach.

    Of course, you get even better noise if you use an op amp to amplify the thermal noise of a resistor and then shift that to half the voltage range of the ADC. I remember USB devices which did exactly that, dunno whether they are still available.

    Temperature measurement (where noise isn't the goal) is usually done with a resistor that has a well defined temperature curve, then driving a constant current through that and digitising the voltage across the resistor.
  • 1
    @irene you cannot have a true software rng because it is debatable is random really exists as a thing in the first place: What makes an event random is simply the lack of information about its cause; the moment you can explain it, it is not random anymore. A prng is not random, but measuring external events is not as well. One reply mentions the low bit of an ADC, but at a low level, there is nothing random about it. So you can call anything random if you don't look at the information related to it. Bus schedules can appear random to the person that doesn't know what time is (or anyone that lives in Malta); prng appear random for most purposes, but there is certainly no 'true' random possible in software since it is at a much higher level of understanding than some complex physics events we can already explain are not random.
  • 0
    @thomasd3 that's not entirely true because thermal noise is random. If you go down to the really micro level for examining causes, you'll only hit Heisenberg's uncertainty principle. That means it's not a question of better measurement equipment, but a basic physical principle.

    The world is not a deterministic clockwork of cause and effect - Newton's take on that got put to rest a 100 years ago.
Add Comment