Bitcoin Forum

Bitcoin => Armory => Topic started by: notig on February 26, 2013, 04:24:41 AM



Title: Anyone use raspberry pi with armory? NT
Post by: notig on February 26, 2013, 04:24:41 AM
NT


Title: Re: Anyone use raspberry pi with armory? NT
Post by: 13Charlie on February 26, 2013, 02:14:32 PM
I came across the post below the other day.
The system requirements are not very demanding.

See the QSG HERE (http://bitcoinarmory.com/armory-quick-start-guide/) for requirements.

Don't forget about printer drivers if you plan to print a paper backup instead of writing it down.

Question about offline transactions... what are the system requirements for a computer that would ONLY hold private keys and sign transactions?

Nothing special. I run it on a Raspberry Pi.

And is there any special setup procedures for such an offline computer?  Do I still have to install the Bitcoin-QT client?

Nope, no blockchain or network connection is necessary.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Carlton Banks on February 26, 2013, 02:44:11 PM
I'd really like to know if the (now released) Model A version of the Pi can do the job with the 256 Mb RAM it's supplied with. It's kind of appealing as a Cold Storage solution as it also comes with no ethernet port.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: bitcoinspot.nl on February 26, 2013, 03:30:55 PM
i was wondering: doesn't armory need a version of bitcoin-qt running with an uploaded blockchain in the background ?
And if i need to connect my pc to the internet to update the blockchain doesn't that pose a security threat since i want to keep my offline pc offline ?

Greetz.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: 13Charlie on February 26, 2013, 06:24:32 PM
i was wondering: doesn't armory need a version of bitcoin-qt running with an uploaded blockchain in the background ?
And if i need to connect my pc to the internet to update the blockchain doesn't that pose a security threat since i want to keep my offline pc offline ?

Greetz.

You would be running 2 separate machines. One online and one offline.
Only your online computer needs the blockchain. All the offline computer does is generate the addresses and create a "Watching only" copy for your online computer. The offline computer won't even tell you your wallet balance. Because it never has and never will touch the internet (or the blockchain).

See the QSG link above. It explains the differences between the 2 in detail.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: bitcoinspot.nl on February 26, 2013, 07:25:33 PM
Ok just read the whole stuff and that sounds great.
i have an old laptop lying around, ill install that with linux and truecrypt and run the offline armory wallet from there.

so for as far as i understand it, the online wallet only contains the public keys?
and if my online version ever gets whacked i just make a new copy of the offline wallet and im good to go?

sounds good!


Title: Re: Anyone use raspberry pi with armory? NT
Post by: twolifeinexile on February 26, 2013, 07:51:54 PM
i was wondering: doesn't armory need a version of bitcoin-qt running with an uploaded blockchain in the background ?
And if i need to connect my pc to the internet to update the blockchain doesn't that pose a security threat since i want to keep my offline pc offline ?

Greetz.

You would be running 2 separate machines. One online and one offline.
Only your online computer needs the blockchain. All the offline computer does is generate the addresses and create a "Watching only" copy for your online computer. The offline computer won't even tell you your wallet balance. Because it never has and never will touch the internet (or the blockchain).

See the QSG link above. It explains the differences between the 2 in detail.
The offline wallet is actually not to be a wallet at all, it only need to generate address/keys and output them through offline method. (Print to paper, shown on screen, a QR Code Generator, etc)


Title: Re: Anyone use raspberry pi with armory? NT
Post by: 13Charlie on February 26, 2013, 08:10:09 PM
Ok just read the whole stuff and that sounds great.
i have an old laptop lying around, ill install that with linux and truecrypt and run the offline armory wallet from there.

so for as far as i understand it, the online wallet only contains the public keys?
and if my online version ever gets whacked i just make a new copy of the offline wallet and im good to go?

sounds good!

Sounds like you're definitely headed in the right direction. THIS (http://bit.ly/XwEfHn) is the chronicle of my endeavor to create an offline wallet with Armory.
It's a tutorial that I'm working on for friends and family that are not so techie.

If you decide to read it, feedback would be appreciated. Thanks.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Ente on February 28, 2013, 09:09:50 PM
For me, two questions remain:

How to connect the offline and the online Armory?
Ethernet? Serial? And then some scripting is needed to let them talk to each other..

What would be the minimal display and "accept/refuse" keys? Something via USB?
I still have that old NAS laying around, Debian, no monitor port..
Dang, no serial either, I guess!

There are some hardware wallet projects running, but I would love a Debian based software-only solution!

Ente


Title: Re: Anyone use raspberry pi with armory? NT
Post by: bitcoinspot.nl on March 01, 2013, 08:04:08 AM
Sounds like you're definitely headed in the right direction. THIS (http://bit.ly/XwEfHn) is the chronicle of my endeavor to create an offline wallet with Armory.
It's a tutorial that I'm working on for friends and family that are not so techie.
If you decide to read it, feedback would be appreciated. Thanks.

Ill look into that, thanks!


Title: Re: Anyone use raspberry pi with armory? NT
Post by: 13Charlie on March 01, 2013, 03:11:53 PM
For me, two questions remain:

How to connect the offline and the online Armory?
Ethernet? Serial? And then some scripting is needed to let them talk to each other..

I think the current recommended method is via USB thumb drive. I just format my thumb drive between uses to ensure that it is clean.
This may be helpful if you need a better solution.

Many times you can disable all that stuff in the BIOS and don't need a special kernel.  If the devices are disabled at the hardware level, it doesn't really matter if the modules are there or not :)

