---
title: 'BRASP: Encrypted Boolean Range Queries'
url: https://www.emergentmind.com/topics/brasp
type: topic
---

# BRASP: Encrypted Boolean Range Queries

BRASP is a searchable encryption scheme for Boolean range queries over encrypted spatial data. It is defined for an outsourced spatio-textual database in which the data owner holds \(DB=\{O_1,\dots,O_n\}\), with \(O_i=(loc_i,W_i)\), \(loc_i\in[0,1]^2\), and \(W_i\subseteq \mathcal{W}\), and a Boolean range query \(Q=(R_q,W_q)\) asks for
\[
\Delta(Q)=\{O_i\in DB \mid loc_i\in R_q \text{ and } W_q\subseteq W_i\}.
\]
The scheme targets the standard leakage problem in efficient searchable encryption: most practical constructions leak the search pattern and access pattern, which may allow an honest-but-curious cloud server to infer query contents, user interests, or returned records. BRASP addresses this setting by combining Hilbert-curve-based prefix encoding with encrypted prefix-ID and keyword-ID inverted indexes, and by using a dual-server design with index shuffling and ID-field redistribution to hide both search and access patterns while supporting dynamic updates and forward security [2604.07797].

## 1. Problem formulation and threat model

The BRASP problem setting is explicitly spatio-textual. Each object couples a two-dimensional location with a keyword set, and query semantics are conjunctive across the spatial and textual dimensions: an object matches only if its location lies in the query range \(R_q\) and the query keyword set \(W_q\) is contained in the object’s keyword set.

The privacy objectives are stated in two distinct forms. **Search-pattern privacy** requires that an adversary should not learn whether two trapdoors correspond to the same \(Q\). **Access-pattern privacy** requires that an adversary should not learn which encrypted objects match each query beyond what can be simulated from the mandatory leakage. These two goals are central because repeated searches and observable result behavior are precisely the channels through which efficient searchable encryption systems often become vulnerable.

The adversary model is a dual-server one. BRASP assumes two non-colluding honest-but-curious cloud servers, \(CS_1\) and \(CS_2\). The data owner and authorized clients are trusted. \(CS_1\) and \(CS_2\) each observe their local encrypted indexes, shuffled states, received trapdoors, partial decryptions, and inter-server messages, but do not collude. This suggests that BRASP trades a stronger deployment assumption—non-collusion—for stronger privacy against single-server observation [2604.07797].

## 2. System architecture and end-to-end workflow

BRASP involves four parties: the Data Owner (DO), an Authorized Client, and two cloud servers \(CS_1\) and \(CS_2\). The DO builds and encrypts indexes, holds master keys, and authorizes clients. The Authorized Client holds a client key \(k_u\), generates query and update tokens, recovers results, and triggers index redistribution. Each cloud server stores one share of the encrypted prefix-ID and keyword-ID indexes plus the encrypted object set.

| Party | Held or stored material | Role |
|---|---|---|
| Data Owner | master keys | builds and encrypts indexes; authorizes clients |
| Authorized Client | client key \(k_u\) | generates query/update tokens; recovers results; triggers index redistribution |
| \(CS_1\) | one share of encrypted indexes and encrypted object set | search, partial decryption, shuffle participation |
| \(CS_2\) | one share of encrypted indexes and encrypted object set | search, partial decryption, shuffle participation |

The system workflow is staged. In **DO.Setup**, the DO generates a TPF key \(k_M\), a TUR key pair \((sk_M^{ID},pk_M^{ID})\), partial TUR keys \(sk_1^{ID},sk_2^{ID}\), and shuffle-seeds \(r_1,r_2\). In **DO.EncryptedIndexBuild**, the DO builds two shared inverted indexes \(I_h^1,I_w^1\) on \(CS_1\) and \(I_h^2,I_w^2\) on \(CS_2\). Before any search and after each search or update, \(CS_1\odot CS_2.\mathrm{IndexShuffle}\) re-randomizes and permutes both indexes. The client then runs **TokenGeneration** for a query \(Q\), producing trapdoors \(T_h,T_w\) that are sent to both servers. During **Search**, the servers perform partial decryptions and bitmap intersections and return encrypted result shares to the client. The client recovers \(\Delta(Q)\) and triggers **IndexRedistribution** to refresh ID-field shares. Updates are handled through client-generated \(UT_h,UT_w\), which \(CS_1\odot CS_2\) apply in a forward-secure way [2604.07797].

A notable systems property is that the shuffle is not an occasional maintenance step; it is part of the privacy-preserving lifecycle. The index state is refreshed before any search and after each search or update, so the storage structure itself becomes stateful.

## 3. Hilbert-curve encoding and encrypted inverted indexes

