SlideShare a Scribd company logo
1 of 30
Message Authentication
and
Hash Function
Authentication Requirement
Disclosure Traffic Analysis Masquerade
Content Modification Sequence Modification
Timing Modification Source Repudiation
Destination Repudiation
Attacks in the Network
Message Authentication
Three Alternative Functions used
Message Encryption
Message Authentication Code (MAC)
Hash Function
Message Encryption
Provides Message Authentication
Symmetric Encryption
Receiver know sender must have created it, since only sender and
receiver now key used
Provides both: sender authentication and message authenticity.
Message Encryption
Provides Message Authentication
Public-Key Encryption
Encryption provides no confidence of sender, since anyone
potentially knows public-key.
however if sender signs message using his private-key then encrypts
with recipients public key have both secrecy and authentication
but at cost of two public-key uses on message
Message Authentication Code
A small fixed-sized block of data
Depends on both message and a secret key like encryption though need not be reversible.
Appended to message as a signature
Receiver performs same computation on message and checks with the MAC
Provides assurance that message is unaltered and comes from sender
Message Authentication Code
MAC provides Authentication
Message can be encrypted for secrecy
Generally use separate keys for each
Can compute MAC either before or after encryption, Generally regarded as better done before
why use a MAC?
sometimes only authentication is needed
Note that a MAC is not a Digital Signature
Message Authentication Code
MAC Properties
A MAC is a cryptographic checksum
MAC = CK(M)
C is a function
M is a variable-length message
K is a secret key
Many-to-One function
potentially many messages have same MAC but finding these
needs to be very difficult
Message Authentication Code
Requirements for MAC
MAC needs to satisfy the following:
Knowing a message and MAC, is infeasible to find another
message with same MAC
MAC should depend equally on all bits of the message
Message Authentication Code
Message Authentication
Message Authentication Code
Message Authentication and Confidentiality
Authentication tied to Plaintext
Message Authentication Code
Message Authentication and Confidentiality
Authentication tied to Ciphertext
Message Authentication Code
Using Symmetric Ciphers for MACs
can use any cipher block chaining mode and use final block as a MAC
Data Authentication Algorithm (DAA) is a widely used MAC based on DES-CBC
using IV=0 and zero-pad of final block
encrypt message using DES in CBC mode
and send just the final block as the MAC
or the leftmost M bits (16≤M≤64) of final block
Message Authentication Code
Using Symmetric Ciphers for MACs
Hash Function
A hash function is any algorithm that maps variable
length data to fixed length data.
Hash Function
Hash Function
• Can be applied to any size message M
• Produces a fixed-length output h
• Easy to compute h=H(M) for any message M
• Given h is infeasible to find x s.t. H(x)=h
• Given x is infeasible to find y s.t. H(y)=H(x)
• infeasible to find any x,y s.t. H(y)=H(x)
Requirements for Hash Functions
Hash Function
MD5 Algorithm
The input message is broken up into chunks of 512-bit blocks (sixteen 32 bit
words).
The message is padded so that its length is divisible by 512
Grouped into four Round (each round process four 32 bit words)
Hash Function
MD5 Algorithm
32 bit
denote the XOR, AND, OR and NOT operations
Mi denotes a 32-bit block of the message input
Ki denotes a 32-bit constant
denotes a left bit rotation by s places
denotes addition modulo 232
SECURE HASH ALGORITHM
SHA 512
Message size : < 2128
Message Digest Size : 512
Block Size : 1024
SECURE HASH ALGORITHM
Step 1: Append padding bits
Step 2: Append Length
Step 3: Initialize HASH buffer
Step 4: Process message in 1024 bit Blocks
Step 5: Output
SECURE HASH ALGORITHM
Step 1: Append padding bits
The message is padded so that length ≡ 896 (mod 1024)
padding is always added
consist of single 1-bit followed by necessary number of 0-bits
SECURE HASH ALGORITHM
Step 2:Append Length
a block of 128 bits is appended
treated as unsigned 128-bit integer
contains the length of original message
SECURE HASH ALGORITHM
Step 3:Initialize hash buffer
hold intermediate values and final result
size: 512 bit
SECURE HASH ALGORITHM
Step 4:Process message in 1024-bit block
Consists 80 rounds
updating a 512-bit buffer using a 64-bit value
Wt derived from the current message block
and a round constant based on cube root of first 80 prime numbers
SECURE HASH ALGORITHM
Step 4:Process message
in 1024-bit block
Step 5:Output
SECURE HASH ALGORITHM
Creation of 80-word Input Sequence for SHA-512 Processing of Single Block
SECURE HASH ALGORITHM
Ch(e,f,g) = If e then f else g
Maj(a, b, c) = TRUE if majority
of a, b, c is TRUE
Wt = 64 bit word
Kt = 64 bit additive constant
HMAC
• Stands for Hash-based Message Authentication Code
• It used to verify data integrity and authenticity of a
message
• It uses current cryptographic hash functions with a secret
key (SHA or MD5)
The name of the function changes depending on what
hash function you use
MD5 would result to HMAC-MD5
SHA# would result to HMAC-SHA#
HMAC
• Stands for Hash-based Message Authentication Code
• It used to verify data integrity and authenticity of a
message
• It uses current cryptographic hash functions with a secret
key (SHA or MD5)
The name of the function changes depending on what
hash function you use
MD5 would result to HMAC-MD5
SHA# would result to HMAC-SHA#

