Wednesday, April 8, 2009

Cryptography Unit III

Unit – III

Authentication and Hash Function

1. What is Hash function?
A Hash function H is a transformation that takes a variable-size input m and return a fixed-size string, which is called the hash value h (that is, h = H(m)). Hash functions with just this property have a variety of general computational uses, but when employed in cryptography the hash functions are usually chosen to have some additional properties. The basic requirements for a cryptography hash functions are:
• The input can be of any length,
• The output has a fixed length,
• H(x) is relatively easy to compute for any given x,
• H(x) is one way,
• H(x) is collision-free.

2. What types of attacks are addressed by message authentication?
• Content modification: Changes to the contents of the message.
• Sequence modification: Any modification to a sequence of messages between parties, including insertion, deletion and recording.
• Timing modification: Delay or replay of messages.

3. What is the use of digital signature?
Data appended to, or a data unit that allows a recipient of the data unit to prove the source and integrity of the data unit and protect against forgery.

4. What two levels of functionality comprise a message authentication or digital signature mechanism?
Two levels of functionality comprise a message authentication or digital signature mechanisms are Low level authentication and High level authentication. At the lower level there must be some sort of function that produces an authenticator: a value to be used to authenticate a message. This lower level function is then used as primitive in a higher-level authentication protocol that enables a receiver to verify the authenticity of message.

5. What is message authentication code?
An alternative authentication technique involves the use of a small fixed size block of data, known as a cryptographic checksum or MAC that is appended to the message.

6. What is the difference between a message authentication code and a one-way hash function?
The difference between a message authentication code and a one-way hash function is that Unlike a MAC, a hash code does not use a key but is a function only of the input message


7. Is it necessary to recover the secret key in order to attack a MAC algorithm?
A number of keys will produce the correct MAC and the opponent has no way of knowing which the correct key is. On an average 2(n-k) keys produce a match. Therefore attacks do not require the discovery of the key.


8. What is the difference between a strong and a weak collision resistance?
• For any given value h it is computationally infeasible to find y = x with H(y) = H(x). This is “weak collision resistance”. It is one way property. It is easy to generate a code given a message, but almost impossible to do the reverse.
• It is computationally infeasible to find any pair(x,y) such that an alternative message hashing to the same value as a given message cannot be found. This prevents forgery.

9. What is the function of a compression function in a hash function?
The hash function involves repeated use of compression function; The motivation is that if the compression function is collision resistant, then the hash function is also collision resistant function. So a secure hash function can be produced.

10. What is a birthday attack?
A birthday attack is a name used to refer to class of brute-force attacks. It gets its name from the surprising result that the probability that two or more people in a group of 23 share the same birthday as greater than ½ ; such a result is called a birthday paradox.

11. What is the utility of a detached signature?
A detached signature may be stored and transmitted separately from the message it signs. This is useful in several contexts. A user may wish to maintain a separate log of all messages sent or received. A detached signature of an executable program can detect subsequent virus infection. Finally detached signature can be used when more than one party must sign a document, such a legal contract.

12. What is the advantage of symmetric encryption?
Symmetric encryption provides both authentication and confidentiality.

13. Name any three contents in which MAC algorithm is used?
The three contents used in MAC algorithm are
a.Broadcasting
b. An exchange in which the number of incoming messages is more.
c. Authentication of a computer program in plain text is an attractive service.

14. What are the steps involved in MD5 logic?
The steps involved in MD5 logic are,
a. Append padding bits
b. Append length
c. Initialize MD buffer
d. Process message in 512 bit(16 word) blocks
e. Output.

15. Mention the differences between MD4 and MD5.
The differences between MD4 and MD5 logic are:
i. MD4 uses three rounds of 16 steps each whereas MD5 uses four rounds of 16 steps each.
ii. In MD4, no additive constant is used in the first round. The same additive constant is used for each of the steps of the second round. Another additive constant is used for each of the steps of the third round. In MD5, a different additive constant. T(i) is used for each of the 64 steps.
16. Expand SHA?
SHA- Secure Hash A1gorithm.
It was developed by the National Institute of Standards and Technology and published as a federal information processing standard in1993. A revised version was issued as FIPS 180.1 in 1995 and is generally referred to as SHA-1.

17. What are the required properties of digital signatures?
The required properties of digital signatures are,
• It must verify the author and the date and time of the signature.
• It must authenticate the contents at the time of the signature.
• It must be verifiable by third parties to resolve disputes.

18. How are replay attacks handled?
By attacking a sequence number to each message used in an authentication exchange. A new message is accepted only if the sequence number is in order.

19. What is the alternate for sequence numbers to avoid replay attacks?
The alternate for sequence number in solving replay attacks is,
• Time stamps
• Challenge response

20. What is meant by suppress-replay attacks?
An opponent can intercept a message from the sender and replay it later when the time stamp in the message becomes correct at the recipients site. This replay could cause unexpected results. Such attacks are called suppress-replay attacks.

Part-B

1. Explain in detail, the message authentication code.
2. Explain in detail, the MD5(Message Digestive Algorithm)
3. Explain in detail, protocols, functions and requirements for authentication.
4. Explain in detail, the secure hash algorithm
5. Explain in detail, the MAC based on DES.

4 comments:

  1. Useful post. In this unit you have explained some important concepts and terms associated with cryptography. I am bookmarking this article so that I can use it when needed. Thanks for posting.
    electronic signature Microsoft

    ReplyDelete
  2. So good information for interviews. Thanks a lot

    ReplyDelete