Offline bitcoin wallet creation on Raspberry Pi

in bitcoin •  2 years ago  (edited)

I had to store my bitcoins somewhere. We all know that those exchanges or custodial accounts are not the safest options.

I am going to tell the steps that I took to create a cold wallet using Raspberry Pi.

Beware the problems with handling your own keys;

  1. You can lose them or drop them if you are traveling with them
  2. Somebody can physically steal them
  3. Somebody can hack your computer / phone and steal the keys
  4. Your device can fail

You need to address each. Otherwise staying in exchanges could be a safer option!

So where do we generate our keys and where do we store them?

  • Hardware wallets are great, but why do I trust the manufacturers?
  • Those websites that are creating the keys? Why do I trust the website?
  • People are talking about Intel CPU backdoors nowadays. Yes, there is a "management" backdoor even if you shut your PC down. Read about it.

Then I thought maybe Raspberry pi is a good option. My hope is nobody would care about what students do (No backdoors).
To go further as being paranoid; I will not connect my device to any network (a.k.a put an air gap). (a.k.a. cold wallet).

This will be an experiment for me also. Lets learn together!

I bought a few of them to maybe select one as a hot wallet (connect to network) and select others as cold wallets (offline).

IMG_20170511_125536.jpg

Lets set up our cold wallet.
Now I am using a wireless keyboard / mouse but for the ultimate paranoid, I suggest wired options.
IMG_20170511_130418.jpg

After initial Raspberry PIXEL setup, I immediately disabled bluetooth and wifi.
IMG_20170511_132901.jpg

To generate keys on Pi, we need to provide key generators in a USB stick.
So I downloaded coinb.in html files and copied them to my stick:
For the download link visit https://coinb.in/
At the time of this posting they resided at https://github.com/OutCast3k/coinbin/archive/master.zip

This 1 html file will allow us to generate a key offline.

Inserted USB into Pi and opened the html in the browser.
IMG_20170511_141304.jpg

I created a new address and gave it a stupid password, for testing purposes.
IMG_20170511_141423.jpg

Seems promising. But how do I save this file? Simply pressing the save as in the browser does not work.
So there is another alternative.
I went to wallet page and create an account for myself. This is working completely offline. And storing your files in your hard drive. I guess it is using some kind of local browser storage.

IMG_20170511_173201.jpg

It creates a wallet automatically for you. Now, it seams there is not much randomness. Seems like it is using hardware clock for random number generation. Somebody please correct me if I am wrong.

IMG_20170511_173416.jpg

And if you press 'Keys' you can see your private key.
Don't lose your keys and or password. I take no responsibility!
Since browser storage is on local drive, your keys are probably stored in your SD which was inserted into Raspberry Pi to boot it up. (I.e. not USB drive). I need to confirm this..

At this time you can send bitcoin to this public address.
I sent a small amount and you can see it appeared in bitcoin-qt below.. But before that;

How do I spend this bitcoin or move it to somewhere else? More elegant way to do is to sign transactions offline. But I don't know how to do that yet. So I will import my private keys to my hot machine (connected to internet).

I will import the private key to bitcoin-qt.
To do that, open bitcoin-qt and help/debug window.

Enter

importprivkey YourPrivATEkeyHERE

I suppose it is searching past records trying to find the balance for the account, for several minutes or more.
Then viola! The account appears in your hot machine.

IMG_20170511_180217.jpg

If you have big BTC amount dont put all of them in one cold wallet. Divide into several cold wallets to avoid risk.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

"People are talking about Intel CPU backdoors nowadays" - 8 months ago.

And it's hitting mainstream news now!

·

Nice post here! I have the same thoughts about hardware security. Do you know that intel bought ledger. These ledger microcontrollers are closed source and we don't really know if backdoors exists right now) I'm sure intel backdoor was not an accident. I think they will try to backdoor every hardware they can until the community somehow built opensource hardware(microcontrollers for example).