Crypter
An innovative, convenient and secure crypto app.
Encrypt unlimited bits. Remember only a bit.
Crypter is a cross-platform crypto app that makes encryption and decryption
convenient while still upholding strong security. It tackles one of the weakest
links in most security systems today - weak passwords. It simplifies secure
password generation and management and requires you to only remember one bit -
your MasterPass.
Crypter v4.0 is a crypto
app that can decrypt and encrypt any arbitrary data this includes files and
folders. This version has been released and fully tested for macOS (OSX), Linux
(for all distros via AppImage) and Windows (32 & 64
bit). All core modules (modules that provide the core functionality) are fully
tested.
Crypter v5.0 will save your MasterPass
in your OS's Keychain so you won't have to enter it every time you open the app.
To help speed up the development please send a PR for what's left do https://github.com/HR/Crypter/milestone/4
Please open an issue if you have any suggestions and add improvements via PRs!
Also checkout Ciphora (https://github.com/HR/ciphora)
a decentralized end-to-end encrypted messaging app.
Link to this README: https://git.io/Crypter.info
Contents
Installation
All prebuilt binaries for all major platforms are available under
releases.
Crypter is also on Homebrew Cask for
macOS. So to install it, simply run the following command in the Terminal:
$ brew install --cask crypter@4.0.0
Screens
Crypto
One key to derive them all!
Crypter derives a MasterPassKey from the MasterPass obtained at setup by using
the PBKDF2 key derivation algorithm (see below for the specification). It
then uses PBKDF2 to derive a number of encryption keys from the MasterPassKey
that can be used for the encryption of files. This method allows for the
generation of very secure encryption keys for data encryption. Moreover, by
publicly storing the credentials used to derive the MasterPassKey and the salts
used to derive the encryption keys, you are able to produce the encryption keys
at will and without needing to store them securely. Your MasterPass is the only
thing that you need to remember.
Crypter never directly encrypts anything with your MasterPass. Instead, it
derives a MasterPassKey from it, which it then uses to derive the
encryption key used to encrypt your file. Every time a file is decrypted,
the encryption key is re-derived from the MasterPassKey. Every time you set the
MasterPass through the setup or reset it through Verify MasterPass, the
MasterPassKey is derived from the MasterPass using a newly generated set of
(random) credentials. These credentials are used to re-derive the MasterPassKey
every time that Crypter is executed (i.e. the app is launched).
Authentication with the AES-256-GCM symmetric block cipher is used by default.
This ensures that data integrity is verified on decryption and allows the app
to detect tampering or data corruption.
The following are the crypto defaults and can be found under app/config.js:
// Crypto defaults
{
ITERATIONS: 50000, // file encryption key derivation iterations
KEYLENGTH: 32, // encryption key length
IVLENGTH: 12, // initialisation vector length
ALGORITHM: 'aes-256-gcm', // encryption algorithm
DIGEST: 'sha256', // digest function
HASH_ALG: 'sha256', // hashing function
MPK_ITERATIONS: 100000 // MasterPassKey derivation iterations
}
Encryption process
When encrypting a file, Crypter first creates a temporary hidden directory,
namely '.crypting'. It then encrypts the user-selected file with the crypto
defaults and flushes the encrypted data to a file in the directory, namely
'data'. If it is a directory then it is compressed first (tar). It also writes
the public credentials to a file within the same directory, namely 'creds'.
Finally, Crypter compresses the directory to a tar archive with the name of the
user-selected file and the '.crypto' extension appended to it.
Decryption process
The decryption process is essentially the inverse of the encryption process.
During decryption, Crypter creates a temporary hidden directory named
'.decrypting'. It then reads the credentials from the creds file and decrypts
the data file into the original file or directory (after decompressing it) with
its original name and extension, as deduced from the CRYPTO file name (e.g. the
extension for "file.txt.crypto" would be ".txt").
Public credentials
Certain credentials are required to decrypt the encrypted data. These are
needed to reconstruct the particular encryption key and to verify data integrity.
These can be stored publicly without compromising security since it is fairly
impossible (by current standards) to reconstruct the encryption key without the
MasterPass and its credentials. These credentials are stored in the creds file of
the CRYPTO file archive (as delineated above) in the following
format:
v1
Crypter#iv#authTag#salt#dir
v2
Uses JSON
{
"type": "CRYPTO",
"iv": "...",
"authTag": "...",
"salt": "...",
"isDir": true || false
}
The dir part is only included for directories
CRYPTO file
Format
A CRYPTO file is the product of the Crypter encryption process. This file
stores both the encrypted version of the user file and the public credentials
needed to encrypt and decrypt it. It has a .crypto file extension, which
is appended to the full file name (including the extension) of the file
originally encrypted. The file itself is a tar archive in the following
structure:
someFile.crypto
βββ data // the encrypted version of the user selected file
βββ creds // the public credentials used to encrypt it
Reusing the same MasterPass
If you attempt to decrypt a CRYPTO file by resetting to a specific
MasterPass or setting an identical MasterPass on a different machine,
you will likely encounter the following error:
ERROR: Unsupported state or unable to authenticate data
This issue occurs because the MasterPassKey that was originally used to
derive the encryption key on is not the same as the MasterPassKey
derived with the reused MasterPass. Since Crypter uses randomness to
generate secure credentials, this second set of credentials will be quite
different from the original set. As a result, the derived encryption key is
incorrect and yields this error.
See Achieving portability and same MasterPass reuse
for instructions on how to successfully reuse the same MasterPass.
Achieving portability and same MasterPass reuse
To achieve portability on Crypter, the set of MasterPassKey credentials
need to be exported from Crypter on the source machine1
and imported into Crypter on the target machine2.
This can be achieved in two simple steps:
- Export MasterPass credentials on the source machine1
- Import MasterPass credentials on the target machine2
Please refer to the FAQs for instructions on how to perform the above steps.
[1] The machine where the CRYPTO file was initially
encrypted.
[2] The machine where you wish to decrypt the CRYPTO
file.
Security
Security-first practice
Crypter follows a security-first practice. This means that security is its
highest priority and first consideration. Thus, while Crypter seeks
to make encryption more convenient, it always defers to maintaining
a high level of security.
MasterPass
Crypter never stores your MasterPass in memory or on the filesystem. This
substantially improves the security of your MasterPass. You are only asked to
enter the MasterPass when you first set, reset or verify it. Whenever you enter
your MasterPass, Crypter derives a MasterPassKey (using a set of generated
credentials) and then immediately discards the MasterPass. The MasterPassKey is
then securely stored in memory and used to derive the encryption keys. Since
these credentials are derived via a one-way function, they cannot be used in
any way to derive the MasterPass.
MasterPassKey