SlideShare a Scribd company logo
1 of 14
Implementation Attacks
on
Hashing Functions
Presented By : Pragyanand Tiwari
Hash Function
Hash Function
(Mathematical
Transformation)
Input
(Message)
Output
(Digest, Tag,
Hash)
Deterministic
Function
Computationally
Efficient
Well Distributed
Output
Hash Function
A Few Hash Functions :
• MD5
• SHA- 1
• SHA - 2
• SHA - 3
• Skein
• Whirlpool
Hash Function
Applications
• Digital Signing
• Message Authentication
• Pseudo Random Number Generation
• Password Security
• Encryption
Hash Function
Desirable Properties
1. OW : One-Wayness
2. CR : Collison Resistance.
3. TCR : Targeted Collision Resistance.
4. PR : Pseudo-Randomness
5. NM : Non-Malleability
Implementation Attacks
Attacks on the Practical Realization of Cryptographic Algorithms and
Protocol.
Implementation Attacks on Hash Functions
Fault Attack
• Fault attacks work by injecting errors into the cryptosystem.
• Works in Three Phases.
• Phase 1 – Design of Fault Model.
• Phase 2 – Actual attack is performed by injecting error.
• Phase 3 – Faulty Result is Evaluated to extract the secret Key.
Implementation Attacks on Hash Functions
Testing Fault Attack on SHA-512 (SHA-2):
• The attack was carried out on HMAC implementation of SHA-2
(SHA-512), that has a key size of 1024 bits.
• Our fault model relies on an iterative flipping of two control bits at
specific time points.
• It reduces number of rounds and returns different intermediate values
as the final hash value.
• By analysing these faulty hash values, the first message can be
extracted entirely.
Implementation Attacks on Hash Functions
Testing Fault Attack on SHA-512 (SHA-2):
Hardware Implementation of SHA-2 contains at least two registers.
1. Hash Register : This register is initialized with the initial hash value
H(0) for each new message and updated after hashing each data
block. After hashing the last block, the HR contains the final hash
value.
2. Round Register(RR) : The register is initialized with the current hash
value H(i) for each data block and updated after each round.
Implementation Attacks on Hash Functions
• Testing Fault Attack on SHA-512 (SHA-2):The proposed fault
model relies on injecting two types of faults into the targeted
implementation.
• End-of-rounds error:
I. This error can be invoked by flipping the control bits which
enables writing the intermediate hash value into the hash register.
II. Must be performed in the correct clock cycle which demands
accurate knowledge of the time behaviour.
Implementation Attacks on Hash Functions
• Testing Fault Attack on SHA-512 (SHA-2):
• Last-Block Error:
1. It can be introduced in the system by flipping the other control bit
which is responsible for indicating the last bit.
2. It is done right after the first data block has been hashed.
3. It breaks the loop responsible for iterating the data blocks and
flipping the control bit, makes the intermediate value to be read out
as the final hash value.
Implementation Attacks on Hash Functions
• Testing Fault Attack on SHA-512 (SHA-2):
• Countermeasures:
There are two types of countermeasures for this Attack.
1. Preventive – Use of Asynchronous logic, clock randomization,
encryption of memory content.
2. Reactive – Blocking of output data in case of error detection.
Implementation Attacks on Hash Functions
• Testing Fault Attack on SHA-512 (SHA-2):
• Attack Evaluation:
1. Two variants of HMAC module were tested: with and without the
countermeasure.
2. Confirmed both, the criticality of attack and the effectiveness of the
Countermeasure.
3. By attacking the implementation the HMAC key was extracted in
mere 16 rounds, whereas each iteration provided a 64-bit segment
of the key.
Thank You!

More Related Content

Similar to Implementation attacks on Hashing Functions

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
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functionsDr.Florence Dayana
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash functionomarShiekh1
 
Hash Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & AnalysisPawandeep Kaur
 
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel NaderBreaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel NaderEC-Council
 
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
 
QuillAudit Smart contracts audit ppt - https://audits.quillhash.com
QuillAudit Smart contracts audit ppt - https://audits.quillhash.comQuillAudit Smart contracts audit ppt - https://audits.quillhash.com
QuillAudit Smart contracts audit ppt - https://audits.quillhash.comPreetam Rao
 
secure hash function for authentication in CNS
secure hash function for authentication in CNSsecure hash function for authentication in CNS
secure hash function for authentication in CNSNithyasriA2
 
Reverse Engineering Malware - A Practical Guide
Reverse Engineering Malware - A Practical GuideReverse Engineering Malware - A Practical Guide
Reverse Engineering Malware - A Practical Guideintertelinvestigations
 
Information and data security pseudorandom number generation and stream cipher
Information and data security pseudorandom number generation and stream cipherInformation and data security pseudorandom number generation and stream cipher
Information and data security pseudorandom number generation and stream cipherMazin Alwaaly
 
Information and network security 42 security of message authentication code
Information and network security 42 security of message authentication codeInformation and network security 42 security of message authentication code
Information and network security 42 security of message authentication codeVaibhav Khanna
 
How Safe is your Link ?
How Safe is your Link ?How Safe is your Link ?
How Safe is your Link ?Peter Hlavaty
 
Redesigning Password Authentication for the Modern Web
Redesigning Password Authentication for the Modern WebRedesigning Password Authentication for the Modern Web
Redesigning Password Authentication for the Modern WebCliff Smith
 
BSidesJXN 2016: Finding a Company's BreakPoint
BSidesJXN 2016: Finding a Company's BreakPointBSidesJXN 2016: Finding a Company's BreakPoint
BSidesJXN 2016: Finding a Company's BreakPointAndrew McNicol
 
BSides Philly Finding a Company's BreakPoint
BSides Philly Finding a Company's BreakPointBSides Philly Finding a Company's BreakPoint
BSides Philly Finding a Company's BreakPointAndrew McNicol
 
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021fabriziopastore
 

