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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
# Eno
**Encrypted Notes, Oui.**
[View Better Docs](https://stigr.org/eno.html)
Eno is a Linux CLI tool for encrypted notes authenticated by your SSH key — no
cloud, no daemon, no extra passwords.
## Motivation
I wanted encrypted notes designed for linux. Not the gnupg all-in-one mess, nor
something as "javascripty" as Notesnook (*amazing tho*). Something for the
terminal. Something quite simple. Something that could be synced and backed up
using just git (TBD).
<!-- TODO: add terminal recording or GIF showing eno in action -->
## Quick Start
```bash
eno init
eno new my-note
eno new my-note -e
eno new my-note --ssh
eno edit my-note
```
## Install
Install Go if you don't have it:
```bash
# Arch Linux
sudo pacman -S go
# Fedora
sudo dnf install golang
# Debian / Ubuntu
sudo apt install golang
```
Then install eno:
```bash
go install gitlab.com/whiteboardguy/eno/cmd/eno@latest
```
## Usage
### `eno init`
Creates default config in `~/.config/eno/eno.conf` (`$XDG_CONFIG_HOME/eno/eno.conf`).
### `eno new <note>`
Creates encrypted note. Defaults to `~/.EnoNotes/<note>.eno`. Use `-o` for custom path.
| Flag | Description |
|---|---|
| `-o, --output` | Output file path |
| `-e, --edit` | Open editor after creating |
| `--ssh` | Use SSH key instead of passphrase |
### `eno edit <note>`
Decrypts, opens in editor, re-encrypts on save. Temp file securely wiped on exit.
### `eno encrypt <file>`
Encrypts any file with passphrase. Output defaults to `<file>.eno`.
| Flag | Description |
|---|---|
| `-o, --output` | Output file path |
### `eno decrypt <file>`
Decrypts `.eno` file. Output defaults to `<file>` (`.eno` stripped).
| Flag | Description |
|---|---|
| `-o, --output` | Output file path |
### `eno ssh init`
Registers SSH key for note auth. Writes key paths to config. Ed25519 only,
passphrase-protected private keys required.
## Configuration
`~/.config/eno/eno.conf` (`$XDG_CONFIG_HOME/eno/eno.conf`)
| Key | Default | Description |
|---|---|---|
| `EDITOR_STRING` | `$EDITOR %s` or `nvim %s` | Editor command template. `%s` replaced with temp file path |
| `DATA_DIR` | `~/.EnoNotes` | Encrypted notes directory |
| `SSH_INIT` | `false` | SSH initialized flag |
| `DEFAULT_SSH_PRIV` | — | Default SSH private key path |
| `DEFAULT_SSH_PUB` | — | Default SSH public key path |
## How It Works
```
<header-length>:<gob-encoded headers><ChaCha20-Poly1305 ciphertext>
```
- `header-length` — ASCII decimal, `:`-terminated
- Headers — salt, nonce, auth type (passphrase or SSH), per-recipient wrapped keys
- Ciphertext — ChaCha20-Poly1305 encrypted
| Mode | Key Derivation | Cipher |
|---|---|---|
| Passphrase | Argon2id (1 pass, 2MB memory, 2 parallelism) | ChaCha20-Poly1305 |
| SSH | X25519 ECDH ephemeral key exchange per recipient | ChaCha20-Poly1305 |
Ed25519 keys converted to X25519 for ECDH. 32-byte random note key encrypted
per recipient.
## Build from source
```bash
go build -o eno ./cmd/eno
```
|