File: README.md

package info (click to toggle)
golang-github-xordataexchange-crypt 0.0.2%2Bgit20170626.21.b2862e3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 164 kB
  • sloc: makefile: 2
file content (46 lines) | stat: -rw-r--r-- 1,009 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# crypt

You can use crypt as a command line tool or as a configuration library:

* [crypt cli](bin/crypt)
* [crypt/config](config)

## Demo

Watch Kelsey explain `crypt` in this quick 5 minute video:

[![Crypt Demonstration Video](https://img.youtube.com/vi/zYpqqfuGwW8/0.jpg)](https://www.youtube.com/watch?v=zYpqqfuGwW8)

## Generating gpg keys and keyrings

The crypt cli and config package require gpg keyrings. 

### Create a key and keyring from a batch file

```
vim app.batch
```

```
%echo Generating a configuration OpenPGP key
Key-Type: default
Subkey-Type: default
Name-Real: app
Name-Comment: app configuration key
Name-Email: app@example.com
Expire-Date: 0
%pubring .pubring.gpg
%secring .secring.gpg
%commit
%echo done
```

Run the following command:

```
gpg2 --batch --armor --gen-key app.batch
```

You should now have two keyrings, `.pubring.gpg` which contains the public keys, and `.secring.gpg` which contains the private keys.

> Note the private key is not protected by a passphrase.