BRASP reduces two-dimensional spatial filtering to prefix matching by means of a Hilbert mapping. For a fixed curve order \(j\), the unit square is divided into \(2^j\times 2^j\) cells, and
\[
H:[0,1]^2 \to \{0,1,\dots,2^{2j}-1\}
\]
maps each point \(loc\) to a single integer Hilbert value \(h=H(loc)\). Writing the \(\gamma=2j\)-bit binary representation of \(h\) as \(a_1a_2\dots a_\gamma\), BRASP defines the prefix family
\[
\mathcal{P}(h)=\{a_1\dots a_\gamma,\ a_1\dots a_{\gamma-1}*,\dots,a_1*,\dots,*****\dots *\},
\]
where \(*\) is a wildcard bit.

For a target Hilbert interval \([r_{\min},r_{\max}]\), BRASP computes the minimal set of prefixes \(\mathcal{G}([r_{\min},r_{\max}])\) such that
\[
\bigcup_{p\in\mathcal{G}}\{h' : p \text{ matches } h'\}=[r_{\min},r_{\max}].
\]
A point with value \(h\) lies in the range iff
\[
\mathcal{P}(h)\cap \mathcal{G}([r_{\min},r_{\max}])\neq \emptyset.
\]
This is the scheme’s core geometric reduction: range membership is transformed into prefix-family overlap.

The plaintext indexing layer contains two bitmap-based inverted indexes. The prefix-ID index is
\[
\bar I_h=\{(h_i,B_{h_i})\}_{i=1\dots p},
\]
where \(h_i\) is a prefix string and \(B_{h_i}\in\{0,1\}^n\) with \(B_{h_i}[i]=1\) iff \(H(loc_i)\) matches \(h_i\). The keyword-ID index is
\[
\bar I_w=\{(w_j,B_{w_j})\}_{j=1\dots m},
\]
where \(w_j\) is a plaintext keyword and \(B_{w_j}[i]=1\) iff keyword \(w_j\in W_i\).

Encryption is split across labels and bitmaps. TPF, the Tailored Proxy PRF, is used for labels: \( \mathrm{TPF.KeyGen}\to k_M\), \( \mathrm{TPF.Rnd}(k,x)\to s\), and \( \mathrm{TPF.ReEnc}(s,rk)\) moves \(s\) under a new key without touching \(x\). TUR, the Tailored Universal Re-encryption, is used for bitmaps: \( \mathrm{TUR.Setup}\to (sk_M^{ID},pk_M^{ID})\), \( \mathrm{TUR.KeyGen}(sk_M^{ID})\to (sk_1^{ID},sk_2^{ID})\), \( \mathrm{TUR.Enc}(m,pk_M^{ID})\to C\), \( \mathrm{TUR.ReEnc}(C,pk)\to \tilde C\), \( \mathrm{TUR.PDec}(\tilde C,sk_i^{ID})\to\) a partial decryption, and \( \mathrm{TUR.Dec}(\cdot,sk_j^{ID})\to m\).

In encrypted index construction, for each \((h_i,B_{h_i})\in \bar I_h\), BRASP computes \(hs_i\leftarrow \mathrm{TPF.Rnd}(k_M,h_i)\) and \(ID_{h_i}\leftarrow \mathrm{TUR.Enc}(B_{h_i},pk_M^{ID})\), then stores \((hs_i,ID_{h_i})\) in \(I_h\); the keyword index is handled analogously. This decomposition separates searchable labels from encrypted bitmap payloads and enables later shuffling and re-randomization without reconstructing plaintext indexes [2604.07797].

## 4. Query execution and dual-server pattern hiding

Query execution begins with prefix-cover computation. For a Boolean range query \(Q=(R_q,W_q)\), the client computes \(QP=\mathcal{G}([r_{\min},r_{\max}])\). For each \(h_k\in QP\), the client computes
\[
v_k \leftarrow k_u\cdot (r_1r_2)^{U_{h_k}}, \qquad T_{h_k}\leftarrow \mathrm{TPF.Rnd}(v_k,h_k),
\]
and performs the same procedure for each \(w_k\in W_q\), yielding \(T_h\) and \(T_w\).

On the server side, \(CS_2\) first transforms client trapdoors into master-key space. For each \(T_{h_k}\in T_h\), it computes \(T_{h_k}^M\leftarrow \mathrm{TPF.ReEnc}(T_{h_k},rk_{u\to M})\), finds the matching \(I_h^2\) entry by label equality, and applies \( \mathrm{TUR.PDec}(\hat C_{h_k},sk_2^{ID})\) to the corresponding encrypted ID bitmap. It performs the same steps for keywords and sends the resulting partial decryptions to \(CS_1\). \(CS_1\) completes decryption of the bitmap shares, uses them to locate matching encrypted objects, unions prefix matches, intersects keyword matches, and returns the encrypted object-ID list. The final server-side result structure is
\[
C_1(Q)=\left(\bigcup_k S_{h_k}\right)\cap \left(\bigcap_k S_{w_k}\right).
\]
The client then recovers and decrypts the returned encrypted objects [2604.07797].

Pattern hiding is reinforced by a separate index-shuffling protocol. Its purpose is twofold: the same \(h\) or \(w\) should lead to a fresh, unlinkable label after each shuffle, and ID bitmaps should be re-randomized and remapped so that the cloud cannot link which bitmap it saw before and after. On the \(CS_1\) side, the high-level protocol takes its index shares \(I_k^1\) for \(k\in\{h,w\}\), sends them to \(CS_2\), and has \(CS_2\) re-encrypt labels with \(r_2\), re-randomize the ID ciphertexts with TUR, increment the entry state, randomly permute all entries, and return the resulting structures. \(CS_1\) then re-encrypts again with \(r_1\), re-randomizes the ciphertexts again, increments the state again, and applies a fresh permutation to obtain the new shuffled index shares.

No zero-knowledge proofs are used. Privacy relies on TPF for pseudorandom labels, TUR for re-rando Paillier, random shuffles, and split-bitmap secret sharing. This design choice is operationally significant because it places the privacy burden on re-encryption, permutation, and server separation rather than on proof-carrying query execution [2604.07797].

## 5. Security properties and formal analyses

BRASP is formalized through confidentiality, shuffle indistinguishability, query unforgeability, and forward security. The confidentiality statement is given as Theorem 1: for any PPT adversary controlling one server, there exists a simulator \(S\) with only leakage \(L^{Query},L^{Update}\) such that
\[
\left|\Pr[\mathrm{Real}_A=1]-\Pr[\mathrm{Ideal}_{A,S}=1]\right| \le \mathrm{negl}(\lambda).
\]
The proof sketch is a hybrid argument replacing TPF outputs and TUR ciphertexts by truly random ones consistent with leakage.

Shuffle indistinguishability is formulated as a separate notion. After a shuffle, any adversary’s advantage in linking a post-shuffle entry \(e'\) to its pre-shuffle origin \(e\) is negligible. The informal theorem states that if TPF and \( \mathrm{TUR.ReEnc}\) are pseudorandom or unlinkable, then shuffle is indistinguishable. The proof sketch is correspondingly direct: \( \mathrm{TPF.ReEnc}\) and \( \mathrm{TUR.ReEnc}\) produce unlinkable outputs, and random permutation erases positional information.

Query unforgeability appears as Theorem 3. No PPT adversary can forge a valid trapdoor for an unissued query with non-negligible probability. The stated intuition is that a successful forgery would imply either a TPF collision or a break of pseudorandomness.

Forward security is captured in Theorem 4. After an update, previous transcripts do not help link the new entries to past queries. The proof sketch attributes this to state-dependent update tokens and new TUR ciphertexts that are re-randomized and therefore unlinkable from past observations [2604.07797].

Taken together, these properties characterize BRASP not merely as an efficient encrypted search structure, but as a stateful dual-server SE system whose privacy guarantees are explicitly tied to re-randomization and non-collusion.

## 6. Experimental results, limitations, and acronym ambiguity

The experimental evaluation uses the Yelp business dataset with approximately \(50\)K objects and an implementation in Python 3.12 on an AMD Ryzen 5 3500U with 16 GB RAM. The baselines are \(VPBRQ_{SupL}\) and PPSKS, and the reported metrics are computation time and communication volume for Index Build, Token Generation, Search, and Update.

The reported results are phase-specific. For **Index Build**, BRASP is approximately \(50\)–\(70\%\) faster than the baselines. For **Token Generation**, BRASP scales linearly in query-size and has the lowest cost. For **Search**, BRASP reduces server-side computation by \(30\)–\(60\%\), while communication overhead is slightly higher due to shuffle. For **Update**, cost grows linearly with update size, and the overhead is dominated by TUR re-encryptions. The overall comparison states that BRASP outperforms \(VPBRQ_{SupL}\) and PPSKS in all four phases, while trading a modest extra communication during search and shuffle for much lower CPU cost. The source code is publicly available at the repository specified by the authors, which is relevant for reproducibility and follow-on systems work [2604.07797].

The stated limitations are also specific. Current schemes assume non-collusion, so extending to \(m>2\) servers or threshold collusion models is open. The Hilbert-curve prefix encoding imposes \(\gamma=2j\) fixed order, and adaptive multi-resolution indexing could improve locality or range overlap. There is no support yet for \(k\)-nearest-neighbor or circular range queries. All cryptographic workloads rely on Paillier-based TUR, and exploring lighter-weight additively homomorphic primitives such as elliptic-curve ElGamal could reduce update cost. Integrating verifiability, in the sense of proofs of correct search, without destroying pattern privacy is identified as an important direction.

A separate source of ambiguity is terminological rather than cryptographic. In reliability-sampling literature, **BRASP** is also used to denote a **Bayesian reliability acceptance sampling plan** under adaptive accelerated testing with competing risks and type-II censoring [2507.23293]. Closely related work under adaptive SSSPALT with Type I censoring uses the term **BSPAA** rather than BRASP [2408.00734]. In the searchable-encryption context, however, BRASP refers specifically to Boolean range queries over encrypted spatial data under access and search pattern privacy.

Source: https://www.emergentmind.com/topics/brasp