A New Functional Encryption for Multidimensional Range Query

Similar documents
ID-based Encryption Scheme Secure against Chosen Ciphertext Attacks

Simple SK-ID-KEM 1. 1 Introduction

Efficient Selective Identity-Based Encryption Without Random Oracles

Function-Hiding Inner Product Encryption

Secure and Practical Identity-Based Encryption

A Strong Identity Based Key-Insulated Cryptosystem

Fully Secure (Doubly-)Spatial Encryption under Simpler Assumptions

Efficient Identity-Based Encryption Without Random Oracles

New Techniques for Dual System Encryption and Fully Secure HIBE with Short Ciphertexts

Applied cryptography

Lesson 8 : Key-Policy Attribute-Based Encryption and Public Key Encryption with Keyword Search

REMARKS ON IBE SCHEME OF WANG AND CAO

Practical Hierarchical Identity Based Encryption and Signature schemes Without Random Oracles

Boneh-Franklin Identity Based Encryption Revisited

Outline. The Game-based Methodology for Computational Security Proofs. Public-Key Cryptography. Outline. Introduction Provable Security

Cryptology. Scribe: Fabrice Mouhartem M2IF

Lecture 7: Boneh-Boyen Proof & Waters IBE System

Delegation in Predicate Encryption Supporting Disjunctive Queries

1 Number Theory Basics

Type-based Proxy Re-encryption and its Construction

Gentry IBE Paper Reading

Efficient Identity-based Encryption Without Random Oracles

Outline Proxy Re-Encryption NTRU NTRUReEncrypt PS-NTRUReEncrypt Experimental results Conclusions. NTRUReEncrypt

Identity-based encryption

Searchable encryption & Anonymous encryption

On the security of Jhanwar-Barua Identity-Based Encryption Scheme

Multi-Input Functional Encryption for Unbounded Arity Functions

Pairing-Based Cryptography An Introduction

A Comment on Gu Map-1

Hidden-Vector Encryption with Groups of Prime Order

Adaptively Simulation-Secure Attribute-Hiding Predicate Encryption

Resistance to Pirates 2.0: A Method from Leakage Resilient Cryptography

Public-Key Cryptography. Lecture 9 Public-Key Encryption Diffie-Hellman Key-Exchange

Secure Certificateless Public Key Encryption without Redundancy

Dual System Encryption via Doubly Selective Security: Framework, Fully-secure Functional Encryption for Regular Languages, and More

Strongly Unforgeable Signatures Based on Computational Diffie-Hellman

Post-quantum security models for authenticated encryption

CS 282A/MATH 209A: Foundations of Cryptography Prof. Rafail Ostrovsky. Lecture 7

Hierarchical identity-based encryption

4-3 A Survey on Oblivious Transfer Protocols

Lecture 4 Chiu Yuen Koo Nikolai Yakovenko. 1 Summary. 2 Hybrid Encryption. CMSC 858K Advanced Topics in Cryptography February 5, 2004

Revocable Identity-Based Encryption from Lattices

Public-Key Encryption

Duality in ABE: Converting Attribute Based Encryption for Dual Predicate and Dual Policy via Computational Encodings

Modern symmetric-key Encryption

Fully Secure Functional Encryption: Attribute-Based Encryption and (Hierarchical) Inner Product Encryption

Bootstrapping Obfuscators via Fast Pseudorandom Functions

PROPERTY PRESERVING SYMMETRIC ENCRYPTION REVISITED

6.892 Computing on Encrypted Data October 28, Lecture 7

A Novel Strong Designated Verifier Signature Scheme without Random Oracles

An efficient variant of Boneh-Gentry-Hamburg's identity-based encryption without pairing

Ciphertext-Policy Hierarchical Attribute-Based Encryption with Short Ciphertexts: Efficiently Sharing Data among Large Organizations

Lecture 9 Julie Staub Avi Dalal Abheek Anand Gelareh Taban. 1 Introduction. 2 Background. CMSC 858K Advanced Topics in Cryptography February 24, 2004

Predicate Privacy in Encryption Systems

Tools for Simulating Features of Composite Order Bilinear Groups in the Prime Order Setting

Gentry s SWHE Scheme

Lecture 5, CPA Secure Encryption from PRFs

Multi-Input Functional Encryption

From Minicrypt to Obfustopia via Private-Key Functional Encryption

Parallel Decryption Queries in Bounded Chosen Ciphertext Attacks

5.4 ElGamal - definition

Lecture 17 - Diffie-Hellman key exchange, pairing, Identity-Based Encryption and Forward Security

Public Key Broadcast Encryption with Low Number of Keys and Constant Decryption Time

A Generic Hybrid Encryption Construction in the Quantum Random Oracle Model

Notes for Lecture A can repeat step 3 as many times as it wishes. We will charge A one unit of time for every time it repeats step 3.

ECS 189A Final Cryptography Spring 2011

G Advanced Cryptography April 10th, Lecture 11

Definitional Issues in Functional Encryption

Generic Constructions for Chosen-Ciphertext Secure Attribute Based Encryption

Universal Samplers with Fast Verification

Ciphertext-Policy Attribute-Based Encryption: An Expressive, Efficient, and Provably Secure Realization

Unbounded HIBE and Attribute-Based Encryption

Bounded Ciphertext Policy Attribute Based Encryption

arxiv: v1 [cs.cr] 24 Feb 2017

RSA-OAEP and Cramer-Shoup

Short Exponent Diffie-Hellman Problems

CHALMERS GÖTEBORGS UNIVERSITET. TDA352 (Chalmers) - DIT250 (GU) 11 April 2017, 8:30-12:30

CTR mode of operation

Lattice-based Multi-signature with Linear Homomorphism

Notes on Property-Preserving Encryption

Dual System Encryption: Realizing Fully Secure IBE and HIBE under Simple Assumptions

A Full Homomorphic Message Authenticator with Improved Efficiency

