You are on page 1of 7

Tanmay Bhalerao D- batch

2016110004 Blue group

To calculate hash values for a


file.

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

Aim: To calculate hash values for a file.

Software used: Hash calc

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)

 Start HashCalc to display the HashCalc window

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. A message digest is a cryptographic hash function containing a string of


digits created by a one-way hashing formula. Message digests are
designed to protect the integrity of a piece of data or media to detect
changes and alterations to any part of a message. They are a type of
cryptography utilizing hash values that can warn the copyright owner of
any modifications applied to their work. Message digest hash numbers
represent specific files containing the protected works. One message
digest is assigned to particular data content. It can reference a change
made deliberately or accidentally, but it prompts the owner to identify the
modification as well as the individual(s) making the change. Message
digests are algorithmic numbers. This term is also known as a hash value
and sometimes as a checksum.

Q2. Compare MD2 with SHA512.

A. SHA512 provides a more adequate cryptographically secure


functionality than MD5. The SHA512 checksum (512 bits) output is
represented by 128 characters in hex format, while MD5 produces a
128-bit (16-byte) hash value, typically expressed in text format as a 32-
digit hexadecimal number.

Q3. What makes SHA512 better than MD2?

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.

Message digests and digital signatures


Messages are inherently variable in size. A message digest is a fixed size
numeric representation of the contents of a message. A message digest is
computed by a hash function, which is a transformation that meets two
criteria:

 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.

A message digest created using a secret symmetric key is known as a Message


Authentication Code (MAC), because it can provide assurance that the message
has not been modified.

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.

You might also like