请输入您要查询的百科知识:

 

词条 Simple file verification
释义

  1. Checksum

      Command-line utility  

  2. See also

  3. References

{{refimprove|date=September 2018}}{{ 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 CRC32 checksums
| container for =
| contained by =
| extended from =
| extended to =
| standard =
| url =
}}

Simple file verification (SFV) is a file format for storing CRC32 checksums of files to verify the integrity of files. SFV is used to verify that a file has not been corrupted, but it does not otherwise verify the file's authenticity. The .sfv file extension is usually used for SFV files.

Checksum

{{unreferenced section|small=y|date=September 2018}}

Files can become corrupted for a variety of reasons including faulty storage media, errors in transmission, write errors during copying or moving, and software bugs. SFV verification ensures that a file has not been corrupted by comparing the file's CRC hash value to a previously calculated value. Due to the nature of hash functions, hash collisions may result in false positives, 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 CRC32 is not a 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 functions respectively.

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.

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 CRC32 checksums when compared to the time taken to calculate cryptographic hashes such as MD5 or SHA-1.

SFV uses a plain text file containing one line for each file and its checksum in the format FILENAMECHECKSUM. Any line starting with a semicolon ';' is considered to be a comment 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 is:

 file_one.zip   c45ad668 file_two.zip   7903b8e6 file_three.zip e99a65fb

Command-line utility

An example of an open-source cross-platform command-line utility that outputs crc32 checksums is 7-Zip.[1]

See also

  • Comparison of file verification software
  • Cyclic redundancy check (CRC)
  • File verification
  • Parchive

References

1. ^{{cite|url=https://sevenzip.osdn.jp/chm/cmdline/commands/hash.htm|title=h (Hash) command|work=7-Zip|date=May 23, 2016}}

2 : Computer file formats|Checksum algorithms

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/21 20:24:52