hypores an hybrid representation system for ecc
play

HyPoRes: An Hybrid Representation System for ECC P. Martins 1 J. - PowerPoint PPT Presentation

HyPoRes: An Hybrid Representation System for ECC P. Martins 1 J. Marrez 2 J.-C. Bajard 2 L. Sousa 1 1 INESC-ID, Instituto Superior Tcnico, Univ. Lisboa 2 Sorbonnes Universit, CNRS, LIP6, Paris, France 26th IEEE Symposium on Computer Arithmetic


  1. HyPoRes: An Hybrid Representation System for ECC P. Martins 1 J. Marrez 2 J.-C. Bajard 2 L. Sousa 1 1 INESC-ID, Instituto Superior Técnico, Univ. Lisboa 2 Sorbonnes Université, CNRS, LIP6, Paris, France 26th IEEE Symposium on Computer Arithmetic

  2. Acknowledgement This work was partially supported by Portuguese funds through Fundação para a Ciência e a Tecnologia (FCT) with reference UID/CEC/50021/2019 and by the Ph.D. grant with reference SFRH/BD/103791/2014; by the ANR grant ARRAND 15-CE39-0002-01; through the Pessoa/Hubert Curien programme with reference 4335 (FCT)/40832XC (CAMPUSFRANCE); and by EU’s Horizon 2020 research and innovation programme under grant agreement No. 779391 (FutureTPM).

  3. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  4. Elliptic Curve Cryptography Point addition of two points over an EC defined in R ◮ Security based on the difficulty of computing n from [ n ] P and P for curves defined over a finite field F P

  5. Residue Number System Z B 1 . . . Z b 1 , 0 Z b 1 , 1 Z b 1 , h 1 − 1 RNS breaks arithmetic modulo B 1 = b 1 , 0 × . . . × b 1 , h 1 − 1 down to arithmetic modulo b 1 , 0 , . . . , b 1 , h 1 − 1

  6. Bridging the Gap ◮ Montgomery Reduction ECC Operations Maps operations in F P to Z B 1 for any P with F P complexity of O (log 2 2 P ) ; ◮ Hybrid-Positional Residue P � = B 1 Number System (HPR) Uses P = B n 1 − β to reduce Z B 1 complexity to O (log 3 / 2 P ) . 2 RNS parallel arithmetic

  7. Bridging the Gap ◮ Montgomery Reduction ECC Operations Maps operations in F P to Z B 1 for any P with F P complexity of O (log 2 2 P ) ; ◮ Hybrid-Positional Residue P � = B 1 Number System (HPR) Uses P = B n 1 − β to reduce Z B 1 complexity to O (log 3 / 2 P ) . 2 ◮ Does not work for RNS parallel arithmetic standardised primes

  8. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  9. Montgomery Reduction A ∼ P 2 O ( h 1 h 2 ) Q 1 s.t. B 1 | A + Q 1 P Q 2 = Q 1 mod B 2 Q 1 = − AP − 1 mod B 1 O ( h 1 h 2 ) Z 2 = A + Q 1 P Z 1 = Z 2 mod B 1 small B 1 Complexity dominated by O ( h 1 h 2 ) with h 1 ∼ h 2 ∼ log 2 P

  10. Hybrid-Positional Residue Number System B n − 1 + A ( 0 ) A ( 1 ) B 1 + . . . + A ( n − 1 ) 1 Z B 1 × Z B 2 ◮ D = A × C = D ( 0 ) + D ( 1 ) B 1 + . . . + D ( n − 1 ) B n − 1 1 + . . . + D ( 2 n − 2 ) B 2 n − 2 + D ( n ) B n 1 1

  11. Hybrid-Positional Residue Number System B n − 1 + A ( 0 ) A ( 1 ) B 1 + . . . + A ( n − 1 ) 1 Z B 1 × Z B 2 ◮ D = A × C = D ( 0 ) + D ( 1 ) B 1 + . . . + D ( n − 1 ) B n − 1 1 + . . . + D ( 2 n − 2 ) B 2 n − 2 + D ( n ) B n 1 1 ◮ For P = B n 1 − β : D ( 0 ) + β D ( n ) � D ( 1 ) + β D ( n + 1 ) � B 1 + . . . + D ( n − 1 ) B n − 1 � � D ≡ + 1

  12. Hybrid-Positional Residue Number System B n − 1 + A ( 0 ) A ( 1 ) B 1 + . . . + A ( n − 1 ) 1 Z B 1 × Z B 2 ◮ D = A × C = D ( 0 ) + D ( 1 ) B 1 + . . . + D ( n − 1 ) B n − 1 1 + . . . + D ( 2 n − 2 ) B 2 n − 2 + D ( n ) B n 1 1 ◮ For P = B n 1 − β : D ( 0 ) + β D ( n ) � D ( 1 ) + β D ( n + 1 ) � B 1 + . . . + D ( n − 1 ) B n − 1 � � D ≡ + 1 ◮ Perform carry propagation to reduce the digits magnitude

  13. Carry Propagation O ( h 1 h 2 ) D ( i ) D ( i ) mod B 1 mod B 2 1 1 O ( h 1 h 2 ) = D ( i ) 2 − D ( i ) C ( i ) = C ( i ) C ( i ) mod B 1 1 1 2 2 B 1 D ( i ) = D ( i ) 2 1 D ( i + 1 ) = D ( i + 1 ) + C ( i ) D ( i + 1 ) = D ( i + 1 ) + C ( i ) 1 1 1 2 2 2 Complexity dominated by O ( n 2 ( h 1 + h 2 ) + nh 1 h 2 ) with nh 1 ∼ nh 2 ∼ log 2 P

  14. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  15. Hybrid Polynomial-Residue Number System Z B 1 × Z B 2 + A ( 0 ) A ( 1 ) X + . . . + A ( n − 1 ) X n − 1 i = 0 A ( i ) γ i mod P a = �

  16. Hybrid Polynomial-Residue Number System Z B 1 × Z B 2 + A ( 0 ) A ( 1 ) X + . . . + A ( n − 1 ) X n − 1 i = 0 A ( i ) γ i mod P a = � γ is the n- th root of a ⇒ X n − β ∼ = 0 small value β over F P

  17. Hybrid Polynomial-Residue Number System γ is the n- th root of a ⇒ X n − β ∼ = 0 small value β over F P ◮ D = A × C = D ( 0 ) + D ( 1 ) X + . . . + D ( n − 1 ) X n − 1 + D ( n ) X n + . . . + D ( 2 n − 2 ) X 2 n − 2

  18. Hybrid Polynomial-Residue Number System γ is the n- th root of a ⇒ X n − β ∼ = 0 small value β over F P ◮ D = A × C = D ( 0 ) + D ( 1 ) X + . . . + D ( n − 1 ) X n − 1 + D ( n ) X n + . . . + D ( 2 n − 2 ) X 2 n − 2 ◮ D ≡ D − ( D ( n ) + . . . + D ( 2 n − 2 ) X n − 2 ) × ( X n − β ) ≡ D ( 0 ) + β D ( n ) � D ( 1 ) + β D ( n + 1 ) � B 1 + . . . + D ( n − 1 ) B n − 1 � � + 1

  19. Hybrid Polynomial-Residue Number System γ is the n- th root of a ⇒ X n − β ∼ = 0 small value β over F P ◮ D = A × C = D ( 0 ) + D ( 1 ) X + . . . + D ( n − 1 ) X n − 1 + D ( n ) X n + . . . + D ( 2 n − 2 ) X 2 n − 2 ◮ D ≡ D − ( D ( n ) + . . . + D ( 2 n − 2 ) X n − 2 ) × ( X n − β ) ≡ D ( 0 ) + β D ( n ) � D ( 1 ) + β D ( n + 1 ) � B 1 + . . . + D ( n − 1 ) B n − 1 � � + 1 ◮ Perform Montgomery reduction to reduce the digits magnitude

  20. Hybrid Polynomial-Residue Number System ◮ Lattice L (Γ) of the representations of zero   P 0 . . . 0 − γ 1 . . . 0   Γ = . . .  ...  . . .   . . .   − γ n 0 . . . 1 ◮ Each line in Γ corresponds to either P = 0 mod P or − γ i + X i , which when evaluated at X = γ produces a value congruent with 0 ◮ Minskowski’s theorem guarantees that L (Γ) contains a nonzero vector M of norm at most ( det L (Γ)) 1 / n = P 1 / n

  21. Hybrid Polynomial-Residue Number System A with large digits O ( nh 1 h 2 ) Q 1 s.t. B 1 | A + Q 1 ⋆ M Q 2 = Q 1 mod B 2 Q 1 = − A ⋆ M − 1 mod B 1 O ( nh 1 h 2 ) Z 2 = A + Q 1 ⋆ M Z 1 = Z 2 mod B 1 small B 1 ⋆ denotes multiplica- tion in Z [ X ] / ( X n − β ) Complexity dominated by O ( n 2 ( h 1 + h 2 ) + nh 1 h 2 ) with nh 1 ∼ nh 2 ∼ log 2 P

  22. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  23. Experimental Results 5 4 Exec. Time [ µ s ] 3 2 1 0 P 383 ( P 384 ) P 448 ( P ′ 448 ) P 521 ( P 512 ) Pure-RNS HyPoRes HPR Average execution time of a pure-RNS and the proposed approaches for standardised primes, as well as of HPR with specially crafted primes on a i7-3770K

  24. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  25. Protection against SCAs ◮ Choose γ as the root of E ( X ) = E ( 0 ) + . . . + E ( n − 1 ) X n − 1 + X n ◮ Operate over Z [ X ] / ( E ( X )) instead of Z [ X ] / ( X n − β ) ◮ Choose a E at random at the beginning of point multiplication ◮ Change representations throughout the execution of the algorithm by precomputing representations of γ i in the target system

  26. Table of Contents Motivation Elliptic Curve Cryptography Residue Number System Background Montgomery Reduction Hybrid-Positional Residue Number System Proposed HyPoRes Experimental Results Protection against SCAs Conclusion

  27. Conclusion Better Performance Pure- HyPoRes HPR RNS Weaker Assumptions ◮ HyPoRes multiplication has subquadratic time complexity ◮ Montgomery reduction is slower than carry propagation so HyPoRes is slower than HPR, but works for any prime ◮ Redundant representations are possible, improving resistance against SCAs

  28. Thank you! Any questions?

Recommend


More recommend