Bitcoin Forum

Bitcoin => Project Development => Topic started by: jim618 on January 10, 2012, 05:07:00 PM



Title: How to build a physical safe that you can open with bitcoin
Post by: jim618 on January 10, 2012, 05:07:00 PM
We all want to keep our bitcoin safe . . .
But how about making a real, physical safe that you can open with bitcoin ?

Here is how I think you will be able to do it.   Not now, but in a few months.


The overall plan

Imagine you have a bitcoin address (to which you have the private key) called the LockKeeper address.   Each physical lock you produce also has a bitcoin address.   Call this the Lock address.

Using the Raspberry Pi you run a bitcoin client that is specifically looking for a transaction FROM the LockKeeper TO the Lock.   If the lock sees such a transaction it opens the solenoid that a typical electronic lock has and then you can open the safe.


Materials
1) First, get a safe.   Let's spend £35 on one of these:

http://www.diy.com/nav/fix/hardware/security/safes/-specificproducttype-electronic_safes/B-and-Q-Electronic-Safe-Anthracite-Small-9380971 (http://www.diy.com/nav/fix/hardware/security/safes/-specificproducttype-electronic_safes/B-and-Q-Electronic-Safe-Anthracite-Small-9380971)

If you have ever dismantled one of these you will know that there is a solenoid in the mechanism which, when active, enables you to turn the handle of the lock and open it.   We are going to hack that.

2) Buy a Raspberry Pi.   $35.   (Ok you cannot buy them yet but Real Soon Now)

3) Install a future version of MultiBit (ok, it is not written yet!) that incorporates the ideas of "the Sound of Bitcoin' from this thread: https://bitcointalk.org/index.php?topic=53371.0.  

4) Buy a cheap USB microphone, a power switch and an op-amp/ relay (used to power the safe's solenoid)


The build

1) You drill through the case of the safe and mount the power switch and microphone so that you can :
+ switch on the power switch from outside
+ the microphone can listen to external noises.

Epoxy these into place.

2) You add the Lock address to the copy of MultiBit which is running on the Raspberry Pi.

3) You hack the MultiBit source code (it is open source after all!) so that when it is notified of a transaction from LockKeeper to Lock it "does something" on the Raspberry Pi to power the opamp/ relay that then opens the solenoid.   (I don't know how to breadboard the Raspberry Pi but I am sure it is doable).

4) The Raspberry Pi goes inside the physical safe, with an AA battery power supply.


How it works

1) You do a spend from the LockKeeper to the Lock address.  Only you can do this as only you have the LockKeeper's private key.
2) The transaction representing the spend you convert to a sound.
3) You switch on the physical safe's Raspberry Pi
4) You playback the sound so that the USB microphone can hear it.
5) The Raspberry Pi hears the sound, decodes the bitcoin transaction, understands it is a transaction from the LockKeeper address to the Lock's bitcoin address and hence powers the solenoid.
6) The physical lock opens.

It is crazy-tech, but in the near future it would be do-able and pretty cheap to build.









Title: Re: How to build a physical safe that you can open with bitcoin
Post by: grue on January 10, 2012, 06:35:40 PM
what's the point of this? why not a raspberry pi that opens based on a gpg signature?


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: jim618 on January 10, 2012, 07:46:56 PM
Oh it is mainly for the fun of it!

:-)

Once a basic non-networked version is working, the logical next steps would be:

1) Use the wifi connection on the Raspberry Pi to maintain a connection to the bitcoin network.
At this point you have a cheap computer that is networked and you can safely control using your private key

It is the start of the 'smart property' idea of Mike Hearn's


2) Moving on from a straightforward On/Off control you can implement an arbitary API by using multiple bitcoin addresses e.g.:

a tx from LockKeeper address to Address A of 0.001 BTC= turn on light A
a tx from LockKeeper address to Address A of 0.002 BTC= turn off light A

a tx from LockKeeper address to Address B of 0.001 BTC= turn on light B
a tx from LockKeeper address to Address B of 0.002 BTC= turn off light B

or whatever.

Using the bitcoin network to control physical hardware would admittedly have terrible latency but excellent resilence (from the P2P point of view)


3) You can extend it to multiple participants. Perhaps you have the locking mechanism but I have the LockKeeper private key and you rent the activation of the locking mechanism by paying me BTC, at which point I send the unlock BTC to the locking mechanism and the Thing-That-Is-Locked is then usable by you.





Title: Re: How to build a physical safe that you can open with bitcoin
Post by: ovidiusoft on January 10, 2012, 11:57:17 PM
I have another idea. It's not as high tech as yours, but it has the advantage that you can implement it now. You need:

1. a safe.
2. a friend.

You don't know the password to the safe, only your friend does. He refuses to open the safe for you unless you pay him 1 BTC. There - a physical safe you can open with bitcoin :)


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: Vernon715 on February 26, 2012, 05:34:40 PM
could this be done with the raspeberry Pi and some sort of finger print scanner?


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: foggyb on February 27, 2012, 04:54:31 PM
I have another idea. It's not as high tech as yours, but it has the advantage that you can implement it now. You need:

1. a safe.
2. a friend.

You don't know the password to the safe, only your friend does. He refuses to open the safe for you unless you pay him 1 BTC. There - a physical safe you can open with bitcoin :)

Friend is the weak link - they can be blackmailed/coerced to release the password.


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: marked on February 27, 2012, 07:45:27 PM
could this be done with the raspeberry Pi and some sort of finger print scanner?

raspberry_pi announcement at 06:00UTC 29 Feb 2012...

marked, awaiting...


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: Vernon715 on February 27, 2012, 10:38:57 PM
could this be done with the raspeberry Pi and some sort of finger print scanner?

raspberry_pi announcement at 06:00UTC 29 Feb 2012...

marked, awaiting...

Yay!! I cant wait.


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: MORA on March 02, 2012, 11:28:24 AM
The raspberry is powerful enough to handle the bitcoin verification itself, however may lack network connectivity.

The triggering of a output based on a bitcoin payment is easy enough, use any of the notify services to call your url and verify the data.
Can be made to not require a incoming connection if its behind a firewall etc.

But ofcause that requires the monitor service to be running, and then you might as well do it without the bitcoin part.
Not sure if any of the light systems are opensource and used widely enough to be an option ? (closed source propriety servers are not)


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: marcus_of_augustus on March 04, 2012, 09:27:41 PM
Raspberry Pi would make a great offline wallet/ bitcoin storage device.

First person to get bitcoin ported onto the Pi gets a raspberry ....


Title: Re: How to build a physical safe that you can open with bitcoin
Post by: marked on March 04, 2012, 09:53:29 PM
Raspberry Pi would make a great offline wallet/ bitcoin storage device.

First person to get bitcoin ported onto the Pi gets a raspberry ....

you can do it yourself if you want, just download the emulator, and one of the OS torrents, and compile. Adjust if necessary for compilation errors...

marked