Multiprecision multiplication on AVR revisited

This paper presents new speed records for multiprecision multiplication on the AVR ATmega family of 8-bit microcontrollers. For example, our software takes only 1,969 cycles for the multiplication of two 160-bit integers; this is more than 15 % faster than that demonstrated in previous work. For 256-bit inputs, our software is not only the first to break through the 6,000-cycle barrier; with only 4,771 cycles it also breaks through the 5,000-cycle barrier and is more than 21 % faster than previous work. We achieve these speed records by carefully optimizing the Karatsuba multiplication technique for AVR ATmega. One might expect that subquadratic-complexity Karatsuba multiplication is only faster than algorithms with quadratic complexity for large inputs. This paper shows that it is in fact faster than fully unrolled product-scanning multiplication already for surprisingly small inputs, starting at 48 bits. Our results thus make Karatsuba multiplication the method of choice for high-performance implementations of elliptic-curve cryptography on AVR ATmega microcontrollers.

[1]  Daniel J. Bernstein,et al.  Batch Binary Edwards , 2009, CRYPTO.

[2]  Anatolij A. Karatsuba,et al.  Multiplication of Multidigit Numbers on Automata , 1963 .

[3]  Julio César López-Hernández,et al.  Software Implementation of Pairing-Based Cryptography on Sensor Networks Using the MSP430 Microcontroller , 2009, INDOCRYPT.

[4]  Paul Barrett,et al.  Implementing the Rivest Shamir and Adleman Public Key Encryption Algorithm on a Standard Digital Signal Processor , 1986, CRYPTO.

[5]  Zhe Liu,et al.  New Speed Records for Montgomery Modular Multiplication on 8-Bit AVR Microcontrollers , 2014, AFRICACRYPT.

[6]  Michael Scott,et al.  Optimizing Multiprecision Multiplication for Public Key Cryptography , 2007, IACR Cryptol. ePrint Arch..

[7]  Hwajeong Seo,et al.  Multi-precision Multiplication for Public-Key Cryptography on Embedded Microprocessors , 2012, WISA.

[8]  Hwajeong Seo,et al.  Optimized Multi-Precision Multiplication for Public-Key Cryptography on Embedded Microprocessors , 2013 .

[9]  Frank J. Swetz,et al.  Capitalism and arithmetic : the new math of the 15th century, including the full text of the Treviso arithmetic of 1478, translated by David Eugene Smith , 1987 .

[10]  Martin Fürer,et al.  Faster integer multiplication , 2007, STOC '07.

[11]  Peter Schwabe,et al.  NaCl on 8-Bit AVR Microcontrollers , 2013, AFRICACRYPT.

[12]  Richard P. Brent,et al.  Modern Computer Arithmetic , 2010 .

[13]  Manuel Koschuch,et al.  Energy-Efficient Implementation of ECDH Key Exchange for Wireless Sensor Networks , 2009, WISTP.

[14]  Erich Wenger,et al.  Fast Multi-precision Multiplication for Public-Key Cryptography on Embedded Microprocessors , 2011, CHES.

[15]  Ilya Kizhvatov,et al.  Efficient and Side-Channel Resistant RSA Implementation for 8-bit AVR Microcontrollers , 2010 .

[16]  Francisco Falconi Magaña Liber Abaci Leonardo Pisano´s Book of Calculation , 2014 .

[17]  Marc Joye,et al.  Checking Before Output May Not Be Enough Against Fault-Based Cryptanalysis , 2000, IEEE Trans. Computers.

[18]  Arnold Schönhage,et al.  Schnelle Multiplikation großer Zahlen , 1971, Computing.

[19]  Paul G. Comba,et al.  Exponentiation Cryptosystems on the IBM PC , 1990, IBM Syst. J..

[20]  Hans Eberle,et al.  Comparing Elliptic Curve Cryptography and RSA on 8-bit CPUs , 2004, CHES.

[21]  Roberto Maria Avanzi,et al.  Energy-Efficient Software Implementation of Long Integer Modular Arithmetic , 2005, CHES.

[22]  Serafina Cuomo,et al.  Fibonacci’s Liber Abaci: A Translation into Modern English of Leonardo Pisano’s Book of Calculation , 2003 .

[23]  Zhe Liu,et al.  Efficient Implementation of NIST-Compliant Elliptic Curve Cryptography for Sensor Nodes , 2013, ICICS.

[24]  Pavel Pudlák,et al.  The Complexity of Computations , 2013 .

[25]  Shmuel Winograd,et al.  Complexity Of Computations , 1978, ACM Annual Conference.

[26]  Leonardo B. Oliveira,et al.  Efficient software implementation of public-key cryptography on sensor networks using the MSP430X microcontroller , 2012, Journal of Cryptographic Engineering.