You may be familiar with a network security measure called air gap. The idea is that your offline bitcoin wallet is running on a machine that is physically isolated from unsecured networks such as the internet. One user has started to use an air gap principle to do transactions between a hot wallet and cold wallet. You may imagine having an air gap security bitcoin wallet or sending bitcoin transactions over the telephone line. How can you do that?
First you need to install minimodem which can encode and decode data using audio modem tones at a specific baud rate. Once you have that installed you can do transactions between two machines using our script. An example output:
Cold wallet machine:
1
2
3
4
5
|
Your brain wallet password: *************************
Address : 1HoSFymoqteYrmmr7s3jDDqmggoxacbk37
Where to send (bitcoin address): 1NWVtaN29usUQ8xSuWqeLR3Un9jkzcyr1f
Amount (satoshi): 10000
** modem tones **
|
Hot wallet machine:
1
2
|
$ minimodem --rx 100
$ 0100000002dd684b97715af043465aa7aee9f86d5cce74e0172f9f751bb15b08c4a0c70fda000000008c493046022100cb8c82b718ba9afb45414cd67c174fe8161c4c758e0d2185ed1dbe8605fff9560221009dc9b5..
|
The host wallet machine can then import this transaction into the blockchain using any wallet.
The script:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
from pybitcointools import *
class Wallet:
priv = ""
pub = ""
address = ""
def createWallet(self,brainwalletpassword):
self.priv = sha256(brainwalletpassword)
self.pub = privtopub(self.priv)
self.address = pubtoaddr(self.pub)
print "Address : " + self.address
def balance(self):
print unspent(self.address)
def sendBTC(self,dst, amount):
h = history(self.address)
outs = [{'value': amount, 'address': dst}]
tx = mksend(h,outs, self.address, 10000)
tx2 = sign(tx,0,self.priv)
os.system("echo " + tx2 + " | minimodem --tx 100")
x = Wallet()
password = raw_input("Your brain wallet password: ")
x.createWallet(password)
destination = raw_input("Where to send (bitcoin address): ")
amount = int(raw_input("Amount (satoshi): "))
x.sendBTC(destination, amount)
|