RustCrypto / RustCrypto/SSH

Question/Feature Request: Is Encryption/Description of text with SSH Key possible?

Open
#527 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
247
Forks
64
Avg merge
4d 7h
Merged PRs (30d)
4

Description

I tried to find a possibility for encrypting and descripting text via an SSH key pair but only found functions to sign and verify text. Is ecryption/decryption implemented?

This would be the corresponding openssl function:

$ ssh-keygen -f path/to/id_rsa.pub -e -m PKCS8 > /tpm/ssh_key.pem
$ echo "some text" | openssl rsautl -encrypt -pubin -inkey /tmp/ssh_key.pem > encrypted.txt
$ openssl rsautl -decrypt -inkey ~/.ssh/id_rsa < encrypted.txt

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing SSH key signing and verification functionality referenced in the issue, then compare its supported key formats with the OpenSSL conversion and encryption commands shown. Determine whether public-key encryption and private-key decryption fit the project’s APIs and define tests for round-trip encryption and decryption. Done means the supported scope and behavior are documented and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cryptography
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.