a masked ring lwe
play

A MASKED RING-LWE IMPLEMENTATION Oscar Reparaz, Sujoy Sinha Roy, - PowerPoint PPT Presentation

A MASKED RING-LWE IMPLEMENTATION Oscar Reparaz, Sujoy Sinha Roy, Frederik Vercauteren, Ingrid Verbauwhede COSIC/KU Leuven CHES 2015, Saint-Malo, FR 1 un protected ring-LWE decryption r2 m=th[INTT(c 1 *r 2 + c 2 )] 2 un protected ring-LWE


  1. A MASKED RING-LWE IMPLEMENTATION Oscar Reparaz, Sujoy Sinha Roy, Frederik Vercauteren, Ingrid Verbauwhede COSIC/KU Leuven CHES 2015, Saint-Malo, FR 1

  2. un protected ring-LWE decryption r2 m=th[INTT(c 1 *r 2 + c 2 )] 2

  3. un protected ring-LWE decryption r2 c1 c2 m=th[INTT(c 1 *r 2 + c 2 )] 2

  4. un protected ring-LWE decryption r2 x x x x x x x x x x c1 c2 m=th[INTT(c 1 *r 2 + c 2 )] 2

  5. un protected ring-LWE decryption r2 x x x x x x x x x x c1 + + + + + + + + + + c2 m=th[INTT(c 1 *r 2 + c 2 )] 2

  6. un protected ring-LWE decryption r2 x x x x x x x x x x c1 + + + + + + + + + + c2 INTT m=th[INTT(c 1 *r 2 + c 2 )] 2

  7. un protected ring-LWE decryption r2 x x x x x x x x x x c1 + + + + + + + + + + c2 INTT th th th th th th th th th th m m=th[INTT(c 1 *r 2 + c 2 )] 2

  8. th operation 3

  9. masking ring-LWE • Core idea: split the secret: r= r’+r’’ m=th[INTT(c 1 *r 2 + c 2 )] 4

  10. masking ring-LWE • Core idea: split the secret: r= r’+r’’ 1 2 2 m=th[INTT(c 1 *r 2 + c 2 )] 4

  11. on the masked decoder 1 2 2 6

  12. on the masked decoder 1 2 2 6

  13. 7

  14. 7

  15. 7

  16. 7

  17. what happened? • could decode th (a) from quad(a’) and quad(a’’) – quad() return only 2 bits, so it will be easy to perform masked computation. • Idea: decode th (a) only from quad(a’) and quad(a’’) – large compression 8

  18. decoding rules • There are 7 other more cases (“rules”) • There are 8 cases that don’t allow inferring th(a)! 9

  19. Cases where it fails 10

  20. solution: refresh • Refresh the sharing: a’ := a’ + D a’’ := a’’ – D And try again • Do not draw D from random, compute nice ones. 11

  21. 12

  22. implementation costs unprotected (CHES2014*) protected (this work) • 1713 LUTs / 830 FFs / 1 DSP • 2014 LUTs / 959 FFs / 1 DSP • Fmax = 120 MHz • 100 MHz Parameter set: (n,q,s)=(256,7681,11.32) Xilinx Virtex-II xc2vp7 FPGA * Synthetized on Virtex-II 13

  23. implementation costs unprotected (CHES2014*) protected (this work) • 1713 LUTs / 830 FFs / 1 DSP • 2014 LUTs / 959 FFs / 1 DSP • Fmax = 120 MHz • 100 MHz • 2.8 k cycles (23.5 us) • 7.5 k cycles (75.2 us) Parameter set: (n,q,s)=(256,7681,11.32) Xilinx Virtex-II xc2vp7 FPGA * Synthetized on Virtex-II 13

  24. implementation costs unprotected (CHES2014*) protected (this work) • 1713 LUTs / 830 FFs / 1 DSP • 2014 LUTs / 959 FFs / 1 DSP • Fmax = 120 MHz • 100 MHz • 2.8 k cycles (23.5 us) • 7.5 k cycles (75.2 us) Parameter set: (n,q,s)=(256,7681,11.32) Xilinx Virtex-II xc2vp7 FPGA ECC: Rebeiro et.al. (CHES2012): 289 kcycles * LUT This work: 151 k cycles*LUTs * Synthetized on Virtex-II 13

  25. error rates 14

  26. error rates 14

  27. 15

  28. 16

  29. evaluation 17

  30. PRNG off 18

  31. PRNG on 19

  32. second order 20

  33. second order 21

  34. Conclusion • Fully masked ring-LWE decryption – outputs Boolean shares • Manageable overhead: x2.6 cycles wrt unprotected • Small! • Bespoke decoder – Error rate controlled • Practical evaluation 22

  35. 23

  36. A MASKED RING-LWE IMPLEMENTATION Oscar Reparaz, Sujoy Sinha Roy, Frederik Vercauteren, Ingrid Verbauwhede COSIC/KU Leuven CHES 2015, Saint-Malo, FR 24

Recommend


More recommend