-
$ gpg --decrypt backup_file.pgp | gpg --import $ gpg --edit-key user-id gpg> trust $ # Use 5 for ultimate trust
-
$ gpg --armor --export-secret-keys \ user-id | gpg --armor --symmetric --output mykey.sec.asc
-
$ gpg --list-keys
-
$ gpg --list-secret-keys
-
$ gpg --export --armor --output public-key.asc user-id
-
$ gpg --import public-key.asc
-
$ gpg --armor --output encrypted.asc --recipient user-id --encrypt doc
-
To decrypt (option -d/--decrypt) a file with the name
encrypted.asc
encrypted with your public key, use:$ gpg --output msg --decrypt encrypted.asc
-
To encrypt
doc
with AES-256 cipher, SHA-512 digest algorithm to mangle the passphrase and Mangles the passphrase for 65536 iterations, use:$ gpg --armor --output secret.asc -c --s2k-cipher-algo AES256 --s2k-digest-algo SHA512 --s2k-count 65536 doc
-
$ gpg --output msg --decrypt encrypted.asc
-
$ gpg --armor --output encrypted.asc --sign --recipient user-id --encrypt doc
-
To encrypt
doc
with AES-256 cipher, SHA-512 digest algorithm to mangle the passphrase and Mangles the passphrase for 65536 iterations, use:$ gpg --armor --output secret.asc --sign -c --s2k-cipher-algo AES256 --s2k-digest-algo SHA512 --s2k-count 65536 doc
-
To decrypt a file with the name
encrypted.asc
encrypted with your public key (which also verifies the signature) use:$ gpg --output msg --decrypt encrypted.asc
-
$ gpg-connect-agent reloadagent /bye