More Related Content

What's hot

Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)Haris Ahmed
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication CodesDarshanPatil82
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit ivArthyR3
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit vArthyR3
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationsarhadisoftengg
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authenticationchauhankapil
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
One time pad Encryption:
One time pad Encryption:One time pad Encryption:
One time pad Encryption:Asad Ali
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptographydrewz lin
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Securitybabak danyal
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacyPawan Arya
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standardVasuki Ramasamy
 
6. cryptography
6. cryptography6. cryptography
6. cryptography7wounders
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
Topic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesTopic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesMdFazleRabbi18
 

What's hot (20)

Data Encryption Standard (DES)
Data Encryption Standard (DES)Data Encryption Standard (DES)
Data Encryption Standard (DES)
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cs8792 cns - unit v
Cs8792   cns - unit vCs8792   cns - unit v
Cs8792 cns - unit v
 
DES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentationDES (Data Encryption Standard) pressentation
DES (Data Encryption Standard) pressentation
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
CRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITYCRYPTOGRAPHY AND NETWORK SECURITY
CRYPTOGRAPHY AND NETWORK SECURITY
 
One time pad Encryption:
One time pad Encryption:One time pad Encryption:
One time pad Encryption:
 
Key management
Key managementKey management
Key management
 
13 asymmetric key cryptography
13   asymmetric key cryptography13   asymmetric key cryptography
13 asymmetric key cryptography
 
Classical Encryption Techniques in Network Security
Classical Encryption Techniques in Network SecurityClassical Encryption Techniques in Network Security
Classical Encryption Techniques in Network Security
 
Pgp pretty good privacy
Pgp pretty good privacyPgp pretty good privacy
Pgp pretty good privacy
 
Hash function
Hash function Hash function
Hash function
 
Transposition Cipher
Transposition CipherTransposition Cipher
Transposition Cipher
 
Data encryption standard
Data encryption standardData encryption standard
Data encryption standard
 
6. cryptography
6. cryptography6. cryptography
6. cryptography
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Topic1 substitution transposition-techniques
Topic1 substitution transposition-techniquesTopic1 substitution transposition-techniques
Topic1 substitution transposition-techniques
 

Similar to Message Authentication Codes and Hash Functions

Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit ivArthyR3
 
Cryptography and network_security
Cryptography and network_securityCryptography and network_security
Cryptography and network_securityJanani Satheshkumar
 
Information and data security cryptography and network security
Information and data security cryptography and network securityInformation and data security cryptography and network security
Information and data security cryptography and network securityMazin Alwaaly
 
Message Authentication Requirement-MAC
Message Authentication Requirement-MACMessage Authentication Requirement-MAC
Message Authentication Requirement-MACSou Jana
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash functionomarShiekh1
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3koolkampus
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMaitree Patel
 
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKUNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKjeevasreemurali
 
unit - III.pptx
unit - III.pptxunit - III.pptx
unit - III.pptxsandyBS
 
