Cool. A JavaScript version with all necessary dependencies bundled would probably be ideal, since everyone has a browser that can run it.
Python is pretty ubiquitous on Linux, but even this code required me to install the ecdsa python module that my base python installation on Ubuntu 14.04 didn't have (sudo apt-get install python-ecdsa).
If I was trying to use this on an Ubuntu live CD, I would also have to put
python-ecdsa_0.10-2_all.deb on my flash drive to set up the ecdsa python module before being able to run your script (since connecting to the internet to install it is obviously unacceptable).
Also it would be really great if the python script also optionally allowed the user to provide a passphrase to encrypt the private key and display that in the results as well. I would prefer the plaintext WIF private key to never actually exist anywhere other than the live environment. So, if I am writing down the private key on paper or storing in a password manager, I want it to be in encrypted form where the unique long passphrase is in my head and only ever typed on live Linux environments.
Of course this can also be done manually using openssl:
- Enter command "openssl aes-256-cbc -a"
- Type in passphrase and press enter
- Retype same passphrase and press enter again
- Paste the WIF private key from the python script and press enter then press Control-D twice
- Copy the two lines output by the program after the private key you entered (this is the encrypted private key)
Then to decrypt it back into the plaintext WIF private key (also this should be done immediately after the previous steps to verify that you encrypted it properly):
- Enter command "openssl aes-256-cbc -a -d"
- Type in the same passphrase you used to encrypt and press enter
- Paste the two encrypted lines from the previous steps and press enter then press Control-D twice
- Copy the one line output by the program after the two lines you entered (this is the plaintext WIF private key)
Finally, although this code is good for generating the keys and funding the balances. It still does not address the offline transaction signing part (which toast has been working on). That will require some minimal BitShares code that can unpack and understand a transaction to present to the user what the transaction is doing (sending a certain amount of funds from these balances to these addresses) and provide a way for them to sign the transaction by providing the private keys necessary. Understanding the transaction and presenting that information to the user is important (rather than just blindly signing a transaction digest), because the online tool that generated the unsigned transaction in the first place may have been compromised to instead create a transaction that sends all of the user's funds to a hacker's address instead.
Anyway, it would be ideal to have all of the above in both a self-contained executable with absolutely minimal dependencies that runs a CLI version of the tool, as well as a Javascript version that provides a more familiar UI interface that people can run in the browser of a live Linux environment.