Last active
June 9, 2017 16:00
-
-
Save SansGuidon/8c989cc6efdfc98eeaa43f1182942763 to your computer and use it in GitHub Desktop.
Using GPG for file encryption
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
# file encryption using private and public key : the recipent public key is used in this case | |
alice$ gpg --output secret.bin --encrypt --recipient bob.public.key secret.txt | |
bob$ gpg --output secret.txt --decrypt secret.txt | |
# file encryption without using priv/pub key | |
gpg --output secret.bin --symmetric --cipher-algo AES256 secret.txt | |
gpg --output secret.txt --decrypt secret.bin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See also https://www.gnupg.org/gph/en/manual/x110.html
https://stackoverflow.com/questions/28247821/openssl-vs-gpg-for-encrypting-off-site-backups
https://stackoverflow.com/questions/16056135/how-to-use-openssl-to-encrypt-decrypt-files/31552829#31552829