Crates.io | safecloset |
lib.rs | safecloset |
version | 1.3.2 |
source | src |
created_at | 2021-08-22 15:29:48.274916 |
updated_at | 2023-11-11 18:31:32.388411 |
description | Secret Keeper |
homepage | |
repository | https://github.com/Canop/safecloset |
max_upload_size | |
id | 440731 |
size | 1,372,471 |
SafeCloset keeps your secrets in password protected files. SafeCloset is designed to be convenient and avoid common weaknesses like external editing or temporary files written on disk.
SafeCloset hasn't been independently audited and comes with absolutely no guarantee. And I can do nothing for you if you lose the secrets you stored in SafeCloset.
A closet is stored in a file that you can backup, keep with you on an USB key, etc.
A closet contains drawers, each one is found and open with its own password.
A drawer contains a list of (key, value). Values are texts in which you can store a code, a password, comments, a poem, some data, etc.
A drawer can also contain deeper crypted drawers.
--hide
option, and toggled with ctrlhThose screenshots are small, to fit here, but you may use SafeCloset full screen if you want.
Run
safecloset some/name.closet
Hit ? to go to the help screen, where you'll find the complete list of commands.
Hit esc to get back to the previous screen.
Hit ctrln
If you want, you can create a deeper drawer there, at any time, by hitting ctrln.
Or hit n to create a new entry, starting with its name then hitting tab to go fill its value.
Change the selection with the arrow keys. Go from input to input with the tab key. Or edit the currently selected field with a.
Reorder entries with ctrl🠕 and ctrl🠗.
In SafeCloset, when editing, searching, opening, etc., the enter key validates the operation while the esc key cancels or closes.
You may add newlines in values with ctrlenter or altenter:
You may notice the values are rendered as Markdown.
Don't hesitate to store hundreds of secrets in the same drawer as you'll easily find them with the fuzzy search.
Search with the / key:
When in the search input, remove the search with esc, freeze it with enter.
Hit ctrls to save, then ctrlq to quit.
The same command is used later on to open the closet again:
safecloset some/name.closet
It may be a good idea to define an alias so that you have your secrets easily available.
You could for example have this in you .bashrc
:
function xx {
safecloset -o ~/some/name.closet
}
The -o
argument makes safecloset immediately prompt for drawer password, so that you don't have to type ctrlo.
On opening, just type the password of the drawer you want to open (all will be tested until the right one opens):
The storage format is described to ensure it's possible to replace SafeCloset with another software if needed.
The closet file is a MessagePack encoded structure Closet
with the following fields:
comments
: a stringsalt
: a stringdrawers
: an array of ClosedDrawer
The MessagePack serialization preserves field names and allows future additions.
An instance of ClosedDrawer
is a structure with the following fields:
id
: a byte arraynonce
: a byte arraycontent
: a byte arrayThe content
is the AES-GCM-SIV encryption of the serializied drawer with the included nonce
.
The key used for this encryption is a 256 bits Argon2 hash of the password with the closet's salt.
The serialized drawer is a MessagePack encoded structure with the following fields:
id
: a byte arrayentries
: an array of Entry
settings
: an instance of DrawerSettings
closet
: a deeper closet, containing drawers, etc.garbage
: a random byte arrayInstances of Entry
contain the following fields:
name
: a stringvalue
: a stringInstances of DrawerSettings
contain the following fields:
hide_values
: a booleanopen_all_values
: a boolean (optional, false if not present)