Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an example of using SSH agent extensions for curve 25519 decryption #70

Merged
merged 1 commit into from
May 20, 2024

Conversation

wiktor-k
Copy link
Owner

Adds the [email protected] and [email protected] extensions with encoding and decoding rules.

The extension is used to facilitate curve 25519 decryption over SSH agent connections.

This PR additionally makes the OpenPGP Card agent example implement these two extensions thus providing clients with public keys of its decryption keys. Additionally a decrypt derive extension similar to the sign request is implemented.

The PGP wrapper example has been extended to emit encryption subkeys if the agent supports them. An extra decrypt subcommand has been added. The docs have been updated to showcase how to use the feature:

echo I like strawberries | gpg -er 4EB27E153DDC454364B36B59A142E92C91BE3AD5 > /tmp/encrypted.pgp
SSH_AUTH_SOCK=/tmp/ext-agent.sock cargo run --example pgp-wrapper -- decrypt < /tmp/encrypted.pgp
...
I like strawberries

@wiktor-k wiktor-k changed the title Add an example of using SSH agent extensions Add an example of using SSH agent extensions for curve 25519 decryption May 16, 2024
Adds the `[email protected]` and `[email protected]`
extensions with encoding and decoding rules.

The extension is used to facilitate curve 25519 decryption over SSH
agent connections.

This PR additionally makes the OpenPGP Card agent example implement
these two extensions thus providing clients with public keys of its
decryption keys. Additionally a `decrypt derive` extension similar to
the sign request is implemented.

The PGP wrapper example has been extended to emit encryption subkeys
if the agent supports them. An extra `decrypt` subcommand has been
added. The docs have been updated to showcase how to use the feature:

```sh
echo I like strawberries | gpg -er 4EB27E153DDC454364B36B59A142E92C91BE3AD5 > /tmp/encrypted.pgp
SSH_AUTH_SOCK=/tmp/ext-agent.sock cargo run --example pgp-wrapper -- decrypt < /tmp/encrypted.pgp
...
I like strawberries
```

Signed-off-by: Wiktor Kwapisiewicz <[email protected]>
@wiktor-k wiktor-k force-pushed the wiktor/add-extensions-to-examples branch from 2c19ab8 to df138ed Compare May 20, 2024 07:24
@wiktor-k wiktor-k enabled auto-merge May 20, 2024 07:24
@wiktor-k wiktor-k merged commit 2fcef7a into main May 20, 2024
16 checks passed
@wiktor-k wiktor-k deleted the wiktor/add-extensions-to-examples branch May 20, 2024 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant