online template attack on ecdsa
play

Online Template Attack on ECDSA: Extracting Keys Via The Other Side - PowerPoint PPT Presentation

Online Template Attack on ECDSA: Extracting Keys Via The Other Side By: Niels Roelofs, Niels Samwel, Lejla Batina and Joan Daemen Africacrypt Conference 2020 July 2020 Side Channel Attack Introduction A side-channel is any unintentional


  1. Online Template Attack on ECDSA: Extracting Keys Via The Other Side By: Niels Roelofs, Niels Samwel, Lejla Batina and Joan Daemen Africacrypt Conference 2020 July 2020

  2. Side Channel Attack Introduction • “A side-channel is any unintentional signal that can offer us a blurry view of the algorithms internal computations” * • Attack implementation of some algorithm, not algorithm itself Message Device Signed message Leakage *Quote source: Introduction to Side-Channel Analysis: Basic Concepts and Techniques, L. Batina, March 2018, Hardware Security Lecture Notes 2

  3. Content • Part 1: Background – Cryptographic ‣ ECDSA ✴ Sign ✴ Verify ‣ Scalar Multiplication Algorithms ✴ Double And Add ✴ Montgomery Ladder ✴ Scalar Multiplication Optimization Tricks - Power Consumption Analysis ‣ Online Template Attack • Part 2: The Attack 3

  4. Part 1 Background 4

  5. ECDSA-Sign 5

  6. ECDSA-Verify 6

  7. Elliptic Curve Scalar Multiplication: Double And Add 7

  8. Elliptic Curve Scalar Multiplication: Montgomery Ladder 8

  9. Scalar Multiplication Optimization Tricks • Projective coordinates: – Homogeneous coordinates ‣ – Jacobian coordinates ‣ Image Source: 18.783 Elliptic Curves Lecture, A Sutherland, February 2017 9

  10. Scalar Multiplication Optimization Tricks • Projective coordinates: – Homogeneous coordinates ‣ – Jacobian coordinates ‣ • During signature verification: – Non-Adjacent Form (NAF) ‣ 7 = (1,0,0,-1) – Shamir’s trick ‣ 1 pre-computation 10

  11. Scalar Multiplication Optimization Tricks • Projective coordinates: – Homogeneous coordinates ‣ – Jacobian coordinates ‣ • During signature verification: – Non-Adjacent Form (NAF) ‣ 7 = (1,0,0,-1) – Shamir’s trick ‣ 1 pre-computation 10

  12. Scalar Multiplication Optimization Tricks • Projective coordinates: – Homogeneous coordinates ‣ – Jacobian coordinates ‣ • During signature verification: – Non-Adjacent Form (NAF) ‣ 7 = (1,0,0,-1) – Shamir’s trick ‣ 1 pre-computation 10

  13. Power Consumption Analysis • Template attack - Two identical devices - Build profiles - Match with target trace - Cumbersome 11

  14. Online Template Attack • Based on template attack • Templates on the fly • Max two templates per bit 12

  15. Online Template Attack • Based on template attack • Templates on the fly • Max two templates per bit 13

  16. Online Template Attack • Based on template attack • Templates on the fly • Max two templates per bit • Differentiate - (2n)P - (2n+1)P 14

  17. Part 2 The Attack 15

  18. Scenario • One device • One ECDSA signature generation - Standard projective coordinates - Montgomery ladder • Unlimited amount of signature verifications - On same device as the signature generated - Jacobian coordinates - Variant of double and add 16

  19. Scenario • One device • One ECDSA signature generation - Standard projective coordinates - Montgomery ladder • Unlimited amount of signature verifications - On same device as the signature generated - Jacobian coordinates - Variant of double and add • Goal: extract secret scalar via ECDSA signature verification 17

  20. Platform ChipWhisperer-Lite Classic 18

  21. Spotting The Attack Vector (1) 19

  22. Spotting The Attack Vector (1) 19

  23. Spotting The Attack Vector (1) 19

  24. Spotting The Attack Vector (2) Sign Verify 20

  25. Spotting The Attack Vector (2) 21

  26. Spotting The Attack Vector (2) 22

  27. Spotting The Attack Vector (2) 23

  28. Spotting The Attack Vector (2) Identical key dependent operation in the Montgommery ladder can be mimicked in the publicly accessible Jacobian doubling operation! 23

  29. Sign Verify Preparing The Input Montgomery Double and add Standard projective Jacobian • Compute possible values 24

  30. Sign Verify Preparing The Input Montgomery Double and add Standard projective Jacobian • Compute possible values • Feed legitimate point on curve 25

  31. Sign Verify Preparing The Input Montgomery Double and add Standard projective Jacobian • Compute possible values • Feed legitimate point on curve – Bit flipping ‣ …1010 -> …1011 ‣ …1010 -> …1000 26

  32. Measuring 27

  33. Extracting Bits (1) • Window resampling (to increase correlation computations) • Calculate Pearson correlation between: – Relevant square operation in target trace – Square operation in both templates 28

  34. Extracting Bits (2) After the correlation calculation, the template trace with the higher value is considered to represent the correct bit value. 29

  35. Countermeasure • Randomized projective coordinates – While signing – No longer build meaningful templates 30

  36. Implications • Attack successful on realistic implementation • Key extraction via ECDSA verification algorithm on the same device • Different scalar multiplications methods for signing and verification • Puts portability discussion in perspective • Simple countermeasure effective – Standard implemented in big crypto libraries – However, not always supported by hardware 31

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend