1 minute read

Maybe I am just a novice, but I had a hard time figuring out the inputs for the creation of the hash database for the OCFA digest module. This step can be found at the end of the 'HOWTO-INSTALL-debian-etch.txt' within /ocfa/doc/usage/install/

If you are installing the publicly available ocfa distribution
you will not have the pre-build databases available and you will
thus need to build the digest files yourself.

The digest database files can be downloaded from http://www.nsrl.nist.gov/Downloads.htm

I have not been able to find the other accepted hash-sets for cp images. I will single a link when I find it. If you know where they are, please let me know. All I know was in the README - file name kp1.hke - cp hashset of BDE Nijmegen

  • Once you have downloaded the NIST disks (currently 1 - 4, about 300MB each), you shoud verify the files, then mount the ISOs.
  • In the base directory of each will be a RDS_222X.ZIP folder (where X is A - D).
  • Extract the contents of RDS_222X.ZIP.
  • For convenience create a folder called 'hash' to put each file in.
  • In the RDS_222X folder copy the 'NSRLProd.txt' and the 'NSRLFile.txt' into your newly created 'hash' folder.
  • You only need to copy 'NSRLProd.txt' once. They are they same in each ISO.
  • Rename 'NSRLFile.txt' to a unique name for each. I used A.txt, B.txt, C.txt, D.txt.
  • If you were not working on your local OCFA server, copy the hash folder to the server now (it will greatly speed up the processing).
  • On the OCFA server navigate to the OCFA source folder (where you build ocfa from).
  • From within the source folder navigate to 'OcfaModules/minimal/digest/init/'
  • You should find a script called 'createshadb2.pl'
  • Run the script with './createshadb2.pl'
  • You should get the message:
Give sourcename,productinfo file and a list of digest files or send an end of file:
  • The sourcename is 'NIST', the productinfo is the 'NSRLProd.txt' file, and the list of digest files is the 'NSRLFile.txt' files separated by a space.
  • For example, using the ocfaShare described in this single, and saving my hashes in a folder called 'hash' - I would use the following command:./createshadb2.pl
    NIST /ocfaShare/hash/NSRLProd.txt /ocfaShare/hash/A.txt
    /ocfaShare/hash/B.txt /ocfaShare/hash/C.txt
  • If everything is working the hash DB will start building. Mine took about two hours.
  • Once done, copy 'adinfodb', 'digestdb' and 'proddb' from 'ocfa/OcfaModules/minimal/digest/init/' to '/usr/local/digiwash2.1/static/hashsets/'