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

PGP S/MIME
PGP S/MIMEPGP S/MIME
PGP S/MIMESou Jana
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithmsRashmi Burugupalli
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication CodesDarshanPatil82
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherNiloy Biswas
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSADr.Florence Dayana
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network securitybabak danyal
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distributionRiya Choudhary
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYKathirvel Ayyaswamy
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Dr. Kapil Gupta
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMACKrishna Gehlot
 
Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)Sandeep Gupta
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and CryptographyAdam Reagan
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardDr.Florence Dayana
 

What's hot (20)

PGP S/MIME
PGP S/MIMEPGP S/MIME
PGP S/MIME
 
symmetric key encryption algorithms
 symmetric key encryption algorithms symmetric key encryption algorithms
symmetric key encryption algorithms
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 
Hash Function
Hash FunctionHash Function
Hash Function
 
Cryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipherCryptography - Block cipher & stream cipher
Cryptography - Block cipher & stream cipher
 
2. public key cryptography and RSA
2. public key cryptography and RSA2. public key cryptography and RSA
2. public key cryptography and RSA
 
key distribution in network security
key distribution in network securitykey distribution in network security
key distribution in network security
 
Ch02...1
Ch02...1Ch02...1
Ch02...1
 
Cryptography
CryptographyCryptography
Cryptography
 
Kerberos
KerberosKerberos
Kerberos
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Cryptography
CryptographyCryptography
Cryptography
 
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITYCS6701 CRYPTOGRAPHY AND NETWORK SECURITY
CS6701 CRYPTOGRAPHY AND NETWORK SECURITY
 
Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security Chapter 1 Introduction of Cryptography and Network security
Chapter 1 Introduction of Cryptography and Network security
 
Message Authentication Code & HMAC
Message Authentication Code & HMACMessage Authentication Code & HMAC
Message Authentication Code & HMAC
 
Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)Ssl (Secure Socket Layer)
Ssl (Secure Socket Layer)
 
Transposition Cipher
Transposition CipherTransposition Cipher
Transposition Cipher
 
Network Security and Cryptography
Network Security and CryptographyNetwork Security and Cryptography
Network Security and Cryptography
 
Hash function
Hash functionHash function
Hash function
 
Block Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption StandardBlock Ciphers and the Data Encryption Standard
Block Ciphers and the Data Encryption Standard
 

Similar to 5. message authentication and hash function

Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit ivArthyR3
 
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
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authenticationchauhankapil
 
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
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
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
 

Similar to 5. message authentication and hash function (20)

Cs8792 cns - unit iv
Cs8792   cns - unit ivCs8792   cns - unit iv
Cs8792 cns - unit iv
 
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
 
Message Authentication
Message AuthenticationMessage Authentication
Message Authentication
 
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
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
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
 

Recently uploaded

💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...vershagrag
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...drmkjayanthikannan
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptAfnanAhmad53
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXssuser89054b
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiessarkmank1
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdfKamal Acharya
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationBhangaleSonal
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdfAldoGarca30
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...jabtakhaidam7
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxMuhammadAsimMuhammad6
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityMorshed Ahmed Rahath
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network DevicesChandrakantDivate1
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayEpec Engineered Technologies
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Call Girls Mumbai
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesRashidFaridChishti
 

Recently uploaded (20)

💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
💚Trustworthy Call Girls Pune Call Girls Service Just Call 🍑👄6378878445 🍑👄 Top...
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
Unit 4_Part 1 CSE2001 Exception Handling and Function Template and Class Temp...
 
Integrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - NeometrixIntegrated Test Rig For HTFE-25 - Neometrix
Integrated Test Rig For HTFE-25 - Neometrix
 
fitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .pptfitting shop and tools used in fitting shop .ppt
fitting shop and tools used in fitting shop .ppt
 
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 
PE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and propertiesPE 459 LECTURE 2- natural gas basic concepts and properties
PE 459 LECTURE 2- natural gas basic concepts and properties
 
Hostel management system project report..pdf
Hostel management system project report..pdfHostel management system project report..pdf
Hostel management system project report..pdf
 
DC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equationDC MACHINE-Motoring and generation, Armature circuit equation
DC MACHINE-Motoring and generation, Armature circuit equation
 
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
1_Introduction + EAM Vocabulary + how to navigate in EAM.pdf
 
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak HamilCara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
Cara Menggugurkan Sperma Yang Masuk Rahim Biyar Tidak Hamil
 
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
Jaipur ❤CALL GIRL 0000000000❤CALL GIRLS IN Jaipur ESCORT SERVICE❤CALL GIRL IN...
 
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptxOrlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
Orlando’s Arnold Palmer Hospital Layout Strategy-1.pptx
 
A Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna MunicipalityA Study of Urban Area Plan for Pabna Municipality
A Study of Urban Area Plan for Pabna Municipality
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Computer Networks Basics of Network Devices
Computer Networks  Basics of Network DevicesComputer Networks  Basics of Network Devices
Computer Networks Basics of Network Devices
 
Standard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power PlayStandard vs Custom Battery Packs - Decoding the Power Play
Standard vs Custom Battery Packs - Decoding the Power Play
 
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
Bhubaneswar🌹Call Girls Bhubaneswar ❤Komal 9777949614 💟 Full Trusted CALL GIRL...
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using PipesLinux Systems Programming: Inter Process Communication (IPC) using Pipes
Linux Systems Programming: Inter Process Communication (IPC) using Pipes
 

5. message authentication and hash function

  • 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#