panthema / 2009 / cryptote / helpdoc / features
Contents Previous Next

Features

Overview
Encrypted Containers
Built-in Encryption
Built-in Compression
Multiple Key Slots
wxWidgets
Command Line Interface


Overview


Encrypted Containers

An encrypted container has the extension .ect. It can hold multiple text or binary subfiles. The contained files are encrypted using strong cryptography and are unreadable by other programs than CryptoTE.

Use multiple subfiles to structure your sensitive data like "WebSitePasswords.txt" and "EMailAccounts.txt".

The container file format supports built-in encryption and built-in compression. It also supports multiple key slots for different passwords.


Built-in Encryption

CryptoTE contains built-in strong encryption. It uses a custom version of the Botan cryptography library.

While designing CryptoTE I decided not to burden a user (that is you) with a long list of encryption ciphers to select one. Instead I selected one for you, the strongest currently freely available one: Serpent.

Why use Serpent? Serpent was among the AES finalists and supports 256 key bits block encryption, that was a minimum requirement. The winner of the AES contest was Rijndael, probably because it is faster by a few percent. Serpent is a bit slower but supposedly more secure. As for the purposes of CryptoTE: encrypting rather small amounts of text or binary data, speed was not an important criterion. Instead Serpent was chosen because if someone ever finds a way to break Rijndael/AES then Serpent will (hopefully) still be safe for a short time. Even though both are based on the same cryptographic mechanisms, more cryptanalysis (read: attempts to break) will be directed at Rijndael/AES.

However secure encryption does not end with selecting a cipher. Instead it starts there: the key material must be stored securely, the contained key hashes must be irreversible.

One mistake in design of the container format can render the encryption weak or even breakable. Be aware that it is rather easy to make such a mistake and I am sure many other "password keeper'' programs contain such errors.

It is also very easy to design a container that has a backdoor, i.e. that can be decrypted without the password. CryptoTE does not contain such a backdoor, there is no viable method to retrieve data without the password. I am sure many other "password protectors'' contain such backdoors.

Each subfile of the container is encrypted using Serpent/CBC with a different randomly generated key and IV (initialization vector). The keys and IVs are stored in a global file table, which in turn is encrypted with a master key using Serpent/CBC. This master key is not stored in plain text within the container file.

Instead a container supports multiple decryption keys: Multiple Key Slots. Each key slot contains an encrypted copy of the master key required to read the file table. The decryption key and CBC-IV for the master key can only be determined from the password entered by the user. The password entered by the user is hashed using PBKDF2 with HMAC(SHA256) as hash function. Two different random salts are used to generate decryption key and CBC-IV from the entered password.

More information about the container file format is available in the CryptoTE source code in libenctain/format.html.

I ran an extensive cryptography speedtest before designing CryptoTE: see http://idlebox.net for details.


Built-in Compression

As a bonus CryptoTE also contains automatic compression of text files. Nothing has to be activated: by default all files are compressed using zlib using the deflate algorithm.

Compression can be deactivated in the SubFile Properties dialog.

CryptoTE also contains bzip2 as alternative compression method. It generally only compresses really large text files better, smaller text files are handled better by zlib.


Multiple Key Slots

A container can be decrypted with multiple different passwords. This way multiple users can keep their password secret. This is called KeySlots in CryptoTE: a new password can be added in the menu entry "Password List''.


wxWidgets

Why choose wxWidgets as toolkit? For many reasons:


Command Line Interface

For Unix users and other power-users the CryptoTE program has a command line interface. This is very useful if you cannot start the graphical user interface, e.g. if logged in via ssh or if you are limited to a text console.

The best way to use CryptoTE without GUI is to start the "shell'': cryptote -s file.ect.

It will query for the container password and if decryption works a simple shell is started. Start using the shell by entering "help'' for a list of command.

Be warned that using the "edit'' command requires CryptoTE to save the contents in a temporary file outside the container. This file can then be modified using any text editor. If you wish to implement a built-in console text editor in CryptoTE, contact me.