Last active
September 13, 2024 19:04
-
-
Save drm/da216840c0da3afab66737b6cdb788c3 to your computer and use it in GitHub Desktop.
keypair encryption using openssl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openssl \ | |
pkeyutl \ | |
-encrypt \ | |
-inkey <(ssh-keygen -f ~/.ssh/id_rsa.pub -e -m pem) \ | |
-pubin \ | |
-in ./foo.txt \ | |
-out foo.enc | |
openssl \ | |
pkeyutl \ | |
-decrypt \ | |
-inkey <(openssl rsa -in ~/.ssh/id_rsa -outform pem) \ | |
-in ./foo.enc \ | |
-out foo2.txt | |
Note to self: The way to continue from here is: check in public-key encrypted files with a symmetric key that can be used to encrypt and decrypt files in the repo. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment