m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gpg.md21
1 files changed, 20 insertions, 1 deletions
diff --git a/gpg.md b/gpg.md
index 2956dab..00a6850 100644
--- a/gpg.md
+++ b/gpg.md
@@ -1,9 +1,28 @@
# GPG Crypto
-## Encrypt file with passphrase
+## General options
+
+* `--armor` or `-a`: ASCII armor, output is printable ASCII
+* `--local-user` or `-u`: specify which ID to use
+
+## Symmetric encryption
+
+### Encrypt file with passphrase
gpg --symmetric <file>
+Add `--armor` to make it readable-ASCII encoded.
+
### Decrypt
gpg --output <out-file> --decrypt <in-file>
+
+## Export private key
+
+ gpg --armor --export-secret-keys <ID>
+
+`--armor` makes it readable-ASCII encoded.
+
+## Asymmetric crypto
+
+ gpg --encrypt [--sign] [-u USER] file