![](bg4.png)
4. For every i, j ∈ {1,2,. . . ,nT}, and every a ∈ A, such
that ty(a) = 1,
t
R
i
[a] ≥ t
R
j
[a] ⇐⇒ t
S
i
[a] ≥ t
S
j
[a].
5. For every i ∈ {1,2,.. . , nT}, and every a ∈ A, |t
R
i
[a]| =
|t
S
i
[a]|.
The basic goal of ESRQ is to transform R to R
′
in
such a way that R
′
should not contain any information
beyond the order relation between the attribute values.
We formally define security of an ESRQ ϒ as a game
between an adversary and a challenger, see Figure 1.
Definition 3. The advantage of an adversary A in
attacking an ESRQ ϒ is defined as
Adv
esrq
ϒ
(A) =
Pr[ESRQ
A
⇒ 1] −
1
2
.
The relevant resources of an adversary attacking
an ESRQ scheme is its running time and the size
of the relations that it chooses and submits to its
challenger. We measure the size of the relation in
two different ways, we denote by q the number of
cells. Let s
i
be the size of each cell, then we define
σ
n
=
∑
q
i=1
⌈s
i
/n⌉. We call q as the cell complexity of
A and σ
n
as the query complexity of A. We define
Adv
esrq
ϒ
(q,σ
n
,t) = maxAdv
esrq
ϒ
(A), where the max-
imum is taken over all adversaries A which runs for
time at most t and has cell complexity and query com-
plexity of at most q and σ
n
, respectively. Moreover,
we say that an ESRQ scheme ϒ is (ε,q,σ
n
,t) secure,
if Adv
esrq
ϒ
(q,σ
n
,t) ≤ ε.
3.2 ESRQ1
Here we discuss a specific scheme ESRQ1 for en-
crypting relations such that simple select and range
queries can be executed in the encrypted relations.
Consider a relation R(A) where A = {a
1
,a
2
,...a
|A|
},
and the function ty : A → {0,1} defined on A. We
consider that a client wants to outsource this generic
relation R(A) to a server. To ensure privacy, the client,
encryptsthe relation R(A) using ESRQ1 and delegates
this encrypted relation instead of the original one.
The client will pose queries to the server and expects
that the server to execute these queries on his/her be-
half without knowing the real contents of the relation
R(A).
In what follows, we present a generic description
of the scheme, also throughout we discuss a specific
example based on the relation shown in Table 1. The
only cryptographic object used by ESRQ1 is a deter-
ministic encryption scheme E which is required to be
det-cpa secure. We assume that E : K × {0,1}
λ
×
{0,1}
∗
→ {0,1}
∗
. Other than the deterministic en-
cryption scheme E, ESRQ1 uses bitmap indices.
The various algorithms involved in ESRQ1 are
discussed next in order.
ESRQ1.K : This procedure selects a key K uniformly
at random from K . Where K is the key space of the
deterministic encryption scheme E involved.
ESRQ1.Enc: Given R(A) and the key K as input,
ESRQ1.Enc outputs two relations R
α
and R
β
. We
assume that R(A) contains nT many tuples and A =
{a
1
,a
2
,...,a
|A|
}. To each attribute a
i
∈ A we asso-
ciate an unique identifier id
i
∈ {0, 1}
λ
. Among other
possibilities, this identifier can be the (appropriately
encoded) name of the attribute or a counter.
R
α
contains nT tuples and is defined over the at-
tributes B = {Row} ∪ {b
1
,b
2
,...,b
|A|
}. Where b
i
=
E
K
(id
∗
,a
i
) for some id
∗
∈ {0,1}
λ
such that id
∗
/∈
{id
1
,id
2
,...,id
|A|
}. Hence, R
α
has one attribute more
than in R, the extra attribute is RowNo, the other at-
tributes of R
α
are the encryptionof the attribute names
in A. The specific way in which R
α
is created from R
is shown in Figure 2, which shows that R
α
contains
the encryption of the values present in R.
The relation R
β
contains the attributes
{Name,SearchKey,BitMap}, irrespective of the
attributes in relation R. The way the relation R
β
is
populated is shown in Figure 2. R
β
stores information
regarding each range attribute in A. For a range
attribute a
i
all its values occurring in R are encrypted.
These encrypted values along with the corresponding
attribute name and the l-encoded bitmap are stored in
R
β
.
For a concrete example, consider that ESRQ1.Enc
has as input the relation R1 as shown in Table 1. The
only attribute in R1, where range queries are mean-
ingful is the attribute
Age
. Then ESRQ1.Enc(R1)
would produce as output the relations R1
α
and R1
β
as shown in Table 2. While applying encryption, the
unique identifier of each column is used as the associ-
ated data. The attribute names of the original relation
R1 occur in R1
α
in the encrypted form.
The relation R1
β
is created as described in Figure
2. The basic idea is to store the order information
of all the values corresponding to the range attributes
in a suitable manner. The table stores the encrypted
values along with the encrypted attribute names. The
order information is stored in the form of l-encoded
bitmaps. Note that, for encrypting a specific value the
identifier of the attribute is used as the associated data.
ESRQ1.Φ: The transform Φ receives as input a query
meant for R and converts it to a query which can be
executed in (R
α
,R
β
). The allowed set of queries are
simple select queries and range queries. The generic
format of an allowed query is
Q:
SELECT * FROM
R
WHERE
(a
1
⊳
1
v
1
) ⊚
1
(a
1
⊳
2
v
2
) ⊚
2
......
⊚
ℓ−1
(a
ℓ
⊳
1
v
ℓ
)
,
UsingBitmapsforExecutingRangeQueriesinEncryptedDatabases
435