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
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: