Start free

← All downloads

Download · seif

seif — a vault for your data that only you can open

Contracts, accounting, client documents, source code, database backups: seif keeps them in an encrypted vault on your server. Open, the vault is a folder you work in. Closed, it is a single file nobody can read without your password — not someone who takes the disk, not someone who copies the server, not the hosting company.

Download for free How secure is it?

  • 8+ yearsused since May 2018 by companies and entrepreneurs
  • LUKS2the standard disk encryption of Linux, with AES-256
  • Closes itselfwhen the server shuts down or restarts
  • One commandto move everything to another server

The approach behind seif — data kept in encrypted LUKS disk images that close themselves and move between servers — is the one its author, Sergiu Gordienco, has put in place for the clients and companies he advised on information security over 17 years. Now he makes it free for everyone, as a contribution to everyone’s information security.

Version
1.0.0
First version
3 May 2018
Runs on
Linux servers (x86_64, ARM64)
License
free to use, closed source
Author
Sergiu Gordienco
Distributed by
SGApps Labs SRL

Why seif

Most data leaks do not need a hacker of genius: a stolen laptop or disk, a backup copied to the wrong place, an old server sold or returned with the data still on it. seif closes these doors.

A disk or server ends up in other hands

Stolen, lost, sent for repair or returned to the provider: a closed vault is only unreadable bytes.

Backups travel

The vault is copied as it is, encrypted: on a stick, another server or in the cloud, the copy stays locked.

Someone else’s hardware

On a rented server, the provider sees the disk, not what is in your closed vault.

Shutdowns and power cuts

When the server shuts down or restarts, including on a UPS command, seif closes every vault by itself.

Moving in a hurry

Server failing, provider ending the contract? One command installs seif on a new server and moves the vault there, by its owner.

Your data does not depend on one place

Your personal data, too

Identity documents, contracts, medical papers, photos, family archives, passwords: anyone who keeps personal data on a Linux computer or on a small rented server can keep it in a vault, so a lost device or a leaked copy shows nothing.

Rented servers (VPS), without fear

The provider holds only an encrypted file. Keep copies on servers with different providers or in different countries: if one server or one provider is gone, your data is not.

Leave with empty pockets

No laptop, no stick, nothing to lose or to hand over at a border: the data stays encrypted on your servers, and with your password you open it from anywhere in the world.

When things change overnight

Conflicts, pressure on a company or on its founders, a forced move: one command moves the vault to another server, and whoever takes a disk or a server gets only an encrypted file. For holdings, the group’s key documents stay outside any single office or country.

Good for: small companies and accounting firms, developers and agencies, anyone who keeps client data on a Linux server — and every person who has personal data and wants to keep it safe.

How it works

  1. 1Create

    A vault is one file. You choose its maximum size; on the disk it takes only what you write into it.

  2. 2Open

    With your password the vault appears as a normal folder. Programs work with it like with any folder.

  3. 3Close

    Closed, it is again a file nobody can read. It closes by itself when the server shuts down.

  4. 4Copy or move

    Back it up to a disk or another server, with dated copies, or move it to a new server with one command.

Everything it does

  • As many vaults as you want on any Linux computer or server — seif sets no limit, only the disk space does — each with its own file, folder and passwords.
  • Up to 32 passwords per vault, each with a name; any one of them opens it. A key file opens it without typing, for automatic opening.
  • Backups to a disk or to another server over SSH, with dated copies; the vault is closed for the copy and opened again after it.
  • Moves a vault to a new server: installs seif there and copies the vault.
  • Keeps a complete copy of a git project inside the vault.
  • A vault takes on disk only what you write into it, and can be made larger later.
  • Closes every vault when the server shuts down or restarts, including a shutdown ordered by a UPS.
  • A copy of the vault header, to keep offline: without it, damage to the first megabytes of the file would lose the data.

For the technical team

  • Encryption: LUKS2 (cryptsetup), AES-256 in XTS mode by default.
  • Passwords: Argon2id, by default about 2 seconds and 1 GB of memory for every attempt.
  • Inside the vault: ext4 with full data journaling, to stand up to sudden power loss.
  • Copies with rsync, over SSH with your own keys; at the destination the copy takes only the space the data uses, not the vault’s maximum size.

How secure

With a good password, practically impossible to break

seif uses Argon2id, the default of LUKS2: every password guess costs about 2 seconds of work and 1 GB of memory. An ordinary computer tests about one password per second; a whole data centre, about ten thousand. This is how long breaking a password chosen at random would take, on average:

PasswordOne computerA whole data centre
8 lowercase letters kqtvmzra too weak3,300 years4 months
8 mixed characters K7#q!m2Z100 million years10,000 years
12 mixed characters8.6·10¹⁵ years860 billion years
4 words salt-tractor-moon-tea58 million years5,800 years
5 words recommended450 billion years45 million years
6 words recommended3.5·10¹⁵ years350 billion years

For comparison, the universe is about 14 billion years old.

What matters is “at random”: words drawn from a list of 7,776 (the diceware method, for example with dice). Password crackers start with dictionaries and billions of leaked passwords and their variations (Password2024!, a name with a year): a 16-character password a person made up can fall in minutes.

Beyond about 6–7 random words nothing more is gained: the weakest link is then the vault’s own encryption key, which cannot be broken either. 5–6 random words are the best choice: practically unbreakable and easy to remember.

On servers with little memory, create vaults on a machine with at least 2–4 GB of RAM: with less, cryptsetup may use less memory per guess, which makes breaking cheaper.

What encryption does not do: while a vault is open, it is a normal folder for anyone who is logged in on that server. Close it when you do not need it.

The same explanation is in the program: seif about.

Want to check the code yourself? The source of seif is available for review on request — see Trust and license.

Secure deployments

Production that opens only when your key server says so

The same vault can hold the code and data of a production server. The server holds no key: after every restart its vault stays locked until a second server — the key server, ideally with another provider or in another country — checks it and opens it over SSH. A disk, a snapshot or a whole server taken away is only an encrypted file.

Key servercron every minuteholds the keyProduction servervault app.imglocked until step 3the app (web service)1 · is the site up?2 · SSH up?3 · key → open vault4 · start the app
  1. Every minute, the key server checks the site (HTTPS). If it answers, nothing happens.
  2. If the site does not answer, it checks whether the server is reachable over SSH. If not, it waits.
  3. Server up but site down (after a restart, for example): it sends the key over SSH; seif opens the vault. The key never touches the production disk.
  4. It starts the app, which runs from the open vault.

On the key server: the check, run every minute by cron

#!/bin/bash
# /usr/local/bin/seif-unlock-prod — on the KEY server; cron runs it every minute:
#   /etc/cron.d/seif-unlock:  * * * * * root /usr/local/bin/seif-unlock-prod
# once, as root: ssh-copy-id deploy@prod.example.com   (and accept its host key)
set -euo pipefail
exec 9>/run/lock/seif-unlock-prod.lock; flock -n 9 || exit 0   # one run at a time

HOST=deploy@prod.example.com            # production server (SSH key of this server)
HEALTH=https://app.example.com/health   # answers 200 while the app runs
KEY=/srv/keys/prod-app.key              # vault key; it never leaves this server as a file
SSH="ssh -o BatchMode=yes -o ConnectTimeout=10"

curl -fsS --max-time 10 -o /dev/null "$HEALTH" && exit 0   # 1. site up: nothing to do
$SSH "$HOST" true || exit 0                                # 2. server unreachable: wait

logger -t seif-unlock "site down, server up: opening the vault"
$SSH "$HOST" "sudo /usr/local/bin/seif -s app open --key-file -" < "$KEY"   # 3. key over SSH (stdin)
$SSH "$HOST" "sudo /usr/bin/systemctl start app"                            # 4. start the app

On the production server: one-time setup

# 1. a vault for the app; its folder is /mnt/seif-app
seif -s app init 50G

# 2. a key for the key server: create it, copy it there, delete it here
seif -s app genkey /root/app.key key-server
scp /root/app.key root@keys.example.net:/srv/keys/prod-app.key && shred -u /root/app.key

# 3. a user for the key server (its SSH public key goes in ~deploy/.ssh/authorized_keys);
#    it may run exactly these two commands, nothing else
useradd -m deploy
echo 'deploy ALL=(root) NOPASSWD: /usr/local/bin/seif -s app open --key-file -, /usr/bin/systemctl start app' \
  > /etc/sudoers.d/seif-deploy && chmod 440 /etc/sudoers.d/seif-deploy

# 4. the app starts only from an open vault (in /etc/systemd/system/app.service, [Unit]):
#      ConditionPathIsMountPoint=/mnt/seif-app
#    and is not started at boot by itself:
systemctl disable app

What you gain

  • Nothing on the production server can open the vault by itself: no key on disk, no password in a file.
  • A stolen disk, a provider snapshot or a seized server holds only an encrypted file.
  • After a restart, production comes back by itself, in about a minute, without anyone typing a password.
  • Stop the key server (or remove its key with seif delkey) and production stays locked at its next restart.
  • The key server needs no open ports: it only connects out, so it is hard to find and reach.

What it does not cover: while the app runs, its data is open on that server — someone who already has root there can read it. The scheme protects the server while it is off, restarted or taken away, and keeps the key elsewhere.

