Bitcoin Forum

Economy => Services => Topic started by: bb113 on March 07, 2013, 09:25:33 PM



Title: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: bb113 on March 07, 2013, 09:25:33 PM
I want to generate some addresses using a gieger counter as a random number generator. Lets say I will just manually write down the number of clicks I hear over a certain period of time.

This task has 3 parts (easy I think if you know javascript):

1) Explain where in this script does it describe the random number generation and how it works.

https://github.com/pointbiz/bitaddress.org/blob/master/bitaddress.org.html

2) Modify the script so that I can use my own random number

3) Tell me how long I would need to count clicks for if there was an average of 1 per second and explain the logic behind that.

OR

4) Convince me this is idea won't work.



Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: Ditto on March 08, 2013, 02:35:46 AM
Patch the window.SecureRandom function, or the ArcFour PRNG inside it.


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: deepceleron on March 08, 2013, 10:37:41 AM
Dude, random.org. Also, this idea won't work. Why? Because Geiger counters measure radiation, and the amount of radiation around you (on any significant, detectable level) is probably strongly non-random.

-1

A Geiger counter measures radioactive decay. Radioactivity is the process whereby unstable atomic nuclei release energetic subatomic particles. Radioactivity is a random process, meaning that it is physically impossible to predict whether or not a given atomic nucleus will decay and emit radiation at any given moment. The amount of it doesn't change the randomness of it.

dude, http://www.fourmilab.ch/hotbits/


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: bb113 on March 08, 2013, 03:34:06 PM
Patch the window.SecureRandom function, or the ArcFour PRNG inside it.

Thank you, but I am not familiar with javascript so I don't know how to do that.

Dude, random.org. Also, this idea won't work. Why? Because Geiger counters measure radiation, and the amount of radiation around you (on any significant, detectable level) is probably strongly non-random.

-1

A Geiger counter measures radioactive decay. Radioactivity is the process whereby unstable atomic nuclei release energetic subatomic particles. Radioactivity is a random process, meaning that it is physically impossible to predict whether or not a given atomic nucleus will decay and emit radiation at any given moment. The amount of it doesn't change the randomness of it.

dude, http://www.fourmilab.ch/hotbits/



I'll use a smoke detector as an alpha particle source




Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: Scrat Acorns on March 09, 2013, 11:51:18 AM
You can extract unbiased output from biased input (Von Neumann whitening is one such technique), but creating a hardware RNG by yourself is a bad idea.

If you really really want to use your geiger counter then your best bet is to feed /dev/random with entropy from the counter and use it's output.


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: Ditto on March 09, 2013, 01:24:49 PM
Also note that javascript in the browser can't access hardware (so it won't work with a geiger counter). You might be able to do it using node.js and making it read from a serial port or something similar, but I still don't think anyone will do that for 0.1BTC

If this convinces you that this idea won't work, my address is 1Pqh1kXjMVa8KvSJFg9DoUoKz9G1kNiYvo


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: bb113 on March 09, 2013, 07:40:44 PM
I need to do a bit more reading on RNGs it looks like. 0.01 btc to all who posted here. Scrat acorns if you want it post an address.


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: Scrat Acorns on March 11, 2013, 08:35:44 PM
PS: I know a good PRNG is Mersenne Twister, maybe you could look into seeding that with your clicks.

No, just no. Mersenne Twister is a terrible RNG for cryptographic purposes. You can actually jump to an arbitrary position in the stream given enough bits to calculate the state: http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/index.html (http://www.math.sci.hiroshima-u.ac.jp/~m-mat/MT/JUMP/index.html)


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: DeathAndTaxes on March 11, 2013, 08:40:25 PM
patch it with this

http://imgs.xkcd.com/comics/random_number.png


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: nimda on March 11, 2013, 10:44:49 PM
I want to generate some addresses using a gieger counter as a random number generator. Lets say I will just manually write down the number of clicks I hear over a certain period of time.

This task has 3 parts (easy I think if you know javascript):

1) Explain where in this script does it describe the random number generation and how it works.

https://github.com/pointbiz/bitaddress.org/blob/master/bitaddress.org.html
Hit ctrl+f, type in ArcFour. Here's the Wiki on it: http://en.wikipedia.org/wiki/RC4#The_pseudo-random_generation_algorithm_.28PRGA.29
It goes around modulo-adding values together, then using the sum as an array key to come up with a new value to modulo-add. It does this a lot.


Quote
3) Tell me how long I would need to count clicks for if there was an average of 1 per second and explain the logic behind that.
Depends on how regular the clicks are; i.e. how much variation there is. If the clicks appear 1s apart +- 0.01s with 99% probability, then it's extremely likely that you'll get 3 clicks if you count for 3.5 seconds. You now have very little entropy. However, if it's equally likely that you'll get 1 click or 2 in a 1.5 second period, then you're garnering at least 1 bit of entropy per 1.5s. You'll want as many bits as the algorithm allows.

Quote
OR
2) Modify the script so that I can use my own random number
4) Convince me this is idea won't work.
It won't work because I doubt someone will modify the script for you for such a small amount of money. You're better off asking for someone to do it for you for free, or finding someone interested in it. That said, it's probably a simple matter of replacing the mouse-entropy with user-input.


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: TheButterZone on March 11, 2013, 10:52:31 PM
Step one: Put optical mouse laser over analog meter
Step two: Wave geiger wand over/away from radioactive source randomly


Title: Re: Generate own random numbers then incorporate into bitaddress.org script (.1 btc)
Post by: pointbiz on April 01, 2013, 10:35:07 PM
Today you can generate your own random number using any method and make sure the number is 256 bit and then convert it to hex and use the wallet details tab to get your bitcoin address.

Does that cover your use case?