I think he's running this off a USB drive and wants to be able to boot untrusted computers (which may have network connectivity).

yes, that is my intent  ;)

USB Stick has a small FAT partition for exchanging the transactions and exporting the watching only wallets,
 a boot partition and LVM on a Luks encrypted partition for the OS

I want to be able to boot it on any computer or even a VM and be sure to cut any links to the evil world  ;D

I was just investigating USB auto-run vulnerabilities, and was surprised by the number of attack vectors that Ubuntu has (mainly due to tendency to "auto" do stuff for the convenience of the user, despite exposing attack surface).  I bet the USB viruses could be completely a non-issue if you compiled away all the auto-everything that is normally part of the kernel and/or desktop manager.  The only thing I want the USB key to do when I plug it in is mount automatically and don't do anything else (also disabling file browser icons, which were a source of previous vulnerabilities -- injecting code that exploits an evince bug into the icon of a file, which will automatically get loaded when the file browser pops and up loads the icons to display the files).  

I never considered that the answer to remaining attack surface of the USB method could just be a custom-compiled distro...

Of course, I have no experience with that, but I'm sure someone else does :)


Title: Re: Anyone use raspberry pi with armory? NT
Post by: fornit on March 25, 2013, 04:00:04 PM
i bought a raspberry rev b to excusively use with armory. i ran into the exact same problem using raspian described here:
https://bitcointalk.org/index.php?topic=156003.0

is there any confirmed method to get armory running on a raspberry? i am willing install any OS as long as armory works.



Title: Re: Anyone use raspberry pi with armory? NT
Post by: etotheipi on March 25, 2013, 05:02:27 PM
i bought a raspberry rev b to excusively use with armory. i ran into the exact same problem using raspian described here:
https://bitcointalk.org/index.php?topic=156003.0

is there any confirmed method to get armory running on a raspberry? i am willing install any OS as long as armory works.

FYI:  some kind soul has donated a RPi to me!  It should be arriving soon, and I will be figuring out how to compile on it.  I hope to make offline-bundle releases for it, eventually. 

But this thread isn't useless ... I'll be needing to figure out how to compile it myself!  So... carry on... :)


Title: Re: Anyone use raspberry pi with armory? NT
Post by: etotheipi on March 25, 2013, 07:18:30 PM
I just got a request to cross-link some discussion in the newbie's thread:

