Q1 MAC a Describe how SHA1 works b Whats the difference betw
Q1) MAC:-
a. Describe how SHA-1 works.
b. Whats the difference between a MAC and HMAC function?
c. Describe how HMAC works? How secure is it?
Q2) RSA:-
a. Give an example of how a user generates its own private and public keys using RSA.
b. Using the keys in (a) give an example of how the keys can encrypt and decrypt.
Solution
1) SHA-1 - its a cryptographic hash function, it produces a 160-bit hash value known as message digest. and typically hash value is a hexadecimal number which is 40 digits long.
2) MAC function : its a hash function which takes a secret key as input and a message to be authenticated and outputs a MAC value.
HMAC function - its a type of MAC function , a keyed hash message authentication code which involves a cryptographic hash function with combination of secret cyrptographic key.
