deadbolt-cli 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +209 -0
- package/dist/deadbolt-cli.js +3 -0
- package/package.json +247 -0
- package/scripts/postinstall.js +20 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Aaron Lichtman
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# deadbolt
|
|
2
|
+
|
|
3
|
+
<img src="img/deadbolt-header.png" />
|
|
4
|
+
|
|
5
|
+
`deadbolt` simplifies encrypting and decrypting files. All you need is a password. Works on any laptop / desktop that you do.
|
|
6
|
+
|
|
7
|
+
You can download `deadbolt` for **macOS**, **Windows**, or **Linux**. Any encrypted file can be shared across these platforms.
|
|
8
|
+
|
|
9
|
+
## Quickstart
|
|
10
|
+
|
|
11
|
+
### GUI
|
|
12
|
+
|
|
13
|
+
Download the desktop app from the [releases tab](https://github.com/alichtman/deadbolt/releases) or see the [installation section](#building--installing) below for platform-specific instructions.
|
|
14
|
+
|
|
15
|
+
Select a file (or folder) to encrypt, enter a password, and … that's it. Decryption is just as easy.
|
|
16
|
+
|
|
17
|
+
### CLI
|
|
18
|
+
|
|
19
|
+
`deadbolt` includes a command-line interface for encrypting and decrypting files without the GUI. If you don't provide a password, you'll be prompted to enter it securely.
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
$ git clone https://github.com/alichtman/deadbolt.git && cd deadbolt
|
|
23
|
+
$ npm run install:cli
|
|
24
|
+
|
|
25
|
+
# Encrypt a file or folder
|
|
26
|
+
$ deadbolt encrypt secret.pdf
|
|
27
|
+
|
|
28
|
+
# Decrypt a file
|
|
29
|
+
$ deadbolt decrypt secret.pdf.deadbolt
|
|
30
|
+
|
|
31
|
+
# Provide password directly (warning: may be logged in shell history)
|
|
32
|
+
$ deadbolt encrypt secret.pdf --password "my-secure-password"
|
|
33
|
+
$ deadbolt decrypt secret.pdf.deadbolt --password "my-secure-password"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
## Building / Installing
|
|
37
|
+
|
|
38
|
+
Check out the [releases tab](https://github.com/alichtman/deadbolt/releases) for pre-built binaries for Mac, Windows, and Linux.
|
|
39
|
+
|
|
40
|
+
### `npm`
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
$ npm install -g deadbolt
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### `macOS`
|
|
48
|
+
|
|
49
|
+
#### Recommended: Installing with Homebrew
|
|
50
|
+
|
|
51
|
+
The recommended way to install `deadbolt` on `macOS` is with [Homebrew](https://brew.sh), which uses [this recipe](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/d/deadbolt.rb):
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# Install Homebrew
|
|
55
|
+
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
56
|
+
|
|
57
|
+
# Install deadbolt, using homebrew
|
|
58
|
+
$ brew install deadbolt --cask
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
When you open the app, you'll receive a Gatekeeper warning about the app not being verified as malware-free.
|
|
62
|
+
|
|
63
|
+
<img src="img/not-opened-warning-macos.png" />
|
|
64
|
+
|
|
65
|
+
This is because the app is not signed/notarized, since I do not have an Apple Developer account. You can bypass this warning by running:
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
$ xattr -c /Applications/Deadbolt.app
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Or, go to `System Preferences > Security & Privacy > General` and click "Open Anyway".
|
|
72
|
+
|
|
73
|
+
<img src="img/security-privacy-apple-settings.png" />
|
|
74
|
+
|
|
75
|
+
#### Using `.dmg` from GitHub Releases
|
|
76
|
+
|
|
77
|
+
Install the `deadbolt.dmg` file from [GitHub Releases](https://github.com/alichtman/deadbolt/releases). There are builds for both `x86_64` (Intel) and `arm64` (Apple Silicon -- M1, M2, etc.) CPU architectures.
|
|
78
|
+
|
|
79
|
+
After downloading:
|
|
80
|
+
|
|
81
|
+
1. Double-click the `.dmg` file to mount it
|
|
82
|
+
2. Drag the `Deadbolt` app to your `Applications` folder
|
|
83
|
+
3. Unquarantine the app by running:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
$ xattr -c /Applications/Deadbolt.app
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Windows
|
|
90
|
+
|
|
91
|
+
Download an `.exe` file, or installer, from [GitHub Releases](https://github.com/alichtman/deadbolt/releases).
|
|
92
|
+
|
|
93
|
+
### Linux
|
|
94
|
+
|
|
95
|
+
`AppImage` and `flatpak` packages are available for Linux. `AppImages` can run on all major Linux desktop distributions, and `flatpak` packages are provided as another option. Auto-updates are not supported for Linux currently.
|
|
96
|
+
|
|
97
|
+
<!-- TODO: Add reference to flathub once I get that published [Flathub](https://flathub.org/apps/details/org.alichtman.deadbolt)-->
|
|
98
|
+
|
|
99
|
+
#### Building and installing `flatpak` package from source
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
$ git clone https://github.com/alichtman/deadbolt.git && cd deadbolt
|
|
103
|
+
|
|
104
|
+
deadbolt on main is 📦 v2.0.0-beta via node v22.11.0 took 0s
|
|
105
|
+
$ npm install
|
|
106
|
+
|
|
107
|
+
deadbolt on main is 📦 v2.0.0-beta via node v22.11.0 took 0s
|
|
108
|
+
$ npm run package:linux-flatpak
|
|
109
|
+
|
|
110
|
+
deadbolt on main is 📦 v2.0.0-beta via node v22.11.0
|
|
111
|
+
$ ls -la release/build/
|
|
112
|
+
...
|
|
113
|
+
.rw-r--r--. alichtman alichtman 75 MB Sat Feb 8 21:42:00 2025 Deadbolt-2.0.0-beta.x86_64.flatpak
|
|
114
|
+
|
|
115
|
+
deadbolt on main is 📦 v2.0.0-beta via node v22.11.0 took 0s
|
|
116
|
+
$ flatpak install --user release/build/Deadbolt-2.0.0-beta.x86_64.flatpak
|
|
117
|
+
|
|
118
|
+
org.alichtman.deadbolt permissions:
|
|
119
|
+
ipc wayland x11 dri file access [1]
|
|
120
|
+
|
|
121
|
+
[1] home
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
ID Branch Op Remote Download
|
|
125
|
+
1. [✓] org.alichtman.deadbolt master i deadbolt-origin 0 bytes
|
|
126
|
+
|
|
127
|
+
Installation complete.
|
|
128
|
+
|
|
129
|
+
deadbolt on main is 📦 v2.0.0-beta via node v22.11.0 took 7s
|
|
130
|
+
$ flatpak run org.alichtman.deadbolt
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
#### Arch Linux
|
|
134
|
+
|
|
135
|
+
`deadbolt` is [packaged as `deadbolt-bin` on `aur`](https://aur.archlinux.org/packages/deadbolt-bin). I do not maintain this package.
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
$ yay -S deadbolt-bin
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## How it Works
|
|
142
|
+
|
|
143
|
+
### Non-Technical Version
|
|
144
|
+
|
|
145
|
+
`deadbolt` uses proven, secure password hashing and data encryption algorithms to make sure your files stay private.
|
|
146
|
+
|
|
147
|
+
### Technical Version
|
|
148
|
+
|
|
149
|
+
`deadbolt` is built on Electron and uses `crypto.js` from the `node.js` standard library as well as the [`@node-rs/argon2` library](https://www.npmjs.com/package/@node-rs/argon2). `AES-256-GCM` is used as an encryption protocol, and `argon2id` is used as a password hashing function. The integrity of all encrypted data is verified with the authentication tag provided by AES-GCM mode.
|
|
150
|
+
|
|
151
|
+
> NOTE
|
|
152
|
+
> Starting in `deadbolt v2.1.0-alpha`, the password-based key derivation function (PBKDF) changed from `pbkdf2-sha512` to `argon2id`. All newly encrypted files will benefit from the security upgrade.
|
|
153
|
+
|
|
154
|
+
### Deadbolt File Formats
|
|
155
|
+
|
|
156
|
+
Encrypted files include a version header (starting with `DEADBOLT_V002` -- if it's missing, it's V1) at the beginning of the file, allowing for cryptographic improvements while maintaining backwards compatibility.
|
|
157
|
+
|
|
158
|
+
**V002 Format (Current)**
|
|
159
|
+
- **Password Hashing Algorithm**: `argon2id`
|
|
160
|
+
- **Parameters**: [RFC 9106 FIRST recommendation](https://datatracker.ietf.org/doc/rfc9106/) (see Section 7.4: Parameter Choice)
|
|
161
|
+
- Memory cost: 2 GiB (2,097,152 KiB)
|
|
162
|
+
- Time cost: 1 iteration
|
|
163
|
+
- Parallelism: 4 lanes
|
|
164
|
+
- **Salt**: 128-bit (16-byte) randomly generated
|
|
165
|
+
- **Output**: 256-bit (32-byte) key for AES-256-GCM
|
|
166
|
+
|
|
167
|
+
**V001 Format (Legacy)**
|
|
168
|
+
- **Password Hashing Algorithm**: `PBKDF2-SHA512`
|
|
169
|
+
- **Parameters**:
|
|
170
|
+
- Iterations: 10,000
|
|
171
|
+
- HMAC digest: SHA-512
|
|
172
|
+
- **Salt**: 512-bit (64-byte) randomly generated
|
|
173
|
+
- **Output**: 256-bit (32-byte) key for AES-256-GCM
|
|
174
|
+
- **Version Header**: None (no `DEADBOLT_V` prefix)
|
|
175
|
+
- **Maintained for backwards compatibility** - V001 files can still be decrypted, but users are encouraged to re-encrypt with V002 for improved security
|
|
176
|
+
|
|
177
|
+
## Security Review
|
|
178
|
+
|
|
179
|
+
The cryptography components of `deadbolt` were written by an ex-Facebook Security Engineer ([@alichtman](https://github.com/alichtman) -- me), and have been briefly reviewed by [Vlad Ionescu](https://github.com/vladionescu), an ex-Facebook Red Team / Offensive Security Group tech lead. Their review is:
|
|
180
|
+
|
|
181
|
+
> "yeah fuck it, it's fine. You're using very boring methods for everything -- that's the way to do it"
|
|
182
|
+
|
|
183
|
+
## FAQ
|
|
184
|
+
|
|
185
|
+
### Showing Extensions on `macOS`
|
|
186
|
+
|
|
187
|
+
By default, `macOS` hides file extensions. To reduce confusion about what type each file is, I recommend configuring `macOS` to show file extensions. You can do that with the following command: `$ defaults write NSGlobalDomain AppleShowAllExtensions -bool true && killall Finder`.
|
|
188
|
+
|
|
189
|
+
### Setting `deadbolt` as Default App for `.deadbolt` Files on macOS
|
|
190
|
+
|
|
191
|
+
You can set this app as the default app for `.deadbolt` files, which means you'll be able to double-click on `.deadbolt` files to open them with `deadbolt` for decryption.
|
|
192
|
+
|
|
193
|
+
You can set this up the first time you double-click on a `.deadbolt` file, or by right-clicking on a `.deadbolt` file, selecting `Get Info` and changing the default app in the `Open With:` section.
|
|
194
|
+
|
|
195
|
+
To do this programmatically, run the following snippet:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
$ brew install duti
|
|
199
|
+
$ duti -s org.alichtman.deadbolt dyn.ah62d4rv4ge80k2xtrv4a all
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
The output of `$ duti -x deadbolt` should then be:
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
$ duti -x deadbolt
|
|
206
|
+
Deadbolt.app
|
|
207
|
+
/Applications/Deadbolt.app
|
|
208
|
+
org.alichtman.deadbolt
|
|
209
|
+
```
|