2014-04-15 10:56:00 +00:00
|
|
|
..... ..
|
|
|
|
.H8888888h. ~-. . uW8"
|
|
|
|
888888888888x `> u. .. . : `t888
|
|
|
|
X~ `?888888hx~ ...ue888b .888: x888 x888. 8888 .
|
|
|
|
' x8.^"*88*" 888R Y888r ~`8888~'888X`?888f` 9888.z88N
|
|
|
|
`-:- X8888x 888R I888> X888 888X '888> 9888 888E
|
|
|
|
488888> 888R I888> X888 888X '888> 9888 888E
|
|
|
|
.. `"88* 888R I888> X888 888X '888> 9888 888E
|
|
|
|
x88888nX" . u8888cJ888 X888 888X '888> 9888 888E
|
|
|
|
!"*8888888n.. : "*888*P" "*88%""*88" '888!` .8888 888"
|
|
|
|
' "*88888888* 'Y" `~ " `"` `%888*%"
|
|
|
|
^"***"` "`
|
2010-08-22 13:04:19 +00:00
|
|
|
|
2014-08-29 21:23:08 +00:00
|
|
|
*A minimalistic commandline tool to manage encrypted volumes* aka **The Crypto Undertaker**
|
2010-08-23 19:28:09 +00:00
|
|
|
|
2014-11-16 14:18:11 +00:00
|
|
|
![](https://github.com/dyne/Tomb/blob/master/extras/images/monmort.png)
|
|
|
|
|
2014-11-16 12:55:51 +00:00
|
|
|
Latest stable version: **2.0**
|
2011-01-30 22:25:01 +00:00
|
|
|
|
2014-11-16 12:55:51 +00:00
|
|
|
Updates on website: https://www.dyne.org/software/tomb
|
2014-04-15 10:56:00 +00:00
|
|
|
|
2014-08-29 21:23:08 +00:00
|
|
|
Get the stable .tar.gz signed release for production use!
|
|
|
|
Download it from https://files.dyne.org/tomb
|
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
# What is Tomb, the crypto undertaker?
|
2010-08-22 13:04:19 +00:00
|
|
|
|
2010-08-23 13:10:57 +00:00
|
|
|
Tomb aims to be a free and open source system for easy encryption and
|
|
|
|
backup of personal files, written in code that is easy to review and
|
2013-05-25 14:29:19 +00:00
|
|
|
links shared GNU/Linux components.
|
2010-08-22 13:04:19 +00:00
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
At present, Tomb consists of a simple shell script (Zsh) using
|
2010-08-25 18:18:15 +00:00
|
|
|
standard filesystem tools (GNU) and the cryptographic API of the Linux
|
2013-05-25 14:29:19 +00:00
|
|
|
kernel (cryptsetup and LUKS). Tomb can also produce machine parsable
|
|
|
|
output to facilitate its use inside graphical applications.
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
# How does it work?
|
2014-04-15 10:56:00 +00:00
|
|
|
|
2014-11-16 14:18:11 +00:00
|
|
|
To create a Tomb, do:
|
|
|
|
```
|
|
|
|
$ tomb dig -s 100 secret.tomb
|
|
|
|
$ tomb forge secret.tomb.key
|
|
|
|
$ tomb lock secret.tomb -k secret.tomb.key
|
|
|
|
```
|
|
|
|
To open it, do
|
|
|
|
```
|
|
|
|
$ tomb open secret.tomb -k secret.tomb.key
|
|
|
|
```
|
|
|
|
and after you are done
|
|
|
|
```
|
|
|
|
$ tomb close
|
|
|
|
```
|
|
|
|
or if you are in a hurry
|
|
|
|
```
|
|
|
|
$ tomb slam all
|
|
|
|
```
|
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
For the instructions on how to get started using Tomb, see [INSTALL](INSTALL.md).
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-11-16 14:18:11 +00:00
|
|
|
```
|
|
|
|
Syntax: tomb [options] command [arguments]
|
|
|
|
|
|
|
|
Commands:
|
|
|
|
|
|
|
|
// Creation:
|
|
|
|
dig create a new empty TOMB file of size -s in MB
|
|
|
|
forge create a new KEY file and set its password
|
|
|
|
lock installs a lock on a TOMB to use it with KEY
|
|
|
|
|
|
|
|
// Operations on tombs:
|
|
|
|
open open an existing TOMB
|
|
|
|
index update the search indexes of tombs
|
|
|
|
search looks for filenames matching text patterns
|
|
|
|
list list of open TOMBs and information on them
|
|
|
|
close close a specific TOMB (or 'all')
|
|
|
|
slam slam a TOMB killing all programs using it
|
|
|
|
resize resize a TOMB to a new size -s (can only grow)
|
|
|
|
|
|
|
|
// Operations on keys:
|
|
|
|
passwd change the password of a KEY (needs old pass)
|
|
|
|
setkey change the KEY locking a TOMB (needs old key and pass)
|
|
|
|
|
|
|
|
// Backup on paper:
|
|
|
|
engrave makes a QR code of a KEY to be saved on paper
|
|
|
|
|
|
|
|
// Steganography:
|
|
|
|
bury hide a KEY inside a JPEG image (for use with -k)
|
|
|
|
exhume extract a KEY from a JPEG image (prints to stout)
|
|
|
|
|
|
|
|
Options:
|
|
|
|
|
|
|
|
-s size of the tomb file when creating/resizing one (in MB)
|
|
|
|
-k path to the key to be used ('-k -' to read from stdin)
|
|
|
|
-n don't process the hooks found in tomb
|
|
|
|
-o mount options used to open (default: rw,noatime,nodev)
|
|
|
|
-f force operation (i.e. even if swap is active)
|
|
|
|
--kdf generate passwords armored against dictionary attacks
|
|
|
|
|
|
|
|
-h print this help
|
|
|
|
-v print version, license and list of available ciphers
|
|
|
|
-q run quietly without printing informations
|
|
|
|
-D print debugging information at runtime
|
|
|
|
```
|
|
|
|
|
2014-11-16 15:16:25 +00:00
|
|
|
# What is this for, exactly?
|
2014-11-16 14:18:11 +00:00
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
This tool can be used to dig .tomb files (LUKS volumes), forge keys
|
2013-05-25 14:29:19 +00:00
|
|
|
protected by a password (GnuPG symmetric encryption) and use the keys
|
|
|
|
to lock the tombs. Tombs are like single files whose contents are
|
2014-09-23 09:57:15 +00:00
|
|
|
inaccessible in the absence of the key they were locked with and its
|
2013-05-25 14:29:19 +00:00
|
|
|
password.
|
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
Once open, the tombs are just like normal folders and can contain
|
2013-05-25 14:29:19 +00:00
|
|
|
different files, plus they offer advanced functionalities like bind
|
|
|
|
and execution hooks and fast search, or they can be slammed close even
|
2014-09-23 09:57:15 +00:00
|
|
|
if busy. Keys can be stored on separate media like USB sticks, NFC, or
|
2013-05-25 14:29:19 +00:00
|
|
|
bluetooth devices to make the transport of data safer: one always
|
|
|
|
needs both the tomb and the key, plus its password, to access it.
|
|
|
|
|
2014-11-16 15:16:25 +00:00
|
|
|
The tomb script takes care of several details to improve user's
|
|
|
|
behaviour and the security of tombs in everyday usage: secures the
|
|
|
|
typing of passwords from keyloggers, facilitates hiding keys inside
|
|
|
|
images, indexes and search a tomb's contents, lists open tombs and
|
|
|
|
selectively closes them, warns the user about free space and last time
|
|
|
|
usage, etc.
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
# How secure is this?
|
2013-05-28 10:53:26 +00:00
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
Death is the only sure thing in life. That said, Tomb is a pretty
|
2014-11-16 15:16:25 +00:00
|
|
|
secure tool especially because it is kept minimal, its source is
|
|
|
|
always open, and its code is easy to review with a bit of shell script
|
2013-05-28 10:53:26 +00:00
|
|
|
knowledge.
|
|
|
|
|
|
|
|
All encryption tools being used in Tomb are included as default in
|
|
|
|
many GNU/Linux operating systems and therefore are regularly peer
|
|
|
|
reviewed: we don't add anything else to them really, just a layer of
|
|
|
|
usability.
|
|
|
|
|
2014-11-16 15:16:25 +00:00
|
|
|
The code of Tomb is made to be read in literate programming style.
|
|
|
|
|
|
|
|
In absence of the Tomb script it is always possible to access the
|
|
|
|
contents of a Tomb using a Linux v3 kernel, cryptsetup and GnuPG
|
|
|
|
issuing the following commands as root:
|
|
|
|
|
|
|
|
```
|
|
|
|
lo=$(losetup -f)
|
|
|
|
losetup -f secret.tomb
|
|
|
|
pass=$(gpg -d secret.key)
|
|
|
|
echo -ne "$pass" | cryptsetup --key-file - luksOpen $lo secret
|
|
|
|
mount /dev/mapper/secret $HOME/secret-contents
|
|
|
|
```
|
|
|
|
|
2013-05-28 10:53:26 +00:00
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
# Stage of development
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-11-16 15:16:25 +00:00
|
|
|
Tomb is an evolution of the 'mknest' tool developed for the
|
|
|
|
[dyne:bolic](http://www.dynebolic.org) 100% Free GNU/Linux
|
|
|
|
distribution in 2001: its 'nesting' mechanism allowed the liveCD users
|
|
|
|
to encrypt and make persistent home directories. Since then the same
|
|
|
|
shell routines kept being maintained and used for dyne:bolic until
|
|
|
|
2007, when they were ported to work on more GNU/Linux distributions.
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
As of today, Tomb is a very stable tool also used in mission critical
|
|
|
|
situations by a number of activists in dangerous zones. It has been
|
2013-05-25 14:29:19 +00:00
|
|
|
reviewed by forensics analysts and it can be considered to be safe for
|
2014-11-16 14:18:11 +00:00
|
|
|
military grade use where the integrity of information stored depends
|
|
|
|
on the user's behaviour and the strength of a standard AES-256 (XTS
|
|
|
|
plain) encryption algorithm.
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-11-16 14:18:11 +00:00
|
|
|
# Use stable releases in production!
|
2014-08-29 21:23:08 +00:00
|
|
|
|
|
|
|
Anyone planning to use Tomb to store and access secrets should not use
|
|
|
|
the latest development version in Git, but use instead the .tar.gz
|
|
|
|
release on https://files.dyne.org/tomb . The stable version will
|
2014-09-23 09:57:15 +00:00
|
|
|
always ensure backward compatibility with older tombs: we make sure it
|
2014-08-29 21:23:08 +00:00
|
|
|
creates sane tombs and keys by running various tests before releasing
|
|
|
|
it. The development version in Git might introduce sudden bugs and is
|
2014-09-23 09:57:15 +00:00
|
|
|
not guaranteed to produce backward- or forward-compatible tombs and keys.
|
2014-11-16 12:55:51 +00:00
|
|
|
The development version in Git should be used to report bugs, test new
|
|
|
|
features and develop patches.
|
2014-08-29 21:23:08 +00:00
|
|
|
|
|
|
|
So be warned: do not use the latest Git version in production
|
|
|
|
environments, but use a stable release versioned and packed as
|
|
|
|
tarball on https://files.dyne.org/tomb
|
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
# How can you help
|
2010-08-23 13:10:57 +00:00
|
|
|
|
2014-08-29 21:23:08 +00:00
|
|
|
Donations are always welcome, see https://www.dyne.org/donate
|
2013-06-12 12:28:40 +00:00
|
|
|
|
2014-06-09 10:42:38 +00:00
|
|
|
Translations are also needed: they can be contributed via this website
|
|
|
|
https://poeditor.com/join/project?hash=33bdefea2e46b26f512a0caae55fbbb5
|
|
|
|
or simply sending the .po file. Start from `extras/po/tomb.pot`.
|
|
|
|
|
2014-09-23 09:57:15 +00:00
|
|
|
The code is pretty short and readable: start looking around and the
|
|
|
|
materials found in `doc/` which are good pointers at security measures
|
2010-08-23 13:10:57 +00:00
|
|
|
to be further implemented.
|
|
|
|
|
2013-06-12 12:28:40 +00:00
|
|
|
For the bleeding edge visit https://github.com/dyne/Tomb
|
2013-05-25 14:29:19 +00:00
|
|
|
|
2014-08-29 21:23:08 +00:00
|
|
|
Tomb's developers can be contacted using the issues on GitHub or over
|
|
|
|
IRC on https://irc.dyne.org channel **#dyne**
|
2011-01-30 22:25:01 +00:00
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
Some enthusiastic ideas are in the [TODO](doc/TODO.org) file.
|
2011-01-30 22:25:01 +00:00
|
|
|
|
2014-04-15 10:56:00 +00:00
|
|
|
Information on developers involved is found in the [AUTHORS](AUTHORS.md) file.
|
2014-11-16 14:18:11 +00:00
|
|
|
|
2014-11-16 15:16:25 +00:00
|
|
|
# Can Tomb be used by applications?
|
2014-11-16 14:18:11 +00:00
|
|
|
|
|
|
|
Sure as Hell it can! Licensing issues aside ([GNU GPLv3+](COPYING)
|
|
|
|
terms) Tomb provides machine-readable output and interaction via some flags:
|
|
|
|
|
|
|
|
flag | function
|
|
|
|
-------------------- | ------------------------------------------------
|
|
|
|
--no-color | avoids coloring output to allow parsing
|
|
|
|
--unsecure-dev-mode | allows giving passwords as argument
|
|
|
|
--tomb-pwd | specify the key password as argument
|
|
|
|
--tomb-old-pwd | specify the old key password as argument
|
|
|
|
--sudo-pwd | specify the sudo password as argument
|
|
|
|
|
|
|
|
Yet please consider that these flags may introduce vulnerabilities as
|
|
|
|
process table scanning can reveal passwords while such commands are
|
|
|
|
executing. For passwords in particular the best is always let Tomb
|
|
|
|
gather them via pinentry.
|
|
|
|
|
|
|
|
## Python
|
|
|
|
|
|
|
|
![](extras/images/python_for_tomb.png)
|
|
|
|
|
|
|
|
A Python wrapper is under developed and already usable, but it
|
|
|
|
introduces the vulnerabilities mentioned above. Find it in
|
|
|
|
`extras/tomber`. For more information see [PYTHON](extras/PYTHON.md).
|
|
|
|
|
|
|
|
## Graphical applications
|
|
|
|
|
|
|
|
So far the only graphical application supporting Tomb volumes is
|
|
|
|
[ZuluCrypt](https://github.com/mhogomchungu/zuluCrypt). One needs to
|
|
|
|
activate the Tomb plugin included in its source and will be able to
|
|
|
|
create, open and close tombs. It might still miss advanced Tomb
|
|
|
|
functionalities that are only available from the command-line.
|
|
|
|
|
|
|
|
## Let us know!
|
|
|
|
|
|
|
|
If you plan to develop any kind of wrapper for Tomb you are welcome to
|
|
|
|
let us know. Tomb is really meant to be maintained as a minimal tool
|
|
|
|
for long-term compatibility when handling something so delicate as our
|
|
|
|
secrets. For anything else we rely on your own initiative.
|
|
|
|
|
|
|
|
Happy hacking! :&^)
|