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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
# Eno
**Encrypted Notes, Oui.**
A CLI tool for creating, editing, and managing encrypted notes with passphrase or SSH key authentication.
## Install
```bash
go install gitlab.com/whiteboardguy/eno/cmd/eno@latest
```
Or download a binary from the [releases page](https://gitlab.com/whiteboardguy/eno/-/releases).
## Quickstart
```bash
# initialize config
eno init
# create a passphrase-protected note
eno new my-note
# create and open in editor immediately
eno new my-note -e
# create an SSH-authenticated note
eno new my-note --ssh
# decrypt and edit an existing note
eno edit my-note
```
## Usage
### `eno init`
Create default config at `~/.config/eno/eno.conf` (or `$XDG_CONFIG_HOME/eno/eno.conf`).
### `eno new <note>`
Create encrypted note. Note name defaults to `~/.EnoNotes/<note>.eno`. Use `-o` to specify custom output path.
Flags:
- `-o, --output` — output file path
- `-e, --edit` — open editor after creating
- `--ssh` — use SSH key for authentication instead of passphrase
### `eno edit <note>`
Decrypt note to temp file, open editor, re-encrypt on save. Temp file is securely wiped on exit.
### `eno encrypt <file>`
Encrypt any file with a passphrase. Output defaults to `<file>.eno`.
Flags:
- `-o, --output` — output file path
### `eno decrypt <file>`
Decrypt a `.eno` file. Output defaults to `<file>` (with `.eno` stripped).
Flags:
- `-o, --output` — output file path
### `eno ssh init`
Register an SSH key for note authentication. Writes key paths into config. Supports Ed25519 keys only with passphrase-protected private keys.
## Configuration
File: `~/.config/eno/eno.conf` (or `$XDG_CONFIG_HOME/eno/eno.conf`)
| Key | Default | Description |
|---|---|---|
| `EDITOR_STRING` | `$EDITOR %s` or `nvim %s` | Editor command template. `%s` is replaced with temp file path |
| `DATA_DIR` | `~/.EnoNotes` | Directory for encrypted notes |
| `SSH_INIT` | `false` | Whether SSH has been initialized |
| `DEFAULT_SSH_PRIV` | — | Path to default SSH private key |
| `DEFAULT_SSH_PUB` | — | Path to default SSH public key |
## File Format
Encrypted `.eno` files use a custom format:
```
<header-length>:<gob-encoded headers><ChaCha20-Poly1305 ciphertext>
```
- Header length is ASCII decimal, terminated by `:`
- Headers contain salt, nonce, auth type (passphrase or SSH), and per-recipient wrapped keys
- Ciphertext is encrypted with ChaCha20-Poly1305
## Cryptography
| Mode | Key Derivation | Cipher |
|---|---|---|
| Passphrase | Argon2id (1 pass, 2MB memory, 2 parallelism) | ChaCha20-Poly1305 |
| SSH | X25519 ECDH ephemeral key exchange per recipient | ChaCha20-Poly1305 |
SSH mode converts Ed25519 keys to X25519 for ECDH. A random 32-byte note key is encrypted per recipient.
## Build from source
```bash
go build -o eno ./cmd/eno
```
|