Message Authentication and Hash Function.pdf
Message Authentication and Hash Function.pdfMessage Authentication and Hash Function.pdf
Message Authentication and Hash Function.pdfsunil sharma
 
Message auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxMessage auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxaribariaz507
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithmsYoung Alista
 

Similar to Message Authentication Codes and Hash Functions (20)

Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
Cns
CnsCns
Cns
 
Cryptography and network_security
Cryptography and network_securityCryptography and network_security
Cryptography and network_security
 
Information and data security cryptography and network security
Information and data security cryptography and network securityInformation and data security cryptography and network security
Information and data security cryptography and network security
 
Message Authentication Requirement-MAC
Message Authentication Requirement-MACMessage Authentication Requirement-MAC
Message Authentication Requirement-MAC
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3
 
Unit 3
Unit 3Unit 3
Unit 3
 
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block CiphersMACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions, MACs based on Block Ciphers
 
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORKUNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
 
ch11.ppt
ch11.pptch11.ppt
ch11.ppt
 
unit - III.pptx
unit - III.pptxunit - III.pptx
unit - III.pptx
 
lecture13.pdf
lecture13.pdflecture13.pdf
lecture13.pdf
 
Ch11
Ch11Ch11
Ch11
 
Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4
 
Message Authentication and Hash Function.pdf
Message Authentication and Hash Function.pdfMessage Authentication and Hash Function.pdf
Message Authentication and Hash Function.pdf
 
Message auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptxMessage auth. code Based on Hash Functions.pptx
Message auth. code Based on Hash Functions.pptx
 
MD5.pptx.pdf
MD5.pptx.pdfMD5.pptx.pdf
MD5.pptx.pdf
 
final ppt TS.pptx
final ppt TS.pptxfinal ppt TS.pptx
final ppt TS.pptx
 
Hash mac algorithms
Hash mac algorithmsHash mac algorithms
Hash mac algorithms
 

Recently uploaded

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations120cr0395
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxupamatechverse
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSSIVASHANKAR N
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Christo Ananth
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).pptssuser5c9d4b1
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Recently uploaded (20)

High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Isha Call 7001035870 Meet With Nagpur Escorts
 
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
(RIA) Call Girls Bhosari ( 7001035870 ) HI-Fi Pune Escorts Service
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024Water Industry Process Automation & Control Monthly - April 2024
Water Industry Process Automation & Control Monthly - April 2024
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Extrusion Processes and Their Limitations
Extrusion Processes and Their LimitationsExtrusion Processes and Their Limitations
Extrusion Processes and Their Limitations
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
Introduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptxIntroduction to IEEE STANDARDS and its different types.pptx
Introduction to IEEE STANDARDS and its different types.pptx
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLSMANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
MANUFACTURING PROCESS-II UNIT-5 NC MACHINE TOOLS
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(PRIYA) Rajgurunagar Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
Call for Papers - African Journal of Biological Sciences, E-ISSN: 2663-2187, ...
 
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
247267395-1-Symmetric-and-distributed-shared-memory-architectures-ppt (1).ppt
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
Call Girls in Nagpur Suman Call 7001035870 Meet With Nagpur Escorts
 

Message Authentication Codes and Hash Functions

  • 2. Authentication Requirement Disclosure Traffic Analysis Masquerade Content Modification Sequence Modification Timing Modification Source Repudiation Destination Repudiation Attacks in the Network
  • 3. Message Authentication Three Alternative Functions used Message Encryption Message Authentication Code (MAC) Hash Function
  • 4. Message Encryption Provides Message Authentication Symmetric Encryption Receiver know sender must have created it, since only sender and receiver now key used Provides both: sender authentication and message authenticity.
  • 5. Message Encryption Provides Message Authentication Public-Key Encryption Encryption provides no confidence of sender, since anyone potentially knows public-key. however if sender signs message using his private-key then encrypts with recipients public key have both secrecy and authentication but at cost of two public-key uses on message
  • 6. Message Authentication Code A small fixed-sized block of data Depends on both message and a secret key like encryption though need not be reversible. Appended to message as a signature Receiver performs same computation on message and checks with the MAC Provides assurance that message is unaltered and comes from sender
  • 7. Message Authentication Code MAC provides Authentication Message can be encrypted for secrecy Generally use separate keys for each Can compute MAC either before or after encryption, Generally regarded as better done before why use a MAC? sometimes only authentication is needed Note that a MAC is not a Digital Signature
  • 8. Message Authentication Code MAC Properties A MAC is a cryptographic checksum MAC = CK(M) C is a function M is a variable-length message K is a secret key Many-to-One function potentially many messages have same MAC but finding these needs to be very difficult
  • 9. Message Authentication Code Requirements for MAC MAC needs to satisfy the following: Knowing a message and MAC, is infeasible to find another message with same MAC MAC should depend equally on all bits of the message
  • 11. Message Authentication Code Message Authentication and Confidentiality Authentication tied to Plaintext
  • 12. Message Authentication Code Message Authentication and Confidentiality Authentication tied to Ciphertext
  • 13. Message Authentication Code Using Symmetric Ciphers for MACs can use any cipher block chaining mode and use final block as a MAC Data Authentication Algorithm (DAA) is a widely used MAC based on DES-CBC using IV=0 and zero-pad of final block encrypt message using DES in CBC mode and send just the final block as the MAC or the leftmost M bits (16≤M≤64) of final block
  • 14. Message Authentication Code Using Symmetric Ciphers for MACs
  • 15. Hash Function A hash function is any algorithm that maps variable length data to fixed length data.
  • 17. Hash Function • Can be applied to any size message M • Produces a fixed-length output h • Easy to compute h=H(M) for any message M • Given h is infeasible to find x s.t. H(x)=h • Given x is infeasible to find y s.t. H(y)=H(x) • infeasible to find any x,y s.t. H(y)=H(x) Requirements for Hash Functions
  • 18. Hash Function MD5 Algorithm The input message is broken up into chunks of 512-bit blocks (sixteen 32 bit words). The message is padded so that its length is divisible by 512 Grouped into four Round (each round process four 32 bit words)
  • 19. Hash Function MD5 Algorithm 32 bit denote the XOR, AND, OR and NOT operations Mi denotes a 32-bit block of the message input Ki denotes a 32-bit constant denotes a left bit rotation by s places denotes addition modulo 232
  • 20. SECURE HASH ALGORITHM SHA 512 Message size : < 2128 Message Digest Size : 512 Block Size : 1024
  • 21. SECURE HASH ALGORITHM Step 1: Append padding bits Step 2: Append Length Step 3: Initialize HASH buffer Step 4: Process message in 1024 bit Blocks Step 5: Output
  • 22. SECURE HASH ALGORITHM Step 1: Append padding bits The message is padded so that length ≡ 896 (mod 1024) padding is always added consist of single 1-bit followed by necessary number of 0-bits
  • 23. SECURE HASH ALGORITHM Step 2:Append Length a block of 128 bits is appended treated as unsigned 128-bit integer contains the length of original message
  • 24. SECURE HASH ALGORITHM Step 3:Initialize hash buffer hold intermediate values and final result size: 512 bit
  • 25. SECURE HASH ALGORITHM Step 4:Process message in 1024-bit block Consists 80 rounds updating a 512-bit buffer using a 64-bit value Wt derived from the current message block and a round constant based on cube root of first 80 prime numbers
  • 26. SECURE HASH ALGORITHM Step 4:Process message in 1024-bit block Step 5:Output
  • 27. SECURE HASH ALGORITHM Creation of 80-word Input Sequence for SHA-512 Processing of Single Block
  • 28. SECURE HASH ALGORITHM Ch(e,f,g) = If e then f else g Maj(a, b, c) = TRUE if majority of a, b, c is TRUE Wt = 64 bit word Kt = 64 bit additive constant
  • 29. HMAC • Stands for Hash-based Message Authentication Code • It used to verify data integrity and authenticity of a message • It uses current cryptographic hash functions with a secret key (SHA or MD5) The name of the function changes depending on what hash function you use MD5 would result to HMAC-MD5 SHA# would result to HMAC-SHA#
  • 30. HMAC • Stands for Hash-based Message Authentication Code • It used to verify data integrity and authenticity of a message • It uses current cryptographic hash functions with a secret key (SHA or MD5) The name of the function changes depending on what hash function you use MD5 would result to HMAC-MD5 SHA# would result to HMAC-SHA#