cryojs-develoeprs team mailing list archive
-
cryojs-develoeprs team
-
Mailing list archive
-
Message #00012
[Blueprint mouse-random] Generate random numbers with mouse input
Blueprint changed by aj00200:
Whiteboard changed:
I would, personally, capture mouse movements using an onmousemove event
to get the values of window.event.clientX and window.event.clientY, and
to feed said values into a SHA512 generator, taking the first 256 bits
for reasons of keeping a random pool unknown. This may be repeated along
the following algorithm:
1.Generate pseudo-random number
2.SHA512 it
3.XOR in mouse coordinates(repeating the same 32-bit integer of (65536*mouseX)+mouseY) upon a mouse movement
4. SHA512 again
5. Use 256 least-significant bits of last hashes (using as many hashes as necessary, but never revealing the most significant bits to keep a pool unknown to attackers)
6. Upon finishing random data collection, keep said key made from last whatever hashes
This will avoid the trouble of the mouse being out of bounds since few users have a 65535x65535 pixel window, and the hash will ensure that even small movements will cause great changes(Avalanche Effect)
-Robert Arkenin (https://launchpad.net/~rarkenin)
Another (easier) method to keep track of 256-bit blocks is to write
sequentially to each block of the final key, looping around and
overwriting as necessary. This does NOT lower security, while it does
make the code easier to handle.
I'm taking over this ---rarkenin
Returning data to main script is postponed as I need to know about main
script implementation first
+
+ I think you would want to create a UI element to cover the entire page
+ to show the user that data is being captured. I have not looked into it
+ yet, but I think we will need a "big number" JavaScript library to work
+ with larger numbers. We will probably need to use that with the returned
+ data to hopefully return a complete random number (i.e. "big number
+ object") which is x bits in length.
--
Generate random numbers with mouse input
https://blueprints.launchpad.net/cryojs/+spec/mouse-random