Encrypted folders
Keep files nobody else should see in a folder locked with a password. A locked folder is one file (NAME.zcrypt); without the password nobody can read what is inside.
What it is
Like a drawer inside a safe. Open the drawer (the encrypted folder) and use its files as usual; close it and it is locked again. While it is locked, the disk holds only unreadable bytes.
What to do now: in Files, choose File › New Encrypted Folder….
How to use it
- Make one — Files › File › New Encrypted Folder…: a name and a password (8 characters or more), twice. The new folder opens at once.
- Write down the recovery key — when it is made, a recovery key (13 groups of 4 characters) is shown once. Write it on paper and keep it away from the computer. If the password is forgotten, only this opens the folder.
- Put files in — drag or save files into the open folder (in the sidebar, under Encrypted).
- Lock it — right-click its row in the sidebar › Lock. Log out, restart, shut down and quitting the Mac app lock it by themselves.
- Open it again — double-click
NAME.zcryptin Files and type the password.
Opening with a vault entry: in the Terminal, cryptfolder vault-add NAME.zcrypt ENTRY lets that vault entry's password open it too. Files then asks the vault first (an allow sheet the first time) and the password only if that fails.
How it works
- Making the folder makes one random key (256 bits) that encrypts its files.
- That key is kept wrapped in key slots — by your password (Argon2id, 64 MB and 3 passes: slow on purpose, so guessing is hard), by the recovery key, and (if chosen) by a vault entry's password. So changing the password does not change the files' key.
- Unlocked, the files are in
/tmp/cryptfolder-NUMBER/NAME./tmplives in memory only and is never saved to the disk. - Locking writes the whole new image as
NAME.zcrypt.newfirst and only then swaps it for the old one. If the power goes in between, the old image is untouched. Then the unlocked files are overwritten with zeros and removed. - If even one byte of the image is changed or it is cut short, it does not open (nothing is unlocked).
Technical details
- Command:
cryptfolder create|unlock|lock|status|info|passwd|recovery|vault-add|vault-remove(--help). - Format: a header (up to 8 key slots, HMAC-SHA256) + XChaCha20-Poly1305 64 KiB chunks (chunk number and last-chunk flag in the nonce, the header MAC as AD). All primitives are the vendored Monocypher / zcrypto ones.
- While it is open the folder's key sits in the same
/tmpplace (0600) so it can be locked without the password. While it is open, programs of the same user can read the folder — lock it when done. - Contract:
docs/contracts/CRYPTFOLDER.md.
Common questions
- Lost both the password and the recovery key? Nobody can open it — not us either.
- Change the password?
cryptfolder passwd NAME.zcrypt(the old password, or--recovery-file). - The recovery key leaked?
cryptfolder recovery NAME.zcrypt— a new key; the old one stops working. - Move it to another computer? Copy the one file
NAME.zcrypt.
NanumOS 0.1.8349 · 2026-11-16