romanz / trezor-agent

Hardware-based SSH/GPG/age agent
GNU Lesser General Public License v3.0
568 stars 152 forks source link

Does KeepKey support GPG? #440

Open doolio opened 1 year ago

doolio commented 1 year ago

https://github.com/romanz/trezor-agent/blob/3c911e99a0394278104564092225d67c75e74b99/agents/keepkey/setup.py#L7

Suggests it does.

https://github.com/romanz/trezor-agent/blob/3c911e99a0394278104564092225d67c75e74b99/agents/keepkey/setup.py#L35-L37

Yet, there appears to be no GPG entry points defined.

https://github.com/romanz/trezor-agent/blob/3c911e99a0394278104564092225d67c75e74b99/agents/keepkey/keepkey_agent.py#L1-L5

L1 imports the GPG module but there are then no gpg_tool or gpg_agent lambda function assignments like we have for the other hardware devices agents.

https://github.com/romanz/trezor-agent/blob/3c911e99a0394278104564092225d67c75e74b99/libagent/device/keepkey.py#L10

Suggests only SSH is supported.

SlugFiller commented 1 year ago

If you have one, you can simply enable the agent and test.

doolio commented 1 year ago

I only have a Trezor T.

romanz commented 1 year ago

@keepkeyjon IIUC, GPG wasn't supported initially on Keepkey - and was added only in https://github.com/keepkey/keepkey-firmware/commit/95e41aa3bd532267490a145bc0fc1c8deb436b16 (#8), right?

romanz commented 1 year ago

FTR, Keepkey support was added in https://github.com/romanz/trezor-agent/commit/5932a89dc58d2a734a1d23115e34562164775df3 when it didn't support GPG.

doolio commented 1 year ago

That would explain the current state. Is it a matter of simply adding the entry points and the lambda functions I discuss above? If so I can submit such a PR for consideration.

romanz commented 1 year ago

Is it a matter of simply adding the entry points and the lambda functions I discuss above?

Not sure - it should also be tested with the latest Keepkey firmware, to make sure it indeed works.

doolio commented 1 year ago

Hmm ok. I only have a trezor T so can't help with such tests.

SlugFiller commented 1 year ago

The best motivation for contribution is needing it, or knowing someone who needs it. Worrying about support for a device you don't have and don't know anyone who has is noble, but most often not particularly productive.

doolio commented 1 year ago

You're right of course. I'm just highlighting potential issues where I see them.

romanz commented 1 year ago

@keepkeyjon IIUC, GPG wasn't supported initially on Keepkey - and was added only in keepkey/keepkey-firmware@95e41aa (#8), right?

CC: @keepkey @pastaghost @markrypto @markrypt0 @mrnerdhair @bgok (KeepKey maintainers) Could you please let us know if GPG signature/decryption is supported by KeepKey?