Presentation is loading. Please wait.

Presentation is loading. Please wait.

Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy

Similar presentations


Presentation on theme: "Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy"— Presentation transcript:

1 Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy
Computer Security Lecture 6 Ch.11 Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy

2 Cryptographic Hash Functions
Applications of Cryptographic Hash Functions Message Authentication Digital Signatures Other Applications Two Simple Hash Functions Requirements and Security Security Requirements for Cryptographic Hash Functions Brute-Force Attacks Cryptanalysis Hash Functions Based on Cipher Block Chaining Secure Hash Algorithm (SHA) SHA-512 Logic SHA-512 Round Function 11.6 SHA-3

3 Cryptographic Hash Functions Key Points
Hash function Variable-length message Fixed-length message digest Cryptographic hash functions iterative use of a compression function Compression function Specific function (SHA) Symmetric block cipher (Whirlpool)

4 Cryptographic Hash Functions
Hash function Computationally infeasible One-way property Collision-free property Data Integrity H “Hash function” M H(M)

5 Cryptographic Hash Functions Block diagram

6 Cryptographic Hash Functions Applications
Message Authentication Digital Signatures Other Applications (Internet protocols)

7 Cryptographic Hash Functions Message Authentication
Message authentication Mechanism or service used to verify the integrity of a message. No modification No insertion No deletion No replay

8 Cryptographic Hash Functions Message Authentication
Confidentiality No Confidentiality

9 Cryptographic Hash Functions Message Authentication
Confidentiality

10 Cryptographic Hash Functions Message Authentication
No confidentiality: method (b) has an advantage over methods (a) and (d) less computation Avoid encryption method (c) Encryption software relatively slow Encryption hardware high cost Time high Encryption algorithms patents cost

11 Cryptographic Hash Functions Message Authentication
MAC: message authentication code (keyed hash function) M: variable-length message K: secret key K Output: fixed-size

12 Cryptographic Hash Functions Digital Signatures
Private key H “Hash function” M H(M) Encryption algorithm Public key

13 Cryptographic Hash Functions Digital Signatures

14 Cryptographic Hash Functions Digital Signatures
Digital signature private-key-encrypted hash code authentication (only the sender could have produced the encrypted hash code, essence of the digital signature technique) Confidentiality + Digital signature message + private-key-encrypted hash code encrypted using a symmetric secret key

15 Cryptographic Hash Functions Digital Signatures

16 Cryptographic Hash Functions Other Applications
One-way password file Intrusion detection Virus detection Pseudorandom function(PRF) or a Pseudorandom number generator (PRNG).

17 Cryptographic Hash Functions Password

18 Cryptographic Hash Functions Two Simple Hash Functions
Bit-by-Bit exclusive-OR (XOR) of every block

19 Cryptographic Hash Functions Two Simple Hash Functions
Rotated exclusive-OR (XOR) of every block Initially set the -bit hash value to zero. Process each successive -bit block of data as follows: a. Rotate the current hash value to the left by one bit. b. XOR the block into the hash value.

20 Cryptographic Hash Functions Requirements and Security

21 Cryptographic Hash Functions Second Preimage Resistant

22 Cryptographic Hash Functions Second Preimage Resistant

23 Cryptographic Hash Functions Requirements and Security
Brute-force attacks bit length (hash value) Cryptanalysis weaknesses in cryptographic algorithm

24 Cryptographic Hash Functions Brute-Force Attacks
Preimage and second preimage attacks y H(y)=h Collision resistant attacks y H(y) Birthday paradox

25 Cryptographic Hash Functions Brute-Force Attacks
m: number of hash value bits

26 Cryptographic Hash Functions Cryptanalysis
Merkle–Damgård hash function

27 Cryptographic Hash Functions Cryptanalysis

28 Cryptographic Hash Functions Secure Hash Algorithm(SHA)
National Institute of Standards and Technology (NIST)- Federal information processing standard (FIPS 180)-1993 SHA (1993) SHA (1995) SHA-256 SHA (2002) SHA-512

29 Cryptographic Hash Functions Secure Hash Algorithm(SHA)

30 Cryptographic Hash Functions SHA-512 Logic

31 Cryptographic Hash Functions SHA-512 Logic
Append padding bits (length≡896 mod 1024) Append length (128 bits=16 bytes) Initialize hash buffer 4. Process message in 1024-bit blocks 5. Output 80 rounds

32

33 Cryptographic Hash Functions SHA-512 Logic

34 Cryptographic Hash Functions SHA-512 Logic
Let 32 bit quantity AB12CD16 4 bytes are: 90, AB, 12, CD Two ways to store in memory Address Value 1000 CD 1001 12 1002 AB 1003 90 Address Value 1000 90 1001 AB 1002 12 1003 CD Big -endian Little -endian

35 Cryptographic Hash Functions SHA-512 Round Function

36 Cryptographic Hash Functions SHA-512 Round Function

37 Cryptographic Hash Functions SHA-512 Round Function

38 Cryptographic Hash Functions SHA-512 Round Function

39 Cryptographic Hash Functions SHA-3
SHA-1& SHA Not broken NIST competition (2007) SHA-3 Replace SHA-2 with SHA-3 in any application by a simple drop-in substitution. Preserve online nature (SHA-2) small blocks (no buffer-entire message)

40 Length=24 bits=18 hexadecimal
Example Length=24 bits=18 hexadecimal ASCII code M=“abc” 1024-bit massage Padding bits=896-24=871

41 Cryptographic Hash Functions Example

42 Cryptographic Hash Functions Example
After two rounds

43 Example After 80 rounds Hash value

44 Example 512-bit message digest Finally

45 Thank you for your attention


Download ppt "Cryptographic Hash Functions Prepared by Dr. Lamiaa Elshenawy"

Similar presentations


Ads by Google