<p>(<code>trezor-agent</code> developer here...)</p>

<p>Please take a look at the latest <code>trezor-agent</code> version <a href="https://github.com/romanz/trezor-agent" rel="nofollow noreferrer">here</a>.
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 :)</p>

<p><strong>EDIT</strong>:
Make sure to install all the required packages as described here: <a href="https://github.com/romanz/trezor-agent/blob/master/INSTALL.md" rel="nofollow noreferrer">https://github.com/romanz/trezor-agent/blob/master/INSTALL.md</a></p>

CC BY-SA 3.0
2017-07-01T22:24:57.950Z
For 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-dev`
Martin Lie
CC BY-SA 3.0
2017-08-04T04:12:00.997Z
Thanks for the heads-up about the installation procedure :)

I have edited my post above.
Roman Zeyde
CC BY-SA 3.0
2016-10-04T17:06:16.003Z
2017-08-04T04:13:13.880Z
2017-08-04T04:13:13.880Z
Roman Zeyde
<p><strong>GPG Keys</strong>
"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."</p>

<p><a href="https://medium.com/@satoshilabs/trezor-firmware-1-3-6-20a7df6e692#.9nmckr4yh">https://medium.com/@satoshilabs/trezor-firmware-1-3-6-20a7df6e692#.9nmckr4yh</a></p>

<p>Complete instructions can be found here:</p>

<p><a href="https://github.com/romanz/trezor-agent/blob/master/README-GPG.md">https://github.com/romanz/trezor-agent/blob/master/README-GPG.md</a></p>

<p><strong>Generate a new GPG identity:</strong></p>

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

<p>gpg: key 5E4D684D: public key "John Doe " imported</p>

<p>gpg: Total number processed: 1</p>

<p>gpg:               imported: 1</p>

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

<p>$ gpg2 -k</p>

<h2>/home/roman/.gnupg/pubring.kbx</h2>

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

<p><strong>Sign and verify GPG messages:</strong></p>

<p>$ echo "Hello World!" | gpg2 --sign | gpg2 --verify</p>

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

<p>gpg: Good signature from "Roman Zeyde " [ultimate]"</p>

CC BY-SA 3.0
2016-06-27T02:09:55.733Z
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
CC BY-SA 3.0
2016-06-24T04:57:22.870Z
2016-06-24T04:57:22.870Z
prodigious
<p>I read <a href="http://bitcoinx.io/news/articles/trezor-updates-firmware-to-include-gpg-signing-and-new-advanced-features/">here</a> 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.</p>

<hardware-wallet><trezor>
How do I use the new GPG signing feature with my Trezor?
user1794469
# How do I use the new GPG signing feature with my Trezor?

(Asked by: username_0 on 2016-06-24)

I read [here](http://bitcoinx.io/news/articles/trezor-updates-firmware-to-include-gpg-signing-and-new-advanced-features/) 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.

**Tags:** hardware-wallet, trezor


---

## 2 answers

### Answer by username_3 on 2016-06-24. Score: 8 | Accepted answer

**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 username_1."

<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 "username_1 " [ultimate]"

> **Comments:**
> **username_0**: 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.  

---

### Answer by username_1 on 2016-10-04. Score: 5

(`trezor-agent` developer here...)

Please take a look at the latest `trezor-agent` version [here](https://github.com/romanz/trezor-agent).
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>

> **Comments:**
> **username_2**: For 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-dev`  
> **username_1**: Thanks for the heads-up about the installation procedure :)  I have edited my post above.  

---

