Title: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: hobbes on February 26, 2014, 04:27:55 PM
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/offbit No 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 <enter>. 3764bc5r7w8cr6wc9 Enter a title for this paper wallet and press <enter>. 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 <enter> to show verification data. <ctrl-c> 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 <enter> 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 <ctrl-c> 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 <enter> to proceed, <ctrl-c> to cancel.
Enter private key or (double) Electrum seed:
2nd half offbit_mktx2_offline.py █▀▀▀▀▀█ █▀ ▄▄█▄▀▄▀▀ ███ █ ▄██ ▄▀ █ █▀ █▄▄▄▄▀ ▄ ██ ▀▄ █▀▀▀▀▀█ █ ███ █ ▄▄▄▀▀█▄▄██▄██▀▄▀▄███▄▄▄█▄██▄██▄█ ▀ ▀ ▀▄▄ ▀▀▀▄█▄▀ █ ███ █ █ ▀▀▀ █ █▀▀██ ▄█▀▄▄██▄█▀▄██▀▀▀█▀▀███▄ ▄▀█▀▄▀▄ █ ▄▄ ▀ █ ▀▀▀ █ ▀▀▀▀▀▀▀ █▄▀ █ █▄▀ █ ▀▄▀▄█▄█▄▀▄█ ▀ █ █ █▄▀▄▀▄█ █▄▀ █▄█▄█▄█ ▀▀▀▀▀▀▀ ▀▄█▀ █▀█▄ ▀█ ▀▄▀ ▀ █▄██▀▄ ▀▄▀▀██▀█▄▄▀███▄▄ █ █▀▀█▄▄▄ ▀▄▄▀▄█▀ ▀█▄ ▀█▀▀ ██▄▀█▀▀█▄ █▄█▀▀▀▀▄█▄ ▀▄██▄ ▄▀▄▀▀▀ ▀▄▀▄▄█▀▀ ▀▄▀▀▄ ▄▀▀▄ █▄▀▄▄▀▀▀▀▀██ ▀ ▄▀█▀▄ ▀▀▀▀▀ █▀ ▄ ▄▄▀▀▀█▄█ █ █ ▀█▄█ ▀█▄▀▀▀██▀▀ █▀█ █▄▀▄▀██▀█ ▀ ▄█ ██▀▄ ▄▄ ██▄█▀▄▄█ ▀▀▀█▄▄ █ ▄ ▀▀ ▄▀▀▄ ▄█▀█ ▀▀ ▀██▄ █▀█ ▀▄ ▄▄ █▀▄█ ▄█▀ █▀▀█ ▀▀██▀▄▀ ▀ ▄▀███▄█▄▄▀▀ █▀▀▀█▄ ▀▀▀▀ ▄██▀▀█▀▀ ▄ ▀▄ ██ ▀▄█▄▄▀▄▄█▀ █ █ ▄█▀▄ ███▀▄▀ ▄ ▀▀█▄█▄██▄ ▀ █ ▄ ▄ █▀█▄▀▄ ▄██▄ ▄▀▄▀▄▀███ ▀ ▀██▄▀▀▀ ▄ ▀▀ ▄ ▀█ ▄ █▀▄▄█ ▀▀ ▀▄ ▀ █▄ ▀▀▀▄ ██ ▄▄ ▄▄▀█▄█ █▀ ██ ▄█ ▀▄█▄ ▄▀ █▄▀ ▀ ▄▄ █▀ ▄▄ ▀▀▄█▀ █ ▄ ▄▀▀▀▀ █ ▀▄ █▄▀▀▀██ ▀ ▀▄█▀ ▀█▄█▀▀▀███ ▀█ █ ██▄▄▄ █▄▄ █▀▀ ▀▄ ▄ ▀▀█▀▀ █▀▄▄████▄█▀ ▀▀ ▀▀▀▀▀ █▄ ▄▄▀ ▀▀▄▄▄█▀▄▀▄▄▀ ▄█▀▀ ▀███▀▄▀▀▀█ █▄▄▄▀█▀█▀██ ▀▀█ ▄ ▄ ███ ▀█▀▄ ▀█▀▀▄▄▄ ▀ ▄▀▀██▄▀ ▀█▄▄ █ █▄▄ ▀▄▄█ ▀ █▀▀▀█ █▄█▀▄██ ▄ ▀▀█ ▀▄▄ █▀▀▀█▀▀▀█▄▄█▀█ ▄ █▀ █▀ █▄██▀▀▀████ ▄▄█ ▀ █ █▄▀▄█ █▄▄ ▄█▄█ █▄ █ ▀ █▀ █ ▀██▄▄ ▀▀▀▄█▀██▄█▀█ ▀ █▀█ ▀ ██▀▀█▀▀▀█ ▄ ▀▄▄██ ▀ ▀██ ▀ ████▀█▀▀▄▀ ▄▄▀▀▄█▀ ▀█ ▀█ ▄██▀▀█ ▀▀ █▀ ▄ █▀▀▄▄▀▄▀██▀▄▄▀ █▄ ▀ ▄▄█▀█ █▄▀█▀█▄█▄▄▀ ▀ █ ██ ▄ ▄ █ ▀ ▄█ █ █▄█ ▀▀▀▄ █▄▄▀▀█ █▄▀▄▄▀▀▀▄█▀▄ ██ ▀ ▀▀▄█▄▀▀█ ▀ ██▄█▄████▄▀ █ █ ███ ▀█▄ ▀▀▀ ▄ █ ██▄▄▄███▄ ▀ ▀▀█▄ ▀▄ ▀ ▀▄▄█ ▄▀▀▄▄▀ ▄█▄█▀▀ █▄ ▄ ▀▄█▀▀▀▄█ ██▀▀ ██ ▀ ▀█▀ ▀▀▄ ▄▄█▄ ▀ ██▄▀ ▀▄█ ▄ ██████▀▀█ ▄ ▄█▄▄ ▄ ▄▀█▄ ▀▄█ ▀ █ ▄▀▀██▀▄▄ ▀ ▀ █ ▀█▄▄█▀▀▀▄▄▄▄ ▀▄█ █▀██▀▄▀███▀▀██ ▀ █▀ ▀▀▄▀█▄█▄▀▀█ ▄▀▀▄▄▀▀▄█▄▀██▀█▄▀▀█▄ ▄█ ▀ ▄▀▄▄▀▀▄▄▀▄██▄ ▀▀█ ▀▄▄▄█ ▀▀██▄▀█▀ ▄ ▄ ▀▄▀█▀████▀█▀█▄█████▄▄▄▀▀▀▄▄ █▀██ █▀▄▄ ▄ ▀▀▄▄▄ █▄█ ▀█ ▀ █▀█▀ █▀█▀▀▄▄▀█▄██ ▀█▀▀█ ▄▄▀█▄▄▄▄███ ██▀▀█ ████▀▄▀▀█ █▀▀ ▀▄▄▀ ▄▄ ▀█▄█ ▄ ▄▄▄█▀▀▀█ ▀█ ▄ ▄ ▀▄▀▀▀▀██ ▀ █▄▄ ▄ ▄▀██▄▄ ▄ ▀█ ▀▀▀ ▀███ ▀█▄▄█ ▄▀ ▀▄▀ ▀▄▄▄▀█▀▀███ ▀█▄█▄▄▄▄▀█ ▄ ▄▄ ▀▀ ▀ ▀▀█ █▄ ▄▀█▄ ▄▄ █ █ ▄▀▀▀ █▀▀▀██ ▄▀██▄█ ▄ █▄▀▀██▄▄▀█▀▀▀█▀ ██ █▀▀▀▀▀█ █▄██ ▄▀ ▄█▄▀▀▀▄ ▀▀▄█▀█ ▀ █▀▄▀ █▄▄▀ █▀▀▄▄▀▄█ ▄▀▄█ ▀ █▀ ▀▄ █ ███ █ ▄▄▄█▄▄██▀██▄ █▀▀ ▄█▄███▀██▀▀██ ▀▀ █ █▀▀▄█▄ ▀ █▀▀████▀▀ █ ▀▀▀ █ ▀▀█ ▄▄▀▄█ ███ ▀▀█ ▀ ▄█ █▄▀▀ ▄█▀██ ▄█▀ █ █ █▀█ ▄▀▀█▄▄ ▄▀ ▀▀▀▀▀▀▀ ▀ ▀▀ ▀▀▀ ▀ ▀ ▀ ▀ ▀▀▀▀▀▀ ▀ ▀ ▀▀▀ ▀▀▀
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: cindy313 on March 06, 2014, 02:54:30 AM
well, using qr code (http://www.keepautomation.com/products/net_barcode_crystal_reports/barcodes/qrcode.html) and qr code scanner (http://www.keepautomation.com/products/net_barcode_reader/barcode_qrcode.html) is good in this field! thanx for your idea!
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: waxwing on March 10, 2014, 07:51:11 PM
I haven't looked into the details but nicely conceived. Working on similar projects, we were worried about the CPOF by using blockchain.info and I've done some work allowing interface to Electrum servers instead of bc.i. However, it can be problematic when combined with Tor, so I'm not sure I'd recommend it in this case.
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: ThirdRenaissance on March 10, 2014, 09:29:28 PM
### Limitations * Only small TXs will fit into the QR code. What's the actual limit?
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: hobbes on March 10, 2014, 10:40:34 PM
I haven't looked into the details but nicely conceived. Working on similar projects, we were worried about the CPOF by using blockchain.info and I've done some work allowing interface to Electrum servers instead of bc.i. However, it can be problematic when combined with Tor, so I'm not sure I'd recommend it in this case.
This certainly is something to think about. I guess pybitcointools is using bc.i because it is instant on and only takes a page of code or so. They are doing a good job so with Tor it goes ok for me. ### Limitations * Only small TXs will fit into the QR code. What's the actual limit? There should be a hard limit of about 850 characters (base58). The most I tried it so far was one prevout and three outputs. On small screens like on an very old laptop you might have to reduce the font size to be able to fit the QR code. This could be improved by using quadrants instead of half characters in the ASCII QR code symbols.
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: hobbes on March 11, 2014, 08:01:47 AM
There is a discussion about air gapping going on here: https://bitcointalk.org/index.php?topic=499711.0
This got me the idea of an improvement for the handling of singing in Offbit. The signing code should be saved to a separate USB stick and never touch anything but the freshly booted live CD system. The transport data should be saved on another USB stick because it comes from the online system. This makes it impossible to alter the signing code. It does not really need a change to Offbit next to guide text maybe.
1.) Launch offline system from boot CD 2.) Insert offline USB stick with offbit_mktx2_offline.py on it and start 3.) Remove mktx2_offline USB stick 4.) Insert online USB stick with transport data from online computer and copy/paste it 5.) Remove online USB stick (---> no persistent memory) 6.) Insert privkey by hand 7.) Export signed tx via QR code
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: Vitalik Buterin on March 23, 2014, 03:47:10 AM
I haven't looked into the details but nicely conceived. Working on similar projects, we were worried about the CPOF by using blockchain.info and I've done some work allowing interface to Electrum servers instead of bc.i. However, it can be problematic when combined with Tor, so I'm not sure I'd recommend it in this case.
For the CPOF issue you can also use eligius_pushtx as a backup. Also, v1.1.7 will probably include a pushtx and fetchtx via some public bitcoind node that I'll run myself and you'll be able to plug in your own node too.
Title: Re: [ANN/RFC] Offbit - off grid Bitcoin TXs - v0.001
Post by: hobbes on April 01, 2014, 04:26:26 PM
I haven't looked into the details but nicely conceived. Working on similar projects, we were worried about the CPOF by using blockchain.info and I've done some work allowing interface to Electrum servers instead of bc.i. However, it can be problematic when combined with Tor, so I'm not sure I'd recommend it in this case.
For the CPOF issue you can also use eligius_pushtx as a backup. Also, v1.1.7 will probably include a pushtx and fetchtx via some public bitcoind node that I'll run myself and you'll be able to plug in your own node too. What is the problem with my torsetup.py? Just start Tor and run these 31 lines of code and you are anonymous.
|