Introduction to Cybersecurity Cryptography (Part 4)

Lecture 1: Perfect Secrecy and Statistical Authentication. 2 Introduction - Historical vs Modern Cryptography

The Distributed Decryption Schemes for Somewhat Homomorphic Encryption

Revisiting Cryptographic Accumulators, Additional Properties and Relations to other Primitives

CPA-Security. Definition: A private-key encryption scheme

Public Key Cryptography

On Two Round Rerunnable MPC Protocols

Recent Advances in Identity-based Encryption Pairing-based Constructions

Cryptanalysis and improvement of an ID-based ad-hoc anonymous identification scheme at CT-RSA 05

A Lower Bound on the Key Length of Information-Theoretic Forward-Secure Storage Schemes

Introduction to Cybersecurity Cryptography (Part 4)

Transitive Signatures Based on Non-adaptive Standard Signatures

On the Achievability of Simulation-Based Security for Functional Encryption

Practice Final Exam Winter 2017, CS 485/585 Crypto March 14, 2017

Multikey Homomorphic Encryption from NTRU

CS 6260 Applied Cryptography

Verifiable Security of Boneh-Franklin Identity-Based Encryption. Federico Olmedo Gilles Barthe Santiago Zanella Béguelin

Chosen-Ciphertext Security from Subset Sum

Transcription:

A New Functional Encryption for Multidimensional Range Query Jia Xu 1, Ee-Chien Chang 2, and Jianying Zhou 3 1 Singapore Telecommunications Limited jia.xu@singtel.com 2 National University of Singapore changec@comp.nus.edu.sg 3 Singapore University of Technology and Design jianying zhou@sutd.edu.sg Abstract. Functional encryption, which emerges in the community recently, is a generalized concept of traditional encryption e.g. RSA and AES). In traditional encryption scheme, decrypting a ciphertext with a correct decryption key will output the original plaintext associated to the ciphertext. In contrast, in functional encryption scheme, decrypting a ciphertext with a correct decryption key will output a value that is derived from both the plaintext and the decryption key, and the decryption output would change when different correct decryption key is used to decrypt the same ciphertext. We propose a new functional encryption scheme for multidimensional range query. Given a ciphertext that is the encryption of some secret plaintext under a public attribute a multidimensional point), and a decryption key corresponding to a query range and a function key. If the public attribute point is within the query range, a user is able to decrypt the ciphertext with the decryption key to obtain a value, which is the output of a pre-defined one-way function with the secret plaintext and the function key as input. In comparison, in previous functional encryption for range query, a decryption will simply output the original secret plaintext when the attribute point is within the query range. Keywords: Functional Encryption, Multidimensional Range Query, Polymorphic Property 1 Introduction The concept of functional encryption emerges recently, as a generalization of traditional encryption. Informally, in traditional encryption scheme e.g. public key cipher like RSA and private key cipher like AES), decrypting a ciphertext CT of a secret plaintext Msg with correct decryption key will output the original plaintext Msg. In a functional encryption scheme, decrypting a ciphertext CT with correct decryption key SK k will obtain only a function value fk, Msg) of the plaintext Msg and the function key k, and nothing more. It will be more interesting when the function f is oneway, such that the original plaintext Msg remains secret after several function values fk j, Msg) s for different function keys k j are revealed. To the best of our knowledge, almost all previous instances of functional encryption schemes for example, attribute-based encryption or predicate encryption) implements a functionality F of This work was partly supported by SUTD start-up research grant SRG-ISTD-2017-124.

the following type: { Msg if Predicatex, k) = True); F k, x, Msg)) = otherwise) where Predicate is pre-defined. In this paper, we are interested in a more general functionality: { fk, Msg) if Predicatex, k) = True); F k, x, Msg)) = 2) otherwise) where f is some one-way function. Few works have been devoted to the latter type of functionality Eq 2)). Very recently, Gorbunov et al. [1] proposed a function encryption method for any multivariable polynomial function, using Secure Multi-party Computation. The supported functionality belongs to the latter style Eq 2)). In this paper, we will propose a more efficient functional encryption scheme which implements functionality in Equation 2) for a particular one-way function f defined later) with Predicate replaced by multidimensional range query, using a novel technique. 1.1 Overview of Our Technique We observe that some HIBE) encryption scheme KeyGen, Enc, Dec), e.g. BBG HIBE scheme [2], satisfies a polymorphic property: From a pair of keys pk, sk) KeyGen1 κ ), a plaintext M, an identity id, and a random coin r, one can efficiently find multiple tuples pk j, sk j, M j, r j ), 1 j n, such that for any 1 j n, pk j, sk j ) KeyGen1 κ ) is a valid key pair and Enc pk id, M; r) = CT = Enc pkj id, M j ; r j ). From the opposite point of view, a ciphertext CT can be decrypted into value M j using the decryption key sk j, 1 j n. We can view these decrypted values M j s as a function of the original plaintext M which is used to produce the ciphertext CT, i.e. decrypting CT using decryption key sk j will generate the function value fj, M) := M j of the plaintext M. Hence, such polymorphic property may lead to a new way to construct functional encryption schemes [3,4,5,6]. 1.2 Application Besides the theoretical merit as an example of a new kind of functional encryption paradigm, our proposed scheme can also be used to authenticate multidimensional range queries. Here we give a brief description in a nutshell: A data owner encrypts his multidimensional data points Msg, x) e.g. netflow, log, or sensor data in a cyber-physical system) using our functional encryption scheme, and outsources all ciphertexts to a cloud. Later, the data owner could choose a multidimensional query range R and a nonce 4 ρ, and sends a delegation key w.r.t. R, ρ) to the cloud. Then the cloud tries to decrypt each ciphertext using this delegation key. If the corresponding point x is within the query range R, then decryption will succeed and the cloud is able to obtain a one-way function value fρ, Msg), which could serve as a proof that x R. The cloud could find and count all ciphertexts of data points within the query range, and sends corresponding proofs to the data owner. This is the basic idea how our proposed scheme can be used to authenticate multidimensional count queries. How to aggregate all individual proofs to reduce total proof size using some homomorphism, and how to prevent miss-counting or double counting, requires other non-trivial techniques. More details are provided in our technical report [7]. 4 Here the nonce ρ is crucial to prevent cloud from abusing delegation keys across different queries. 1)

