Authentication and Hash Function
Authentication and Hash Function
1.Authentication Requirements
I. Symmetric Encryption
A message M transmitted from source A to destination B is encrypted using a secret key K shared by
A and B.
If no other party knows the key, then confidentiality is provided.
Symmetric encryption provides authentication as well as confidentiality.
2.a.Message Encryption
To provide authentication, A uses its private key to encrypt the message, and B uses A's public key
to decrypt.
Provides authentication using the same type of reasoning as in the symmetric encryption case
The message must have come from A because A is the only party that possesses PR a .
Signature - The only party with the information necessary to construct ciphertext that can be
decrypted with PUa.
2.a.Message Encryption
A can encrypt M first using its private key, which provides the digital signature, and then using
B's public key, which provides confidentiality.
B knows A’s public key so this authenticates that the message is from source A.
2.b.Message Authentication Code
Involves the use of a secret key to generate a small fixed-size block of data.
The generated cryptographic checksum or MAC is appended to the message.
This technique assumes that two communicating parties, say A and B, share a common secret key
K.
When A has a message to send to B, it calculates the MAC as a function of the message and the
key: MAC = C(K,M), where
M = input message.
C = MAC function.
K = shared secret key.
MAC = message authentication code.
2.b.Message Authentication Code
The message plus MAC are transmitted to the intended recipient.
The recipient performs the same calculation on the received message, using the same secret key, to
generate a new MAC.
The received MAC is compared to the calculated MAC.
The receiver is assured that the message has not been altered.
If an attacker alters the message but does not alter the MAC, then the receiver's calculation of the
MAC will differ from the received MAC.
Because the attacker is assumed not to know the secret key, the attacker cannot alter the MAC to
correspond to the alterations in the message.
2.b.Message Authentication Code
The receiver is assured that the message is from the alleged sender.
Because no one else knows the secret key, no one else could prepare a message with a proper
MAC.
c) Only the hash code is encrypted, using public-key encryption and using the sender's private key.
As with (b), this provides authentication and also digital signature.