User Guide
Chapters
Table of Contents
Decrypting a File
Encrypted File Formats
Encrypted File
Each file encrypted by QTCrypt is composed of three parts:
- Overhead. This is information written at the beginning of the
file and
which is necessary for decryption and to identify the file.
- Body of the file. This contains the encrypted file.
- Trailer information. This is information necessary to
authenticate
and/or verify the encrypted file.
Overhead
QTCrypt outputs overhead to identify certain knowledge about
the
file encrypted. The overhead contains the following information:
- if encrypted file is not armored, then output a QTCrypt
signature line identifying the file as an encrypted file produced by QTCrypt.
- The major version number QTCrypt followed by the minor
version number. The major and minor version number output was added in
version 5.0 for Linux.
- a single byte flag with one of the following possible values:
- '\x00' - indicates that the file has been encrypted using a
CD-ROM encryption
key. The following five values are then output. These values are not
included
in the message digest of the encrypted file. They are encrypted using
the
Byte Shift Encryption, BSE. A Special Pass Phrase derived from a series
of
pseudorandom numbers is used for the encryption. The Pass Phrase was
derived
at the time the Encryption Key was created.
- Randomizer Unique ID. A Pseudorandom Number that has been
assigned as
the unique ID for the randomizer key derived from a specified CD-ROM.
The
ID is written "in the clear", i.e., unencrypted.
- random number - a pseudorandom number derived at the time
of
file encryption. The value is encrypted.
- Randomizer Line Number #1 - a Pseudorandom Number derived
at
the time of file encryption. Used as an index into the Encryption Key
file
table for the name of the first randomizer file byte stream.
- Randomizer Line Number #2 - a Pseudorandom Number derived
at
the time of file encryption. Used as an index into the Encryption Key
file
table for the name of the second randomizer file byte stream.
- Parameter Line Number - a Pseudorandom Number derived at
the
time of file encryption. Used as an index into the Encryption Key
parameter
table.
- '\x01' - indicates that the file has been encrypted using a
pass
phrase. A single byte is written to indicate the Secure Hash Algorithm
used
for encryption the file.
- '\x00' - use Secure Hash Algorithm, Federal Information
Processing Standards
Publication, 180-1, 1995 April 17
- '\x01' - use RIPEMD-160
-
- a pseudorandom number used to indicate whether the file is Signed
or
not. If the low order bit is set, the file is Signed otherwise it is
not
Signed.
- Forced Secure Hash Algorithm flag. Value included in file message
digest.
This is a byte stream terminated with a zero byte with the following
values:
- '\x00' - Use Secure Hash Algorithm specified in Encryption
Key parameter
table
- '\x01' - Force the use of Federal Information Processing
Standards
Publication, 180-2, 2002 August 1, 160 bit hash.
- '\x02' -Force the use of Federal Information Processing
Standards
Publication, 180-2, 2002 August 1, 224 bit hash.
- '\x03' -Force the use of Federal Information Processing
Standards
Publication, 180-2, 2002 August 1, 256 bit hash.
- '\x04' -Force the use of Federal Information Processing
Standards
Publication, 180-2, 2002 August 1, 384 bit hash.
- '\x05' -Force the use of Federal Information Processing
Standards
Publication, 180-2, 2002 August 1, 512 bit hash.
- '\x06' - Force the use of the RMD 16- bit hash.
- '\x07' - Force the Whirlpool 512 bit hash.
- '\x08' - Force the Tiger 192 bit hash.
Multiple secure hashes are used for each encrypted file.
- Original file size. If the file is compressed prior to
encryption,
this is the size of the encrypted file. The value is written twice.
Upon
decryption, if the two sizes do not agree, then the decryption mistake
is
caught
early. Both values are included in the file message digests.
- Forced Encoding Scheme - overrides parameter file. Value not
include
in file message digests. This field has the following values:
- '\x00' - use encryption method specified in parameter table
- '\x01' - use Alternating Encryption, ALE,
- '\x02' - use Relative Offset Encryption, ROE,
- '\x03' - use Byte Shift Encryption, BSE,
- '\x04' - use Permutation Change Encryption, PCE,
- '\x05' - use Bit Mix Encryption, BME,
- '\x06' - use Byte Mix Encryption, BYE,
- Flag to indicate forcing decrypted output. Value not include in
file
message digests. This field has the following values:
- '\00' - use file specified at time of decryption
- '\01' - force decrypted output to filename the same as
encryption
input filename
- '\02' - force decrypted output to standard out file - usually
the
console. May be redirected.
- Input File Name length. Value included in file message digests.
- Input File Name. Value included in file message digests.
- Input file date as Julian Day Number. Value included in file
message
digests.
- Input file time as seconds since midnight. Value included in file
message
digests.
- Encryption date as Julian Day Number. Value included in file
message
digests.
- Encryption time as seconds since midnight. Value included in file
message
digests.
- If the encrypted file is Signed, then the following values are
output:
- Group Key string length. Value included in file message
digests.
- Group Key string. Value included in file message digests.
- Private Key string length. Value included in file message
digests.
- Private Key string. Value included in file message digests.
- Single byte indicating whether the input file is compressed prior
to
encryption.
Value not included in file message digests.
- '\x00' - file not compressed
- '\x01' - file compressed. When compressing the input file,
the
following values are included in the file overhead. All values are
included
in the file message digests.
- Uncompressed file size,
- rle run threshold
- Block size for compression in 100K byte blocks
The overhead will add a minimum of approximately 100 bytes to the
length
of the encrypted file.
Trailer Information
QTEncode writes the following information after the encrypted
input
file. All values are written encrypted.
- A single zero value. The value is included in the message
digests.
- The size of the input file. If the input file was compressed by QTEncode,
then this is the size of the compressed file. When the file is
decrypted,
the size decrypted here is compared with the file size decrypted in the
header
overhead to confirm proper decryption. The value is included in the
message
digests.
- If the input file has been compressed by QTEncode, then
the
original input file is added to the message digests at this time. Thus,
for
compressed files, both the compressed file and the uncompressed file
forms
are contained in the message digests.
- If the encrypted file is not signed, then the message digests are
written
to the output file. If the encrypted file is signed, then the Digital
Signature
Algorithm is used to derive the Secure Digital Signature for each
message digest which are then
written
to the output file.
User Guide
Chapters
Table of Contents
Decrypting a File