1.3 Contribution We propose a functional encryption scheme, by exploiting a special property we call it polymorphic property ) of the BBG HIBE scheme [2]. Under this functional encryption scheme, given a secret message Msg and a public identity x, which is a d-dimensional point in domain [1, Z] d where system parameter Z is an integer, a ciphertext can be generated using the private 5 key. A decryption key w.r.t. a d-dimensional rectangular range R and a random nonce ρ can also be derived from the private key. With this decryption key and the ciphertext for message Msg under identity x, the decryption algorithm will output Ω ρ Msg iff x R, where Ω is a part of key of the functional encryption scheme. The size 6 of a public/private key is in O1), the size of a ciphertext is in Od), and the size of a decryption key is in Od log 2 Z). The application of our functional encryption scheme in authenticating multidimensional range queries 7 is demonstrated in the technical report [7]. We define weak-ind-sid-cpa security following the IND-sID-CPA security formulation given by Boneh et al. [2]. We prove that the proposed functional encryption scheme is weak-ind-sid- CPA secure as defined in Section 3.3), if BBG HIBE scheme [2] is IND-sID-CPA secure See Theorem 2). 1.4 Organization The rest of this paper is organized as below. Section 2 reviews related works. Section 3 constructs a new functional encryption scheme for multidimensional range query, and Section 4 presents the security formulation and analyzes the correctness and security of the proposed scheme. At the end, Section 5 concludes this paper. 2 Related Works Functional encryption [3,4,5,6,8,1,9,10,11] is a new and more general notion to capture all of previous public encryption e.g. RSA), private encryption e.g. AES), identity based encryption e.g. [12]), attribute-based encryption e.g. [13]), and predicate encryption e.g. [14]). Some works [3,4,9] aimed to formulate the security of generic functional encryption, some [11,8,1] constructed functional encryption for a somewhat generic class of functionalities, and some [10] analyzed the lower bound of functional encryption scheme. In particular to functional encryption supporting multidimensional range query, Shi et al. [15] proposed a predicate encryption scheme called MRQED Multi-dimensional Range Query over Encrypted Data). Under their scheme, given a message and an identity, which is a d-dimensional point, a ciphertext can be generated. A short decryption key for a d-dimensional rectangular range can be generated from the master secret key. From this decryption key and the ciphertext, the original message can be decrypted, iff the identity point associated with the ciphertext is within the 5 Unlike [3,4], our functional encryption scheme is a symmetric key encryption system. However, in the case that dimension d = 1, our functional encryption scheme can become a public key encryption scheme. 6 Since the private key contains Od) random elements from Z p and Ol) random elements from G, its size can be reduced from Ol + d) to O1) precisely, O1) number of secret seeds, and each seed with length equal to the security parameter κ), using a pseudorandom function. 7 Note that authenticating multidimensional range queries is very useful when outsourcing multidimensional dataset e.g. network flow or log data in cyber physical system) to cloud

query range. There is a subtle but crucial difference between MRQED scheme and our implementation of functional encryption scheme: After a successful decryption, MRQED scheme reveals the message, whereas our functional encryption scheme reveals only a function value of the message. Precisely, the functionalities supported by MRQED [15] and this paper are given in Equation 3) and Equation 4), respectively. { Msg if x R); MRQED: F k = R), x, Msg)) = otherwise) { fρ, Msg) if x R); This paper: F k = ρ, R), x, Msg)) = otherwise) 3) 4) where f is some one-way function and will be defined later. On the other hand, MRQED has its own advantages over our proposed functional encryption scheme MRQED [15] is a public key encryption scheme and has a stronger security model. Other recent works in functional encryption include [16,17,18,19,20]. 3 Construction of A New Functional Encryption Scheme 3.1 Polymorphic Property of BBG HIBE Scheme We observe that the BBG HIBE scheme [2] satisfies the polymorphic property: An encryption of a message M can be viewed as the encryption of another message M under different key. Precisely, let CT and ĈT be defined as follows, we have CT = ĈT: ) s ) CT = Encryptparams, id, M; s) = Ω s M, g s, h I1 1 hi k k g 3 under key: params = g, g 1, g 2, g 3, h 1,..., h l, Ω = eg 1, g 2 )), master-key = g2 α ĈT = Encrypt params, id, M; sz) = Ω sz M, ) sz ) ĝ sz, ĥi 1 1 ĥi k k ĝ 3, under key: params = ĝ, g 1, g 2, ĝ 3, ĥ1,..., ĥl, Ω = eg 1, g 2 )), master-key = g2 αz 5) where l is the maximum depth of the HIBE scheme, k l is the length of identity id, M = MΩ s1 z), ĝ = g z 1 mod p, ĝ 3 = g z 1 mod p 3, ĥi = h z 1 mod p i for 1 i l and identity id = I 1,..., I k ) k. Zp) To be self-contained, the description of this BBG HIBE scheme is given in Appendix A on page 14). One can verify the above equality easily. 3.2 Define Identities based on Binary Interval Tree An identity is a sequence of elements from Z p. To apply HIBE scheme, we intend to construct two mappings, named ID and IdSet, to associate identities to integers or integer intervals: ID ) maps an integer x [Z] into an identity IDx) Z p) l, where l = log Z is the height of identity hierarchy tree of the BBG HIBE scheme. IdSet ) maps an integer interval [a, b] [Z] into a set of Ol) identities, where each identity is a sequence of at most l elements from Z p.

