SlideShare a Scribd company logo
11
Most read
12
Most read
13
Most read
1
VADODARA INSTITUTE OF ENGINEERING
ACTIVE LEARNING ASSIGNMENT
Presented By:
Krishna Patel 150800107047
Maitree Patel 150800107048
Meet Patel 150800107049 :
TOPIC :MACs based on Hash Functions, MACs based on Block Ciphers
Information and Network Security (2170709)
Content:
• Message Authentication
• MACs based on Hash Functions
• MACs based on Block Ciphers
1. Data Authentication Algorithm ( DAA )
2. Cipher Based Message Authentication Codes ( CMAC )
• Message authentication is concerned with:
 Protecting the integrity of a message
 Validating identity of originator
 Non-repudiation of origin (dispute resolution)
• Will consider the security requirements
• Then three alternative functions used:
 Message encryption
 Message authentication code (MAC)
 Hash function
Message Authentication
MACs based on Hash Functions
• Hash-based message authentication code (HMAC) is a specific construction for
calculating a message authentication code (MAC) involving a cryptographic hash
function in combination with a secret cryptographic key.
• As with any MAC, it may be used to simultaneously verify both the data integrity
and the authentication of a message.
• Any cryptographic hash function, such as MD5 or SHA-1, may be used in the
calculation of an HMAC; the resulting MAC algorithm is termed HMAC-MD5 or
HMAC-SHA1 accordingly.
• The cryptographic strength of the HMAC depends upon the cryptographic strength
of the underlying hash function, the size of its hash output, and on the size and
quality of the key.
MACs based on Hash Functions
• Hash-based message authentication code (HMAC) provides the server and the
client each with a public and private key.
• The public key is known, but the private key is known only to that specific server
and that specific client.
• The client creates a unique HMAC, or hash, per request to the server by combing
the request data and hashing that data, along with a private key and sending it as
part of a request.
• The server receives the request and regenerates its own unique HMAC. The server
compares the two HMACs, and, if they're equal, the client is trusted and the
request is executed. This process is often called a secret handshake.
MACs based on Hash Functions, MACs based on Block Ciphers
MACs based on Hash Functions
HMAC can be expressed as:
where
K = secret key; recommended length is ≥ n; if key length is greater than b-bit block,
the key is input to the hash function to produce an n-bit key
M = message input to HMAC,
H = cryptographic hash function,
K+ = K padded with zeros on the left so that the result is b bits in
length,
∥= concatenation,
opad = 01011100 (5C in hexadecimal) repeated b/8 times,
ipad = 00110110 (36 in hexadecimal) repeated b/8 times
MACs based on Block Ciphers
• We look at two MACs that are based on the use of a block cipher mode of
operation.
• Data Authentication Algorithm ( DAA )
• Cipher Based Message Authentication Codes ( CMAC )
Data Authentication Algorithm
• Data Authentication Algorithm(DAA) is a widely used MAC based on DES-
CBC.
• Send final block as the MAC or the leftmost M bits (16≤M≤64) of final block.
• If necessary, the final block is padded on the right with zeroes to form a full
64-bit block.
O1 = E(K, D)
O2 = E(K, [D2 ⊕ O1])
O3 = E(K, [D3 ⊕ O2])
ON = E(K, [DN ⊕ ON-1])
Data Authentication Algorithm
CMAC
CMAC (Cipher-based Message Authentication Code) is a block cipher based
MAC algorithm. It may be used to provide assurance of the authenticity and,
hence, the integrity of binary data. This mode of operation fixes security
deficiencies of CBC-MAC .
C1 = E(K, M1) Where,
C2 = E(K, [M2 ⊕ C1] T = message authentication code, also
referred to as the tag
C3 = E(K, [M3 ⊕ C2]) Tlen = bit length of T
Cn = E(K, [Mn ⊕ Cn-1 ⊕K1])
MSBs(X) = the s leftmost bits of thebit string X
T = MSBTlen(Cn)
CMAC
CMAC
Advantages
• Can use existing encryption functions.
• Encryption functions have properties that resist pre image and collision
attacks
• Disadvantage
• Encryption algorithms (particularly when chained) can be much slower than
hash algorithms
References
• http://pubs.sciepub.com/iteces/3/1/1/
• http://www.brainkart.com/article/MACS-Based-on-Block-Ciphers--DAA-
And-CMAC_8458/
Thank You

More Related Content

PPT
block ciphers
PPTX
Block cipher modes of operation
PPT
Block Cipher and its Design Principles
PPTX
MD5 ALGORITHM.pptx
PPTX
Key Management and Distribution
PPTX
IP Security
PPTX
MAC-Message Authentication Codes
block ciphers
Block cipher modes of operation
Block Cipher and its Design Principles
MD5 ALGORITHM.pptx
Key Management and Distribution
IP Security
MAC-Message Authentication Codes

What's hot (20)

PPT
SHA 1 Algorithm.ppt
PPTX
Topic1 substitution transposition-techniques
PPTX
Elgamal & schnorr digital signature scheme copy
PPT
Message Authentication Code & HMAC
PDF
Classical encryption techniques
PPTX
5. message authentication and hash function
PPTX
Security services and mechanisms
PPTX
SHA- Secure hashing algorithm
PPTX
Compiler Design Unit 4
PPTX
CMACs and MACS based on block ciphers, Digital signature
PPTX
Modern Block Cipher- Modern Symmetric-Key Cipher
PPTX
Feistel cipher
PPTX
Product Cipher
PDF
Mobile Network Layer
PDF
MD-5 : Algorithm
PPT
Sliding window protocol
PDF
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
PPT
Network security cryptographic hash function
SHA 1 Algorithm.ppt
Topic1 substitution transposition-techniques
Elgamal & schnorr digital signature scheme copy
Message Authentication Code & HMAC
Classical encryption techniques
5. message authentication and hash function
Security services and mechanisms
SHA- Secure hashing algorithm
Compiler Design Unit 4
CMACs and MACS based on block ciphers, Digital signature
Modern Block Cipher- Modern Symmetric-Key Cipher
Feistel cipher
Product Cipher
Mobile Network Layer
MD-5 : Algorithm
Sliding window protocol
Symmetric Cipher Model, Substitution techniques, Transposition techniques, St...
Network security cryptographic hash function
Ad

Similar to MACs based on Hash Functions, MACs based on Block Ciphers (20)

PDF
Computer network system presentation pdf
PDF
Message Authentication and Hash Function.pdf
PPT
Information and data security cryptography and network security
PPTX
unit4- predicate logic in artificial intelligence
PPT
Message Authentication Requirement-MAC
PPT
Message Authentication
PDF
Cs8792 cns - unit iv
PDF
Cs8792 cns - unit iv
PPT
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
PDF
Cns
PPT
ch11.ppt
PPT
cryptography and network security by william stallings
PPTX
Information and network security 42 security of message authentication code
PPT
Message Authentication: MAC, Hashes
PPTX
Cryptography and network_security
PPT
ch11.ppt
PPT
Message authentication
 
PPTX
Hash Function
PPT
Network Security Lec5
Computer network system presentation pdf
Message Authentication and Hash Function.pdf
Information and data security cryptography and network security
unit4- predicate logic in artificial intelligence
Message Authentication Requirement-MAC
Message Authentication
Cs8792 cns - unit iv
Cs8792 cns - unit iv
UNIT3_class (1).ppt CRYPTOGRAPHY NOTES AND NETWORK
Cns
ch11.ppt
cryptography and network security by william stallings
Information and network security 42 security of message authentication code
Message Authentication: MAC, Hashes
Cryptography and network_security
ch11.ppt
Message authentication
 
Hash Function
Network Security Lec5
Ad

More from Maitree Patel (11)

PPTX
Form using html and java script validation
PPT
Software engineering Testing technique,test case,test suit design
PPTX
Dotnet :Attributes
PPTX
Advance Java
PPTX
Introduction of Memory Management
PPTX
Scheduling Definition, objectives and types
PPTX
Simple Mail Transfer Protocol
PPTX
Virtual circuit and Datagram network
PPTX
Gauss Quadrature Formula
PPT
Merge sort and Quick sort
PPTX
Static Import and access modifiers
Form using html and java script validation
Software engineering Testing technique,test case,test suit design
Dotnet :Attributes
Advance Java
Introduction of Memory Management
Scheduling Definition, objectives and types
Simple Mail Transfer Protocol
Virtual circuit and Datagram network
Gauss Quadrature Formula
Merge sort and Quick sort
Static Import and access modifiers

Recently uploaded (20)

PDF
Automation-in-Manufacturing-Chapter-Introduction.pdf
DOCX
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
PPTX
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PDF
Digital Logic Computer Design lecture notes
PPTX
Lecture Notes Electrical Wiring System Components
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
additive manufacturing of ss316l using mig welding
PDF
Well-logging-methods_new................
PDF
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
PDF
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
PPT
Mechanical Engineering MATERIALS Selection
PPTX
Internet of Things (IOT) - A guide to understanding
PPTX
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPT
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
PDF
R24 SURVEYING LAB MANUAL for civil enggi
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
Construction Project Organization Group 2.pptx
Automation-in-Manufacturing-Chapter-Introduction.pdf
ASol_English-Language-Literature-Set-1-27-02-2023-converted.docx
MCN 401 KTU-2019-PPE KITS-MODULE 2.pptx
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
Digital Logic Computer Design lecture notes
Lecture Notes Electrical Wiring System Components
Embodied AI: Ushering in the Next Era of Intelligent Systems
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
additive manufacturing of ss316l using mig welding
Well-logging-methods_new................
July 2025 - Top 10 Read Articles in International Journal of Software Enginee...
keyrequirementskkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk
Mechanical Engineering MATERIALS Selection
Internet of Things (IOT) - A guide to understanding
M Tech Sem 1 Civil Engineering Environmental Sciences.pptx
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
CRASH COURSE IN ALTERNATIVE PLUMBING CLASS
R24 SURVEYING LAB MANUAL for civil enggi
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
Construction Project Organization Group 2.pptx

MACs based on Hash Functions, MACs based on Block Ciphers

  • 1. 1 VADODARA INSTITUTE OF ENGINEERING ACTIVE LEARNING ASSIGNMENT Presented By: Krishna Patel 150800107047 Maitree Patel 150800107048 Meet Patel 150800107049 : TOPIC :MACs based on Hash Functions, MACs based on Block Ciphers Information and Network Security (2170709)
  • 2. Content: • Message Authentication • MACs based on Hash Functions • MACs based on Block Ciphers 1. Data Authentication Algorithm ( DAA ) 2. Cipher Based Message Authentication Codes ( CMAC )
  • 3. • Message authentication is concerned with:  Protecting the integrity of a message  Validating identity of originator  Non-repudiation of origin (dispute resolution) • Will consider the security requirements • Then three alternative functions used:  Message encryption  Message authentication code (MAC)  Hash function Message Authentication
  • 4. MACs based on Hash Functions • Hash-based message authentication code (HMAC) is a specific construction for calculating a message authentication code (MAC) involving a cryptographic hash function in combination with a secret cryptographic key. • As with any MAC, it may be used to simultaneously verify both the data integrity and the authentication of a message. • Any cryptographic hash function, such as MD5 or SHA-1, may be used in the calculation of an HMAC; the resulting MAC algorithm is termed HMAC-MD5 or HMAC-SHA1 accordingly. • The cryptographic strength of the HMAC depends upon the cryptographic strength of the underlying hash function, the size of its hash output, and on the size and quality of the key.
  • 5. MACs based on Hash Functions • Hash-based message authentication code (HMAC) provides the server and the client each with a public and private key. • The public key is known, but the private key is known only to that specific server and that specific client. • The client creates a unique HMAC, or hash, per request to the server by combing the request data and hashing that data, along with a private key and sending it as part of a request. • The server receives the request and regenerates its own unique HMAC. The server compares the two HMACs, and, if they're equal, the client is trusted and the request is executed. This process is often called a secret handshake.
  • 7. MACs based on Hash Functions HMAC can be expressed as: where K = secret key; recommended length is ≥ n; if key length is greater than b-bit block, the key is input to the hash function to produce an n-bit key M = message input to HMAC, H = cryptographic hash function, K+ = K padded with zeros on the left so that the result is b bits in length, ∥= concatenation, opad = 01011100 (5C in hexadecimal) repeated b/8 times, ipad = 00110110 (36 in hexadecimal) repeated b/8 times
  • 8. MACs based on Block Ciphers • We look at two MACs that are based on the use of a block cipher mode of operation. • Data Authentication Algorithm ( DAA ) • Cipher Based Message Authentication Codes ( CMAC )
  • 9. Data Authentication Algorithm • Data Authentication Algorithm(DAA) is a widely used MAC based on DES- CBC. • Send final block as the MAC or the leftmost M bits (16≤M≤64) of final block. • If necessary, the final block is padded on the right with zeroes to form a full 64-bit block. O1 = E(K, D) O2 = E(K, [D2 ⊕ O1]) O3 = E(K, [D3 ⊕ O2]) ON = E(K, [DN ⊕ ON-1])
  • 11. CMAC CMAC (Cipher-based Message Authentication Code) is a block cipher based MAC algorithm. It may be used to provide assurance of the authenticity and, hence, the integrity of binary data. This mode of operation fixes security deficiencies of CBC-MAC . C1 = E(K, M1) Where, C2 = E(K, [M2 ⊕ C1] T = message authentication code, also referred to as the tag C3 = E(K, [M3 ⊕ C2]) Tlen = bit length of T Cn = E(K, [Mn ⊕ Cn-1 ⊕K1]) MSBs(X) = the s leftmost bits of thebit string X T = MSBTlen(Cn)
  • 12. CMAC
  • 13. CMAC Advantages • Can use existing encryption functions. • Encryption functions have properties that resist pre image and collision attacks • Disadvantage • Encryption algorithms (particularly when chained) can be much slower than hash algorithms

Editor's Notes

  • #4: Up till now, have been concerned with protecting message content (ie secrecy) by encrypting the message. Will now consider how to protect message integrity (ie protection from modification), as well as confirming the identity of the sender. Generically this is the problem of message authentication, and in eCommerce applications is arguably more important than secrecy.