2.1 Hash algorithms

A hash is a unique number used to identify a piece of data. MD5, SHA1, and SHA2 are famous algorithms to identify the hash of data. One can say hash algorithms can uniquely identify one piece of data from another one. If a hash of the complete file (all data inside the file) is calculated, it will not resemble another file. A hash can be calculated for the complete file or a part of a file (some data from the file).

Initially, MD5 was used to uniquely identify a file but, after some time, it was discovered that with very large files the algorithm did not work properly and two files with different content could possibly have the same MD5. This was termed hash collision. Thus, SHA1 and SHA2 were also used to avoid this problem.

An antivirus signature can use the hash of the complete file. To create a generic signature for multiple files, one should identify a portion of data that is common across all files and calculate the hash of that data and use it as a signature.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.207.129