The two mappings ID and IdSet are required to satisfy this property: For any x [a, b] [Z], there is a unique identity id in the set IdSet[a, b]), such that identity id is a prefix of identity IDx). If x [a, b], then there is no such identity id in IdSet[a, b]). For each dimension ι [d], we will construct such mappings ID ι and IdSet ι using a binary interval tree [15]. The resulting mappings are made public. Binary Interval Tree. The binary interval tree is constructed as below: First, we build a complete ordered binary tree with 2 l leaf nodes. Next, we associate an integer interval to each tree node in a bottom-up manner: 1) Counting from the leftmost leaf, the j-th leaf is associated with interval [j, j]; 2) For any internal node, the associated interval is the union of the two intervals associated to its left and right children respectively. As a result, the interval associated to the root node is [1, 2 l ]. An example of binary interval tree with size 8 is showed in Figure 1. Constructions of Mappings ID ι and IdSet ι for dimension ι. Let H : Z 2 l +1 Z 2 l +1 [d] Z p be a collision resistant hash function. Let v 1, v 2,..., v m ) be the unique simple path from the root node v 1 to the node v m in the binary interval tree. We associate to node v m the identity Ha 1, b 1, ι),..., Ha m, b m, ι)) Z p) m, where [aj, b j ] is the interval associated to node v j, 1 j m. For any x [Z], we define ID ι x) as the identity associated to the x-th leaf node counting from the left). For any interval [a, b] [Z], we find the minimum covering set MCS a,b, which is a set {v j : v j is a tree node, 1 j n} with minimal size such that the intervals associated to v j s form a partition of the interval [a, b], and define IdSet ι [a, b]) := {id j : id j is the identity associated to node v j, v j MCS a,b }. One can verify that the newly constructed mappings ID ι and IdSet ι satisfy the property mentioned in the beginning of Section 3.2. Furthermore, the set IdSet ι [a, b]) contains Ol) identities and each identity is a sequence of at most l elements from Z p. [1,8] [1,4] [5,8] [1,2] [3,4] [5,6] [7,8] [1,1] [2,2] [3,3] [4,4] [5,5] [6,6] [7,7] [8,8] Fig. 1. Binary Interval Tree with 8 leaf nodes. 3.3 Construction of Functional Encryption Scheme Let Setup, KeyGen, Encrypt, Decrypt) be the BBG Hierarchical Identity Based Encryption HIBE) scheme proposed by Boneh, Boyen and Goh [2] the description of this scheme is in Appendix A

on page 14). Based on this HIBE scheme, we construct a functional encryption scheme FE = f Setup, f Enc, f KeyGen, f Dec) as below. f Setup1 λ, d, Z) : security parameter λ, dimension d, maximum integer Z; the domain of points is [Z] d 1. Let l = log Z. Run algorithm Setupl, λ) to obtain bilinear groups p, G, G, e), public parameter params = g, g 1, g 2, g 3, h 1,..., h l, Ω = eg 1, g 2 )) and master private key master-key = g α 2, such that p is a λ bits prime, G, G are cyclic multiplicative groups of order p, e : G G G is a bilinear map, g is a generator of G, α Z p, g 1 = g α G, and g 2, g 3, h 1,..., h l G. 2. Let ID ι and IdSet ι, ι [d], be the mappings as in Section 3.2. 3. Choose d random elements τ 1,..., τ d from Z p and let τ = τ 1,..., τ d ). 4. Let pk = p, G, G, e, Ω) and sk = pk, params, master-key, τ ). Make ID ι s and IdSet ι s public and output pk, sk). f EncMsg, x, sk) : message Msg Z p, d-dimensional point x 1. Treat the d-dimensional point x as x 1,..., x d ) [Z] d ; recall that the private key sk is pk, params, master-key, τ ), where τ = τ 1,..., τ d ). 2. Choose d random elements s 1,..., s d from Z p with constraint Msg = d j=1 s j τ j mod p). 3. Choose d random elements σ 1,..., σ d from G with constraint d j=1 σ j = Ω d j=1 sj. 4. For each j [d], encrypt σ j under identity ID j x j ) with random coin s j to obtain ciphertext c j as follows 5. Output ciphertext CT = c 1,..., c d ). c j Encryptparams, ID j x j ), σ j ; s j ). 6) f KeyGenR, ρ, sk) : d-dimensional rectangular range R, function key ρ Z p 1. Treat the d-dimensional rectangular range R [Z] d as Cartesian product A 1 A 2... A d, where A j [Z] for each j [d]; recall that the private key sk is pk, params, master-key, τ ), where τ = τ 1,..., τ d ). 2. For each dimension j [d], generate a set δ j in this way: a) For each identity id IdSet j A j ), generate the private key d id, using algorithm KeyGen and taking the value master-key ρτj as the master key. b) Set δ j {d id : id IdSet j A j )}. 3. Output delegation key δ = δ 1, δ 2,..., δ d ). f DecCT, x, R, δ, pk) : ciphertext CT, d-dimensional point x, d-dimensional rectangular range R, delegation key δ 1. Treat the d-dimensional rectangular range R [Z] d as Cartesian product A 1 A 2... A d, where A j [Z] for each j [d]. Let us write the ciphertext CT as c 1,..., c d ), and the d-dimensional point x as x 1,..., x d ).

