bcryptThere are two kinds of cryptography in this world: cryptography that will stop your kid sister from reading your files, and cryptography that will stop major governments from reading your files. This book is about the latter.
-- Preface to Applied Cryptography by Bruce Schneier
Bcrypt is a cross platform file encryption utility. Encrypted files are portable across all supported operating systems and processors. Passphrases must be between 8 and 56 characters and are hashed internally to a 448 bit key. However, all characters supplied are significant. The stronger your passphrase, the more secure your data.
In addition to encrypting your data, bcrypt will by default overwrite the original input file with random garbage three times before deleting it in order to thwart data recovery attempts by persons who may gain access to your computer. If you're not quite ready for this level of paranoia yet, see the installation instructions below for how to disable this feature. If you don't think this is paranoid enough.. see below.
Bcrypt uses the blowfish encryption algorithm published by Bruce Schneier in 1993. More information on the algorithm can be found at Counterpane. Specifically, bcrypt uses Paul Kocher's implementation of the algorithm. The source distributed with bcrypt has been slightly altered from the original. Original source code can be obtained from [www.counterpane.com].
Bcrypt has been successfully tested on the following platforms:x86:
FreeBSD, OpenBSD, Linux, Cygwin, Win32
Solaris 2.7, 2.8
MacOS X 10.1 SERVER
Linux 2.0.34 (Cobalt)
No other operating systems have been tested, but most should work with minimal modifications. If you get bcrypt to compile without errors on any other platform or architecture, I'd like to know about it. If patches are necessary to get bcrypt work on your OS, I will try to incorporate them into the main distribution.
If you have a machine not listed above that is incapable of compiling bcrypt and are willing to give me access to the machine, I will make an attempt to port it to your OS.
News (Updated September 11, 2002)
Bcrypt 1.1 fixes a few minor bugs and adds support for many new operating systems. If you previously used 1.0 on an unsupported platform, you may not be able to decrypt any encrypted files you have. Alpha systems are known to have this problem. 32 bit systems should not have this problem. 64 bit systems probably do. If your system exhibits this problem, you should decrypt your files with 1.0 and reencrypt them with 1.1.
1.1 is immensely faster than 1.0. Additionally, it uses about 50% as much memory with compression turned off, or 66% with compression on.
Source Code: bcrypt-1.1.tar.gz GPG signature bcrypt-1.1.tar.gz.asc Win32 Binary: bcrypt-1.1.zip GPG signature bcrypt-1.1.zip.asc
The following files are copies of the LICENSE file that have been encrypted with the passphrase 'eggheads'. If you can decrypt both, then your installation should be compatible with any other supported systems.bigendian.bfe
If you're so inclined, edit config.h and change the defaults to whatever you think is appropriate for your needs. If you choose not to have bcrypt remove input files after processing, or set SECUREDELETE to 0, you are likely to have data on your hard drive that can be recovered even after deletion. All of these options can be set on the command line as well.
When you're satisfied with the default settings, simply type:
then su and type:
It would be wise to test the installation on a few unimportant files before encrypting anything you value, removing the only copy and overwriting it 127 times with garbage.
bcrypt [-orc][-sN] file ...
Encrypted files will be saved with an extension of .bfe. Any files ending in .bfe will be assumed to be encrypted with bcrypt and will attempt to decrypt them. Any other input files will be encrypted. If more than one type of file is given, bcrypt will process all files which are the same as the first filetype given.
By default, bcrypt will compress input files before encryption, remove input files after they are processed (assuming they are processed successfully) and overwrite input files with random data to prevent data recovery.
Passphrases may be between 8 and 56 characters. Regardless of the passphrase size, the key is hashed internally to 448 bits - the largest keysize supported by the blowfish algorithm. However, it is still wise to use a strong passphrase.
Options-o print output to standard out. Implies -r. -c DO NOT compress files before encryption. -r DO NOT remove input files after processing -sN How many times to overwrite input files with random data before processing. The default number of overwrites is 3. Use -s0 to disable this feature. No effect if -r is supplied. Note
The options o,c and r each have the opposite effects if the appropriate settings are altered from the default in config.h.
Encrypted files should be compatible between most systems. Binary compatibility has been tested for all systems listed above.
Support, Help, Bugs, What the hell is this?!
Bcrypt has a mailing list for support. You can subscribe at https://lists.sourceforge.net/lists/listinfo/bcrypt-users.
Copyright (c) 2002 Johnny Shelley All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the author nor any contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.