Allow signing arbitrary SSH messages
Hi,
Thanks for making trezor-agent!
Currently the Trezor SSH Agent closes the client connection if the payload of a signing request fails to parse as a SSH2_MSG_USERAUTH_REQUEST data structure (and/or a SSH Signature blob in #370).
But the SSH agent protocol, and Trezor, allows signing arbitrary messages. This PR enables SSH signature requests to be passed through to Trezor even if they do not match the known formats. This change enables signing for other applications, such as using JSON Web Signatures and Verifiable Credentials.
Hi :)
But the SSH agent protocol, and Trezor, allows signing arbitrary messages.
I agree, but we should make sure that we don't make the user vulnerable to cross-protocol attacks (as described by @agwa here):
Always be wary of repurposing cryptographic keys for a different protocol. If not done carefully, there's a risk of cross-protocol attacks. For example, if the structure of the messages signed by Git is similar to the structure of SSH protocol messages, an attacker might be able to forge Git artifacts by misappropriating the signature from an SSH transcript.
Closing, since it's already supported (#411).