Fine-Grained Access Control with KP-ABE
Fine-Grained Access Control with KP-ABE
Abstract
As more sensitive data is shared and stored by third-party sites on the Internet, there
will be a need to encrypt data stored at these sites. One drawback of encrypting data,
is that it can be selectively shared only at a coarse-grained level (i.e., giving another
party your private key). We develop a new cryptosystem for fine-grained sharing of
encrypted data that we call Key-Policy Attribute-Based Encryption (KP-ABE). In
our cryptosystem, ciphertexts are labeled with sets of attributes and private keys are
associated with access structures that control which ciphertexts a user is able to decrypt.
We demonstrate the applicability of our construction to sharing of audit-log information
and broadcast encryption. Our construction supports delegation of private keys which
subsumes Hierarchical Identity-Based Encryption (HIBE).
1 Introduction
There is a trend for sensitive user data to be stored by third parties on the Internet. For
example, personal email, data, and personal preferences are stored on web portal sites such
as Google and Yahoo. The attack correlation center, dshield.org, presents aggregated
views of attacks on the Internet, but stores intrusion reports individually submitted by
users. Given the variety, amount, and importance of information stored at these sites,
there is cause for concern that personal data will be compromised. This worry is escalated
by the surge in recent attacks and legal pressure faced by such services.
One method for alleviating some of these problems is to store data in encrypted form.
Thus, if the storage is compromised the amount of information loss will be limited. One
disadvantage of encrypting data is that it severely limits the ability of users to selectively
share their encrypted data at a fine-grained level. Suppose a particular user wants to grant
decryption access to a party to all of its Internet traffic logs for all entries on a particular
range of dates that had a source IP address from a particular subnet. The user either needs
∗
This research was supported in part by NSF ITR/Cybertrust grants 0456717 and 0627781.
†
This research was supported in part by NSF ITR/Cybertrust grants 0456717 and 0627781.
‡
This research was supported in part by an Alfred P. Sloan Foundation Research Fellowship, an Intel
equipment grant, and NSF ITR/Cybertrust grants 0205594, 0456717 and 0627781.
§
This research was supported in part by NSF, the US Army Research Office Grant No. W911NF-06-
1-0316, and the Department of Homeland Security (DHS) and the Department of Interior (DOI) under
Contract No. NBCHF040146. Any opinions, finding and conclusions or recommendations expressed in this
material are those of the author(s) and do not necessarily reflect the views of the funding agencies.
1
to act as an intermediary and decrypt all relevant entries for the party or must give the
party its private decryption key, and thus let it have access to all entries. Neither one of
these options is particularly appealing. An important setting where these issues give rise
to serious problems is audit logs (discussed in more detail in Section 7).
Sahai and Waters [34] made some initial steps to solving this problem by introducing
the concept of Attributed-Based Encryption (ABE). In an ABE system, a user’s keys and
ciphertexts are labeled with sets of descriptive attributes and a particular key can decrypt
a particular ciphertext only if there is a match between the attributes of the ciphertext and
the user’s key. The cryptosystem of Sahai and Waters allowed for decryption when at least
k attributes overlapped between a ciphertext and a private key. While this primitive was
shown to be useful for error-tolerant encryption with biometrics, the lack of expressibility
seems to limit its applicability to larger systems.
2
[24, 21] and its derivatives [1].
1.1 Organization
We begin with a discussion of related work in Section 2. Next, we give necessary back-
ground information and our definitions of security in Section 3. We then present our first
construction and a proof of security in Section 4 and later generalize it to work for any LSSS
realizable access structure in Appendix A. We give a construction for the large universe
case in Section 5. We then show how to add the delegation property in Section 6. We
follow with a discussion of how our system applies to audit logs in Section 7. We discuss
the application of our construction to broadcast encryption in Section 8. Finally, we discuss
some interesting extensions and open problems in Section 9.
2 Related Work
Fine-grained Access Control. Fine-grained access control systems facilitate granting
differential access rights to a set of users and allow flexibility in specifying the access rights
of individual users. Several techniques are known for implementing fine grained access
control.
Common to the existing techniques (see, e.g., [26, 20, 38, 28, 23, 29] and the references
therein) is the fact that they employ a trusted server that stores the data in clear. Access
control relies on software checks to ensure that a user can access a piece of data only if
he is authorized to do so. This situation is not particularly appealing from a security
standpoint. In the event of server compromise, for example, as a result of a software
vulnerability exploit, the potential for information theft is immense. Furthermore, there
is always a danger of “insider attacks” wherein a person having access to the server steals
and leaks the information, for example, for economic gains. Some techniques (see, e.g., [2])
create user hierarchies and require the users to share a common secret key if they are in
a common set in the hierarchy. The data is then classified according to the hierarchy and
encrypted under the public key of the set it is meant for. Clearly, such methods have several
limitations. If a third party must access the data for a set, a user of that set either needs
to act as an intermediary and decrypt all relevant entries for the party or must give the
party its private decryption key, and thus let it have access to all entries. In many cases,
by using the user hierarchies it is not even possible to realize an access control equivalent
to monotone access trees.
In this paper, we introduce new techniques to implement fine grained access control. In
our techniques, the data is stored on the server in an encrypted form while different users
are still allowed to decrypt different pieces of data per the security policy. This effectively
eliminates the need to rely on the storage server for preventing unauthorized data access.
Secret-Sharing Schemes. Secret-sharing schemes (SSS) are used to divide a secret among
a number of parties. The information given to a party is called the share (of the secret) for
that party. Every SSS realizes some access structure that defines the sets of parties who
should be able to reconstruct the secret by using their shares.
3
Shamir [35] and Blakley [7] were the first to propose a construction for secret-sharing
schemes where the access structure is a threshold gate. That is, if any t or more parties come
together, they can reconstruct the secret by using their shares; however, any lesser number
of parties do not get any information about the secret. Benaloh [6] extended Shamir’s idea
to realize any access structure that can be represented as a tree consisting of threshold
gates. Other notable secret-sharing schemes are [25, 15].
In SSS, one can specify a tree-access structure where the interior nodes consist of AND
and OR gates and the leaves consist of different parties. Any set of parties that satisfy
the tree can come together and reconstruct the secret. Therefore in SSS, collusion among
different users (or parties) is not only allowed but required.
In our construction each user’s key is associated with a tree-access structure where the
leaves are associated with attributes. A user is able to decrypt a ciphertext if the attributes
associated with a ciphertext satisfy the key’s access structure. In our scheme, contrary to
SSS, users should be unable to collude in any meaningful way.
3 Background
We first give formal definitions for the security of Key-Policy Attribute Based Encryp-
tion (KP-ABE). Then we give background information on bilinear maps and our crypto-
graphic assumption. Finally, we give some background on linear secret-sharing schemes
4
and monotone span programs.
3.1 Definitions
Definition 1 (Access Structure [4]) Let {P1 , P2 , . . . , Pn } be a set of parties. A collec-
tion A ⊆ 2{P1 ,P2 ,...,Pn } is monotone if ∀B, C : if B ∈ A and B ⊆ C then C ∈ A. An access
structure (respectively, monotone access structure) is a collection (respectively, monotone
collection) A of non-empty subsets of {P1 , P2 , . . . , Pn }, i.e., A ⊆ 2{P1 ,P2 ,...,Pn } \{∅}. The
sets in A are called the authorized sets, and the sets not in A are called the unauthorized
sets.
In our context, the role of the parties is taken by the attributes. Thus, the access
structure A will contain the authorized sets of attributes. We restrict our attention to
monotone access structures. However, it is also possible to (inefficiently) realize general
access structures using our techniques by having the not of an attribute as a separate at-
tribute altogether. Thus, the number of attributes in the system will be doubled. From now
on, unless stated otherwise, by an access structure we mean a monotone access structure.
An (Key-Policy) Attribute Based Encryption scheme consists of four algorithms.
Setup This is a randomized algorithm that takes no input other than the implicit security
parameter. It outputs the public parameters PK and a master key MK.
Key Generation This is a randomized algorithm that takes as input – an access structure
A, the master key MK and the public parameters PK. It outputs a decryption key D.
Decryption This algorithm takes as input – the ciphertext E that was encrypted under
the set γ of attributes, the decryption key D for access control structure A and the public
parameters PK. It outputs the message M if γ ∈ A.
We now discuss the security of an ABE scheme. We define a selective-set model for
proving the security of the attribute based under chosen plaintext attack. This model can
be seen as analogous to the selective-ID model [16, 17, 8] used in identity-based encryption
(IBE) schemes [36, 10, 18].
Init The adversary declares the set of attributes, γ, that he wishes to be challenged upon.
Setup The challenger runs the Setup algorithm of ABE and gives the public parameters
to the adversary.
Phase 1 The adversary is allowed to issue queries for private keys for many access
structures Aj , where γ ∈
/ Aj for all j.
Challenge The adversary submits two equal length messages M0 and M1 . The challenger
flips a random coin b, and encrypts Mb with γ. The ciphertext is passed to the adversary.
5
Phase 2 Phase 1 is repeated.
Guess The adversary outputs a guess b0 of b.
where the probability is taken over the random choice of the generator g, the random choice
of a, b, c, z in Zp , and the random bits consumed by B.
6
Definition 3 (Monotone Span Program) Let K be a field and {x1 , . . . , xn } be a set
of variables. A monotone span program over K is labeled matrix M̂ (M, ρ) where M is a
matrix over K, and ρ is a labeling of the rows of M by literals from {x1 , . . . , xn } (every row
is labeled by one literal).
A monotone span program accepts or rejects an input by the following criterion. For
every input set γ of literals, define the submatrix Mγ of M consisting of those rows whose
labels are in γ, i.e., rows labeled by some xi such that xi ∈ γ. The monotone span program
M̂ accepts γ if and only if ~1 ∈ span(Mγ ), i.e., some linear combination of the rows of
Mγ gives the all-one vector ~1. The MSP M̂ computes a Boolean function fM if it accepts
exactly those inputs γ where fM (γ) = 1. The size of M̂ is the number of rows in M .
Again, since the role of parties will be assumed by attributes in our context, each row
of the matrix M will be labeled by an attribute.
Satisfying an access tree. Let T be an access tree with root r. Denote by Tx the subtree
of T rooted at the node x. Hence T is the same as Tr . If a set of attributes γ satisfies the
access tree Tx , we denote it as Tx (γ) = 1. We compute Tx (γ) recursively as follows. If x is a
non-leaf node, evaluate Tx0 (γ) for all children x0 of node x. Tx (γ) returns 1 if and only if at
least kx children return 1. If x is a leaf node, then Tx (γ) returns 1 if and only if att(x) ∈ γ.
7
4.2 Our Construction
Let G1 be a bilinear group of prime order p, and let g be a generator of G1 . In addition,
let e : G1 × G1 → G2 denote the bilinear map. A security parameter, κ, will determine the
size of the groups. We also define
Q the Lagrange coefficient ∆i,S for i ∈ Zp and a set, S,
of elements in Zp : ∆i,S (x) = j∈S,j6=i x−j
i−j . We will associate each attribute with a unique
element in Z∗p .
Our construction follows.
Setup Define the universe of attributes U = {1, 2, . . . , n}. Now, for each attribute i ∈ U,
choose a number ti uniformly at random from Zp . Finally, choose y uniformly at random
in Zp . The published public parameters PK are
T1 = g t1 , . . . , T|U| = g t|U | , Y = e(g, g)y .
The master key MK is:
t1 , . . . , t|U| , y .
Encryption (M, γ, PK) To encrypt a message M ∈ G2 under a set of attributes γ,
choose a random value s ∈ Zp and publish the ciphertext as:
0
E = (γ, E = M Y s , {Ei = Tis }i∈γ ) .
Key Generation (T , MK) The algorithm outputs a key that enables the user to decrypt
a message encrypted under a set of attributes γ if and only if T (γ) = 1. The algorithm
proceeds as follows. First choose a polynomial qx for each node x (including the leaves)
in the tree T . These polynomials are chosen in the following way in a top-down manner,
starting from the root node r.
For each node x in the tree, set the degree dx of the polynomial qx to be one less than
the threshold value kx of that node, that is, dx = kx − 1. Now, for the root node r, set
qr (0) = y and dr other points of the polynomial qr randomly to define it completely. For
any other node x, set qx (0) = qparent(x) (index(x)) and choose dx other points randomly to
completely define qx .
Once the polynomials have been decided, for each leaf node x, we give the following
secret value to the user:
qx (0)
Dx = g ti where i = att(x) .
The set of above secret values is the decryption key D.
8
We now consider the recursive case when x is a non-leaf node. The algorithm DecryptNode(E, D, x)
then proceeds as follows: For all nodes z that are children of x, it calls DecryptNode(E, D, z)
and stores the output as Fz . Let Sx be an arbitrary kx -sized set of child nodes z such that
Fz 6= ⊥. If no such set exists then the node was not satisfied and the function returns ⊥.
Otherwise, we compute:
Y ∆i,S0 (0) i=index(z)
Fx = Fz x , where S 0 ={index(z):z∈S }
x x
z∈Sx
Y ∆ 0 (0)
= (e(g, g)s·qz (0) ) i,Sx
z∈Sx
Y ∆ 0 (0)
= (e(g, g)s·qparent(z) (index(z)) ) i,Sx (by construction)
z∈Sx
Y s·qx (i)·∆ 0 (0)
= e(g, g) i,Sx
z∈Sx
4.3 Efficiency
We now consider the efficiency of the scheme in terms of ciphertext size, private key size,
and computation time for decryption and encryption.
The ciphertext overhead will be approximately one group element in G1 for every ele-
ment in γ. That is the number of group elements will be equal to the number of descriptive
attributes in the ciphertext. Similarly, the encryption algorithm will need to perform one
exponentiation for each attribute in γ.
The public parameters in the system will be of size linear in the number of attributes
defined in the system. (We will later discuss systems where the set of legal attributes is not
dependent upon the public parameters and we give a so called Large-Universe construction
in Section 5.) User’s private keys will consist of a group element for every leaf in the key’s
corresponding access tree.
The decryption procedure is by far the hardest to define performance for. In our rudi-
mentary decryption algorithm the number of pairings to decrypt might always be as large
as the number of nodes in the tree. However, this method is extremely suboptimal and we
now discuss methods to improve upon it.
One important idea is for the decryption algorithm to do some type of exploration of the
access tree relative to the ciphertext attributes before it makes cryptographic computations.
At the very least the algorithm should first discover which nodes are not satisfied and not
bother performing cryptographic operations on them.
The following observation shows how to modify our decryption method to optimize the
efficiency. First we find out which leaf nodes we should use in order to minimize the number
9
of pairing computations as follows. For each node x, define a set Sx . If x is a leaf node,
then Sx = {x}. Otherwise, let k be the threshold value of x. From among the child nodes
of x, choose k nodes x1 , x2 , . . . , xk such that Sxi (for i = 1, 2, . . . , k) are first k sets of the
smallest size. Then for non-leaf node x, Sx = {x0 : x0 ∈ Sxi , i = 1, 2, . . . , k}. The set
Sr corresponding to the root node r denotes the set of leaf nodes that should be used in
order to minimize the number of pairing computations. Next, we notice that in the given
decryption algorithm, Lagrange coefficients (∆i,Sx0 ) from various levels get multiplied in the
exponent in a certain way in Zp . Thus, instead of exponentiating at each level, for each
leaf node x ∈ Sr , we can keep track of which Lagrange coefficients get multiplied with each
other. Using this we can compute the final Q exponent fx for feach leaf node x ∈ Sr by doing
multiplication in Zp . Now Fr is simply x∈Sr e(Dx , Eatt(x) ) . This reduces the number of
x
Proof: Suppose there exists a polynomial-time adversary A, that can attack our scheme
in the Selective-Set model with advantage ². We build a simulator B that can play the
Decisional BDH game with advantage ²/2. The simulation proceeds as follows:
We first let the challenger set the groups G1 and G2 with an efficient bilinear map, e
and generator g. The challenger flips a fair binary coin µ, outside of B’s view. If µ = 0,
the challenger sets (A, B, C, Z) = (g a , g b , g c , e(g, g)abc ); otherwise it sets (A, B, C, Z) =
(g a , g b , g c , e(g, g)z ) for random a, b, c, z. We assume the universe, U is defined.
Init The simulator B runs A. A chooses the set of attributes γ it wishes to be challenged
upon.
Setup The simulator sets the parameter Y = e(A, B) = e(g, g)ab . For all i ∈ U, it sets Ti
as follows: if i ∈ γ, it chooses a random ri ∈ Zp and sets Ti = g ri (thus, ti = ri ); otherwise
it chooses a random βi ∈ Zp and sets Ti = g bβi = B βi (thus, ti = bβi ). It then gives the
public parameters to A.
10
Phase 1 A adaptively makes requests for the keys corresponding to any access structures
T such that the challenge set γ does not satisfy T . Suppose A makes a request for the
secret key for an access structure T where T (γ) = 0. To generate the secret key, B needs
to assign a polynomial Qx of degree dx for every node in the access tree T .
We first define the following two procedures: PolySat and PolyUnsat.
PolySat(Tx , γ, λx ) This procedure sets up the polynomials for the nodes of an access sub-
tree with satisfied root node, that is, Tx (γ) = 1. The procedure takes an access tree
Tx (with root node x) as input along with a set of attributes γ and an integer λx ∈ Zp .
It first sets up a polynomial qx of degree dx for the root node x. It sets qx (0) = λx and
then sets rest of the points randomly to completely fix qx . Now it sets polynomials for
each child node x0 of x by calling the procedure PolySat(Tx0 , γ, qx (index(x0 ))). Notice
that in this way, qx0 (0) = qx (index(x0 )) for each child node x0 of x.
PolyUnsat(Tx , γ, g λx ) This procedure sets up the polynomials for the nodes of an access
tree with unsatisfied root node, that is, Tx (γ) = 0. The procedure takes an access
tree Tx (with root node x) as input along with a set of attributes γ and an element
g λx ∈ G1 (where λx ∈ Zp ).
It first defines a polynomial qx of degree dx for the root node x such that qx (0) = λx .
Because Tx (γ) = 0, no more than dx children of x are satisfied. Let hx ≤ dx be
the number of satisfied children of x. For each satisfied child x0 of x, the procedure
chooses a random point λx0 ∈ Zp and sets qx (index(x0 )) = λx0 . It then fixes the
remaining dx − hx points of qx randomly to completely define qx . Now the algorithm
recursively defines polynomials for the rest of the nodes in the tree as follows. For
each child node x0 of x, the algorithm calls:
Notice that in this case also, qx0 (0) = qx (index(x0 )) for each child node x0 of x.
To give keys for access structure T , simulator first runs PolyUnsat(T , γ, A) to define a
polynomial qx for each node x of T . Notice that for each leaf node x of T , we know qx
completely if x is satisfied; if x is not satisfied, then at least g qx (0) is known (in some cases
qx might be known completely). Furthermore, qr (0) = a.
Simulator now defines the final polynomial Qx (·) = bqx (·) for each node x of T . Notice
that this sets y = Qr (0) = ab. The key corresponding to each leaf node is given using its
polynomial as follows. Let i = att(x).
Q (0)
g xti = g bqxri(0) = B qxr(0)
i if att(x) ∈ γ
Dx = Qx (0) bqx (0) qx (0)
g ti = g bβi = g βi otherwise
Therefore, the simulator is able to construct a private key for the access structure T .
Furthermore, the distribution of the private key for T is identical to that in the original
11
scheme.
Challenge The adversary A, will submit two challenge messages m0 and m1 to the
simulator. The simulator flips a fair binary coin ν, and returns an encryption of mν . The
ciphertext is output as:
E = (γ, E 0 = mν Z, {Ei = C ri }i∈γ )
If µ = 0 then Z = e(g, g)abc . If we let s = c, then we have Y s = (e(g, g)ab )c = e(g, g)abc ,
and Ei = (g ri )c = C ri . Therefore, the ciphertext is a valid random encryption of message
mν .
Otherwise, if µ = 1, then Z = e(g, g)z . We then have E 0 = mν e(g, g)z . Since z is
random, E 0 will be a random element of G2 from the adversaries view and the message
contains no information about mν .
Chosen-Ciphertext Security. Our security definitions and proofs have been in the
chosen-plaintext model. Similar to [34], we notice that our construction can be extended
to the chosen-ciphertext model by applying the technique of using simulation-sound NIZK
proofs to achieve chosen-ciphertext security [33]. However, in Section 9 we describe how our
delegation mechanism can be used with the techniques of Cannetti, Halevi, and Katz [17]
to achieve a much more efficient CCA-2 system.
12
a parameter n which we fix as the maximum size of the set we can encrypt under.3
This construction not only reduces the size of the public parameters but also allows us
to apply a collision resistant hash function H : {0, 1}∗ → Z∗p and use arbitrary strings, that
were not necessarily considered during public key setup, as attributes. For example we can
add any verifiable attribute, such as “Lives in Beverly Hills”, to a user’s private key.
5.1 Description
Let G1 be a bilinear group of prime order p, and let g be a generator of G1 . Additionally,
let e : G1 × G1 → G2 denote the bilinear map. A security parameter, κ, will determine
the size of the groups. Also define the Lagrange coefficient ∆i,S for i ∈ Zp and a set, S, of
elements in Zp , exactly as before. The data will be encrypted under a set γ of n elements4
of Z∗p . Our construction follows.
Setup (n) Choose a random value y ∈ Zp and let g1 = g y . Now choose a random element
g2 of G1 .
Next, choose t1 , . . . , tn+1 uniformly at random from G1 . Let N be the set {1, 2, . . . , n +
1}. Define a function T , as:
n+1
Y ∆i,N (X)
n
T (X) = g2X ti .
i=1
Xn
Function T can be viewed as the function g2 g h(X) for some n degree polynomial h. The
public parameters PK are: g1 , g2 , t1 , . . . , tn+1 and the master key MK is: y.
Key Generation (T , MK, PK) The algorithm outputs a key which enables the user to
decrypt a message encrypted under a set of attributes γ, if and only if T (γ) = 1. The
algorithm proceeds as follows. First choose a polynomial qx for each non-leaf node x in the
tree T . These polynomials are chosen in the following way in a top down manner, starting
from the root node r.
For each node x in the tree, set the degree dx of the polynomial qx to be one less than
the threshold value kx of that node, that is, dx = kx − 1. Now for the root node r, set
qr (0) = y and dr other points of the polynomial qr randomly to define it completely. For
any other node x, set qx (0) = qparent(x) (index(x)) and choose dx other points randomly to
completely define qx .
3
If we are willing to accept random oracles [5], it is possible to overcome the size-limitation on γ by
replacing the function T (X) in our construction (see Setup) by a hash function (see [31] for details). This
also improves the efficiency of the system.
4
With some minor modifications, which we omit for simplicity, we can encrypt to all sets of size ≤ n.
13
Once the polynomials have been decided, for each leaf node x, we give the following
secret values to the user:
q (0)
Dx = g2x · T (i)rx where i = att(x)
rx
Rx = g
where rx is chosen uniformly at random from Zp for each node x. The set of above secret
pairs is the decryption key D.
Decryption (E, D) As for the case of small universe, we first define a recursive algorithm
DecryptNode(E, D, x) that takes as input the ciphertext E = (γ, E 0 , E 00 , {Ei }i∈γ ), the
private key D (we assume the access tree T is embedded in the private key), and a node x
in the tree. It outputs a group element of G2 or ⊥ as follows.
Let i = att(x). If the node x is a leaf node then:
e(Dx ,E 00 ) q (0)
e(g x ·T (i)rx ,g s )
q (0)
e(g x ,g s )·e(T (i)rx ,g s )
e(R ,E ) = 2e(grx ,T (i)s ) = 2 e(grx ,T (i)s ) = e(g, g2 )s·qx (0) if i ∈ γ
DecryptNode(E, D, x) = x i
⊥ otherwise
We now consider the recursive case when x is a non-leaf node. The algorithm DecryptNode(E, D, x)
then proceeds as follows: For all nodes z that are children of x, it calls DecryptNode(E, D, z)
and stores the output as Fz . Let Sx be an arbitrary kx -sized set of child nodes z such that
Fz 6= ⊥. If no such set exists then the node was not satisfied and the function returns ⊥.
Otherwise, we compute:
Y ∆ 0 (0)
i,Sx i=index(z)
Fx = Fz , where 0
Sx ={index(z):z∈Sx }
z∈Sx
Y ∆ 0 (0)
= (e(g, g2 )s·qz (0) ) i,Sx
z∈Sx
Y ∆ 0 (0)
= (e(g, g2 )s·qparent(z) (index(z)) ) i,Sx (by construction)
z∈Sx
Y s·qx (0)·∆ 0 (0)
= e(g, g2 ) i,Sx
z∈Sx
14
Algorithms Setup and Encryption remain exactly the same as for the above construction.
Key Generation takes an MSP and the master key as input. For each row i of the matrix,
~
it gives the following pair to the user: (Di = g2Mi ·~u · T (i)ri , Ri = g ri ); where ~u is chosen
such that ~1 · ~u = y (master key), and ri is chosen randomly. Decryption and the security
proof follow using the tricks of appendix A.
Now, we change the key such that qx0 becomes the new polynomial of the node x. This
is done as follows. For every child y of x, compute the constant Cx = index(y) + 1. For
every leaf node z in the subtree5 Ty , compute the new decryption key as
15
The above results in the multiplication of all the polynomials in the subtree Ty with the
constant Cx . Hence, qy0 (0) = (index(y) + 1)qy (0) which is indeed a point on the new
polynomial qx0 . Note that since qx0 (0) = qx (0), no changes outside the subtree Tx are
required.
The above procedure effectively changes x from a (t, n)-gate to a (t + 1, n)-gate and
yields the corresponding new private key.
6
Recall that dx is the degree of the polynomial qx associated with the node x
16
In the following theorem, we prove that the above set of operations is complete. That is,
give a key for an access tree T , this set of operations is sufficient to compute a key for ANY
access tree T 0 which is more restrictive than T .
Proof: We can obtain a key for an access tree T 0 from a key for T using the following
general technique. Add a new trivial gate x (using operation 1) above the root node of T
so that the new gate becomes the root node. Now we apply operation 2.2 to x to convert
it from a (1, 1)-gate to a (2, 2)-gate. The new subtree added as a child of x corresponds to
the access tree T 0 . Finally, we re-randomize the key obtained (operation 3). This gives us
a key for the access structure (T AND T 0 ). However, since T 0 is more restrictive than T ,
this access structure is equivalent to T 0 itself. Hence, we have obtained a key for the access
structure T 0 . We point out that this is a general method for obtaining a more restrictive
access structure; in practice users will likely use the delegation tools described above in a
more refined manner to achieve shorter private key sizes and faster decryption times.
In the above setting, we may imagine an entity having multiple private keys (procured from
different entities). We note that it is possible to use these multiple keys (for different access
structures) to compute a key for the targeted access structure. Given n keys for the access
trees T1 , T2 , ... ,Tn , using an operation similar to operation 1, we can connect them to
obtain a single tree with an OR gate being the root node and T1 , T2 , ... ,Tn each being a
child subtree of that OR gate. Thus, we obtain a single key for the access structure T = (T1
OR T2 OR ... OR Tn ). This key can then be used to generate new private keys.
17
OR (the date is between October 4, 2005 and October 7, 2005 AND the data accessed
pertained to naval operations off the coast of North Korea)”. Our system would provide
the guarantee that even if multiple rogue analysts collude to try to extract unauthorized
information from the audit log, they will fail.
A more concrete example audit-log application of our ABE system would be to the
ArmyCERT program, which uses netflow logs [30]. Basically, an entry is created for every
flow (e.g. TCP connection), indexed by seven attributes: source IP address, destination
IP address, L3 protocol type, source port, destination port, ToS byte (DSCP), and input
logical interface (ifIndex). These aspects of every flow are in the clear, and the payload can
be encrypted using our ABE system with these fields as attributes.
Note that in our scheme, we would need to assume that the attributes associated with
audit log entries would be available to all analysts.7 This may present a problem in highly
secret environments where even attributes themselves would need to be kept hidden from
analysts. We leave the problem of constructing KP-ABE systems where attributes associ-
ated with ciphertexts remain secret as an important open problem.
18
system would be used to encrypt the symmetric key with the attributes associated with
the item being broadcast. The KP-ABE system would precisely allow the flexibility we
envision in issuing private keys for the unique needs of each user.
It is worth mentioning that handling such a situation with the best known broadcast
encryption schemes [11, 22] (which allow encrypting to an arbitrary subset of users) is quite
inefficient in comparison. The efficiency of such systems is dependent on the size of the
authorized user set or the number of users in the system [11, 22], and would also require
the broadcaster to refer to its database of user authorizations each time a different item
is to be encrypted for broadcast. In our scheme, the encryption of an item would depend
only on the properties of that item. The broadcaster could in principle even forget about
the levels of access granted to each user after preparing a private key for the user.
19
CP-ABE systems that allow for complex policies (like those considered here) would have
a number of applications. An important example is a kind of sophisticated Broadcast
Encryption, where users are described by (and therefore associated with) various attributes.
Then, one could create a ciphertext that can be opened only if the attributes of a user match
a policy. For instance, in a military setting, one could broadcast a message that is meant to
be read only by users who have a rank of Lieutenant or higher, and who were deployed in
South Korea in the year 2005. We leave constructing such a system as an important open
problem.
Searching on Encrypted Data. Our current constructions do not hide the set of at-
tributes under which the data is encrypted. However, if it were possible to hide the at-
tributes, then viewing attributes as keywords in such a system would lead to the first
general keyword-based search on encrypted data [9]. A search query could potentially be
any monotone boolean formula of any number of keywords. We leave the problem of hiding
the set of attributes as open.
References
[1] Michel Abdalla, Dario Catalano, Alexander W. Dent, John Malone-Lee, Gregory
Neven, and Nigel P. Smart. Identity-based encryption gone wild. In Michele Bugliesi,
Bart Preneel, Vladimiro Sassone, and Ingo Wegener, editors, ICALP (2), volume 4052
of Lecture Notes in Computer Science, pages 300–311. Springer, 2006.
[2] S.G. Akl and P.D. Taylor. Cryptographic Solution to a Multi Level Security Problem.
In Advances in Cryptology – CRYPTO, 1982.
[3] H. Anton and C. Rorres. Elementary Linear Algebra, 9th Edition. 2005.
[4] A. Beimel. Secure Schemes for Secret Sharing and Key Distribution. PhD thesis, Israel
Institute of Technology, Technion, Haifa, Israel, 1996.
[5] M. Bellare and P. Rogaway. Random oracles are practical: A paradigm for designing
efficient protocols. In ACM conference on Computer and Communications Security
(ACM CCS), pages 62–73, 1993.
[6] J. Benaloh and Leichter J. Generalized Secret Sharing and Monotone Functions. In
Advances in Cryptology – CRYPTO, volume 403 of LNCS, pages 27–36. Springer, 1988.
[8] D. Boneh and X. Boyen. Efficient Selective-ID Secure Identity Based Encryption
Without Random Oracles. In Advances in Cryptology – Eurocrypt, volume 3027 of
LNCS, pages 223–238. Springer, 2004.
20
[9] D. Boneh, G.D. Crescenzo, R. Ostrovsky, and G. Persiano. Public-Key Encryption
with Keyword Search. In Advances in Cryptology – Eurocrypt, volume 3027 of LNCS,
pages 506–522. Springer, 2004.
[10] D. Boneh and M. Franklin. Identity Based Encryption from the Weil Pairing. In
Advances in Cryptology – CRYPTO, volume 2139 of LNCS, pages 213–229. Springer,
2001.
[11] D. Boneh, C. Gentry, and B. Waters. Collusion Resistant Broadcast Encryption with
Short Ciphertexts and Private Keys. In Advances in Cryptology – CRYPTO, volume
3621 of LNCS, pages 258–275. Springer, 2005.
[12] Dan Boneh and Jonathan Katz. Improved efficiency for cca-secure cryptosystems built
using identity-based encryption. In CT-RSA, pages 87–103, 2005.
[13] Xavier Boyen, Qixiang Mei, and Brent Waters. Direct chosen ciphertext security from
identity-based techniques. In ACM Conference on Computer and Communications
Security, pages 320–329, 2005.
[14] Robert W. Bradshaw, Jason E. Holt, and Kent E. Seamons. Concealing complex poli-
cies with hidden credentials. In ACM Conference on Computer and Communications
Security, pages 146–157, 2004.
[15] E. F. Brickell. Some ideal secret sharing schemes. Journal of Combinatorial Mathe-
matics and Combinatorial Computing, 6:105–113, 1989.
[17] R. Canetti, S. Halevi, and J. Katz. Chosen Ciphertext Security from Identity Based
Encryption. In Advances in Cryptology – Eurocrypt, volume 3027 of LNCS, pages
207–222. Springer, 2004.
[18] Clifford Cocks. An identity based encryption scheme based on quadratic residues. In
IMA Int. Conf., pages 360–363, 2001.
[19] Y. Dodis, N. Fazio, A. Lysyanskaya, and D.F. Yao. ID-Based Encryption for Complex
Hierarchies with Applications to Forward Security and Broadcast Encryption. In ACM
conference on Computer and Communications Security (ACM CCS), pages 354–363,
2004.
[20] Rita Gavriloaie, Wolfgang Nejdl, Daniel Olmedilla, Kent E. Seamons, and Marianne
Winslett. No registration needed: How to use declarative policies and negotiation to
access sensitive resources on the semantic web. In ESWS, pages 342–356, 2004.
[21] Craig Gentry and Alice Silverberg. Hierarchical id-based cryptography. In ASI-
ACRYPT, pages 548–566, 2002.
[22] D. Halevy and A. Shamir. The LSD Broadcast Encryption Scheme. In Advances in
Cryptology – CRYPTO, volume 2442 of LNCS, pages 47–60. Springer, 2002.
21
[23] Hugh Harney, Andrea Colgrove, and Patrick Drew McDaniel. Principles of policy in
secure groups. In NDSS, 2001.
[24] Jeremy Horwitz and Ben Lynn. Toward hierarchical identity-based encryption. In
Lars R. Knudsen, editor, EUROCRYPT, volume 2332 of Lecture Notes in Computer
Science, pages 466–481. Springer, 2002.
[25] M. Ito, A. Saito, and T. Nishizeki. Secret Sharing Scheme Realizing General Access
Structure. In IEEE Globecom. IEEE, 1987.
[26] Myong H. Kang, Joon S. Park, and Judith N. Froscher. Access control mechanisms
for inter-organizational workflow. In SACMAT ’01: Proceedings of the sixth ACM
symposium on Access control models and technologies, pages 66–74, New York, NY,
USA, 2001. ACM Press.
[27] M. Karchmer and A. Wigderson. On Span Programs. In The Eighth Annual Structure
in Complexity Theory, pages 102–111, 1993.
[28] Jiangtao Li, Ninghui Li, and William H. Winsborough. Automated trust negotiation
using cryptographic credentials. In ACM Conference on Computer and Communica-
tions Security, pages 46–57, 2005.
[29] Patrick Drew McDaniel and Atul Prakash. Methods and limitations of security policy
reconciliation. In IEEE Symposium on Security and Privacy, pages 73–87, 2002.
[32] V.V. Prasolov. Problems and Theorems in Linear Algebra. American Mathematical
Society, 1994.
[34] A. Sahai and B. Waters. Fuzzy Identity Based Encryption. In Advances in Cryptology
– Eurocrypt, volume 3494 of LNCS, pages 457–473. Springer, 2005.
[37] Nigel P. Smart. Access control using pairing based cryptography. In CT-RSA, pages
111–121, 2003.
[38] Ting Yu and Marianne Winslett. A unified scheme for resource protection in automated
trust negotiation. In IEEE Symposium on Security and Privacy, pages 110–122, 2003.
22
A Construction for Any LSSS-realizable Access Structure
Consider an access structure for which there exists a linear secret-sharing scheme that
realizes it. It is known that for every LSSS realizable access structure, there exists a
monotone span program (MSP) that computes the corresponding boolean function and
vice versa [4]. Thus, such an access structure can be represented by a monotone span
program.
In an attempt to accommodate more general and complex access structures, we present
attribute based encryption for the class of access structures which can be represented by
polynomial size monotone span programs. The access structure will be represented in the
form of a monotone span program M̂ (M, ρ). Each row of M will be labeled by an attribute
~ i.
from U and ρ(i) will denote the label of ith row M
Setup Define the universe of attributes U = {1, 2, . . . , n}. Now, for each attribute i ∈ U,
choose a number ti uniformly at random from Zp . Finally, choose y uniformly at random
in Zp . The published public parameters PK are:
Key Generation (M̂ , MK, PK) Input to the key generation algorithm is an access
structure in the form of an MSP M̂ (M, ρ). Let the dimensions of M be d × `. Choose
a random vector ~u from Z`p such that ~1 · ~u = y, that is, u = (u1 , u2 , . . . , u` ) such that
P` ~
i=1 ui = y. For each row vector Mi , give the following secret value to the user:
M~ ·~
i u
tρ(i)
Di = g
23
Decryption (E, D, PK) To decrypt the ciphertext E = (γ, E 0 , {Ei }i∈γ ) with the decryp-
tion key D, proceed as follows. Since fM (γ) = 1, the span program M̂ accepts γ. Thus,
there exist coefficients αi ∈ Zp such that,
X
~ i = ~1
αi · M
ρ(i)∈γ
Now,
Y Y ~ ·~
Mi u
E0/ e(Di , Eρ(i) )αi = E0/ e(g tρ(i) , g stρ (i) )αi
ρ(i)∈γ ρ(i)∈γ
Y ~
= mY s / e(g, g)sαi ·Mi ·~u
ρ(i)∈γ
P
~ i )·~
= mY s /e(g, g)s·( ρ(i)∈γ αi ·M u
~
= mY s /e(g, g)s·(1·~u)
= me(g, g)sy /e(g, g)sy
= m.
Proof: Suppose there exists a polynomial-time adversary A, that can attack our scheme
in the Selective-Set model with advantage ². We build a simulator B that can play the
Decisional BDH game with advantage ²/2. The simulation proceeds as follows:
We first let the challenger set the groups G1 and G2 with an efficient bilinear map, e
and generator g. The challenger flips a fair binary coin µ, outside of B’s view. If µ = 0,
the challenger sets (A, B, C, Z) = (g a , g b , g c , e(g, g)abc ); otherwise it sets (A, B, C, Z) =
(g a , g b , g c , e(g, g)z ) for random a, b, c, z. We assume the universe, U, is defined.
Init The simulator B runs A. A chooses the set of attributes γ it wishes to be challenged
upon.
Setup The simulator sets the parameter Y = e(A, B) = e(g, g)ab . For all i ∈ U, it sets
Ti as follows: if i ∈ γ, it chooses a random ri and sets Ti = g ri (thus, ti = ri ); otherwise it
chooses a random βi and sets Ti = g bβi = B βi (thus, ti = bβi ).
It then gives the public parameters to A. Notice that from A’s view all parameters are
chosen at random as in the construction.
24
Phase 1 A adaptively makes requests for several access structures represented in the
form of MSP such that γ is accepted by none of them.
Suppose A makes a request for the secret key for an MSP M̂ (M, ρ) such that fM (γ) = 0.
Let the dimensions of M be d × `. Let Mγ be the submatrix of M consisting of only
those rows whose label is in γ. To generate the secret key, B has to fix a random vector
u = (u1 , u2 , . . . , u` ) such that ~1 · ~u = ab. To do that, first define a vector v = (v1 , v2 , . . . , v` )
such that vi = bλi , for λi chosen uniformly at random from Zp . Now, consider the following
proposition [3, 32],
Proposition 1 A vector ~π is independent of a set of vectors represented by a matrix N if
and only if there exists a vector w ~ = ~0 while ~π · w
~ such that N w ~ 6= 0.
Since ~1 is independent of Mγ , there exists a vector w ~ = ~0 and ~1 · w
~ such that Mγ w ~ 6=
0(= h, say). Such a vector can be efficiently computed [3, 32]. Let w = (w1 , w2 , . . . , w` ).
Finally define the vector ~u as follows:
P
ab − b `k=1 λk
~u = ~v + ψ w
~ where ψ =
h
Notice that,
P`
k=1 λk
ab − b
ui = vi + ψwi = bλi + · wi
h
Let Mj = (xj1 , xj2 , . . . , xj` ). Give the secret key for the row Mj as follows. If ρ(j) ∈ γ,
then: P`
φ1 xji λj
Dj = B where φ1 = i=1
rρ(j)
Note that φ1 is completely known. This is a legitimate key because,
P`
~ j · ~u ~ j · (~v + ψ w) ~ j · ~v + ψ(M ~ j · w) ~ j · ~v + ψ · 0
M M ~ M ~ M i=1 xji λi
= = = =b· = bφ1
tρ(j) tρ(j) tρ(j) tρ(j) rρ(j)
If ρ(j) ∈
/ γ, then:
P` P` P`
φ2 φ3 i=1 xji i=1 xji (hλi − k=1 λk )
Dj = A g where φ2 = , φ3 =
hβρ(j) hβρ(j)
Note that φ2 , φ3 are completely known. This is a legitimate key because,
P` ³ P ´ ÃP ! ÃP !
a− `k=1 λk P`
M~ j · ~u b x
i=1 ji λ i + h
`
x `
x (hλ − λ )
i=1 ji i=1 ji i k=1 k
= =a + = aφ2 +φ3
tρ(j) bβρ(j) hβρ(j) hβρ(j)
Therefore, the simulator is able to construct a private key for the MSP M̂ . Furthermore,
the distribution of the private key for M̂ is identical to that of the original scheme.
Challenge The adversary A, will submit two challenge messages m0 and m1 to the
simulator. The simulator flips a fair binary coin, ν, and returns an encryption of mν . The
ciphertext is output as:
0
E = (γ, E = mν Z, {Ei = C ri }i∈γ )
25
If µ = 0 then Z = e(g, g)abc . If we let s = c, then we have Y s = (e(g, g)ab )c = e(g, g)abc ,
and Ei = (g ri )c = C ri . Therefore, the ciphertext is a valid random encryption of message
mν .
0
Otherwise, if µ = 1, then Z = e(g, g)z . We then have E = mν e(g, g)z . Since z is
0
random, E will be a random element of G2 from the adversary’s view and the message
contains no information about mν .
Proof: Suppose there exists a polynomial-time adversary A, that can attack our scheme
in the Selective-Set model with advantage ². We build a simulator B that can play the
Decisional BDH game with advantage ²/2. The simulation proceeds as follows:
We first let the challenger set the groups G1 and G2 with an efficient bilinear map, e
and generator g. The challenger flips a fair binary coin µ, outside of B’s view. If µ = 0,
the challenger sets (A, B, C, Z) = (g a , g b , g c , e(g, g)abc ); otherwise it sets (A, B, C, Z) =
(g a , g b , g c , e(g, g)z ) for random a, b, c, z.
Init The simulator B runs A. A chooses the challenge set, γ, an n element set of members
of Zp .
Setup The simulator assigns the public parameters g1 = A and g2 = B. It then chooses a
random n degree polynomial f (X) and calculates an n degree polynomial u(X) as follows:
26
set u(X) = −X n for all X ∈ γ and u(X) 6= −X n for some other X. Because, −X n and
u(X) are two n degree polynomials, they will have at most n points in common or they
are the same polynomial. This construction ensures that ∀X, u(X) = −X n if and only if
X ∈ γ.
u(i)
Now, the simulator sets ti = g2 g f (i) for all i = 1 to n + 1. Because f (X) is a random
n degree polynomial, all ti will be chosen independently at random as in the construction.
in +u(i) f (i)
Implicitly we have: T (i) = g2 g .
Phase 1 A adaptively makes requests for several access structures such that γ passes
through none of them. Suppose A makes a request for the secret key for an access structure
T where T (γ) = 0. To generate the secret key, B has to fix a polynomial Qx of degree dx
for every non-leaf node in the access tree.
Recall the functions PolySat and PolyUnsat from the proof of small universe case. The
simulator simply runs PolyUnsat(T , γ, A) on the main tree T . This defines a polynomial
qx for each node x of T such that qr (0) = a. Furthermore, for each leaf node x of T , we
know the polynomial qx completely if x is satisfied, and at least g qx (0) if x is not satisfied.
Simulator now defines the main polynomial Qx (·) = qx (·) for each node x of T . Notice
that this sets y = Qr (0) = a. The key corresponding to each leaf node x is given using its
polynomial as follows. Let i = att(x).
• If i ∈ γ.
Q (0) q (0)
Dx = g2 x T (i)rx = g2x T (i)rx
Rx = g rx
Where rx is chosen at random from Zp .
−f (i)
n +u(i) in +u(i) f (i) rx0
Dx = g3i (g2 g )
−qx (0).f (i)
in +u(i) 0
= g in +u(i) (g2 g f (i) )rx
−qx (0)
q (0) in +u(i) f (i) in +u(i) f (i) rx0
= g2x (g2 g ) in +u(i) (g2 g )
q (0)
q (0) in +u(i) f (i) rx0 − in x
= g2x (g2 g ) +u(i)
q (0)
= g2x (T (i))rx
Q (0)
= g2 x T (i)rx
27
and,
−1 q (0)
n +u(i) 0 rx0 − in x
Rx = g3i g rx = g +u(i) = g rx
Therefore, the simulator is able to construct a private key for the access structure T .
Furthermore, the distribution of the private key for T is identical to that of the original
scheme.
Challenge The adversary A, will submit two challenge messages m0 and m1 to the
simulator. The simulator flips a fair binary coin ν, and returns an encryption of mν . The
ciphertext is output as:
0
E = (γ, E = mν Z, E 00 = C, {Ei = C f (i) }i∈γ )
28