Simple file verification: Difference between revisions

Content deleted Content added
Bender the Bot (talk | contribs)
m HTTP to HTTPS for SourceForge
 
(246 intermediate revisions by more than 100 users not shown)
Line 1:
{{Short description|File format for storing file checksums}}
'''SFV''' is an [[abbreviation]] for ''simple file verification'', a [[checksum]] format using the [[CRC32]] algorithm to verify the integrity of files.
{{refimprove|date=September 2018}}
{{cleanup|reason=Needs refocussing on sfv extension rather than overlapping with [[File verification]]|talk=Talk:File verification#Merge from Simple file verification|date=November 2022}}
{{ infobox file format
| name = Simple file verification
| icon =
| logo =
| screenshot =
| caption =
| extension = .sfv
| mime = text/x-sfv
| type code =
| uniform type =
| magic =
| owner =
| released =
| latest release version =
| latest release date =
| genre = [[Plain text]] list of [[CRC-32]] [[checksum]]s
| container for =
| contained by =
| extended from =
| extended to =
| standard =
| url =
}}
'''Simple file verification''' ('''SFV''') is a file format for storing [[CRC-32]] [[checksum]]s of files to verify the integrity of files. SFV is used to verify that a file has not been [[data corruption|corrupted]], but it does not otherwise verify the file's [[Information security#Authenticity|authenticity]]. The <code>.sfv</code> [[file extension]] is usually used for SFV files.<ref name="stealthisbook"/>
 
==Flaws Checksum ==
Files can become corrupted for a variety of reasons, including faulty [[Computer Storage|storage media]], errors in [[Transmission (telecommunications)|transmission]], write errors during [[copying]] or moving, and [[software bug]]s. SFV verification ensures that a file has not been corrupted by comparing the file's [[cyclic redundancy check|CRC]] [[Hash function|hash]] value to a previously calculated value.<ref name="stealthisbook"/> Due to the nature of hash functions, [[hash collision]]s may result in [[false positive]]s, but the likelihood of collisions is usually negligible with random corruption. (The number of possible checksums is limited though large, so that with any checksum scheme many files will have the same checksum. However, the probability of a corrupted file having the same checksum as its original is exceedingly small, unless deliberately constructed to maintain the checksum.)
 
SFV cannot be used to verify the authenticity of files, as CRC-32 is not a [[collision resistance|collision resistant]] hash function; even if the hash sum file is not tampered with, it is computationally trivial for an attacker to cause deliberate hash collisions, meaning that a malicious change in the file is not detected by a hash comparison. In cryptography, this attack is called a [[collision attack]]. For this reason, the [[md5sum]] and [[sha1sum]] utilities are often preferred in [[Unix]] operating systems, which use the [[MD5]] and [[SHA-1]] [[cryptographic hash function]]s respectively.
[[CRC32]], and thus also SFV, is not an ideal format for [[Computer security|securely]] verifying data integrity, since the CRC32 format is vulnerable to intentional modification that cannot be detected. Other formats, such as [[SHA512]], are better suited for ensuring the authenticity of files.
 
Even a single-bit error causes both SFV's CRC and md5sum's cryptographic hash to fail, requiring the entire file to be re-fetched.
[[MD5]] has also been used for this purpose, but it's now prone to the same attacks (after the discovery of an MD5 hash collision in August 2004, claimed to be found in only 1 hour on a low-grade computing cluster).
The [[Parchive]] and [[rsync]] utilities are often preferred for verifying that a file has not been accidentally corrupted in transmission, since they can correct common small errors with a much shorter download.
 
Despite the weaknesses of the SFV format, it is popular due to the relatively small amount of time taken by SFV utilities to calculate the CRC-32 checksums when compared to the time taken to calculate cryptographic hashes such as MD5 or SHA-1.
==Check sum==
 
SFV uses a [[plain- text]] file containing one line for each file and its checksum<ref name="stealthisbook"/> in the format ''FILENAME <whitespaces>CHECKSUM''. Any line starting with a semicolon ';' is considered to be a comment line and is ignored for the purposes of file verification. The delimiter between the filename and checksum is always one or several spaces; tabs are never used. A sample SFV file appears as followsis:
Files can become [[Data corruption|corrupted]] for a variety of reasons including: faulty [[Computer Storage|storage media]], errors in [[Transmission (telecommunications)|transmission]], write errors during [[copying]] or moving, and so on. SFV allows a person to ensure that a file has not become corrupted by comparing a [[Hash function|hash]] applied a file to see that they are equal. SFV also allows users to verify the authenticity of files, since if a file was changed (say, with the addition of malicious code) the hash 'fingerprint' of the file would change and alter the user that the authenticity of the file is in question.
 
; This is a comment
One of the first programs to use the SFV format was [[WinSFV]].
:file1 file_one.zip c45ad668
:file2 file_two.zip 7903b8e6
file_three.zip e99a65fb
 
=== Command-line utility ===
SFV uses a plain-text file containing one line for each file and its checksum in the format FILENAME CHECKSUM. Any line starting with a semicolon ';' is considered to be a comment line and is ignored for the purposes of file verification. A sample SFV file appears as follows:
An example of an [[open-source]] [[cross-platform]] [[command-line utility]] that outputs crc32 checksums is [[7-Zip]].<ref name="TL4i0" />
 
Many Linux distributions include a simple command-line tool <code>cksfv</code> to verify the checksums.
:file1.zip c45ad668
 
:file2.zip 7903b8e6
== See also ==
* [[Cyclic redundancy check]] (CRC)
* [[File verification]]
* [[Parchive]]
 
== References ==
{{reflist|refs=
<ref name="TL4i0">{{citation|url=https://sevenzip.osdn.jp/chm/cmdline/commands/hash.htm|title=h (Hash) command|work=[[7-Zip]]|date=May 23, 2016}}</ref>
<ref name="stealthisbook">{{cite book|title=Steal this file sharing book: what they won't tell you about file sharing|first=Wallace|last=Wang|year=2004|ISBN=9781593270940}}</ref>
}}
 
== Further reading ==
* [https://pure-sfv.sourceforge.net/faqsfv.html "SFV FAQ ( from isonews.com )"], ''SourceForge'', retrieved and [https://web.archive.org/web/20210831133047/http://pure-sfv.sourceforge.net/faqsfv.html archived] 29 August 2021.
 
== External links ==
* [http://www.quicksfvwebutils.orgpl/SFV_Calculator QuickSFVOnline SFV Calculator]
* [http://www.fodderquicksfv.org/cksfv/ CheckQuickSFV] SFV] checksum verifier (Windows Vista or earlier and Linux)
* [https://wxchecksums.sourceforge.net/mainpage_en.html wxChecksums]- Opensource Windows/Linux application
* [http://www.traction-software.co.uk/SFVChecker/ SFV Checker]
* [http://zakalwe.fi/~shd/foss/cksfv/ Check SFV - SFV software for UNIX systems]
* [http://members.lycos.nl/winsfvfaq/ WinSFV FAQ (in Dutch!)]
* [http://www.irnisjulifos.netcom/soft/xcsvchecksum/index.html YetcheckSum+], anotherMac SFVOS Checker]X, MD5 compatible, free
* [https://sourceforge.net/projects/isfv isfv] sfv checksum verifier for Mac OS X
* [http://www.irnis.net/ SFV (and also MD5) Creator and Checker]
===Windows only===
* Googling for dsSFV is a good free small app too
* [https://rapidcrc.sourceforge.net/ RapidCRC]- Freeware application
[[Category:Programming]]
* [http://www.kifoth.de/jane/misc/#RekSFV RekSFV] - SFV, MD5, SHA1 utility (Multi-Language, Unicode, with batch mode for checking a huge amount of folders)
* [http://www.ov2.eu/programs/rapidcrc-unicode/ RapidCRC Unicode]- RapidCRC with Unicode support (v0.3.4 as of 05/27/2012 supports UTF-8 with or without BOM and UTF-16 LE)
* [http://www.amok.am/en/freeware/amok_sfv_utility/ AmoK SFV Utility] - CRC32 and MD5 Compatible
* [http://skwire.dcmembers.com/fp/?page=sfv-ninja SFV Ninja] - SFV, MD5, SHA-1/256/384/512 utility (Freeware for personal use)
* [http://www.traction-software.co.uk/SFVChecker/index.html SFV Checker]
* {{usurped|1=[https://web.archive.org/web/20041205194036/http://www.triceptual.co.uk/shareware/Applications.asp?appid=sfvmanager SFVManager]}}
* [http://www.slavasoft.com/fsum/ SlavaSoft FSUM] - Fast File Integrity Checker
* [http://code.kliu.org/hashcheck/ HashCheck Shell Extension] - SFV, MD4, MD5, SHA-1 (Multi-Language)
* [http://www.ghisler.com/ Total Commander] - supports creation and verification of SFV files
* [http://www.big-o-software.com/products/hksfv/ hkSFV] - supports creation and verification of SFV files (crashes on massive SFV files check)
* [https://dysfv.sourceforge.net/ DySFV] - Open Source (free) application for large files
* [http://www.cdtag.com/ilsfv/ ilSFV] - free and open-source SFV, MD5 and SHA-1 file verification utility.
[[Category:Computer file formats]]
[[Category:ProgrammingChecksum algorithms]]