https://bitcointalk.org/index.php?topic=156003.msg1674928#msg1674928

Looks like good information!


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Nemesis on March 31, 2013, 07:56:54 PM
I just got a request to cross-link some discussion in the newbie's thread:

https://bitcointalk.org/index.php?topic=156003.msg1674928#msg1674928

Looks like good information!

Great thread, I'm wondering the same thing.

Also Can you point me to some document to show how making transaction of offline wallet technically works? I understand what it does, but i'm curious of how it does it. Especially the whole "sign" the transaction then relay it with the online watch-only wallet.

is it possible to run Amory offline on an Android device soon?


Title: Re: Anyone use raspberry pi with armory? NT
Post by: etotheipi on March 31, 2013, 08:11:35 PM
I just got a request to cross-link some discussion in the newbie's thread:

https://bitcointalk.org/index.php?topic=156003.msg1674928#msg1674928

Looks like good information!

Great thread, I'm wondering the same thing.

Also Can you point me to some document to show how making transaction of offline wallet technically works? I understand what it does, but i'm curious of how it does it. Especially the whole "sign" the transaction then relay it with the online watch-only wallet.

is it possible to run Amory offline on an Android device soon?


There's an Offline wallet tutorial (https://bitcoinarmory.com/using-offline-wallets-in-armory/) which will soon be replaced with a illustrated tutorial (with screenshots).  You can think of it as:  your "watching-only wallet" is identical to a regular, the only difference is there's an "extra step" that has to be completed when you hit the "Send" button (it doesn't send right away, it will save a file to your USB key which you get signed by the offline computer and then bring it back and hit "Broadcast").

I'd love to support Android devices, but I don't have a secure file transfer mechanism for them.  The only way to really transfer data to it is through plugging it in via USB, but then it's filesystem becomes accessible to the online computer, which kind of defeats the purpose.  However, I will implement multi-sig, allowing you to link computer and phone -- then the computer simply emails/texts/QR-codes a half-signed transaction to the phone, the phone signs and broadcasts (after verification).  

Seriously, I would love to support Android offline signing devices, I just don't have a good way to it.  This is what this thread was about (https://bitcointalk.org/index.php?topic=68482.0) and one reason I really liked the audio-transfer solution ... it's just that it's too slow, and likely to destroy some hardware :(


Title: Re: Anyone use raspberry pi with armory? NT
Post by: TierNolan on April 27, 2013, 07:52:20 PM
I submitted a pull request (https://github.com/etotheipi/BitcoinArmory/pull/73) to help with this.

Assuming the pull request is accepted, these are the compile steps.  They also work if you pull from the PR instead of the main repo.  You can see the files that were changed by clicking of the PR link.


Initial Setup

Get image for Raspbian “wheezy” and write to sd card
http://www.raspberrypi.org/downloads

After imaging, for HDMI/DVI graphics, you should edit the config.txt file on the sdcard

Uncomment: hdmi_force_hotplug=1


Power up the pi, using sd card

You are given a few options.  You can expand the OS to the full SD card capacity and then reboot.

Login

username: pi
password: raspberry


Distro update and Dependencies

You need an internet connection for this.  This downloads and installs all the dependencies.  This takes around 45 mins

Code:
sudo apt-get update

sudo apt-get upgrade

sudo apt-get -y install git libcrypto++-dev swig python-twisted libqtcore4 libqt4-dev python-qt4 python-dev pyqt4-dev-tools python-psutil


QTReactor

Code:
git clone git://github.com/ghtdak/qtreactor.git

Armoury
If the PR is not included, you need to use the PR version instead.

Code:
git clone git://github.com/TierNolan/BitcoinArmory.git
cd BitcoinArmory
git checkout pi_makefile
cd ..

Otherwise, clone from the main repo

Code:
git clone git://github.com/etotheipi/BitcoinArmory.git

Network

The network link can be disconnected now and doesn't need to be connected again.


Build QTReactor

Code:
cd qtreactor

sudo python setup.py build
sudo python setup.py install

cd ..


Build Armory

You might need to add a swap file for the 256MB version

http://www.roberteklund.org/projects/raspberry-pi#TOC-Installation1
https://bitcointalk.org/index.php?topic=156003.msg1906666#msg1906666

Building armory takes around 1 hour 30.

Code:
cd BitcoinArmory/

make all

sudo make install

cd ..

Start GUI

Code:
startx

Starting Armory

Double click on LXTerminal to open a terminal.

Code:
cd BitcoinArmory

python ArmoryQt.py

It takes a while to start.  You can see CPU load in the bottom RHS, and the graph will go to max.  This happens when doing stuff related to encryption.


USB Drive access

The usb drive is located at /media/<usb label> when using the terminal in the GUI.

If you connect a usb stick directly into the PI, then it can cause a reboot due to current surge.

If possible you should use a hub.  

Failing that, you may need to shutdown the pi before inserting the usb and then restart.


SAFE SHUTDOWN

Open a terminal and enter

Code:
sudo shutdown -h -t 10 now


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Ente on April 27, 2013, 10:15:42 PM
I submitted a pull request (https://github.com/etotheipi/BitcoinArmory/pull/73) to help with this.
[..]

Wow, that's great info!
Thank you for all the details and work! :-)

Seems I need to get a rasp-pi now, after all :-)
(and will look for a minimalistic tiny display and keypad now)

Ente


Title: Re: Anyone use raspberry pi with armory? NT
Post by: fornit on April 27, 2013, 11:53:13 PM
I submitted a pull request (https://github.com/etotheipi/BitcoinArmory/pull/73) to help with this.

yay! awesome! pull!  :)

i already got a raspberry. but i intended to write a blog post for german users about how to use it and i couldnt possibly expect them to cross-compile armory.
so its basically collecting dust and waiting - possibly for this! cant wait to test it!


Title: Re: Anyone use raspberry pi with armory? NT
Post by: TierNolan on April 28, 2013, 10:18:01 AM
I tweaked the PR slightly.  It now checks that "python" returns a version of 2.x before using that instead of "python2".


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Ente on April 28, 2013, 04:22:36 PM
I submitted a pull request (https://github.com/etotheipi/BitcoinArmory/pull/73) to help with this.
[..]

Wow, that's great info!
Thank you for all the details and work! :-)

Seems I need to get a rasp-pi now, after all :-)
(and will look for a minimalistic tiny display and keypad now)

