www.gryphel.com/c/minivmac/extras/makerand - feedback



makerand-1.0.0.zip (90K) a zipped hfs disk image and checksum file. The disk image can be mounted with Mini vMac. Includes source code.

MakeRand is a tool for making random hexadecimal data, such as for use with the MakeKeys tool.


To use MakeRand, launch the application, and start typing random text. Random data is gathered from the timing of your key presses. The text you type is also mixed in.

MakeRand counts 2 to 7 bits of randomness per key press. When it thinks it has gathered at least 1024 bits of randomness, it “stirs” the pool of bits with a strong psuedo-randomizing function, and then takes 1024 bits and appends them in hexadecimal (base 16) to the output window.

You can copy this text to the clipboard to use in MakeKeys or elsewhere. When MakeRand is run inside Mini vMac, you can get text out of the emulated Macintosh using the “Host Copy” command in the Edit Menu. It is like the “Copy” command, except that it uses the clipboard of the real computer instead of the clipboard of the emulated computer. The keyboard shortcut is Command-Option-C. (The “Host Copy” command has similar effect to using the normal “Copy” command and then ClipOut.)

If you want more than 1024 bits, you can keep typing to generate another block. If you want fewer bits, at any time you can click on the status bar (at the bottom of the window below the editing area) to save the bits collected so far. The status bar displays a count of how many bits have been collected.

MakeRand does use the text you type, so how random it is does affect how random the output is. Perfectly typing in a passage from a book adds very little true randomness. Making lots of typos adds more randomness. Typing in gibberish is better. Mashing keys randomly might be better yet, except that people aren't very good at truly being random. Also, if you try to press keys randomly, you might easily fall into a simple rhythm, which would reduce the randomness of the timing, which is more important than the keys pressed.

MakeRand is in part descended from MacPGP source code, which, as far as I can tell, allows derived works for noncommercial use.

MacPGP has various code to try to protect secrets from other software running on the computer. MakeRand does not. If you are using the random data for something sensitive, such as with MakeKeys, you should instead try to secure the entire virtual machine that it is run in. Such as by putting the Mini vMac disk image on an encrypted volume of the host computer, for a start.

MacPGP uses the time manager to try to determine more precisely when keys are pressed. But in Mini vMac, the emulated keyboard can only generate presses at each sixtieth of a second. So MakeRand only uses the “ticks” value for key presses (time in sixtieths of a second), so it won’t think it has more randomness than it really has when run in Mini vMac. How much randomness MakeRand counts for each keypress depends on how long it has been since the last key press: 0 ticks = 2 bits, 1 tick = 3 bits, 2 - 3 ticks = 4 bits, 4 - 7 ticks = 5 bits, 8 - 15 ticks = 6 bits, 16 or more ticks = 7 bits.

The Abort command in the File menu (shortcut: Command-Period) resets the count of randomness to zero, but it does not clear the pool of random bits. So if you worry that MakeRand is too optimistic in its estimate of randomness, you can use the Abort command to accumulate more, before the count reaches 1024 bits and output produced.

Here is the md5 checksum for the download:

--------- GRY SIGNED TEXT ---------

9131c13685ba2a4dda508056a3f1cf9c makerand-1.0.0.zip

------- BEGIN GRY SIGNATURE -------
-------- END GRY SIGNATURE --------

See the Compiling page for instructions on compiling MakeRand from the source code.


If you find MakeRand useful, please consider helping the Gryphel Project, of which it is a part.

gryphel logo, 1K
www.gryphel.com/c/minivmac/extras/makerand - feedback
copyright (c) 2018 Paul C. Pratt - last update 10/15/2018