SGApps Labs sets up such deployments for companies: key server, health checks, copies on several servers, the emergency move. Write to us: contact@sgapps.io.

Download and install

Files

Linux x86_64

Ubuntu, Debian, Fedora, RHEL and most distributions

Version 1.0.0 · 78 KB

Download
Check the file
SHA-256
1f5942db63d763b81ca2824a732e1ec25405c138e60b444c0538c0b04c7ede2b

sha256sum <file> must print exactly this value, the same as in the signed list of files.

Linux ARM64

Ubuntu, Debian, Fedora, RHEL and most distributions

Version 1.0.0 · 74 KB

Download
Check the file
SHA-256
bea19d521aa414e0254d99b15ef333128aa988d8fca4b3574b12d7ebe81a6dee

sha256sum <file> must print exactly this value, the same as in the signed list of files.

Linux x86_64 — Alpine (musl)

Alpine Linux and other musl-based systems

Version 1.0.0 · 77 KB

Download
Check the file
SHA-256
58dd6c569310e2d67084b61a4e7ab1253a53e1ee8a20dc00c1215bba36e8f1bd

sha256sum <file> must print exactly this value, the same as in the signed list of files.

Linux ARM64 — Alpine (musl)

Alpine Linux and other musl-based systems

Version 1.0.0 · 125 KB

Download
Check the file
SHA-256
67af9251e23493702b0541b3b736ade3c3d985820fea2434ac0ef575388a7b8c

sha256sum <file> must print exactly this value, the same as in the signed list of files.

Install

You need a Linux server with bash and root access (sudo). uname -m tells you which file to take: x86_64, or aarch64 for ARM64.

  1. Make the downloaded file executable and install it; seif install also installs what it needs (cryptsetup, rsync, git, e2fsprogs).
    chmod +x seif-linux-x86_64-glibc.bin
    sudo ./seif-linux-x86_64-glibc.bin install
  2. Create a vault of at most 20 GB: it asks for the new password and opens the vault in the folder /mnt/seif.
    seif init 20G
  3. Save a copy of the header, move it to a stick or an offline computer and delete it from the server.
    seif header
  4. Close the vault when you are done; open it again when you need it.
    seif close
    seif open
  5. Help for every command.
    seif help
    seif help backup

On Alpine Linux, install bash first: apk add bash.

Several vaults

Keep as many vaults as you want on the same computer or server: seif sets no limit, only the disk space does. Each vault has its own file, folder and passwords — for example one for accounting, one for code, one for personal documents. Add -s NAME to any command to work on that vault.

# three vaults, each with its own file, folder and passwords
seif -s accounting init 10G             # /srv/vault/accounting.img -> /mnt/seif-accounting
seif -s code init 30G                   # /srv/vault/code.img -> /mnt/seif-code
seif -s personal init 5G                # /srv/vault/personal.img -> /mnt/seif-personal

seif list                               # every vault: size, space on disk, open or closed
seif -s code close                      # close one vault
seif -s code open                       # open it again
seif -s accounting addkey anna          # another password, named "anna", only for this vault
seif -s accounting backup /media/stick  # a copy of one vault, plus a dated copy
seif copy code code-2026                # a new vault with the same data and passwords
seif close-all                          # close every vault at once

Before you trust it with data

Nobody can recover the data of a vault without a password (or key file) and its header, not the author either. Keep the passwords and a copy of the header (seif header) in a safe place, away from the server.

Trust and license

Why you can trust it

seif is free to use, and only its author can change it. Every version is signed by him, so a file someone else has altered is recognised at once.

  • No hidden functions: seif does only what this page describes — it creates, opens, closes and copies your vaults.
  • It sends nothing anywhere: your data and passwords stay with you. It connects only to the servers you name yourself, for copies and moves.
  • Nobody can open your vault for you, not the author either: there is no master key and no back door.

List of files (text) License

The list of files signed electronically by the author (PDF) is available on request, together with the source code review: contact@sgapps.io.

Source code review, on request

Companies and corporations can review the source code of seif on request, to see for themselves how it works and that it has no hidden ways in. The code you receive is exactly the one of the published version. For clients of the information security consulting services of SGApps Labs SRL, the review is included. Write to us: contact@sgapps.io.

License

Free to use, for personal or professional purposes, on any number of computers and servers. Not allowed without the author’s written consent: changing or decompiling it, and redistributing it — send people to this page instead. Provided as is, without warranty.

Questions, or help to set it up in your company? Write to us: contact@sgapps.io.

Free discovery · 20 minutes

20 minutes to look at your scenario — we evaluate fit, timeline, risks. No pressure, no mandatory demos. Write or call.

All contact details →