Post
Topic
Board Development & Technical Discussion
coinsplit: generate, split, rejoin and import bitcoin addresses and keys offline
by
cecil w.
on 20/06/2011, 23:14:10 UTC
This is a simple commandline tool for playing with addresses and keys and wallets. I've been working on it for fun, just using ideas seen in other tools.

http://github.com/cecilw/coinsplit

This isn't for split-device generation of keys, as is discussed elsewhere in this forum, but simply a way of doing it with a one-time pad for now. I tried to keep it UNIXy, so you can append lists of keys together and pipe back and forth between the wallet and key backups.

Here's "coinsplit --help", just to give an idea.

Code:
coinsplit [wallet.dat] [--generate|--address XXX|--wallet|--import file1 file2] [--split] [keyfile1] [keyfile2]
Generates offline Bitcoin addresses and can split them into halves and import them into wallet.dat files.

** THIS BUILD GENERATES ONLY TESTNET ADDRESSES (which start with an 'm'). **

Examples:
        coinsplit --generate new.key
                Generates a new offline key and stores it in new.key.
        coinsplit --generate --split new.pt1 new.pt2
                Generates a new key and splits it into two halves.
        coinsplit wallet.dat --address 14Yots3PR3ygt12ksi5MZ36tBdaseQxN46 --split old.pt1 old.pt2
                Splits an address from the wallet into two halves.
        coinsplit wallet.dat --wallet --split old.pt1 old.pt2
                Splits all addresses from the wallet into two halves.
        coinsplit wallet.dat --import old.key
                Imports the addresses in old.key into the wallet.
        coinsplit wallet.dat --import old.pt1 old.pt2
                Imports the addresses in the split keys into the wallet.
        coinsplit wallet.dat --import old.pt1 old.pt2 old.key
                Rejoins two split keys into a single key.
        coinsplit --generate --split 1>mail 2>curl
                Generates a new key and sends the two halves off.
        coinsplit --generate | coinsplit --import
                Generate a new key and save the key in the wallet.

This is probably worthless and overlaps other tools, but I had fun making it. Take care.