Professional Documents
Culture Documents
11/9/2021
Abstract: A message digest algorithm or a hash function, is a procedure that maps input
data of an arbitrary length to an output of fixed length. Output is often known as hash values,
hash codes, hash sums, checksums, message digest, digital fingerprint or simply hashes. The
length of output hashes is generally less than its corresponding input message length. Unlike
other cryptographic algorithms, hash functions do not have keys.
Hash functions are an essential part of message authentication codes and digital signature
schemes, which deserve special attention and will be covered in future posts. Hash functions are
also used in varied cryptographic applications like integrity checks, password storage and key
derivations, discussed in this post. They are also utilized in Secure Sockets Layer (SSL), Pretty
Good Privacy (PGP), and various other cryptographic protocols.
Experiment – 5B
Observation:
Creating a Microsoft word document with contents
1
Now make a single change to Studentsname.docx and then save the
document as Studentsname-Copy.docx in the same directory. (Added
an extra t in the last line)
2
Calculating Hash values for file ‘Studentsname.docx’
3
Q1. What can you say about these digests? Compare MD2 with SHA512.
What makes SHA512 better than MD2? Why?
A. MD5 has been cryptographically broken for quite some time now. This
basically means that some of the properties usually guaranteed by hash
algorithms, do not hold anymore. For example it is possible to find hash
collisions in much less time than potentially necessary for the output
length. SHA-512 (one of the SHA-2 family of hash functions) is, for
now, secure enough but possibly not much longer for the foreseeable
future. That's why the NIST started a contest for SHA-3. Generally, you
want hash algorithms to be one-way functions. They map some input to
some output. Usually the output is of a fixed length, thereby providing a
"digest" of the original input. Common properties are for example that
small changes in input yield large changes in the output (which helps
detecting tampering) and that the function is not easily reversible. For
the latter property the length of the output greatly helps because it
provides a theoretical upper bound for the complexity of a collision
4
attack. However, flaws in design or implementation often result in
reduced complexity for attacks. Once those are known it's time to
evaluate whether still using a hash function. If the attack complexity
drops far enough practical attacks easily get in the range of people
without specialized computing equipment.
The hash function must be one way. It must not be possible to reverse the
function to find the message corresponding to a particular message digest,
other than by testing all possible messages.
It must be computationally infeasible to find two messages that hash to
the same digest.
The message digest is sent with the message itself. The receiver can generate a
digest for the message and compare it with the digest of the sender. The
integrity of the message is verified when the two message digests are the same.
Any tampering with the message during transmission almost certainly results in
a different message digest.
5
Conclusion:
In this lab we learnt about the Hash algorithm
We saw different aspects and uses of message digest
We saw the comparison between MD1 and SHA 521
A message digest is a fixed size numeric representation of the
contents of a message, computed by a hash function. A message
digest can be encrypted, forming a digital signature.
The sender can also generate a message digest and then encrypt
the digest using the private key of an asymmetric key pair,
forming a digital signature. The signature must then be
decrypted by the receiver, before comparing it with a locally
generated digest.
We saw how SHA512 is better than the MD2.