Ente

Here we go:

http://harizanov.com/product/1-8-tft-display-for-raspberry-pi/ (http://harizanov.com/product/1-8-tft-display-for-raspberry-pi/)
http://harizanov.com/wp-content/uploads/2013/02/IMG_1980-e1362079459902-225x300.jpg
12€ for a 1.8" tft!

Buttons?
https://projects.drogon.net/raspberry-pi/gpio-examples/tux-crossing/3-more-leds-and-a-button/ (https://projects.drogon.net/raspberry-pi/gpio-examples/tux-crossing/3-more-leds-and-a-button/)
For free!

Thats all we need!
Raspberry Pi, a trustworthy debian image with offline-armory preinstalled (Alan?), display and buttons, add a nice case and here we go! I would both buy one and add to a bounty!

Ente


Title: Re: Anyone use raspberry pi with armory? NT
Post by: etotheipi on April 28, 2013, 04:46:39 PM
Armory will definitely have to be modified to get it usable on such a small screen, but I bet I could do it.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: TierNolan on April 28, 2013, 06:16:57 PM
Here we go:

Cool.

Armory will definitely have to be modified to get it usable on such a small screen, but I bet I could do it.

Initial setup could be via a monitor and keyboard. 

Once done, transaction signing would need less info to be displayed.

If it could be setup to auto-start armory on powerup, then you could operate it with a single button and change the choice every second.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Ente on April 28, 2013, 07:08:08 PM
Here we go:

