sliding right into disaster left to right sliding windows
play

Sliding right into disaster - Left-to-right sliding windows leak - PowerPoint PPT Presentation

Sliding right into disaster - Left-to-right sliding windows leak Daniel J. Bernstein, Joachim Breitner, Daniel Genkin, Leon Groot Bruinderink , Nadia Heninger, Tanja Lange, Christine van Vredendaal and Yuval Yarom September 28th, 2017 Sliding


  1. Sliding right into disaster - Left-to-right sliding windows leak Daniel J. Bernstein, Joachim Breitner, Daniel Genkin, Leon Groot Bruinderink , Nadia Heninger, Tanja Lange, Christine van Vredendaal and Yuval Yarom September 28th, 2017 Sliding right into disaster - Left-to-right sliding windows leak 1

  2. Side-channel attacks on RSA Side-channel attacks on RSA: modular exponentiation Constant-time implementations cannot use sliding windows Common belief: sliding windows do not leak enough for key recovery Sliding right into disaster - Left-to-right sliding windows leak 2

  3. This work We show that right-to-left sliding window method does not leak enough Sliding right into disaster - Left-to-right sliding windows leak 3

  4. This work We show that right-to-left sliding window method does not leak enough We show that left-to-right sliding window method does leak enough Two methods to extract information from square and multiply sequence Demonstrated real-world applicability by attacking Libgcrypt We analyze the reasons why left-to-right leaks more than right-to-left Sliding right into disaster - Left-to-right sliding windows leak 3

  5. RSA Sliding right into disaster - Left-to-right sliding windows leak 4

  6. RSA signatures Keygen: Public key ( e , N ) where N = pq for primes p , q Secret key ( d , p , q ) where ed ≡ 1 mod φ ( N ) and φ ( N ) = ( p − 1)( q − 1) Sliding right into disaster - Left-to-right sliding windows leak 5

  7. RSA signatures Keygen: Public key ( e , N ) where N = pq for primes p , q Secret key ( d , p , q ) where ed ≡ 1 mod φ ( N ) and φ ( N ) = ( p − 1)( q − 1) Sign and verify: Let H be a padded secure hash-function Signature: s of message m : s = H ( m ) d mod N Verification: compute z = s e mod N and verify z ? = H ( m ) Sliding right into disaster - Left-to-right sliding windows leak 5

  8. RSA signatures Keygen: Public key ( e , N ) where N = pq for primes p , q Secret key ( d , p , q ) where ed ≡ 1 mod φ ( N ) and φ ( N ) = ( p − 1)( q − 1) Sign and verify: Let H be a padded secure hash-function Signature: s of message m : s = H ( m ) d mod N Verification: compute z = s e mod N and verify z ? = H ( m ) CRT: Common optimization based on Chinese Remainder Theorem (CRT) Compute s p ≡ H ( m ) d p mod p and s q ≡ H ( m ) d q mod q Combine to s using CRT Sliding right into disaster - Left-to-right sliding windows leak 5

  9. Sliding-window method Implement modular exponentiation using sliding-windows Window size w , sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i for odd 0 ≤ d i ≤ 2 w − 1 In general, compute b d mod p as follows: Sliding right into disaster - Left-to-right sliding windows leak 6

  10. Sliding-window method Implement modular exponentiation using sliding-windows Window size w , sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i for odd 0 ≤ d i ≤ 2 w − 1 In general, compute b d mod p as follows: Precompute small, odd powers of b mod p 1 (i.e. b mod p , b 3 mod p , . . . , b 2 w − 1 mod p ). Sliding right into disaster - Left-to-right sliding windows leak 6

  11. Sliding-window method Implement modular exponentiation using sliding-windows Window size w , sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i for odd 0 ≤ d i ≤ 2 w − 1 In general, compute b d mod p as follows: Precompute small, odd powers of b mod p 1 (i.e. b mod p , b 3 mod p , . . . , b 2 w − 1 mod p ). Set a = 1 2 For i ← n − 1 to 0: 3 a = a · a mod p (Square) 4 If d i � = 0: 5 a = a · b d i mod p (Multiply) 6 Return a 7 Sliding right into disaster - Left-to-right sliding windows leak 6

  12. Sliding-window method Implement modular exponentiation using sliding-windows Window size w , sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i for odd 0 ≤ d i ≤ 2 w − 1 In general, compute b d mod p as follows: Precompute small, odd powers of b mod p 1 (i.e. b mod p , b 3 mod p , . . . , b 2 w − 1 mod p ). Set a = 1 2 For i ← n − 1 to 0: 3 a = a · a mod p (Square) 4 If d i � = 0: 5 a = a · b d i mod p (Multiply) 6 Return a 7 This leaks a Square and Multiply Sequence For sufficiently large w , too many options to try Sliding right into disaster - Left-to-right sliding windows leak 6

  13. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Sliding right into disaster - Left-to-right sliding windows leak 7

  14. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  15. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form 0 0 0 3 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  16. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form 0 0 0 0 3 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  17. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form 0 0 0 11 0 0 0 0 3 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  18. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form 0 0 0 1 0 0 0 11 0 0 0 0 3 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  19. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Right-to-left Windowed form 1 0 0 0 1 0 0 0 11 0 0 0 0 3 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 2 Leaking on average a fraction of w +1 bits Sliding right into disaster - Left-to-right sliding windows leak 7

  20. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  21. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  22. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  23. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  24. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 0 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  25. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 0 0 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  26. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 0 0 0 0 0 13 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  27. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 0 0 0 0 0 13 1 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

  28. Sliding-window form How to compute sliding-window form d n − 1 . . . d 0 s.t. d = � n − 1 i =0 d i 2 i Example with w = 4, d = 9059 = 10001101100011 Left-to-right Windowed form 1 0 0 0 0 0 0 13 1 0 0 0 Binary form 1 0 0 0 1 1 0 1 1 0 0 0 1 1 Sliding right into disaster - Left-to-right sliding windows leak 7

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