You are on page 1of 3

LAB 4

CREATING A TEST FILE

CREATING MULTIPLE HASHES


Question for Lab 4

● What is the purpose of a file hashing?

The primary purpose of file hashing is to generate a fixed-size, unique


digital "fingerprint" or hash value for a file. This hash is generated
using a hash function. File hashing is commonly used for data integrity
verification, digital signatures, password storage, and ensuring the
authenticity of files.

● Hashing provides confidentiality. True or False?

False. Hashing is not designed for confidentiality. Hash functions are


one-way functions, meaning you can't reverse the process to obtain the
original data. However, hashing is not a form of encryption, and the
hash itself is not meant to keep the content confidential. It's used for
data integrity verification and not for hiding the content.

● Does a hash change only a little if the file is changed only a little?

Yes, generally speaking. A well-designed hash function will produce a


significantly different hash value even if a small change is made to the
input (file). This property is known as the avalanche effect. A small
change in the input should result in a substantially different hash
output. This feature is crucial for detecting any alterations or
corruption in a file.

● Of the three hash algorithms used, which has the longest digest?

Three commonly used hash functions are MD5, SHA-1, and SHA-256. Among
these, SHA-256 has the longest digest. It produces a 256-bit hash value
(32 bytes), while MD5 produces a 128-bit hash value (16 bytes), and
SHA-1 produces a 160-bit hash value (20 bytes). It's important to note
that MD5 and SHA-1 are now considered insecure for cryptographic
purposes due to vulnerabilities, and SHA-256 or higher is recommended
for secure applications.

You might also like