Cool.

Armory will definitely have to be modified to get it usable on such a small screen, but I bet I could do it.

Initial setup could be via a monitor and keyboard. 

Once done, transaction signing would need less info to be displayed.

If it could be setup to auto-start armory on powerup, then you could operate it with a single button and change the choice every second.

That's what I had in mind too. The screen to only show the address, sum, and maybe fees and a graphical representation of the address. And "Accept / Dismiss" with the buttons.
My priority was to find a screen the size or smaller than the R-Pi itself. There will be larger ones than the one I found. And, I found the 12€ pricetag.. noteworthy :-)
This (or other) displays leave the regular monitor connector unused. So we can connect both a "real" display and leave the tiny display connected. Which means there is a way to have different views on the different displays too. Like, a full debian shell or desktop on the big display, and the armory gui only on the small display.

Ente


Title: Re: Anyone use raspberry pi with armory? NT
Post by: TierNolan on April 29, 2013, 04:43:06 PM
Was doing some Googling and found this (http://www.hotmcu.com/28-touch-screen-tft-lcd-with-spi-interface-p-42.html?cPath=6_16).  It is $12 but includes a touch screen.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: Ente on April 29, 2013, 07:11:36 PM
Was doing some Googling and found this (http://www.hotmcu.com/28-touch-screen-tft-lcd-with-spi-interface-p-42.html?cPath=6_16).  It is $12 but includes a touch screen.

Oh yeah! Nice find!
Can anyone confirm this would easily mate with the RPi?

Ente


Title: Re: Anyone use raspberry pi with armory? NT
Post by: TierNolan on April 29, 2013, 07:42:03 PM
Oh yeah! Nice find!
Can anyone confirm this would easily mate with the RPi?

Looking at the pin list, it has 11 data connections and 2 for power/gnd.

That suggests it could be interfaced, since the pi has lots of GPIOs.  There are 2 headers at either side, so maybe not very convenient.

I am not sure about drivers.  However, it is probably possible to "bit-bash" the GPIO pins and do the SPI writes.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: aneutronic on May 09, 2013, 09:03:29 PM

Assuming the pull request is accepted, these are the compile steps.  They also work if you pull from the PR instead of the main repo.  You can see the files that were changed by clicking of the PR link.


Nice write-up, thanks for your efforts.    8)

I had difficulty compiling this with my rev A. It kept on running out of memory with 204800 so I bumped the swap file size up to 307200 and it did the next compile without any trouble. I haven't tried signing any tx yet but it loads up Armory fine. It's a bit slow starting up but way quicker than trying to boot a cold wallet usb drive and then back online on the same pc.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: bitcork on June 16, 2013, 04:43:05 PM
 :o i'll be monitoring this thread closely and wait for any updates from etotheipi. RPi+Armory would be a great leap in this realm..  


Title: Re: Anyone use raspberry pi with armory? NT
Post by: peapodamus on June 29, 2013, 03:41:13 AM
I might just want to do something like this :D


Title: Re: Anyone use raspberry pi with armory? NT
Post by: 420session on October 01, 2013, 03:37:52 PM

FYI:  some kind soul has donated a RPi to me!  It should be arriving soon, and I will be figuring out how to compile on it.  I hope to make offline-bundle releases for it, eventually. 

Any update on an offline-bundle for the RPi?
I've added a watch on this thread in the hope there will be one available, I don't have the technical know-how to build this from scratch but I'd really like to try out armory.


Title: Re: Anyone use raspberry pi with armory? NT
Post by: goatpig on October 02, 2013, 11:33:16 PM
Looking at the pin list, it has 11 data connections and 2 for power/gnd.

That suggests it could be interfaced, since the pi has lots of GPIOs.  There are 2 headers at either side, so maybe not very convenient.

I am not sure about drivers.  However, it is probably possible to "bit-bash" the GPIO pins and do the SPI writes.

Writing an ASM driver for a single $12 piece of hardware? Ouch...