2. For each dimension j [d], generate t j in this way: If x j A j, then output and abort. Otherwise, do the followings: a) Find the unique identity id IdSet j A j ) such that id is a prefix of identity ID j x j ). b) Parse δ as δ 1,..., δ d ) and find the private key d id δ j = {d id : id IdSet j A j )} for identity id. c) Generate the private key d j for the identity ID j x j ) from private key d id, using algorithm KeyGen. d) Decrypt c j using algorithm Decrypt with decryption key d j, and denote the decrypted message as t j. 3. Output t = 1 j d t j G. 4 The Constructed Functional Encryption Scheme is Correct and Secure In this section, we analyze the correctness and security of the newly constructed functional encryption scheme. 4.1 Correctness Let us define a key-ed function family {f ρ : Z p G} ρ Z p as below: Let Ω G be as in f Setup of Section 3.3. f 1 Msg) = Ω Msg ; ρ Z p, f ρ Msg) = f 1 Msg) ρ G. 7) Lemma 1 FE is correct) The functional encryption scheme FE described in Section 3.3 satisfies this property: For any public-private key pair pk, sk) f Setup1 λ, d, Z), for any message Msg Z p, for any point x [Z] d, for any rectangular range R [Z] d, for any ρ Z p, if CT f EncMsg, x, sk) and δ f KeyGenR, ρ, sk), then { fρ Msg) if x R) f DecCT, x, R, δ, pk) = otherwise) 8) Most of previous functional encryption schemes [5] e.g. attribute-based encryption [13], and predicate encryption [14]), if not all, allow the decryptor to obtain the original plaintext Msg from a ciphertext of Msg in good case e.g. if the attribute of plaintext and/or the decryption key satisfy the designated predicate), and nothing otherwise. In contrast, our functional encryption scheme FE only allows the decryptor to obtain f 1 Msg) ρ in good case, from a ciphertext of Msg, where f 1 is a one-way function. Unlike [3,4], our functional encryption scheme is a symmetric key system. Our security formulation is weaker than previous works e.g. [3,4]). 4.2 Proof of Correctness Proof of Lemma 1). We observe that the BBG HIBE scheme [2] satisfies the polymorphic property: An encryption of a message M can be viewed as the encryption of another message M under different

key. Precisely, let CT and ĈT be defined as follows, we have CT = ĈT: ) s ) CT = Encryptparams, id, M; s) = Ω s M, g s, h I1 1 hi k k g 3 under key: params = g, g 1, g 2, g 3, h 1,..., h l, Ω = eg 1, g 2 )), master-key = g2 α ĈT = Encrypt params, id, M; sz) = Ω sz M, ) sz ) ĝ sz, ĥi 1 1 ĥi k k ĝ 3, under key: params = ĝ, g 1, g 2, ĝ 3, ĥ1,..., ĥl, Ω = eg 1, g 2 )), master-key = g2 αz 9) where identity id = I 1,..., I k ) ) k, Z p M = MΩ s1 z), ĝ = g z 1 mod p, ĝ 3 = g z 1 mod p 3 and ĥ i = h z 1 mod p i for 1 i l. To be self-contained, the description of this BBG HIBE scheme [2] is given in Appendix A. One can verify the above equality easily. Let pk, sk) f Setup1 λ ), message Msg Z p, point x [Z] d, R be a d-dimensional rectangular range, and ρ Z p. Let CT f EncMsg, x, sk), δ f KeyGenR, ρ, sk), and y G. We consider dimension j [d] and apply the polymorphic property of BBG scheme Equation 9)): Take M = σ j, s = s j and z = ρτ j. Then M = MΩ s1 z) = σ j Ω sj1 τjρ). In case x R. If x R, then the HIBE decryption will succeed in the process of f Dec Section 3.3). Note that during decryption for dimension j, we use decryption key derived from master-key ρτj. Let t j be as in Step 2d) of f Dec for decrypting ciphertext CT. We have t j = M = σ j Ω sj1 τjρ), j [d]. 10) Combining all d dimensions, and applying the two equalities see algorithm f Enc in Section 3.3) Msg = d j=1 s jτ j mod p and d j=1 σ j = Ω d j=1 sj we have, f DecCT, x, R, δ, pk) = t = = d t j = j=1 d σ j j=1 d σ j Ω sj1 τjρ)) j=1 d j=1 = Ω d j=1 sj = Ω ρmsg = f ρ Msg). Ω sj d j=1 d j=1 Ω sjτj Ω sj Ω Msg) ρ In case x R. Let R = A 1 A 2... A d as in Step 1 of f Dec. If x R, then for some dimension j [d], x[j] A j, and f Dec will output Step 2 of f Dec in Section 3.3). ρ 4.3 Security We formulize the security requirement of our functional encryption scheme by modifying the INDsID-CPA security game [2]. The resulting weak-ind-sid-cpa security game between an adversary A and a challenger C is defined as below:

Commit: The adversary A chooses the target point x from the space [Z] d and sends it to the challenger C. Setup: The challenger C runs the setup algorithm f Setup and gives A the resulting system parameters pk, keeping the secret key sk to itself. Challenge: The challenger C chooses two plaintexts Msg 0, Msg 1 at random from the message space Z p, and chooses a random bit b {0, 1}. C sets the challenge ciphertext to CT = f EncMsg b, x, sk), and sends CT, f 1 Msg 0 ), f 1 Msg 1 )) to the adversary A. Learning Phase: The adversary A adaptively issues queries to the challenger C, where each query is one of the following: Delegation key query R, ρ), where x R: In response to this query, C runs algorithm f KeyGenR, ρ, sk) to generate the delegation key δ, and sends δ to A. Anonymous delegation key query R): In response to this query, C chooses ρ at random from the space Z p and runs algorithm f KeyGenR, ρ, sk) to generate the delegation key δ, and sends δ to A. Encryption query Msg, x): In response to this query, C runs f EncMsg, x, sk) to obtain a ciphertext, and sends the ciphertext to A. Guess: Finally, the adversary A outputs a guess b {0, 1} and wins if b = b. We refer to the above adversary A as a weak-ind-sid-cpa adversary. We define the advantage of the adversary A in attacking the scheme FE as Adv weak-ind-sid-cpa FE,A = Pr[b = b ] 1 2. We will show in the following theorem that: if the BBG HIBE scheme is IND-sID-CPA secure as defined in [2]), then the functional encryption scheme FE constructed in Section 3.3 is weak-indsid-cpa secure. Note that the above security definition is weak in the sense that the two challenged messages Msg 0 and Msg 1 are chosen randomly instead of adversarially. Compared to Gorbunov et al. [1] which only allows a pre-defined number of delegation queries they called q-collusions ), the above security definition allows practically unlimited number of delegation key queries. Theorem 2 Suppose there exists a weak-ind-sid-cpa adversary A FE, which runs in time t FE and has non-negligible advantage ɛ against the functional encryption scheme FE constructed in Section 3.3) with one chosen delegation key query and N aq chosen anonymous delegation key queries and N enc chosen encryption queries. Then there exists an IND-sID-CPA adversary A BBG, which has ɛ 2d advantage against the BBG HIBE scheme [2] with Odl) chosen private key queries and zero chosen decryption query, and runs in time t FE + Odl t max N aq + N enc )), where t max is the maximum time for a random sampling within a space of size at most p), a BBG encryption Encrypt, or a BBG key generation KeyGen. 4.4 Proof of Security Proof of Theorem 2).

