Pregunta

I have a thought, but am unsure how to execute it. I want to take a somewhat long usb cable and plug both ends into the same machine. Then I would like to send a signal from one end and time how long it would take to reach the other end. I think this should cause signal to arrive at different times and that would cause me to get random numbers.

Can someone suggest a language in which I could do this the quickest? I have zero experience in sending signals over usb and don't know where to start or how to start. Any help will be greatly appreciated.

I simply want to do this as a fun in home project, so I don't need anything official and just would like to see if this idea can work.

EDIT: What if I store the usb cable in liquid nitrogen or a substance just as cold in order to slow down the signal as much as possible (I have access to liquid nitrogen).

¿Fue útil?

Solución

Sorry I can't comment (not enough rep), but the delay should always be the same through the wire. This might limit the true randomness of your numbers. Plus the acutal delay time in the wire might be shorter than even a CPU cycle.

If your operating system is Windows, you may run into this type of issue:

Why are .NET timers limited to 15 ms resolution?

Apparently the minimum time resolution on Windows is around 15ms.

EDIT: In response to your liquid nitrogen edit, according to these graphs, you may have more luck with heat! Interestingly enough...

Temperature vs Conductivity http://www.emeraldinsight.com/content_images/fig/1740240120008.png

Otros consejos

I want to take a somewhat long usb cable and plug both ends into the same machine.

Won't work. A USB connection is always Host -> Device, a PC can only be Host. And the communication uses predictable 1 ms intervals - bad for randomness.

Some newer microcontrollers have both RNG and USB on chip, that way you can make a real USB RNG.

What if I store the usb cable in liquid nitrogen or a substance just as cold in order to slow down the signal

The signal would travel a tiny bit faster, as the resistance of the cable is lower.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top