Filiprogrammer / SimpleJadePinServer

Simple reimplementation of the blind_pin_server for the Blockstream Jade along with a very simple web interface
1 stars 1 forks source link

Can I use SimpleJadePinServer to unlock Jade with QR code? #1

Closed petre-c closed 2 weeks ago

petre-c commented 2 months ago

Can SimpleJadePinServer be used to QR PIN Unlock a Jade?

https://help.blockstream.com/hc/en-us/articles/15572026940953-How-do-I-access-my-wallet-with-QR-PIN-Unlock

Their official documentation on how to setup and use a custom pinserver is less than optimal and does not support QR PIN Unlock

Well done, by the way @Filiprogrammer

Filiprogrammer commented 2 months ago

Can SimpleJadePinServer be used to QR PIN Unlock a Jade?

Yes of course, that is its purpose after all. I do admit, I might have to improve the documentation though.

Start by installing the dependencies for SimpleJadePinServer

apt update
apt install python3 python3-pip python3-venv
python3 -m venv venv
source venv/bin/activate
pip install wallycore

Then generate a self-signed TLS certificate to be used by the web server.

openssl req -new -x509 -keyout server.pem -out server.pem -days 3650 -nodes

Start SimpleJadePinServer to generate a static server key pair.

python3 SimpleJadePinServer.py

This will generate private.key and public.key.

Next, point your Jade to the SimpleJadePinServer. Follow the steps in the "Point Jade to Personal Blind Oracle" section of this article: https://help.blockstream.com/hc/en-us/articles/12800132096793-Set-up-a-personal-blind-oracle During step 2 make sure to provide the path of the public.key file to the --set-pubkey argument. It does not matter what you provide to --set-url. You can pass anything there to confuse a potential thief.

Once the Jade is configured to work with the SimpleJadePinServer, set up your wallet on the Jade. When asked to select a connection, choose QR. After providing a six digit pin, the Jade will display Step 1/4 with a series of BC-UR QR codes. This step can be skipped. The Jade will then display Step 2/4 and ask you to scan a BC-UR QR code. Make sure that SimpleJadePinServer is running and navigate to https://127.0.0.1:4443 in your web browser. Click the button labelled "Step 2/4 start_handshake". This will show a series of BC-UR QR codes you can scan with your Jade. Once scanning is complete, the Jade will proceed to Step 3/4 and show a series of BC-UR QR codes on its screen. Click "Step 3/4 start_handshake reply" in the web interface. This will use your computer's camera to scan the QR codes on the Jade. Once it is done scanning, the camera interface will automatically disappear. Continue to Step 4/4 on the Jade and click "set_pin" in the web interface. This will show another series of BC-UR QR codes which can be scanned by the Jade. Once that is scanned, you are done and the wallet is ready to be used.

If you want to unlock the wallet at some later point, select "QR Mode" -> "QR PIN Unlock" on the Jade. Enter your PIN and perform the same steps as described before. The only difference being at step 4/4 where you will have to click on "get_pin" instead of "set_pin".

petre-c commented 2 months ago

Thank you, @Filiprogrammer , I was able to follow your instructions.

Two points:

Filiprogrammer commented 1 month ago

I wasn’t aware of this option. That sounds like a much more convenient approach. I’ll look into this when I have some time. Thanks for bringing it to my attention!

  • Would you consider dockerizing the project? I can submit a PR, if you want.

That thought has crossed my mind already, I just didn't bother to do it yet. But if you're willing to submit a PR, I'd really appreciate it!