Skip to content

Use an air-gapped Raspberry Pi Zero to sign for Monero transactions!

License

Notifications You must be signed in to change notification settings

DiosDelRayo/MoneroSigner

 
 

Repository files navigation

Build an offline, airgapped Monero signing device for less than $50!



MoneroSigner is in the process of rebranding to XmrSigner, to be not confused to an abandoned project called MoneroSigner.


Project Summary

XmrSigner is a fork from SeedSigner, Bitcoin signing device. It builds on the same hardware and actually you could use the same device for Monero and Bitcoin with two different microSD cards. MoneroSigner offers anyone the opportunity to build a verifiably air-gapped, stateless Monero signing device using inexpensive, publicly available hardware components (usually < $50).

How Monero is not a direct decendent from Bitcoin a lot of things are different... Really, a lot!

Features

  • Calculate word 13/25 of monero seed phrase
  • Create a 25-word monero seed phrase with 99 dice rolls
  • Create a 16 word polyseed phrase with 99(?) dice rolls
  • Create a 25-word monero seed phrase by taking a digital photo
  • Create a 16-word polyseed phrase by taking a digital photo
  • Temporarily store up to 3 seed phrases while device is powered
  • Monero passphrase support, posponed, possible #rabbit-hole (>48h work to implement in python)
  • Polyseed passphrase support
  • Multisig support: later
  • Scan and parse transaction data from animated QR codes using UR
  • Sign transactions
  • Live preview during photo-to-seed and QR scanning UX
  • Optimized seed word entry interface
  • Support for Monero Mainnet, Stagenet & Testnet
  • User-configurable QR code display density (check: UR documentation about viability)

Considerations:

  • Built for compatibility using UR with Feather Waller, etc, and adapt oficial Monero GUI.
  • Device takes up to 60 seconds to boot before menu appears (be patient!)
  • Always test your setup before transfering larger amounts of bitcoin (try testnet first!)
  • Slightly rotating the screen clockwise or counter-clockwise should resolve lighting/glare issues
  • If you think XmrSigner adds value to the Monero ecosystem, please help us spread the word! (tweets, pics, videos, etc.)

Related Repositories


Milestones

  1. Monero Signer basics on emulator (10 days from now)

    • Emulator easy start
    • Polyseed python implementation
    • Monero seed generation with camera for entropy
    • Monero seed generation on dice rolls
    • Monero seed generation by picking words
    • Polyseed generation with camera for entropy
    • Polyseed generation on dice rolls
    • Polyseed generation by picking words can't be done, because you can't choose words, because seeds are generate with pbkdf sha256, so only one way, we could over an alternative, or generate need seeds out of the choosen one.
    • Wallet export seed phrase
    • [-] Wallet export seed hex not to be implemented, bad decision
    • Wallet export QR code
    • Build script to generate executable for linux
    • Build script to generate executable win32
    • [-] Build script to generate executable macOS Not supported: use Docker
  2. XmrSigner working with companion Application (25 days from now)

    • Monero signer companion Application finished
      • Show View Only Wallet QR code
      • Export key images
        • conversion from monero encrypted key images file to RPC Json => Not viable, used modified monero-wallet-rpc
        • Rest
      • import outputs
      • sign transaction
      • export signed transaction
      • UR's implemented
      • [P] sending progress
      • [P] config QR
    • All missing XmrSigner functionality
      • Show View Only Wallet QR code
      • import outputs
      • Export key images
      • import unsigned transaction
      • show data from unsigned transaction
      • ask for confirmation to proceed
      • sign transaction
      • export signed transaction
      • UR's implemented
    • first xmrsigner image build
    • xmrsigner image build chain
  3. Cleanup and production ready (45 days from now)

    • Tools
    • Scripts
    • Documentation final version
    • Final cleanup XmrSigner
    • Final cleanup companion Application
  4. Monero-GUI integration (60 days from now from, until PR)

    • Fork
    • Modify
    • PR

P: posponed W: WIP ?: Not decided yet

XmrSigner development faced numerous technical challenges, including issues with monero-python, complexities in the Monero codebase, and difficulties building monero-wallet-rpc for ARMv6 devices.

Rabbit holes

Pretty much rabbit holes everywhere, somebody please remember me the next time to at least 3x the estimated time to unforeseen clusterfuck.

What to expect:

  1. Create a PiOS development image with XmrSigner running on it (for development only, not for real use).
  2. Fix open imperfections in XmrSigner and XmrSigner Companion code.
  3. Continue with milestone 3 targets, bringing XmrSigner to beta state.
  4. Finish milestone 4, including Monero GUI integration and PR.
  5. Make XmrSigner work on XmrSigner OS (buildroot).
  6. Create a phone app to test XmrSigner and other offline signing wallets.
  7. Write comprehensive documentation.
  8. Implement multisig functionality.
  9. Potentially develop XmrSigner NG, a slim reimplementation in Go/Zig/Rust or C++/Qt.

The project remains committed to delivering a functional and secure XmrSigner, despite the challenges encountered.


Shopping List

To build a SeedSigner, you will need:

  • Raspberry Pi Zero (preferably version 1.3 with no WiFi/Bluetooth capability, but any Raspberry Pi 2/3/4 or Zero model will work)
  • Waveshare 1.3" 240x240 pxl LCD (correct pixel count is important, more info at https://www.waveshare.com/wiki/1.3inch_LCD_HAT)
  • Pi Zero-compatible camera (tested to work with the Aokin / AuviPal 5MP 1080p with OV5647 Sensor)

Notes:

  • You will need to solder the 40 GPIO pins (20 pins per row) to the Raspberry Pi Zero board. If you don't want to solder, purchase "GPIO Hammer Headers" for a solderless experience.
  • Other cameras with the above sensor module should work, but may not fit in the Orange Pill enclosure
  • Choose the Waveshare screen carefully; make sure to purchase the model that has a resolution of 240x240 pixels

Software Installation

At the moment there is only a development image based on Raspberries Pi OS (buster, pretty old), with bookworm there is stil an issue with picamera2 although I adapted the code to run on both. After running in similar issues with buster, it could be that it is only a wrong setting in config.txt.

But honestly, this development image was meant that there is at least something running and the ability to thinker with it, or check things out. But main focus should be to get it on XmrSigner OS running. Here is the issue to compile monero-wallet-rpc without to bring even more dependencies, which are by they way all unnecessary becauae absolutely unneeded for the use case, into buidroot.

I will need how to go further and in which direction, monero-wallet-rpc was a temporary solution to move "quick" after figuring out at monero-python is mostly only a wrapper around monero-wallet-rpc, but implementing thing like password or key images import/export base on ch_hash_slow (CryptoNight), there would be a lot to transpile. So the better approach in my opinion and beneficial for all comming monero developers would be to take monero souce appart modularize it, minimze dependencies and allow to compile only what you need. And after that reimplement it without monero-wallet-rpc.

Further I think for the XmrSigner itself there are also too much dependencies, and also completely unnecessary. Essentially XmrSigner doesn't need an OS, it should run bare metal on the Raspberry Pi or it should be on something like the i.MX from NXP/Freescale. That all let's so many questions open in which direction to go from here. Input welcome!


Enclosure Designs

Comming soon

Community Designs


Manual Installation Instructions

see the docs: Manual Installation Instructions (To be updated)

About

Use an air-gapped Raspberry Pi Zero to sign for Monero transactions!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 97.3%
  • Standard ML 1.5%
  • Other 1.2%