Outsourcing Modular Exponentiation in Cryptographic Web Applications
Modern web applications using advanced cryptographic methods may need to calculate a large number of modular exponentiations. Performing such calculations in the web browser efficiently is a known problem. We propose a solution to this problem based on ou
- PDF / 329,275 Bytes
- 15 Pages / 439.37 x 666.142 pts Page_size
- 44 Downloads / 188 Views
Abstract. Modern web applications using advanced cryptographic methods may need to calculate a large number of modular exponentiations. Performing such calculations in the web browser efficiently is a known problem. We propose a solution to this problem based on outsourcing the computational effort to untrusted exponentiation servers. We present several efficient outsourcing protocols for different settings and a practical implementation consisting of a JavaScript client library and a server application. Compared to browser-only computation, our solution improves the overall computation time by an order of magnitude.
1
Introduction
Due to the limited performance of interpreted JavaScript code, web browsers are relatively slow computational environments compared to high-performance servers running compiled native or pre-compiled VM code. With recent performance improvements of the most common JavaScript engines, this is no longer a real limitation for most modern web applications. However, exceptionally expensive client-side computations are required in applications of public-key cryptography. Usually, the most critical operation in such applications is modular exponentiation (modexp), i.e., the computation of z = xy mod n for given integer inputs x, y, and n of length 2048 bits or higher. While web browsers compute modexps efficiently to establish TLS connections to servers, JavaScript developers have no built-in access to such a primitive, not even using the recently standardized Web Cryptography API.1 To allow the development of cryptographic code in JavaScript, several libraries provide an API for dealing with large integers and an implementation of the most important arithmetic operations. With the best libraries available today, computing a small number of modexps is possible in a modern web browser, but the performance is more than one order of magnitude inferior compared to native code.2 1
2
The Web Cryptography API offers operations for Diffie-Hellman key exchanges and DSA signatures, but currently only elliptic curves are supported. Therefore, we do not see a way of exploiting this interface for computing modular exponentiations. We expect significant performance improvements in libraries making use of the recently introduced WebAssembly technology for web browsers.
c International Financial Cryptography Association 2019 A. Zohar et al. (Eds.): FC 2018 Workshops, LNCS 10958, pp. 181–195, 2019. https://doi.org/10.1007/978-3-662-58820-8_13
182
P. Mainini and R. Haenni
If a large number of modexps needs to be computed in a cryptographic application, the limited performance of JavaScript leads to major usability problems. In such cases, calculating the modexps may take several minutes, which is not tolerated by most users. Examples of such applications exist in the context of cryptographic voting protocols. In [5,6], for example, the web client used for vote casting requires up to 2k modexps in a k-out-of-n election. In parliamentary elections, where k represents the number of seats and n the number of candida
Data Loading...