Provide steps in verifying hashes.
As mentioned before, a common use for hashes is to verify file integrity. Follow the steps below to use
SHA-2-256 hashes to verify the integrity of sample.img, a file downloaded from the Internet.
a. Along with sample.img, sample.img_SHA256.sig was also downloaded. sample.img_
SHA256.sig is a file containing the SHA-2-256 computed by the website. First, use the
cat command to display the contents of the sample.img_SHA256.sig file:
```
[analyst@secOps lab.support.files]$ cat sample.img_SHA256.sig
c56c4724c26eb0157963c0d62b76422116be31804a39c82fd44ddf0ca5013e6a
```
b. Use SHA256sum to calculate the SHA-2-256 hash of the sample.img file:
```
[analyst@secOps lab.support.files]$ sha256sum sample.img
c56c4724c26eb0157963c0d62b76422116be31804a39c82fd44ddf0ca5013e6a sample.img
```
Was the sample.img correctly downloaded? Explain.
Yes. Because both hashes match, the hash calculated before download and the one cal-
culated after, it is correct to state that no errors were introduced during download.
Note: While comparing hashes is a relatively robust method to detect transmission errors, there are
better ways to ensure the file has not been tampered with. Tools such as gpg provide a much better
method for ensuring the downloaded file has not been modified by third parties, and is in fact the file
the publisher meant to publish.
You might also like to view...
File compression makes files smaller to conserve disk space and make the files easier to transfer
Indicate whether the statement is true or false
There are ____ flag fields provided for each task, resource, and assignment.
A. 15 B. 20 C. 31 D. 40