Computing Mod with a Variable Lookup Table
Encryption algorithms are designed to be difficult to break without knowledge of the secrets or keys. To achieve this, the algorithms require the keys to be large, with some having a recommend size of 2048-bits or more. However most modern processors only support computation on 64-bits at a time. Therefore standard operations with large numbers are more complicated to implement. One operation that is particularly challenging to efficiently implement is modular reduction. In this paper we propose a highly-efficient algorithm for solving large modulo operations; it has several advantages over current approaches as it supports the use of a variable sized lookup table, has good spatial and temporal locality allowing data to be streamed, and only requires basic processor instructions. Our proposed algorithm is theoretically compared to widely used modular algorithms, and shows improvements over other algorithms using predefined lookup tables.
This research is supported by STRATUS (Security Technologies Returning Accountability, Trust and User-Centric Services in the Cloud) (https://stratus.org.nz), a science investment project funded by the New Zealand Ministry of Business, Innovation and Employment (MBIE). The authors would also like to thank Sabu M. Thampi for his kind invitation to submit this invited paper for the SSCC 2016 proceedings.
- 4.Intel 64 and IA-32 architectures software developer’s manual. http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-32-architectures-software-developer-manual-325462.pdf. Accessed 27 Aug 2014
- 5.Kaliski, B.: Twirl and RSA key size. RSA Laboratories Technical Note (2003)Google Scholar
- 6.Barrett, P.: Implementing the Rivest Shamir and Adleman public key encryption algorithm on a standard digital signal processor. In: Odlyzko, A.M. (ed.) CRYPTO 1986. LNCS, vol. 263, pp. 311–323. Springer, Heidelberg (1987)Google Scholar
- 7.Cao, Z., Wei, R., Lin, X.: A fast modular reduction method. IACR Cryptol. ePrint Arch. 2014, 40 (2014)Google Scholar
- 10.Denis, S.T., Rose, G.: BigNum Math: Implementing Cryptographic Multiple Precision Arithmetic. Syngress Publishing, Boston (2006)Google Scholar
- 11.Kwon, T.-W., You, C.-S., Heo, W.-S., Kang, Y.-K., Choi, J.-R.: Two implementation methods of a 1024-bit RSA cryptoprocessor based on modified montgomery algorithm. In: The 2001 IEEE International Symposium on Circuits and Systems, ISCAS 2001, vol. 4, pp. 650–653. IEEE (2001)Google Scholar
- 13.Lim, C.H., Lee, P.J.: Generating efficient primes for discretelog cryptosystems, POSTECH Information Research LaboratoriesGoogle Scholar
- 14.Lim, C.H., Hwang, H.S., Lee, P.J.: Fast modular reduction with precomputation. In: Proceedings of Korea-Japan Joint Workshop on Information Security and Cryptology (JWISC 1997), pp. 65–79. Citeseer (1997)Google Scholar