Similar to Implementation attacks on Hashing Functions (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
 
Public Key Encryption & Hash functions
Public Key Encryption & Hash functionsPublic Key Encryption & Hash functions
Public Key Encryption & Hash functions
 
Message authentication and hash function
Message authentication and hash functionMessage authentication and hash function
Message authentication and hash function
 
Hash Function & Analysis
Hash Function & AnalysisHash Function & Analysis
Hash Function & Analysis
 
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel NaderBreaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
Breaking Smart [Bank] Statements – Hacker Halted 2019 – Manuel Nader
 
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
 
35c
35c35c
35c
 
QuillAudit Smart contracts audit ppt - https://audits.quillhash.com
QuillAudit Smart contracts audit ppt - https://audits.quillhash.comQuillAudit Smart contracts audit ppt - https://audits.quillhash.com
QuillAudit Smart contracts audit ppt - https://audits.quillhash.com
 
secure hash function for authentication in CNS
secure hash function for authentication in CNSsecure hash function for authentication in CNS
secure hash function for authentication in CNS
 
HASH FUNCTIONS.pdf
HASH FUNCTIONS.pdfHASH FUNCTIONS.pdf
HASH FUNCTIONS.pdf
 
Reverse Engineering Malware - A Practical Guide
Reverse Engineering Malware - A Practical GuideReverse Engineering Malware - A Practical Guide
Reverse Engineering Malware - A Practical Guide
 
Information and data security pseudorandom number generation and stream cipher
Information and data security pseudorandom number generation and stream cipherInformation and data security pseudorandom number generation and stream cipher
Information and data security pseudorandom number generation and stream cipher
 
Information and network security 42 security of message authentication code
Information and network security 42 security of message authentication codeInformation and network security 42 security of message authentication code
Information and network security 42 security of message authentication code
 
How Safe is your Link ?
How Safe is your Link ?How Safe is your Link ?
How Safe is your Link ?
 
Redesigning Password Authentication for the Modern Web
Redesigning Password Authentication for the Modern WebRedesigning Password Authentication for the Modern Web
Redesigning Password Authentication for the Modern Web
 
BSidesJXN 2016: Finding a Company's BreakPoint
BSidesJXN 2016: Finding a Company's BreakPointBSidesJXN 2016: Finding a Company's BreakPoint
BSidesJXN 2016: Finding a Company's BreakPoint
 
BSides Philly Finding a Company's BreakPoint
BSides Philly Finding a Company's BreakPointBSides Philly Finding a Company's BreakPoint
BSides Philly Finding a Company's BreakPoint
 
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash FunctionsCRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
CRYPTOGRAPHY & NETWORK SECURITY- Cryptographic Hash Functions
 
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021
Fabrizio pastore TORACLE-2021 @ESEC/FSE 2021
 

Recently uploaded

Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfakmcokerachita
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsKarinaGenton
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17Celine George
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 

Recently uploaded (20)

Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
Class 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdfClass 11 Legal Studies Ch-1 Concept of State .pdf
Class 11 Legal Studies Ch-1 Concept of State .pdf
 
Science 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its CharacteristicsScience 7 - LAND and SEA BREEZE and its Characteristics
Science 7 - LAND and SEA BREEZE and its Characteristics
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17How to Configure Email Server in Odoo 17
How to Configure Email Server in Odoo 17
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 

Implementation attacks on Hashing Functions

  • 2. Hash Function Hash Function (Mathematical Transformation) Input (Message) Output (Digest, Tag, Hash) Deterministic Function Computationally Efficient Well Distributed Output
  • 3. Hash Function A Few Hash Functions : • MD5 • SHA- 1 • SHA - 2 • SHA - 3 • Skein • Whirlpool
  • 4. Hash Function Applications • Digital Signing • Message Authentication • Pseudo Random Number Generation • Password Security • Encryption
  • 5. Hash Function Desirable Properties 1. OW : One-Wayness 2. CR : Collison Resistance. 3. TCR : Targeted Collision Resistance. 4. PR : Pseudo-Randomness 5. NM : Non-Malleability
  • 6. Implementation Attacks Attacks on the Practical Realization of Cryptographic Algorithms and Protocol.
  • 7. Implementation Attacks on Hash Functions Fault Attack • Fault attacks work by injecting errors into the cryptosystem. • Works in Three Phases. • Phase 1 – Design of Fault Model. • Phase 2 – Actual attack is performed by injecting error. • Phase 3 – Faulty Result is Evaluated to extract the secret Key.
  • 8. Implementation Attacks on Hash Functions Testing Fault Attack on SHA-512 (SHA-2): • The attack was carried out on HMAC implementation of SHA-2 (SHA-512), that has a key size of 1024 bits. • Our fault model relies on an iterative flipping of two control bits at specific time points. • It reduces number of rounds and returns different intermediate values as the final hash value. • By analysing these faulty hash values, the first message can be extracted entirely.
  • 9. Implementation Attacks on Hash Functions Testing Fault Attack on SHA-512 (SHA-2): Hardware Implementation of SHA-2 contains at least two registers. 1. Hash Register : This register is initialized with the initial hash value H(0) for each new message and updated after hashing each data block. After hashing the last block, the HR contains the final hash value. 2. Round Register(RR) : The register is initialized with the current hash value H(i) for each data block and updated after each round.
  • 10. Implementation Attacks on Hash Functions • Testing Fault Attack on SHA-512 (SHA-2):The proposed fault model relies on injecting two types of faults into the targeted implementation. • End-of-rounds error: I. This error can be invoked by flipping the control bits which enables writing the intermediate hash value into the hash register. II. Must be performed in the correct clock cycle which demands accurate knowledge of the time behaviour.
  • 11. Implementation Attacks on Hash Functions • Testing Fault Attack on SHA-512 (SHA-2): • Last-Block Error: 1. It can be introduced in the system by flipping the other control bit which is responsible for indicating the last bit. 2. It is done right after the first data block has been hashed. 3. It breaks the loop responsible for iterating the data blocks and flipping the control bit, makes the intermediate value to be read out as the final hash value.
  • 12. Implementation Attacks on Hash Functions • Testing Fault Attack on SHA-512 (SHA-2): • Countermeasures: There are two types of countermeasures for this Attack. 1. Preventive – Use of Asynchronous logic, clock randomization, encryption of memory content. 2. Reactive – Blocking of output data in case of error detection.
  • 13. Implementation Attacks on Hash Functions • Testing Fault Attack on SHA-512 (SHA-2): • Attack Evaluation: 1. Two variants of HMAC module were tested: with and without the countermeasure. 2. Confirmed both, the criticality of attack and the effectiveness of the Countermeasure. 3. By attacking the implementation the HMAC key was extracted in mere 16 rounds, whereas each iteration provided a 64-bit segment of the key.