Optimizing Multiprecision Squaring for Efficient Public Key Cryptography on 8-bit Sensor Nodes

8 비트 센서 노드 상에서 효율적인 공개키 암호를 위한 다정도 제곱 연산의 최적화

  • 김일희 (한양대학교 전자컴퓨터통신공학과) ;
  • 박용수 (한양대학교 정보통신대학) ;
  • 이윤호 (영남대학교 정보통신공학과)
  • Published : 2009.12.15

Abstract

Multiprecision squaring is one of the most significant algorithms in the core public key cryptography operation. The aim of this work is to present a new improved squaring algorithm compared with the MIRACL's multi precision squaring algorithm in which the previous work [1] on multiprecision multiplication is implemented. First, previous works on multiprecision multiplication and standard squaring are analyzed. Then, our new Lazy Doubling squaring algorithm is introduced. In MIRACLE library [3], Scott's Carry-Catcher Hybrid multiplication technique [1] is applied to implementation of multiprecision multiplication and squaring. Experimental results of the Carry-Catcher hybrid squaring algorithm and the proposed Lazy Doubling squaring algorithm both of which are tested on Atmega128 CPU show that proposed idea has achieved significant performance improvements. The proposed Lazy Doubling Squaring algorithm reduces addition instructions by the fact $a_0\;{\ast}\;2\;+\;a_1\;{\ast}\;2\;+\;...\;+\;a_{n-1}\;{\ast}\;2\;+\;a_n\;{\ast}\;2\;=\;(a_0\;+\;a_1\;+\;...\;+\;a_{n-1}\;+\;a_n)\;{\ast}\;2$ while the standard squaring algorithm reduces multiplication instructions by the fact $S_{ij}\;=\;x_i\;{\ast}\;x_j\;=\;S_{ij}$. Experimental results show that the proposed squaring method is 25% faster than that in MIRACL.

Multiprecision Squaring은 공개키 알고리즘을 구성하는 연산 중에서 가장 중요한 연산 중 하나이다. 본 논문에서는 기존의 Multiprecision Squaring 알고리즘을 개선하여 연산 양을 줄임으로 성능을 항상시키는 Squaring 기법들을 제시하고 구현하였다. Scott이[1]에서 제안한 Carry-Catcher Hybrid 곱셈 알고리즘은 Gura가 제안한 Hybrid 곱셈 알고리즘[2]을 계승 발전시킨 것으로 MRACL 라이브러리에 구현되어 있으며, Carry-Catcher Hybrid 방법 사용한 Multiprecision Squaring 알고리즘도 MIRACL에 함께 구현되어 있다. 본 논문에서 이 Carry-Catcher Hybrid Squaring 알고리즘을 발전시켜 보다 효율적인 Squaring 알고리즘인 Lazy Doubling Squaring 알고리즘을 제안하고 구현하였으며, atmega128상에서 성능테스터를 수행하여 Carry-Catcher Hybrid Squaring 알고리즘과 비교하여 더 효율적인 알고리즘임을 보였다. 표준 Squaring 알고리즘이 $S_{ij}\;=\;x_i\;{\ast}\;x_j\;=\;S_{ij}$인 사실을 기반으로 곱셈의 횟수를 절반 가까이 줄인 알고리즘이라면 본 논문에서 제시한 Lazy Doubling Squaring 알고리즘은 $a_0\;{\ast}\;2\;+\;a_1\;{\ast}\;2\;+\;...\;+\;a_{n-1}\;{\ast}\;2\;+\;a_n\;{\ast}\;2\;=\;(a_0\;+\;a_1\;+\;...\;+\;a_{n-1}\;+\;a_n)\;{\ast}\;2$ 라는 사실을 기반으로 하여 doubling 연산 횟수를 획기적으로 줄인 알고리즘으로, MIRACL에 구현되어 있는 Multiprecision Squaring 알고리즘 보다 atmega128상에서 약 25% 정도의 빠른 결과를 얻을 수 있었으며, 저자가 아는 바로는 현재까지 나온 어떤 방법보다 빠르다.

Keywords

References

  1. M. Scott and P. Szczechowiak, "Optimizing Multiprecision Multiplication for Public Key Cryptography," Cryptology ePrint Archive, Report 2007/299, 2007. http://eprint.iacr.org/.
  2. N. Gura, A. Patel,A. Wander, H. Eberle, and S.C. Shantz, "Comparing Elleptic Curve Cryptography and RSA on 8-bit CPUs. Proceedings of Workshop on Cryptographic Hardware and Embedded Systems," CHES 2004, 6th Intermational Workshop, pp.119-132, 2004.
  3. MIRACL, Multiprecision Integer and Rational Artihmetic C/C++ Library. hppt://www.shamus.ie/.
  4. Koc. C. K, "High-Speed RSA Implementation," Technical Report TR-201, version 2.0, RSA Laboratiories, November 1994.
  5. D. Zuras, "More on Squaring and Multiplying Large Integers," IEEE Transactions on Computers, vol.43, no.8, pp.899-908, August 1994. https://doi.org/10.1109/12.295852
  6. A. Karastuba and Y. Ofman, "Multiplication of Multidigit Numbers on Automata," Soviet PhysicsDoklady (English translation), vol.7, no.7, pp.595-596, 1963.
  7. P. Comba, "Exponentiation cryptosystems on the IBM PC," IBM Systems Journal, 29(4):526(538, 1990. https://doi.org/10.1147/sj.294.0526
  8. Leif Uhsadel, Axel Poschmann, and Christof Paar, "Enabling Full-Size Public-Key Algorithms on 8-bit Sensor Nodes," In Proceedings of ESAS 2007, volume 4572 of LNCS. Spriner, 2007. http://www.ist-ubisecsens.org/publications/ecc_esas2007.pdf.
  9. P. Szczechowiak, L. Olveira, M.Scott, M. Collier and R. Dahab, NonoECC: "Testing the limits of elliptic curve cryptography in sensor networks, Wireless Sensor Networks," (EWSN 2008), LNCS 4913 (2008), 305-320.
  10. H. Thapliyal and M.B. Srinivas, "An Efficient Method of Elliptic Curve Encryption Using Ancient Indian Vedic Mathematice," 48th IEEE MIDWEST Symposium on Circuits and Systems (MWSCAS 2005).
  11. Donald Knuth, The Art of Computer Programming, Third Edition, Volume Two, Seminumerical Algorithms, Addison-Wesley, 1998.