Latest Version Chat on Miaou

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 documentation

Warning

SafeCloset hasn't been independently audited yet and comes with absolutely no guarantee. And I can do nothing for you if you lose the secrets you stored in SafeCloset.

Overview

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.

clear drawer

Features

Non features

TODO

Usage

Those screenshots are small, to fit here, but you may use SafeCloset full screen if you want.

Create your closet file

Run

bash safecloset some/name.closet

new closet

Have a glance at the help

Hit ? to go to the help screen, where you'll find the complete list of commands.

help

Hit esc to get back to the previous screen.

Create your first drawer

Hit ctrln

drawer creation

new drawer

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.

typing entry

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:

multiline

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:

search

When in the search input, remove the search with esc, freeze it with enter.

Save

Hit ctrls to save, or ctrlx to save and quit.

Reopen

The same command is used later on to open the closet again:

bash 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:

bash 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):

drawer opening

Storage format

The closet file is a MessagePack encoded structure Closet with the following fields:

The MessagePack serialization preserves field names and allows future additions.

An instance of ClosedDrawer is a structure with the following fields:

The 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:

Instances of Entry contain the following fields:

Instances of DrawerSettings contain for now just one optional field: