SlideShare a Scribd company logo
1 of 43
Chapter – 11
Message Authentication
and
Hash Functions
Contents
 Authentication Requirements
 Authentication Functions
 Message Authentication Codes (MACs)
 Hash Functions
 Security of Hash Functions and MACs
 One of the key aspect of cryptography –
authentication.
 Many ways to authenticate the user.
It helps to establish trust – by identifying
the particular user.
Best and popular method – user id and password
So, modern password based authentication follows encryption and
randomness mechanism to protect password from attackers.
Note Password – when travel across network - dangerous
Authentication Requirements
 In the context of communications across a network, the
following attacks are identified
1. Disclosure
2. Traffic analysis
3. Masquerade
4. Content modification
5. Sequence modification
6. Timing modification
7. Source repudiation
8. Destination repudiation
Authentication Requirements
1. Disclosure : Release of message contents to any person, not
possessing the appropriate the cryptographic key
2. Traffic analysis : Discovers traffic between parties.
In connection oriented applications, frequency and duration of
connections can be determined.
In connection oriented or connectionless, the number and length
of messages can be identified
3. Masquerade : Insertion of messages into the network from the
fraudulent source.
4. Content modification : changes to the content of the message
including insertion, deletion, transposition and modification.
5. Sequence Modification : Any modification to the sequence of
messages b/w parties including insertion, deletion and reordering.
6. Timing Modification : Delay or replay of messages.
In connection oriented application, either entire sequence of
messages or entire session can be delayed.
In connectionless application, individual message can be delayed
7. Source Repudiation : Denial of transmission of message by
Source
8.Destination Repudiation : Denial of receipt of message by
Destination
The security measures for the following attacks…
1 and 2 ------> Message Confidentiality
3, 4, 5, 6 ------> Message Authentication
7 ------> Digital Signatures
8 -------> Digital Signatures + protocol
designed to counter this attack
Authentication Requirements - Summary
Message authentication
A procedure to verify that received messages come
from the alleged source and have not been altered
Message authentication may also verify sequencing
and timeliness
Digital signature
An authentication technique that also includes
measures to counter repudiation by the source
Authentication Functions
 Message authentication or digital signature mechanism can
be viewed as having two levels
 At lower level: there must be some sort of functions producing
an authenticator – a value to be used to authenticate a message
 This lower level functions is used as primitive in a higher level
authentication protocol
Types of Functions used to
produce an Authenticator
 Three classes of functions that may be used to produce an
authenticator
1. Message encryption
- Cipher text itself serves as authenticator
2. Message authentication code (MAC)
- A public function of the message and a secret key that produces a
fixed-length value that serves as the authenticator
3. Hash function
- A function that maps a message of any length into a fixed-length hash
value that serves as the authenticator
Method – 1
Message Encryption
Message Encryption
 K is shared both by A and B.
 No other person know the key(K)
 No other party recover the plain text except A and B.
M - Original Message. E - Encryption
K - Secret Key D - Decryption
Drawbacks: The plain text can be easily captured and modified
by the opponent
Solution to the plain text attack.
To avoid the plain text, give some other structure to the
plain text, to avoid replication of message or duplication
of the message.
A prepares a plain text message M and then provides
this input to the function F that produces an FCS
For this, Append an error-detecting code (frame check
sequence (FCS) or checksum) to each message before
encryption
B decrypts the incoming block
M - Original Message E – Encryption
K - Secret Key D – Decryption
FCS – Frame check sequence || - concatenation operator
Contd…
 FCS is performed before encryption [internal error
control] and after encryption [external error control]
respectively.
 In both the methods, if the calculated FCS at the
destination side is generated FCS at the sender side, the
message transmitted is considered as an authentic
message.
Public key Encryption
Public key encryption.
Hence 2 keys – public key and private key
Method – 2
Message Authentication Codes
Message Authentication Code
 Uses a shared secret key to generate a fixed-size
block of data (known as a cryptographic
checksum or MAC) that is appended to the
message
 The MAC is appended to the message at the source at
a time when the message is assumed or known to be
correct.
 The receiver authenticates that message by
recomputing the MAC
MAC = CK(M),
where C is a MAC function & M is a variable length message
Contd…
Note:
MAC is Similar to encryption but MAC algorithm need not be
reversible
-- > this MAC function is a many to one function
-- > the domain of the function consists of some arbitrary length,
whereas the range consists of all possible Macs and all possible
keys.
Contd…
 Assurances:
Message has not been altered
Message is from the alleged sender
Message sequence is unaltered
(requires internal sequencing)
If we assume that the sender and the receiver know
the identity of the secret key and if the received MAC
matches the calculated MAC, we assure the following
MAC Properties
 a MAC is a cryptographic checksum
MAC = CK(M)
 condenses a variable-length message M
 using a secret key K
 to a fixed-sized authenticator
 is a many-to-one function
 potentially many messages have same MAC
 but finding these needs to be very difficult
REQUIREMENTS FOR MACs
 First, the security of MAC algorithm depends on the
bit length of the key
 Suppose the key size(K) is greater than the MAC
size(n), then more number of keys will produce the
correct MAC and the opponent has no way of knowing
which is the correct key.
 On average, a total of 2k/2n = 2(k-n)
B’cos opponent should not try the possible
keys with the Brute force attack.
Hash functions
 A variation on the MAC is the hash function.
Message M
[Variable size]
Hash
function
Hash code, H(M)
[Fixed size output]
It’ll not use the
key, unlike MAC
Referred as
Message digest
or hash value
Note:
1. Hash code is a function of all the bits of the message and provides
error detection capability.
2. A change to any bit or bits in the message results in the change in
the Hash code
TYPE 1
Type 1 – Hash function
o The message + concatenated hash code is
encrypted using symmetric encryption.
o Since encryption applied to the entire message +
hash code , confidentiality is also provided.
o The hash code provide a structure, which is
required to provide authentication.
o It is similar to internal error control strategy.
TYPE 2
Type 2 – Hash function
Only hash code is encrypted using symmetric
encryption.
This reduces the processing burden for those
applications, which do not require
confidentiality.
The transferred message is secure, since the
opponent do not know the secret key
TYPE 3
Type 3 – Hash function
Only hash code is encrypted, using public key
encryption and using senders private key.
It provides both authentication and the digital
signature.
TYPE 4
Type 4 – Hash function
 If confidentiality as well as the digital signature is
desired, then public key encrypted hash code is
encrypted using symmetric key
TYPE 5
Type 5 – Hash function
• This technique uses a hash function but no
encryption for message authentication.
• This technique assumes that 2 communicating
parties share a common secret value S and
appends to the resulting hash value
• Since B possesses S, it recompute the hash value
to verify.
TYPE 6
Type 6 – Hash function
• Confidentiality added to the above approach, by
encrypting the entire message + hash code.
 Normally we prefer for techniques, that avoid
encryption.
 Reasons for this are,
1. Encryption software is quite slow. Even though amount of
data to be encrypted is small, there may be steady
stream of messages into and out of the stream.
2. Encryption hardware costs are not negligible. Even though
low cost chip implementations of DES are available, it is not
proper for larger networks.
3. Normally encryption algorithms are patent. Ex. RSA – should be
public licensed.
4. Encryption algorithms are subject to U.S export control.
Message authentication codes
 A MAC, also known as a cryptographic checksum,
is generated by a function C of the form.
where M is a variable length message, K is the
secret key shared by sender and receiver and
CK(M) is the fixed length authenticator
 Requirements for MACs
 Message authentication code based on DES
MAC = CK(M), where C is a MAC function

More Related Content

Similar to Message Authentication Codes and Hash Functions Explained

MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication CodesDarshanPatil82
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing Shakas Technologies
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxhallettfaustina
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxdohertyjoetta
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxvannagoforth
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingEfficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingIGEEKS TECHNOLOGIES
 
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
 
Message authentication between the nodes
Message authentication between the nodesMessage authentication between the nodes
Message authentication between the nodesSelva Raj
 
Message authentication
Message authenticationMessage authentication
Message authenticationCAS
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3koolkampus
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingEfficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingIGEEKS TECHNOLOGIES
 

Similar to Message Authentication Codes and Hash Functions Explained (20)

Iss lecture 4
Iss lecture 4Iss lecture 4
Iss lecture 4
 
network security
network securitynetwork security
network security
 
MAC-Message Authentication Codes
MAC-Message Authentication CodesMAC-Message Authentication Codes
MAC-Message Authentication Codes
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docx
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docx
 
Network Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docxNetwork Security Essentials Applications and StandardsSixth E.docx
Network Security Essentials Applications and StandardsSixth E.docx
 
Unit 3
Unit 3Unit 3
Unit 3
 
Message Authentication: MAC, Hashes
Message Authentication: MAC, HashesMessage Authentication: MAC, Hashes
Message Authentication: MAC, Hashes
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingEfficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing
 
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash FunctionsCRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
 
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
 
Message authentication between the nodes
Message authentication between the nodesMessage authentication between the nodes
Message authentication between the nodes
 
Message authentication
Message authenticationMessage authentication
Message authentication
 
Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3Cryptography and Message Authentication NS3
Cryptography and Message Authentication NS3
 
Cns
CnsCns
Cns
 
Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4Cryptography and netwrk securityunit 4
Cryptography and netwrk securityunit 4
 
Efficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computingEfficient authentication for mobile and pervasive computing
Efficient authentication for mobile and pervasive computing
 
ch11.ppt
ch11.pptch11.ppt
ch11.ppt
 

Recently uploaded

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130Suhani Kapoor
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSKurinjimalarL3
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxvipinkmenon1
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024hassan khalil
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130Suhani Kapoor
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learningmisbanausheenparvam
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile servicerehmti665
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )Tsuyoshi Horigome
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxJoão Esperancinha
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AIabhishek36461
 
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
 

Recently uploaded (20)

CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
VIP Call Girls Service Kondapur Hyderabad Call +91-8250192130
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICSAPPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
APPLICATIONS-AC/DC DRIVES-OPERATING CHARACTERISTICS
 
Introduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptxIntroduction to Microprocesso programming and interfacing.pptx
Introduction to Microprocesso programming and interfacing.pptx
 
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024Architect Hassan Khalil Portfolio for 2024
Architect Hassan Khalil Portfolio for 2024
 
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
VIP Call Girls Service Hitech City Hyderabad Call +91-8250192130
 
chaitra-1.pptx fake news detection using machine learning
chaitra-1.pptx  fake news detection using machine learningchaitra-1.pptx  fake news detection using machine learning
chaitra-1.pptx fake news detection using machine learning
 
Call Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile serviceCall Girls Delhi {Jodhpur} 9711199012 high profile service
Call Girls Delhi {Jodhpur} 9711199012 high profile service
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur EscortsHigh Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
High Profile Call Girls Nagpur Meera Call 7001035870 Meet With Nagpur Escorts
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )SPICE PARK APR2024 ( 6,793 SPICE Models )
SPICE PARK APR2024 ( 6,793 SPICE Models )
 
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptxExploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
Exploring_Network_Security_with_JA3_by_Rakesh Seal.pptx
 
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptxDecoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
Decoding Kotlin - Your guide to solving the mysterious in Kotlin.pptx
 
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
★ CALL US 9953330565 ( HOT Young Call Girls In Badarpur delhi NCR
 
Past, Present and Future of Generative AI
Past, Present and Future of Generative AIPast, Present and Future of Generative AI
Past, Present and Future of Generative AI
 
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...
 

Message Authentication Codes and Hash Functions Explained

  • 1. Chapter – 11 Message Authentication and Hash Functions
  • 2. Contents  Authentication Requirements  Authentication Functions  Message Authentication Codes (MACs)  Hash Functions  Security of Hash Functions and MACs
  • 3.  One of the key aspect of cryptography – authentication.  Many ways to authenticate the user. It helps to establish trust – by identifying the particular user. Best and popular method – user id and password So, modern password based authentication follows encryption and randomness mechanism to protect password from attackers. Note Password – when travel across network - dangerous
  • 4. Authentication Requirements  In the context of communications across a network, the following attacks are identified 1. Disclosure 2. Traffic analysis 3. Masquerade 4. Content modification 5. Sequence modification 6. Timing modification 7. Source repudiation 8. Destination repudiation Authentication Requirements
  • 5. 1. Disclosure : Release of message contents to any person, not possessing the appropriate the cryptographic key 2. Traffic analysis : Discovers traffic between parties. In connection oriented applications, frequency and duration of connections can be determined. In connection oriented or connectionless, the number and length of messages can be identified 3. Masquerade : Insertion of messages into the network from the fraudulent source.
  • 6. 4. Content modification : changes to the content of the message including insertion, deletion, transposition and modification. 5. Sequence Modification : Any modification to the sequence of messages b/w parties including insertion, deletion and reordering. 6. Timing Modification : Delay or replay of messages. In connection oriented application, either entire sequence of messages or entire session can be delayed. In connectionless application, individual message can be delayed
  • 7. 7. Source Repudiation : Denial of transmission of message by Source 8.Destination Repudiation : Denial of receipt of message by Destination The security measures for the following attacks… 1 and 2 ------> Message Confidentiality 3, 4, 5, 6 ------> Message Authentication 7 ------> Digital Signatures 8 -------> Digital Signatures + protocol designed to counter this attack
  • 8. Authentication Requirements - Summary Message authentication A procedure to verify that received messages come from the alleged source and have not been altered Message authentication may also verify sequencing and timeliness Digital signature An authentication technique that also includes measures to counter repudiation by the source
  • 9. Authentication Functions  Message authentication or digital signature mechanism can be viewed as having two levels  At lower level: there must be some sort of functions producing an authenticator – a value to be used to authenticate a message  This lower level functions is used as primitive in a higher level authentication protocol
  • 10. Types of Functions used to produce an Authenticator  Three classes of functions that may be used to produce an authenticator 1. Message encryption - Cipher text itself serves as authenticator 2. Message authentication code (MAC) - A public function of the message and a secret key that produces a fixed-length value that serves as the authenticator 3. Hash function - A function that maps a message of any length into a fixed-length hash value that serves as the authenticator
  • 11. Method – 1 Message Encryption
  • 12. Message Encryption  K is shared both by A and B.  No other person know the key(K)  No other party recover the plain text except A and B. M - Original Message. E - Encryption K - Secret Key D - Decryption
  • 13. Drawbacks: The plain text can be easily captured and modified by the opponent
  • 14. Solution to the plain text attack. To avoid the plain text, give some other structure to the plain text, to avoid replication of message or duplication of the message. A prepares a plain text message M and then provides this input to the function F that produces an FCS For this, Append an error-detecting code (frame check sequence (FCS) or checksum) to each message before encryption B decrypts the incoming block
  • 15. M - Original Message E – Encryption K - Secret Key D – Decryption FCS – Frame check sequence || - concatenation operator
  • 16. Contd…  FCS is performed before encryption [internal error control] and after encryption [external error control] respectively.  In both the methods, if the calculated FCS at the destination side is generated FCS at the sender side, the message transmitted is considered as an authentic message.
  • 17. Public key Encryption Public key encryption. Hence 2 keys – public key and private key
  • 18.
  • 19.
  • 20. Method – 2 Message Authentication Codes
  • 21. Message Authentication Code  Uses a shared secret key to generate a fixed-size block of data (known as a cryptographic checksum or MAC) that is appended to the message  The MAC is appended to the message at the source at a time when the message is assumed or known to be correct.  The receiver authenticates that message by recomputing the MAC MAC = CK(M), where C is a MAC function & M is a variable length message
  • 22. Contd… Note: MAC is Similar to encryption but MAC algorithm need not be reversible -- > this MAC function is a many to one function -- > the domain of the function consists of some arbitrary length, whereas the range consists of all possible Macs and all possible keys.
  • 23.
  • 24.
  • 25.
  • 26. Contd…  Assurances: Message has not been altered Message is from the alleged sender Message sequence is unaltered (requires internal sequencing) If we assume that the sender and the receiver know the identity of the secret key and if the received MAC matches the calculated MAC, we assure the following
  • 27. MAC Properties  a MAC is a cryptographic checksum MAC = CK(M)  condenses a variable-length message M  using a secret key K  to a fixed-sized authenticator  is a many-to-one function  potentially many messages have same MAC  but finding these needs to be very difficult
  • 28. REQUIREMENTS FOR MACs  First, the security of MAC algorithm depends on the bit length of the key  Suppose the key size(K) is greater than the MAC size(n), then more number of keys will produce the correct MAC and the opponent has no way of knowing which is the correct key.  On average, a total of 2k/2n = 2(k-n) B’cos opponent should not try the possible keys with the Brute force attack.
  • 29. Hash functions  A variation on the MAC is the hash function. Message M [Variable size] Hash function Hash code, H(M) [Fixed size output] It’ll not use the key, unlike MAC Referred as Message digest or hash value Note: 1. Hash code is a function of all the bits of the message and provides error detection capability. 2. A change to any bit or bits in the message results in the change in the Hash code
  • 31. Type 1 – Hash function o The message + concatenated hash code is encrypted using symmetric encryption. o Since encryption applied to the entire message + hash code , confidentiality is also provided. o The hash code provide a structure, which is required to provide authentication. o It is similar to internal error control strategy.
  • 33. Type 2 – Hash function Only hash code is encrypted using symmetric encryption. This reduces the processing burden for those applications, which do not require confidentiality. The transferred message is secure, since the opponent do not know the secret key
  • 35. Type 3 – Hash function Only hash code is encrypted, using public key encryption and using senders private key. It provides both authentication and the digital signature.
  • 37. Type 4 – Hash function  If confidentiality as well as the digital signature is desired, then public key encrypted hash code is encrypted using symmetric key
  • 39. Type 5 – Hash function • This technique uses a hash function but no encryption for message authentication. • This technique assumes that 2 communicating parties share a common secret value S and appends to the resulting hash value • Since B possesses S, it recompute the hash value to verify.
  • 41. Type 6 – Hash function • Confidentiality added to the above approach, by encrypting the entire message + hash code.
  • 42.  Normally we prefer for techniques, that avoid encryption.  Reasons for this are, 1. Encryption software is quite slow. Even though amount of data to be encrypted is small, there may be steady stream of messages into and out of the stream. 2. Encryption hardware costs are not negligible. Even though low cost chip implementations of DES are available, it is not proper for larger networks. 3. Normally encryption algorithms are patent. Ex. RSA – should be public licensed. 4. Encryption algorithms are subject to U.S export control.
  • 43. Message authentication codes  A MAC, also known as a cryptographic checksum, is generated by a function C of the form. where M is a variable length message, K is the secret key shared by sender and receiver and CK(M) is the fixed length authenticator  Requirements for MACs  Message authentication code based on DES MAC = CK(M), where C is a MAC function