Page 1 of 1

What is hkSFV?

Posted: Sat May 17, 2003 10:24 pm
by Big-O Mark
What is hkSFV? This gets asked a lot around here, so I have written up a short tutorial to answer this question.
1. What is hkSFV?
hkSFV is the simply the easiest and most automatic way to create or check SFV and MD5 files. It is free, fast, small, and carefully designed to be as intuitive and attractive as possible.

2. What is an .SFV?
An .SFV file is a tiny list of files and CRCs, which allow you to check to see if the files you have downloaded are exactly what you are expecting. The CRC algorithm used in .SFV files allows you to see if the file you have has been changed, even a single byte, since the .SFV file was created.

3. What is an .MD5?
In a sense, .MD5 did not exist until now, as md5sum is a popular Unix format similar to .SFV and Unix does not use file extensions the way Windows based systems do. .MD5 uses the md5 algorithm to compute its checksums, rather than the crc32 method used by .SFV. The md5 algorithm is almost as fast as crc32, but it is much more accurate at detecting changes in files.

From this point on in the tutorial, the term '.SFV' will be used to represent both .SFV and .MD5, as they are similar in function and hkSFV handles them identically.

4. Why would I want to use .SFV files?
People use .SFV files in different ways, but always for the same purpose, to ensure that their data is error free. If the files recorded in the .SFV have changed since the .SFV was created, even by a single byte, hkSFV will be able to detect this change, and the user would know that the data has been corrupted.

For example, if your friend has sent you some music files through AIM, you may simply assume that they are identical to the ones he has. However, if there were any errors during the transfer, your files may be altered. If your friend were to create an .SFV record of the files and send it to you with them, you could then use hkSFV to check the .SFV. If all the files pass the verification process, you can be sure that your files are identical to his.

Another example. If you bought a new hard drive and would like to transfer all of your data from your old drive to the new one, it may be useful to use hkSFV to create a record of all of your files. After the data is completely moved to the new hard drive, you can then check the .SFV files you created to ensure that nothing happened during the transfer. You could then safely delete the files from your first hard drive with no worries that data was lost or corrupted.

Once again, .SFV and .MD5 files are useful because they can ensure that data is error free.

5. I have an .SFV file, what do I do with it?
If you have an .SFV file, you can ensure that your files have not changed since the .SFV was created. The fastest way to check an .SFV file is to double click it in Windows Explorer. This will launch hkSFV and it will automatically verify your files. You can also run hkSFV and then use File|Open to verify and .SFV.

6. How do I create an .SFV file?
If you would like to create an .SFV file, open Windows Explorer and find the directory or files you would like to create an .SFV record of. Then right click, choose hkSFV, and create .SFV. hkSFV will then create the .SFV for the files you specified. Another way to create a new .SFV file is to launch hkSFV and choose File|New and select the files through the dialog box.

7. What is a .PAR?
.PAR files are frequently used in Usenet newsgroups. .PAR files are a solution to missing files. They are used to reconstruct files missing from an archive.

8. Can I use hkSFV with .PAR files?
hkSFV does not currently handle .PAR files. .PAR functionality is currently in a developmental stage, and the completion of this is a top priority for hkSFV.

9. What are the differences between .SFV, .MD5, and .PAR?
The Short Answer: .SFV and .MD5 files serve the exact same purpose, to ensure that data is error free. Both formats use algorithms to validate files, .SFV uses the crc32 and .MD5 uses md5. .SFV is the more common of the two formats and has a better defined standard. .MD5 is significantly more accurate, but to date is less popular and there are many ".MD5" formats floating around the internet.

The Long Answer: Therefore, the major difference between the two formats is that .MD5 is more accurate. Neither algorithms are perfect, the simple fact of the matter is that there are only 2^32 crc32 codes, and that means it can only uniquely hash 2^32 different files. Md5 can accurately assign unique hashes to 2^128 files. Both of these statements are assuming these algorithms work ideally, which they do not. Depending on your use, you may eventually encounter two files with the same crc32 code, however it is very unlikely that you will do so with md5. In fact, many websites use md5 codes as unique identifiers for images and documents. If they were come across two files with the same md5, this system would fail, but it seems to hold up well.

.PAR files use the md5 algorithm to verify the files in the par set. The files in this set (identied as .P01, .P02, .P03, etc.), as previously discussed, are used to reconstruct missing files from a specific archive. Therefore, .PAR files have a similar function to .SFV and .MD5 files, but are not used outside of par sets, whereas .SFV and .MD5 have universal applications.