SCC'17 ~ Efficient Key-Rotatable and Security-Updatable Homomorphic
Total Page:16
File Type:pdf, Size:1020Kb
Efficient Key-Rotatable and Security-Updatable Homomorphic Encryption ∗ Yoshinori Aono Takuya Hayashi Le Trieu Phong NICT, Japan NICT, Japan NICT, Japan [email protected] [email protected] [email protected] Lihua Wang NICT, Japan [email protected] ABSTRACT during which they are used. As suggested in [19], cryptoperi- In this paper we presents the notion of key-rotatable and ods are in the order of 1-2 years depending on the considered security-updatable homomorphic encryption (KR-SU-HE) primitives. Therefore, after a few years, the old key should scheme, which is a class of public-key homomorphic encryp- be changed by a new one. tion in which the keys and the security of any ciphertext In this paper, we focus on the problem of key rotation can be rotated and updated while still keeping the under- and its close variant called security update over public key lying plaintext intact and unrevealed. We formalise syntax homomorphic encryption, as it is particularly relevant to and security notions for KR-SU-HE schemes and then build secure cloud computing. a concrete scheme based on the Learning With Errors as- sumption. We then perform testing implementation to show 1.2 Problem formalisation and naïve solution that our proposed scheme is efficiently practical. We first formalise the problem of key rotation and security update, and then present a na¨ıve solution. Keywords Problem formalisation. Let us consider a public key ho- Homomorphic encryption, Learning With Errors, key rota- momorphic encryption scheme. Suppose encryption under tion, security update. (pk1; sk1) has n1-bit security, while that under (pk2; sk2) has n2-bit security. The question is how to turn an n1-bit secu- rity ciphertext into a ciphertext having n2-bit security while 1. INTRODUCTION keeping the underlying plaintext the same. Moreover, ho- momorphic operations such as additions and multiplications 1.1 Background can be still performed after the transformation. Key rotation is an important practice for cryptosystems. Two possibly interesting cases of the above problem are Succinctly, it is the change of an old key by a new one, while as follows: keeping the plaintexts intact. Key rotation is specified in several security standards. • Key rotation: when n1 = n2, the above is the known Indeed, on the industrial side, it is required by Payment problem in practice as the process of re-keying en- Card Industry Data Security Standard [22], and is consid- crypted data from an old key to a new one. ered as an obligation by Open Web Application Security Project [21], concretely specifying that • Security update: when n1 < n2, the problem can be described succinctly as turning security-weakened \key rotation is a must as all good keys do come to an end ciphertexts and the related secret key into ones with either through expiration or revocation. So a developer will higher security assurance. have to deal with rotating keys at some point { better to have a system in place now rather than scrambling later." The na¨ıve solution: decrypt-then-encrypt. It is possi- On the federal side, it is recommended by NIST [19] via ble to solve the problem by the decrypt-then-encrypt method. the concept of cryptoperiods of keys, namely the time spans Specifically, use the secret key sk1 related to pk1 to decrypt ∗Corresponding author. the old ciphertext, and then encrypt the obtained plaintext under pk2. This approach has potential shortcomings: (1) Permission to make digital or hard copies of all or part of this work for personal or the plaintext is recovered, and (2) the secret sk1 must be classroom use is granted without fee provided that copies are not made or distributed used for decryption. Concretely, if the task of key rotation for profit or commercial advantage and that copies bear this notice and the full cita- is done by an outsourced server in cloud computing, then tion on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or re- either by (1) or (2), the server learns the data or the secret publish, to post on servers or to redistribute to lists, requires prior specific permission key. and/or a fee. Request permissions from [email protected]. SCC’17, April 2, 2017, Abu Dhabi, United Arab Emirates. Our goal. In this paper, we are interested in developing c 2017 ACM. ISBN 978-1-4503-4970-3/17/04. $15.00. an efficient solution without the above shortcomings of the DOI: http://dx.doi.org/10.1145/3055259.3055260 na¨ıve solution. 35 Table 1: Usages of the dimension switching technique. Dimension switching Exploited in Main purpose (high ! low) n2 < n1 [9, 11] efficiency in FHE (equal) n2 = n1 [1, 12, 20] PRE, obfuscation (equal, low ! high) n2 ≥ n1 this paper key rotation, security update 2. OUR CONTRIBUTIONS Testing implementation. Taking a concrete parameter We propose a primitive called key-rotatable and security- set, we implement our proposed scheme to show that it is updatable homomorphic encryption (KR-SU-HE) and for- efficient. Details are given in Section 4.3, including the tim- malise its security notions. We then construct a concrete ings for all algorithms in our proposed scheme. scheme based on the Learning With Errors (LWE) assump- tion. We finally show that our scheme is practical by imple- 3. PRELIMINARIES mentation. Details are given below. Let Z(0;s) be the discrete Gaussian distribution over the integers Z, with mean 0 and deviation s > 0. The mark Conceptual proposal. We develop a solution to the above g is for \sampling at random from a discrete Gaussian" problem where, given public/secret key pair (pk1; sk1) of n1- g set, so that x (0;s) means x appears with probability bit security and (pk2; sk2) of n2-bit security, Z proportional to exp(−πx2=s2). Below, $ means \sampling • An outsourced server is given an update key uk , n1!n2 uniformly at random". Also, Zq ⊂ (−q=2; q=2] is the set of which is computed from sk1 and sk2, and yet ukn1!n2 integers centered modulus q. is computationally random from the server's view. 3.1 Learning with Errors (LWE) • The server uses uk to update ciphertexts corre- n1!n2 Related to the decision LWE assumption LWE(n; s; q), sponding to (pk ; sk ) into ciphertexts corresponding 1 1 where n; s; q depend on the security parameter, consider ma- to (pk ; sk ), while underlying plaintexts are kept the 2 2 trix A $ m×n, vectors r $ m×1, x g n×1 ; e g m×1. same. Zq Zq Z(0;s) Z(0;s) Then vector Ax + e is computed over Zq. Define the fol- • Only sk2 is needed in decryption of updated cipher- lowing advantage of a poly-time probabilistic algorithm D: texts. LWE(n;s;q) AdvD (λ) We call a homomorphic encryption scheme having above = Pr[D(A; Ax + e) ! 1] − Pr[D(A; r) ! 1] : transformation key-rotatable and security-updatable homo- morphic encryption. This type of homomorphic encryption The LWE assumption asserts that AdvLWE(n;s;q)(λ) is neg- needs new security definitions, because we want to ensure D ligible as a function of λ. Also note that, originally, x is that transformed ciphertexts not only can be decrypted by n×1 chosen randomly from q in [23]. However, as showed sk2, but also have n2-bit security. We therefore formalise Z g n×1 the notion of d-CPA security, where d is an integer spec- in [4, 18], one can take x Z(0;s) without weakening the ifying the number of updates so far. For example, if one assumption as we do here. goes from 80- to 128- then to 256-bit security, then d = 2 LWE dimension and security level. The length of se- (updates of security). Also, for key rotation purpose, if one cret vector x, namely n, is denoted as the LWE dimension. periodically switches 10 times among keys of identical bit For the same deviation s and modulus q, the hardness of security, then d = 10. LWE assumption increases with its dimension n as showed A concrete scheme. We then build a concrete and efficient in [10], which is the important fact we will exploit in design- KR-SU-HE scheme based on the LWE assumption. The tool ing our KR-SU-HE schemes. Therefore, \LWE dimension" for our construction is described below. and \security level" are sometimes used interchangeably in On a bird's-eye view, increasing security is possible via an this manuscript. enlargement of dimension in the LWE assumption, where higher dimension ensures more security. The switch is ex- 3.2 Homomorphic encryption, key rotation, se- actly the dimension-switching technique original used in fully curity update homomorphic encryption (FHE) [11]. Historically, the paper [11] only considered dimension-reduction, namely n2 < n1 in Definition 1 (PHE). Public key homomorphic encryp- our notation, for efficiency issues in FHE. Then subsequent tion (PHE) schemes consist of the following (possibly prob- paper [9], while notified that the technique works for ar- abilistic) poly-time algorithms. bitrary dimensions n1 and n2, only made use of the case • ParamGen(1λ) ! pp: λ is the security parameter and n2 < n1 as in [11]. The case n1 = n2 is considered in [1, 20] for proxy re-encryption and in [12] for obfuscation. To our the public parameter pp is implicitly fed in following algorithms. best knowledge, we are the first to exploit the case n1 < n2 for security enhancement. • KeyGen(1λ) ! (pk; sk): pk is the public key, while sk Dimension switching however provides us only with cor- is the secret key.