Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
olback109816yIf you need true randomness, this is what you need: https://en.m.wikipedia.org/wiki/...
-
R-C-D160066y@SanitizedOutput whell
Many ciphers use random numbers to secure the text.
If the number is predictable,
The cipher is broken -
@SanitizedOutput that's super easy. There are not that many milliseconds and.. You know... You can use computers to do the calculations :)
-
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. -
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 -
The key is that the rand() function is not idempotent because it has side effects.
-
@irene we don't need quantum computers. Just use an ADC and exploit thermal noise.
-
thomasd3676y@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.
-
thomasd3676y@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. -
@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.
-
@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. -
thomasd3676y@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.
-
@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.
Related Rants
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?
question
random