How do I use the new GPG signing feature with my Trezor?

9

2

I read here that with the new firmware, a trezor can be used to generate GPG signatures. How does that work? Is there a tutorial? I didn't see anything on the satoshi labs website.

user1794469

Posted 2016-06-24T02:19:01.597

Reputation: 195

Answers

8

GPG Keys "TREZOR can now securely generate GPG keys for signing of emails or documents (using the NIST256P1 and Ed25519 curves). Currently, this update does not allow for GPG decryption, a feature planned for next firmware update. For more information check out the great TREZOR Agent by Roman Zeyde."

https://medium.com/@satoshilabs/trezor-firmware-1-3-6-20a7df6e692#.9nmckr4yh

Complete instructions can be found here:

https://github.com/romanz/trezor-agent/blob/master/README-GPG.md

Generate a new GPG identity:

$ trezor-gpg create | gpg2 --import # use the TREZOR to confirm signing the primary key

gpg: key 5E4D684D: public key "John Doe " imported

gpg: Total number processed: 1

gpg: imported: 1

$ gpg2 --edit "${TREZOR_GPG_USER_ID}" trust # set this key to ultimate trust (option #5)

$ gpg2 -k

/home/roman/.gnupg/pubring.kbx

pub nistp256/5E4D684D 2016-06-17 [SC] uid [ultimate] John Doe sub nistp256/A31D9E25 2016-06-17 [E]

Sign and verify GPG messages:

$ echo "Hello World!" | gpg2 --sign | gpg2 --verify

gpg: Signature made Fri 17 Jun 2016 08:55:13 PM IDT using ECDSA key ID 5E4D684D

gpg: Good signature from "Roman Zeyde " [ultimate]"

prodigious

Posted 2016-06-24T02:19:01.597

Reputation: 421

Thanks, this is the right answer so I accepted it but I can't get it to work. Also the README looks a little stale (there is no gpg-agent branch anymore). I just get gpg: can't connect to the agent: IPC connect call failed so I guess I will wait for the next round of dev.user1794469 2016-06-27T02:09:55.733

5

(trezor-agent developer here...)

Please take a look at the latest trezor-agent version here. I'd be happy to fix any issue with the documentation, and extend it with more examples to make it more helpful for first-time users :)

EDIT: Make sure to install all the required packages as described here: https://github.com/romanz/trezor-agent/blob/master/INSTALL.md

Roman Zeyde

Posted 2016-06-24T02:19:01.597

Reputation: 51

1For the people who aren't used to compile code from the command line, you could perhaps mention that the dev packages of libusb-1.0 and libudev are needed in order to compile the hidapi package (which is part of what happens when you run pip install --user trezor_agent)?

In my case, this was the full sequence of commands needed til install it (on Ubuntu 16.04.2 LTS, which is what you get when installing WSL on Win10):

sudo apt update sudo apt install python-pip pip install --upgrade pip sudo apt install libusb-1.0-0-dev sudo apt install libudev-devMartin Lie 2017-07-01T22:24:57.950

Thanks for the heads-up about the installation procedure :)

I have edited my post above. – Roman Zeyde 2017-08-04T04:12:00.997