The proof idea. Let A FE be the weak-ind-sid-cpa adversary against the functional encryption scheme FE as in Theorem 2. We try to construct an IND-sID-CPA adversary A BBG against BBG based on A FE : Choose two random messages m 0 and m 1, and send them to the BBG challenger. After receiving the challenge ciphertext CT for message m b where b {0, 1}, guess b = 0 and construct a FE challenge f 1 Msg 0 ), f 1 Msg 1 ), CT FE ) based on the BBG challenge CT. If the adversary A FE wins the weak-ind-sid-cpa game, then output a guess b = 0; otherwise output a guess b = 1. We argue that if indeed b = 0, then the forged FE challenge is valid, and the hypothesis is applicable: A FE wins with probability 1/2 + ɛ. If b = 1, the forged FE challenge is invalid, we cannot apply the hypothesis. However, in this case the forged FE challenge is independent on the value of Msg a. Hence, in case of b = 1, A FE wins in guessing the value a {0, 1}) with probability exactly 1/2. Recall that the BBG HIBE scheme is Setup, KeyGen, Encrypt, Decrypt) and the functional encryption scheme FE is f Setup, f Enc, f KeyGen, f Dec). Now let us construct the IND-sID-CPA adversary A BBG against BBG. A BBG will simulate the weak-ind-sid-cpa game where A BBG takes the role of challenger and invokes A FE in the hypothesis as the adversary. Construction of IND-sID-CPA adversary A BBG against BBG HIBE scheme based on A FE BBG Commit : FE Commit : Adversary A FE chooses a random point x = x 1,..., x d ) [Z] d. A FE sends x to FE challenger A BBG as the target identity. BBG adversary A BBG chooses ξ [d] at random and sends target identity id = ID ξ x ξ ) Zp) l to BBG challenger C BBG. BBG Setup : BBG challenger C BBG runs setup algorithm Setup, and give A BBG the resulting system parameter params, keeping the master-key private. BBG Phase 1 : Adversary A BBG does nothing. BBG Challenge : Adversary A BBG chooses m 0, m 1 at random from the plaintext space G, and sends m 0, m 1) to the challenger C BBG. C BBG picks a random bit b {0, 1} and sends the challenge ciphertext CT = Encryptparams, id, m b ; s) to A BBG. BBG Phase 2 : FE Setup : A BBG chooses d random elements τ 1,..., τ d from Z p and let τ = τ 1,..., τ d ). Let p, G, G, e, Ω) be a part of params, where p is a prime, both G and G are cyclic multiplicative group of order p, e : G G G is a bilinear map, and Ω G. Let pk = p, G, G, e, Ω) and sk = pk, params, master-key, τ ). A BBG sends pk to A FE. Note: A BBG does not know master-key. FE Challenge : The FE challenger A BBG chooses a random bit a {0, 1} and a random message Msg 1 a from the message space Z p. A BBG will decide Msg a and generate the challenge ciphertext CT FE in this way: 1. Parse the BBG challenge ciphertext as CT = A, B, C), where A = Ω s m b. 2. Choose d 1) random elements s 1,..., s ξ 1, s ξ+1,..., s d i.e. excluding s ξ ) from Z p. 3. Choose d random elements σ 1,..., σ d from G with constraint d σ j = Ω s m b ) 1 m 0 Ω j=1 1 j d j ξ s j

4. For each j [d] and j ξ, encrypt σ j under identity ID jx j) with random coin s j to obtain ciphertext c j as follows c j Encryptparams, ID jx j), σ j; s j). 11) 5. Define c ξ based on the BBG challenge ciphertext CT = Ω s m b, B, C): c ξ = Ω s m b m 1 0 σ ξ, B, C). 6. Define Msg a = j [d] sj τj mod p), where unknown s ξ Z p is defined by Ω s ξ = Ω s m b m 1 0. Although the value Msg a is unknown since s ξ is unknown, A BBG can still compute f 1Msg a ): s j τ j ) f 1Msg a ) = Ω Msg a = Ω s m b ) 1 τξ 1 j d m 0 Ω j ξ A BBG computes f 1Msg 1 a ) = Ω Msg 1 a. 7. Set the challenge ciphertext to CT FE = c 1,..., c d ), and send CT FE, f 1Msg 0 ), f 1Msg 1 )) to A FE. FE Learning Phase : 1. A FE issues a delegation key query R, ρ), where x R and R = A 1 A 2... A d [Z] d : If x ξ A ξ, then A BBG aborts and outputs a random bit b {0, 1} Denote this event as E 1). Otherwise, simulate the procedure of f KeyGen: a) The private key is sk = pk, params, master-key, τ = τ 1,..., τ d )), where A BBG has only pk, params and τ, and does not know master-key which is kept securely by the BBG challenger C BBG ). b) For each j [d], generate a set δ j in this way: For each identity id IdSet ja j), issue a private key query with identity id to BBG challenger C BBG and get reply d id. Note: The BBG private key query id) is valid, i.e. id id and id is not a prefix of id. This is implied by the following two properties satisfied by our constructions of ID ι and IdSet ι in Section 3.2: 1) For any i, j [d], x, y [Z], if ID ix) and ID jy) share a non-empty prefix, then i = j; 2) For any [a, b] [Z], iff x [a, b], there exits an identity id in the set IdSet j[a, b]), such that id is a prefix of identity ID jx). For each identity id IdSet ja j), parse the key d id as K 0, K 1, Υ k,..., Υ l ) and set d id = K ρτ j 0, K ρτ j 1, Υ ρτ j k,..., Υ ρτ j l ). Set δ j {d id : id IdSet ja j)}. c) Send δ = δ 1, δ 2,..., δ d ) to A FE as the delegation key w.r.t. R, ρ). Note: A FE can make at most one delegation key query. 2. A FE issues an anonymous delegation key query R): Choose a random element Z G. For each anonymous delegation key query R), choose ρ Z p at random, run the algorithm f KeyGenR, ρ, sk ), where sk = pk, params, Z, τ ) i.e. taking Z as the master key), and get output δ. Send δ to A FE as the delegation key w.r.t. R. Note: 1) A BBG can answer anonymous delegation key query without the help of BBG challenger C BBG. 2) There exists an unknown ω, such that Z = master-key ω. The generated delegation key δ corresponds to range R and unknown) function key ρω, where ρω is uniformly distributed in Z p as desired. 3. A FE issues an encryption key query Msg, x): Run the encryption algorithm: C f EncMsg, x, sk) and send the resulting ciphertext C to A FE as the reply. Note: A BBG can run algorithm f Enc, since it requires only pk, params, τ. FE Guess : Adversary A FE outputs a bit a {0, 1}. BBG Guess : If a = a, adversary A BBG outputs b = 0. Otherwise, A BBG outputs b = 1.

The constructed BBG adversary A BBG made Odl) private key query and zero decryption query to the BBG challenger C BBG. Let id = ID ξ x ξ ) = I 1,..., I l ) l. Zp) Recall that the two BBG ciphertexts CT and c ξ are ) s ) CT = A, B, C) = Ω s m b, g s, h I1 G G 2 c ξ = Ω sξ σ ξ, B, C) = Ω sξ σ ξ, g s, 1... hi l l g 3 ) s ) h I1 1... hi l l g 3 G G 2 where Ω s ξ = Ω s m b m 1 0. If b = 0, then s ξ = s and thus c ξ is a valid BBG encryption of σ ξ under identity ID ξ x ξ ) with random coin s ξ. Consequently, the FE scheme simulated by A BBG is identical to a real one from the view of A FE even if A FE is computationally unbounded). If b = 1, then s ξ is independent on s. As a result, in the FE scheme simulated by A BBG, the challenging ciphertext CT FE is independent on the value of Msg a. Note that adversary A FE does not know m 0, m 1. Let the d-dimensional range R = A 1... A d. Define set S # : S # = {j [d] : x [j] A j } Since x R, S # is not empty and S # 1. We have Pr[ E 1 ] = Pr[ξ S # ] = S # d Note that adversary A BBG has two terminal cases: 1) If event E 1 occurs, A BBG outputs a random bit b {0, 1}. 2) If event E 1 does not occur, A BBG outputs b = 0 iff A FE outputs a = a. In case of E 1 : Conditional on event E 1, Pr[b = b ] = 1/2. In case of E 1 : Suppose event E 1 does not occur. Then b = 0 a = a and b = 1 a a. We have Pr[b = 0 b = 0] = Pr[a = a b = 0] and Pr[b = 1 b = 1] = Pr[a a b = 1]. As a result, conditional on event E 1, Pr[b = b ] = Pr[b = b = 0] + Pr[b = b = 1] 1 d. = Pr[b = 0]Pr[b = 0 b = 0] + Pr[b = 1]Pr[b = 1 b = 1] = Pr[b = 0]Pr[a = a b = 0] + Pr[b = 1]Pr[a a b = 1] = 1 2 1 2 + ɛ ) + 1 2 1 2 = 1 2 + 1 2 ɛ Combining the two cases E 1 and E 1 ), we obtain the advantage of A BBG against BBG scheme in the IND-sID-CPA game: Adv A BBG BBG + 1 2 = Pr[E 1] 1 1 2 + Pr[ E 1] 2 + 1 ) 2 ɛ = 1 2 + ɛ 2 Pr[ E 1] 1 2 + ɛ 2d The adversary A BBG wins the game with probability at least 1/2 + ɛ/2d) using Odl) private key queries and running in time t FE + Odl t max N aq + N enc )), where t max is the maximum time for random sampling within a space of size at most p), BBG encryption Encrypt, or BBG key generation KeyGen, and N aq N enc, respectively) is the number of anonymous delegation key queries encryption key queries, respectively) made by A FE.

5 Conclusion In this paper, we constructed a new functional encryption scheme for multidimensional range query, using a new technique. The proposed functional encryption scheme allows a user with a valid ciphertext and a correct decryption key to obtain only a one-way function value of the plaintext, where the plaintext remains secure, assuming that the multidimensional point associated to the ciphertext is within the query range associated to the decryption key. Our functional encryption scheme is designed by exploiting the polymorphic property of existing BBG HIBE scheme: encryption of a message can be viewed as encryption of another message under a different key. References 1. Gorbunov, S., Vaikuntanathan, V., Wee, H.: Functional Encryption with Bounded Collusions via Multiparty Computation. In: CRYPTO 12: Annual International Cryptology Conference on Advances in Cryptology. 162 179 2. Boneh, D., Boyen, X., Goh, E.J.: Hierarchical Identity Based Encryption with Constant Size Ciphertext. In: EUROCRYPT 05: Annual International Conference on Advances in Cryptology. 2005) 440 456 3. Boneh, D., Sahai, A., Waters, B.: Functional Encryption: Definitions and Challenges. In: will appear in) TCC 11: Theory of Cryptography Conference. 2011) http://eprint.iacr.org/2010/543. 4. O Neill, A.: Definitional issues in functional encryption. Cryptology eprint Archive, Report 2010/556 2010) http://eprint.iacr.org/. 5. Lewko, A.B., Okamoto, T., Sahai, A., Takashima, K., Waters, B.: Fully Secure Functional Encryption: Attribute-Based Encryption and Hierarchical) Inner Product Encryption. In: EUROCRYPT 10: Annual International Conference on Advances in Cryptology. 2010) 62 91 6. Okamoto, T., Takashima, K.: Fully Secure Functional Encryption with General Relations from the Decisional Linear Assumption. In: CRYPTO 10: Annual International Cryptology Conference on Advances in Cryptology. 2010) 191 208 7. Xu, J., Chang, E.C.: Authenticating aggregate range queries over multidimensional dataset. Cryptology eprint Archive, Report 2010/050 2010) http://eprint.iacr.org/. 8. Waters, B.: Functional Encryption for Regular Languages. In: CRYPTO 12: Annual International Cryptology Conference on Advances in Cryptology. 218 235 9. Barbosa, M., Farshim, P.: Semantically Secure Functional Encryption, Revisited. Cryptology eprint Archive, Report 2012/474 2012) http://eprint.iacr.org/. 10. Agrawal, S., Gorbunov, S., Vaikuntanathan, V., Wee, H.: Functional Encryption: New Perspectives and Lower Bounds. Cryptology eprint Archive, Report 2012/468 2012) http://eprint.iacr.org/. 11. Sahai, A., Seyalioglu, H.: Worry-free encryption: functional encryption with public keys. In: CCS 10: ACM conference on Computer and communications security. 463 472 12. Boneh, D., Franklin, M.: Identity-Based Encryption from the Weil Pairing. SIAM J. Comput. 323) 2003) 586 615 13. Sahai, A., Waters, B.: Fuzzy Identity-Based Encryption. In: EUROCRYPT 05: Annual International Conference on Advances in Cryptology. 2005) 457 473 14. Katz, J., Sahai, A., Waters, B.: Predicate Encryption Supporting Disjunctions, Polynomial Equations, and Inner Products. In: EUROCRYPT 08: Annual International Conference on Advances in Cryptology. 2008) 146 162 15. Shi, E., Bethencourt, J., Chan, T.H.H., Song, D., Perrig, A.: Multi-Dimensional Range Query over Encrypted Data. In: SP 07: IEEE Symposium on Security and Privacy. 2007) 350 364 16. Garg, S., Gentry, C., Halevi, S., Raykova, M., Sahai, A., Waters, B.: Candidate Indistinguishability Obfuscation and Functional Encryption for All Circuits. SIAM J. Comput. 453) June 2016) 882 929

17. Garg, S., Gentry, C., Halevi, S., Zhandry, M.: Functional Encryption Without Obfuscation. In: TCC 16: Theory of Cryptography Conference. 480 511 18. Waters, B.: A Punctured Programming Approach to Adaptively Secure Functional Encryption. In: Advances in Cryptology CRYPTO 2015. 678 697 19. GoldwasserS, S., Gordon, D., Goyal, V., Jain, A., Katz, J., Liu, F.H., Sahai, A., Shi, E., Zhou, H.S.: Multi-input Functional Encryption. In: Advances in Cryptology EUROCRYPT 2014. 578 602 20. Ben A. Fisch, Dhinakaran Vinayagamurthy, D.B.S.G.: Iron: Functional Encryption using Intel SGX. Cryptology eprint Archive, Report 2016/1071 2016) http://eprint.iacr.org/2016/1071. A BBG HIBE We restate the BBG HIBE scheme proposed by Boneh et al. [2], to make this paper self-contained. Let p be a λ bits safe prime, and e : G G G be a bilinear map, where the orders of G and G are both p. The HIBE scheme contains four algorithms Setup, KeyGen, Encrypt, Decrypt), which are described as follows. Setupl) To generate system parameters for an HIBE of maximum depth l, select a random generator g G, a random α Z p, and set g 1 = g α. Next, pick random elements g 2, g 3, h 1,..., h l G. The public parameters and the master key are KeyGend id k 1, id) params = g, g 1, g 2, g 3, h 1,..., h l, Ω = eg 1, g 2 )), master-key = g α 2. To generate a private key d id for an identity id = I 1,..., I k ) Zp) k of depth k l, using the master secret key master-key, pick a random r Z p and output ) r ) d id = g2 α h I1 1... hi k k g 3, g r, h r k+1,..., h r l G 2+l k The private key for id can be generated incrementally, given a private key for the parent identity id k 1 = I 1,..., I k 1 ) k 1. Zp) Let ) r ) d id k 1 = g2 α h I1 1... hi k 1 k 1 g 3, g r, h r k,..., h r l = K 0, K 1, W k,..., W l ) be the private key for id k 1. To generate d id, pick a random t Z p and output ) ) t d id = K 0 W I k k h I1 1... hi k k g 3, K1 g t, W k+1 h t k+1,..., W l h t l. This private key is a properly distributed private key for id = I 1,..., I k ) for r = r + t Z p. Encryptparams, id, M; s) To encrypt a message M G under the public key id = I 1,..., I k ) k, Zp) pick a random s Z p and output ) s ) CT = Ω s M, g s, h I1 1... hi k k g 3 G G 2. 12)

Decryptd id, CT) Consider an identity id = I 1,..., I k ). To decrypt a given ciphertext CT = A, B, C) using the private key d id = K 0, K 1, W k+1,..., W l ), output For a valid ciphertext, we have ek 1, C) e g r, eb, K 0 ) = e g s, g α 2 A ek 1, C) eb, K 0 ). ) s ) h I1 1... hi k k g 3 ) r ) = h I1 1... hi k k g 3 1 eg s, g α 2 ) = 1 eg 1, g 2 ) s = 1 Ω s. 13)