m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-05-31 14:17:10 +0200
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2020-05-31 14:17:10 +0200
commit05dccfb509994792f7d3e0c1143f1dfea8a32d5a (patch)
tree931175d432803f64e922e1edb134b4b86a43e5f8
parent9e685b3a87db5658bb5325f5c67db2838f81f76b (diff)
Add gpg symmetric stuff
-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