FTC - File and Text encryption, version 3.01
Dana Booth, 25 June 2025
There are OS specific files in the Linux and Windows directories, this includes
the main binary and graphical interface, "ftc", and the encryption and hashing
engine,"ftc_engine".
*NOTE*: ftc_engine must be in your path for ftc to function properly.
*NOTE*: I've included the file "sdelete.exe" for Windows users, this utility is
required to perform "wipe file" option, and needs to be in the path. If "wipe
file" is selected and sdelete cannot be found in the path, a normal file delete
is done instead. Linux users are assumed to have "shred" in their path.
1 - File Encryption
File encryption is done from the file pull down menu. To encrypt a file, simply
choose that option, a file selection dialog will follow. Once a file is
selected, the password dialog box appears, asking for the standard password /
repeat password action. Additionally, you may enter any string in the field
labled "Optional ASL" (added security layer), this string will be hashed and
added to the tests that must pass for the file to be deciphered correctly. The
password that you enter will be mixed with a random salt and hashed between
one hundred and two hundred thousand times, and this can be further obfuscated
by entering a "Hash Offset" number which can be any integer. (preceed
negative numbers with a "-") This offset will be added or subracted from the
number of hashes determined by the random number generator. The ASL does not
need to be remembered, but the Hash Offset does. If you check the "Garble
Filename" box, a hash of the computer clocks microsecond at runtime will be
used as the filename, although the original filename will not be lost when
deciphering. Ftc will do (2) rounds of encryption, and round one and round two
pull down lists determine which ciphers will be used.
File deciphering is basically the same steps, although the ASL field will not
be displayed, and the Garble Filename checkbox will be greyed out. Upon
successful deciphering, a message box will be displayed announcing this.The
ciphers used in encryption will need to match the round one and round two pull
down lists. If the user is unsure or forgot, the ciphers used on any particular
file can be shown in the help menu.
Note that FTC runs on one thread, and when processing very large files, the
title bar may (in Windows) say, "not responding". For files, FTC calls on
ftc_engine to do the actual encryption / deciphring, and will be running in the
background. The FTC UI will free up once the ftc_engine does its thing.
2 - Text Encryption
The two text boxes in FTC are for use in text encryption, the top box will
contain plain text, and the bottom box ciphertext. You can type text into the
top text box, or you can "Import Textfile" using the button or pulling down the
file menu. To encrypt the text, click on "Encrypt Top Box", or choose that
option in the file menu. You'll be presented with the same password dialog as
in file encryption, minus the ASL field and Garble Filename now becomes "No
L/F's In Output". By default, the ciphertext will be formatted at 74 columns,
but it is desirable in some cases to not insert linefeeds, including copying
pasting to some websites or IRC channels, and checking this box will produce
long ciphertext, although the bottom text box will wrap it. Once encrypted, you
are offered the opportunity to save the ciphertext to a file.
To decipher ciphertext, paste or import the ciphertext from a saved file or from
another source, and simply choose Decrypt rather than Encrypt. In either case,
you can choose to send either text box to the clipboard using the two bottom
buttons. You can clear either or both text boxes by using the CLR buttons or by
pulling down the file menu.
Text encryption uses a cascade of AES-256, TripleDES, and Blowfish (Native TCL
code)
If you enjoy these little scripts that I make, write me an email and let me
know where you're from!
Dana Booth
danabooth@mail.com
CHANGELOG
3.01 - It occurred to me that timestamps on encrypted files were not being
preserved, this version fixes that.
2.02 - Added ChaCha20 to list of available ciphers (file encryption)
2.01 - fixed a bug in text encryption where DOS/Windows style line terminators,
CR/LF was being stripped, and only the LF remained in the de-ciphered text.
2.0 - went from using OpenSSL to doing the encryption to a dedicated encryption
engine, "ftc_engine", which is written in Crystal and is very fast. This
version is not compatible with previous versions because of this.