Message Digest Algorithm
Message digest or a cryptographic hash function is a
mathematical algorithm that maps the input data of arbitrary length
into a fixed size string called message digest or hash value.
The most common message digest algorithm is MD5
Desirable properties of message digest algorithm are as
follows
- Pre-Image resistance: This property implies that it should be
computationally infeasible to reverse the hash function.
- Second Pre-image resistance: This means that for an input and
its hash value it should be hard to find another input with same
hash value or message digest.
- Collision Resistance: This property also called the
collision-free hash function which means that no two different
message will have the same hash value.
Integrity of data
- It refers to the validity of the transmitted message. message
integrity is ensuring that the message is as it is sent and no
alteration or modification is made on it.
- The common method is to use a hash function that produces a
message digest that is difficult to reverse.
Outline two distinct examples of how a message
digest algorithm may be employed to ensure the integrity of
data
- Data integrity check(Checksum):
- It generates a message digest of
the transmitting message as a checksum and transmitted along with
the message and at the receiver side the message is again given as
input to the hash function and create a checksum and both the
checksums are compared if they are same then it is sure that the
message is not altered.
- Next method to ensure integrity is the use of Digital
Signatures
- A digital signature is a cryptographic value generated from
data and a secret key by the user
- The hash value of the message and the private key are input for
the signature algorithm and generate a signature (Encryption)
- The signature along with the message is sent to the
receiver.
- receiver create a hash value from the message itself and
decrypt the signature using the verification algorithm.
(Decryption)
- if both hash values(Generated and decrypted) if both are same
then both authenticity and integrity of the data is ensured.
The outline of the two examples are given in the figure
below: