Documentation

The Documentation will be put on the web in stages.

The documentation here is in two tables.  The first table looks at the Sub Menu.  The second Table describes the entries of the Sub Sub Menu.  The second Table also describes what SHA1 log files and SHA1 double log files are.  Above the Second Table is a description of the difference between SHA1 and the variation of SHA1 that is used in this program.

Log files are:

  1. When creating a log file all files and directories are placed in alphabetical order
  2. The format depending whether it is a single or double log file is as follows
  3. Each file occupies one line and is file tab filesize Signature return linefeed. Format as follows:


Logs

Menu Level

Why Needed

Sub Sub Menu

Description

1 Transfer Log   Sub


                              
This creates single log file of directory or CDROM or USB stick and places it in a drive of choice under a date named directory

It is designed to get the SHA1 values and then paste the values into a text file or email.

It does not handle UNICODE files
2 Un-Encrypted   Sub
---No Sub Directories Directory-----
&1 SHA1 Log
&2 Double SHA1 Log
---With Sub Directories Directory---
&3 SHA1 Log
&4 Double SHA1 Log
---------------- File List -----------------
&5 List Log Single Directory
&6 List Log with Sub Directories
- Log Sub Directories on CDROM ---
&7 List Log
&8 SHA1 && List Log
&9 Double SHA1 && List Log

3 Encrypt Sub

---Needs two or more files to be present --
--------Single Password---------
----No Sub Directories Directory----
&1 SHA1 Log
&2 Double SHA1 Log
----With Sub Directories Directory----
&3 SHA1 Log
&4 Double SHA1 Log
---------------- File List -----------------
&5 List Log Single Directory
&6 List Log with Sub Directories
------- Log Sub Directories on CDROM ------- to do
&7 List Log
&8 SHA1 && List Log
&9 Double SHA1 && List Log
--------Double Password---------
---No Sub Directories Directory----
a SHA1 Log
b Double SHA1 Log
----With Sub Directories Directory-----
c SHA1 Log
d Double SHA1 Log
---------------- File List -----------------
e List Log Single Directory
f List Log with Sub Directories
-- Log Sub Directories on CDROM - to do
&7 List Log
&8 SHA1 && List Log
&9 Double SHA1 && List Log



4 CRC-32 Quick File Examination Logs Sub



5 Create Log in all top directories Sub



6 Create Logs in Multiple Directories Sub

1 SHA1 Log
2 Double SHA1 Log

7 Log of Multi Directories to be copied to CDROM   Sub

1 SHA1 Log
2 Double SHA1 Log- to do

8 Encrypt    Sub

-------Single Password---------
1 SHA1 File
2 Double SHA1 File
-------Double Password---------
3 SHA1 File
4 Double SHA1 File

9 Make Log File (Include Subdirectories) Sub



a Make Log File (Single Directory) Sub


---------------ABOUT-----------------    Sub


menu items below here are about descriptions not functions Sub




The difference between SHA1 and SHA-1.  This program uses SHA-1 in its log files.
SHA-1 (499,999,999) = SHA(500,000);
SHA-1(500,000,010) = SHA(500,000)+SHA(10);
SHA-1(1,001,000 size file) = SHA-1(SHA1(500,000) + SHA1(500,000)+ SHA1(2000)) = SHA1(SHA1(500,000) + SHA1(500,000)+ SHA1(2000)).

The NTFS file system can have very large files.  A High quality video file may be many times larger than 4GB.  If the number of 500k chunks in a file exceeds 500k then we take the signature of 500k signatures and continue.

for example
SHA-1(250,000,001,000 size file) = SHA1(SHA-1(250,000,000,000) + SHA-1(1000)).

Test Vectors (from FIPS PUB 180-1)
"abc"
A999-3E36-4706-816A-BA3E-2571-7850-C26C-9CD0-D89D
"abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq"
8498-3E44-1C3B-D26E-BAAE-4AA1-F951-29E5-E546-70F1

A million repetitions of "a" which under SHA-1 gives
34AA-973C-D4C4-DAA4-F61E-EB2B-DBAD-2731-6534-016F
will under SHA1 give:
C3AC-C310-183F-238A-CEA1-CF5C-243C-74C1

The structure of a log file is dependent whether it is a single or double SHA1 log file.  A single SHA1 log file will have extension "1log".  A double SHA1 log file will have extension "d1log". Each file with "1log" extension is represented by:
"Sub Directory" "File Name" "File Size as a 4 Byte integer or 8 Byte integer" "SHA1 as a 20 character string" "return linefeed characters 0x0D 0x0A"
Each file with "d1log" extension is represented by:
"Sub Directory" "File Name" "File Size as a 4 Byte integer or 8 Byte integer" "double SHA1 as a 40 character string" "return linefeed characters 0x0D 0x0A"


Sub Sub Menu

Description

Single SHA1 Hash The Secure Hash Algorithm (SHA), was developed by National Institute of Standards and Technology (USA) NIST.  When a message of any length < 2 power 64 bits is input, the SHA produces a 160-bit output called a message digest. This program uses the implementation as written by Peter C. Gutmann on 2 September 1992 and modified 1 June 1993, by Colin Plumb.

160 bits (20 bytes) are not easily readable by the human being or always capable of being displayed on a computer screen.  A byte can be represented by two Hex characters.  20 byte  message digest are translated into 40 Hex characters for readability.
Eg:

File Name: Graphics.cpp
File Size: 26290
Hash: 9761-AC8E-8094-5EBA-78BC-CCE2-3ECE-4FB1-8BBE-AE76

The 40 Hex characters here displayed in groups of four for readability.

This enables identification of file's contents without the need to display a file which can vary in size from 0 bytes to Gigabytes.  There is always the problem that you can have two files with different contents having the same SHA1.

This enables identification of file's contents without the need to display a file which can vary in size from 0 bytes to Gigabytes.  There is always the problem that you can have two files with different contents having the same SHA1.



--------Not Encrypted--------- Separator
1 SHA1 Log Log file of single SHA1 hashes
2 Double SHA1 Log Log file of double SHA1 hashes
--------Single Password--------- Separator
3 SHA1 Log Log file of single SHA1 hashes.  The log file is encrypted by a single password. Double SHA1 Hash A one way hash function H(M), operates on an arbitrary-length pre-image message,
M. It returns a fixed-length hash value, h.
h = H(M). This is our first file signature.

To each byte of an arbitrary-length pre-image message M we add 1 to get M1.
we apply the one way hash function to M1 to get
h1 = H(M1). This is our second file signature.

There is always a probability that two files can share the same hash.  This fact can be used by the legal profession to claim that a file is not unique and hence the file is not the original legal document.  The probability of two files meeting the criteria of having the same double SHA1 hash value is very small.  The probability of finding two files with the same single SHA1 is a lot larger in comparison.

This enables identification of file's contents without the need to display a file which can vary in size from 0 bytes to Gigabytes.  There is always the problem that you can have two files with different contents having the same SHA1.  This problem does not occur with the double SHA1.



4 Double SHA1 Log Log file of double SHA1 hashes. The log file is encrypted by a single password.
--------Double Password--------- Separator
5 SHA1 Log Log file of single SHA1 hashes.  The log file is encrypted by a single password.
6 Double SHA1 Log Log file of double SHA1 hashes. The log file is encrypted by a double password.