Minimalistic offline key generation, offline TX signing and Tor protected TX broadcasting.
Keep your private key at a reasonable distance from online systems and any persistent storage such as hard drives, USB sticks.Will run on Python 2.7.x without installation of additional dependencies so it can be run from most Linux live CDs. Torified data retrieval/broadcasting through blockchain.info via pybitcointools.
https://github.com/bithobbes/offbitNo need to trust me. You can compare the libraries to the original ones. The actual code is very short.
readme.md:
offbit
======
v0.001
2014 hobbes / bitcointalk
https://github.com/bithobbes/offbit
Basic off grid Bitcoin storage and TXs. Helps with hodling. Tor protected retrieval/broadcasting via blockchain.info.
Alpha software. Nothing guaranteed. Maximum recommendend amount: see version number.
https://www.gnu.org/copyleft/gpl.html
### Files
* offbit_keygen_offline.py - generate (mnemonic) privkeys
* offbit_mktx1_online.py - start transaction (also broadcast)
* offbit_mktx2_offline.py - sign transaction
### How to use
Generate (mnemoic) privkeys via offline keygen, load them and keep them safe (bring one half to the bank). Then:
1. Optional: Start Tor Browser to set up a Tor socket to be used by offbit.
2. Use mktx1 to create a transaction.
3. Save offbit data to a USB stick (text file).
4. Move the stick into an old offline computer, booted from a Linux Live CD (knoppix.org). Needs Python but no WiFi, no bluetooth.
5. Start mktx2 and feed it the data (currently a manual process).
6. Remove the USB stick so that there is no persistent data (no USB stick, no harddrive, no SD card)
7. Verify the TX, enter your privkey and sign.
8. Transport the signed transaction to the online computer via QR code (designated reader, synced clipboard or manually)
9. Broadcast the signed transaction by finishing mktx1
You will be guided through the steps.
Step 8. works completely automatic with Windows/ClipSync & Android/ZXBarcodeScanner.
### QR Code Scanner
Use only open source Zebra Crossing Barcode Scanner as the other scanners sniff your data (hurting your privacy).
Helpful options:
* inverted image scan (negative)
* copy to clipboard (automatically on scan)
### Clipboard syncing
* Windows & Android: ClipSync (data stays within you local WiFi)
hint: will only sync when clipboard content has changed (will not sync on the second scan when scanning twice)
* Linux & Android: ?
* Mac & iOS: ???
### Limitations
* Only small TXs will fit into the QR code.
### Todo
* add manual random data for tx generation
* encrypt offbit transport data
* check if TX to publish matches original TX
* find open source clipboard local sharing software
### Based on
* https://github.com/vbuterin/pybitcointools (thanks vitalik!)
* https://github.com/unapiedra/pyqrnative
* https://github.com/spesmilo/electrum (mnemonic.py)
offbit_keygen_offline.py - generate (mnemonic) privkeys
len(wordList): 1626
Enter some random characters and press .
3764bc5r7w8cr6wc9
Enter a title for this paper wallet and press .
hodl
working...
--------------------------------------------------------------------------------
hodl
Electrum 1.x seed part 1 of 2 copy A
rootAddress: 1BLfktq4TVtwyV1TdeRH839xJLXQLpr6nm
decision society situation circle size grief close shall relationship desire inn
ocence roll
--------------------------------------------------------------------------------
hodl
Electrum 1.x seed part 1 of 2 copy B
rootAddress: 1BLfktq4TVtwyV1TdeRH839xJLXQLpr6nm
decision society situation circle size grief close shall relationship desire inn
ocence roll
--------------------------------------------------------------------------------
hodl
Electrum 1.x seed part 2 of 2 copy A
dress voice smile tide sometimes since anywhere lick horrible clearly everyone s
way
--------------------------------------------------------------------------------
hodl
Electrum 1.x seed part 2 of 2 copy B
dress voice smile tide sometimes since anywhere lick horrible clearly everyone s
way
--------------------------------------------------------------------------------
Press to show verification data. to exit.
1st half of offbit_mktx1_online.py
Tor socket found. Your IP seems to be: 123.123.123.123
About to query inputs from blockchain.info
Enter address to spend from:
(Normal address or Electrum root address.)
1JEiV9CiJmhfYhE7MzeSdmH82xRYrbYrtb
Number of previous outputs: 2
balance: 0.0004
availableBalance: 0.0003 (balance - fee)
Enter target address:
1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i
Enter amount to spend in Bitcoin:
(maximum: 0.0003)
0.0001
Add another target address or press to continue.
Enter target address:
Offbit data:
(Transport safely to offline system. Keep the '!' at the end.)
{"amounts": [10000], "source": "1JEiV9CiJmhfYhE7MzeSdmH82xRYrbYrtb", "u": [{"out
put": "41efd332db50d2fd7941979f21827cc4851a361c4dcdd9e6430ff940f9e7bc04:59", "va
lue": 20000}, {"output": "debbacc8a949c86ea61aa6b7c03f47cb36b9759ab207ba28ef9a69
a46eed5b93:54", "value": 20000}], "targets": ["1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62
i"]}!
Waiting for signed tx in clipboard (no carriage returns allowed).
Press to cancel.
offbit_mktx2_offline.py
Enter offbit data:
{"amounts": [10000], "source": "1JEiV9CiJmhfYhE7MzeSdmH82xRYrbYrtb", "u": [{"out
put": "41efd332db50d2fd7941979f21827cc4851a361c4dcdd9e6430ff940f9e7bc04:59", "va
lue": 20000}, {"output": "debbacc8a949c86ea61aa6b7c03f47cb36b9759ab207ba28ef9a69
a46eed5b93:54", "value": 20000}], "targets": ["1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62
i"]}!
Number of previous outputs: 2
balance: 0.0004
availableBalance: 0.0003 (balance - fee)
tx summary:
Sending 0.000200BTC to 1JEiV9CiJmhfYhE7MzeSdmH82xRYrbYrtb (change)
Sending 0.000100BTC to 1AGNa15ZQXAZUgFiqJ2i7Z2DPU2J6hW62i
fee: 0.0001
Check balance and targets. Remove your data source (USB-stick).
Press to proceed, to cancel.
Enter private key or (double) Electrum seed:
2nd half offbit_mktx2_offline.py
...
█▀▀▀▀▀█ █▀ ▄▄█▄▀▄▀▀ ███ █ ▄██ ▄▀ █ █▀ █▄▄▄▄▀ ▄ ██ ▀▄ █▀▀▀▀▀█
█ ███ █ ▄▄▄▀▀█▄▄██▄██▀▄▀▄███▄▄▄█▄██▄██▄█ ▀ ▀ ▀▄▄ ▀▀▀▄█▄▀ █ ███ █
█ ▀▀▀ █ █▀▀██ ▄█▀▄▄██▄█▀▄██▀▀▀█▀▀███▄ ▄▀█▀▄▀▄ █ ▄▄ ▀ █ ▀▀▀ █
▀▀▀▀▀▀▀ █▄▀ █ █▄▀ █ ▀▄▀▄█▄█▄▀▄█ ▀ █ █ █▄▀▄▀▄█ █▄▀ █▄█▄█▄█ ▀▀▀▀▀▀▀
▀▄█▀ █▀█▄ ▀█ ▀▄▀ ▀ █▄██▀▄ ▀▄▀▀██▀█▄▄▀███▄▄ █ █▀▀█▄▄▄ ▀▄▄▀▄█▀
▀█▄ ▀█▀▀ ██▄▀█▀▀█▄ █▄█▀▀▀▀▄█▄ ▀▄██▄ ▄▀▄▀▀▀ ▀▄▀▄▄█▀▀ ▀▄▀▀▄ ▄▀▀▄
█▄▀▄▄▀▀▀▀▀██ ▀ ▄▀█▀▄ ▀▀▀▀▀ █▀ ▄ ▄▄▀▀▀█▄█ █ █ ▀█▄█ ▀█▄▀▀▀██▀▀
█▀█ █▄▀▄▀██▀█ ▀ ▄█ ██▀▄ ▄▄ ██▄█▀▄▄█ ▀▀▀█▄▄ █ ▄ ▀▀ ▄▀▀▄ ▄█▀█ ▀▀
▀██▄ █▀█ ▀▄ ▄▄ █▀▄█ ▄█▀ █▀▀█ ▀▀██▀▄▀ ▀ ▄▀███▄█▄▄▀▀ █▀▀▀█▄ ▀▀▀▀
▄██▀▀█▀▀ ▄ ▀▄ ██ ▀▄█▄▄▀▄▄█▀ █ █ ▄█▀▄ ███▀▄▀ ▄ ▀▀█▄█▄██▄ ▀ █ ▄
▄ █▀█▄▀▄ ▄██▄ ▄▀▄▀▄▀███ ▀ ▀██▄▀▀▀ ▄ ▀▀ ▄ ▀█ ▄ █▀▄▄█ ▀▀ ▀▄
▀ █▄ ▀▀▀▄ ██ ▄▄ ▄▄▀█▄█ █▀ ██ ▄█ ▀▄█▄ ▄▀ █▄▀ ▀ ▄▄ █▀ ▄▄ ▀▀▄█▀ █
▄ ▄▀▀▀▀ █ ▀▄ █▄▀▀▀██ ▀ ▀▄█▀ ▀█▄█▀▀▀███ ▀█ █ ██▄▄▄ █▄▄ █▀▀ ▀▄
▄ ▀▀█▀▀ █▀▄▄████▄█▀ ▀▀ ▀▀▀▀▀ █▄ ▄▄▀ ▀▀▄▄▄█▀▄▀▄▄▀ ▄█▀▀ ▀███▀▄▀▀▀█
█▄▄▄▀█▀█▀██ ▀▀█ ▄ ▄ ███ ▀█▀▄ ▀█▀▀▄▄▄ ▀ ▄▀▀██▄▀ ▀█▄▄ █ █▄▄ ▀▄▄█
▀ █▀▀▀█ █▄█▀▄██ ▄ ▀▀█ ▀▄▄ █▀▀▀█▀▀▀█▄▄█▀█ ▄ █▀ █▀ █▄██▀▀▀████
▄▄█ ▀ █ █▄▀▄█ █▄▄ ▄█▄█ █▄ █ ▀ █▀ █ ▀██▄▄ ▀▀▀▄█▀██▄█▀█ ▀ █▀█ ▀
██▀▀█▀▀▀█ ▄ ▀▄▄██ ▀ ▀██ ▀ ████▀█▀▀▄▀ ▄▄▀▀▄█▀ ▀█ ▀█ ▄██▀▀█ ▀▀
█▀ ▄ █▀▀▄▄▀▄▀██▀▄▄▀ █▄ ▀ ▄▄█▀█ █▄▀█▀█▄█▄▄▀ ▀ █ ██ ▄ ▄ █ ▀ ▄█
█ █▄█ ▀▀▀▄ █▄▄▀▀█ █▄▀▄▄▀▀▀▄█▀▄ ██ ▀ ▀▀▄█▄▀▀█ ▀ ██▄█▄████▄▀ █
█ ███ ▀█▄ ▀▀▀ ▄ █ ██▄▄▄███▄ ▀ ▀▀█▄ ▀▄ ▀ ▀▄▄█ ▄▀▀▄▄▀ ▄█▄█▀▀ █▄
▄ ▀▄█▀▀▀▄█ ██▀▀ ██ ▀ ▀█▀ ▀▀▄ ▄▄█▄ ▀ ██▄▀ ▀▄█ ▄ ██████▀▀█ ▄ ▄█▄▄ ▄
▄▀█▄ ▀▄█ ▀ █ ▄▀▀██▀▄▄ ▀ ▀ █ ▀█▄▄█▀▀▀▄▄▄▄ ▀▄█ █▀██▀▄▀███▀▀██
▀ █▀ ▀▀▄▀█▄█▄▀▀█ ▄▀▀▄▄▀▀▄█▄▀██▀█▄▀▀█▄ ▄█ ▀ ▄▀▄▄▀▀▄▄▀▄██▄ ▀▀█
▀▄▄▄█ ▀▀██▄▀█▀ ▄ ▄ ▀▄▀█▀████▀█▀█▄█████▄▄▄▀▀▀▄▄ █▀██ █▀▄▄ ▄ ▀▀▄▄▄
█▄█ ▀█ ▀ █▀█▀ █▀█▀▀▄▄▀█▄██ ▀█▀▀█ ▄▄▀█▄▄▄▄███ ██▀▀█ ████▀▄▀▀█
█▀▀ ▀▄▄▀ ▄▄ ▀█▄█ ▄ ▄▄▄█▀▀▀█ ▀█ ▄ ▄ ▀▄▀▀▀▀██ ▀ █▄▄ ▄ ▄▀██▄▄
▄ ▀█ ▀▀▀ ▀███ ▀█▄▄█ ▄▀ ▀▄▀ ▀▄▄▄▀█▀▀███ ▀█▄█▄▄▄▄▀█ ▄ ▄▄
▀▀ ▀ ▀▀█ █▄ ▄▀█▄ ▄▄ █ █ ▄▀▀▀ █▀▀▀██ ▄▀██▄█ ▄ █▄▀▀██▄▄▀█▀▀▀█▀ ██
█▀▀▀▀▀█ █▄██ ▄▀ ▄█▄▀▀▀▄ ▀▀▄█▀█ ▀ █▀▄▀ █▄▄▀ █▀▀▄▄▀▄█ ▄▀▄█ ▀ █▀ ▀▄
█ ███ █ ▄▄▄█▄▄██▀██▄ █▀▀ ▄█▄███▀██▀▀██ ▀▀ █ █▀▀▄█▄ ▀ █▀▀████▀▀
█ ▀▀▀ █ ▀▀█ ▄▄▀▄█ ███ ▀▀█ ▀ ▄█ █▄▀▀ ▄█▀██ ▄█▀ █ █ █▀█ ▄▀▀█▄▄ ▄▀
▀▀▀▀▀▀▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