Next Article in Journal
DBFP-Net: Dynamic Graph and Bidirectional Temporal-Frequency Fusion Network for Wind Power Prediction with Physics Constraints
Previous Article in Journal
Artificial Intelligence Governance Mechanisms—The Chief Data Officer Perspective with a Focus on Agentic AI Governance
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

VMkCwPIR: A Single-Round Scalable Multi-Keyword PIR Protocol Supporting Non-Primary Key Queries

1
Shandong Key Laboratory of Ubiquitous Intelligent Computing, University of Jinan, Jinan 250022, China
2
Quan Cheng Laboratory, Jinan 250103, China
3
Inspur Group Co., Ltd., Jinan 250000, China
*
Authors to whom correspondence should be addressed.
Information 2026, 17(4), 337; https://doi.org/10.3390/info17040337
Submission received: 8 February 2026 / Revised: 19 March 2026 / Accepted: 26 March 2026 / Published: 1 April 2026

Abstract

Keyword Private Information Retrieval (Keyword PIR) enables private querying over keyword-based databases, which are typically sparse, as opposed to the dense arrays used in standard Index PIR. However, existing Keyword PIR schemes are limited to single-keyword queries and generally assume that keywords serve as unique identifiers, making them inadequate for practical scenarios where keywords are non-unique attributes and clients need to retrieve records matching multiple keywords simultaneously. To bridge this gap, we propose MkCwPIR, the first single-round, exact-match multi-keyword PIR protocol that supports conjunctive keyword queries while preserving strict keyword privacy against the server. Our construction employs Constant-weight codes and Newton–Girard identities to encode multi-keyword selection into a compact algebraic representation, representing a functional extension of CwPIR (Usenix Security ’22). While this functional expansion introduces additional computational overhead due to the processing of multiple keywords, we further introduce VMkCwPIR—an optimized variant leveraging BFV vectorized homomorphic encryption. Experimental results demonstrate that although the base MkCwPIR incurs higher latency due to its enhanced logical capabilities, the vectorized optimizations in VMkCwPIR effectively close this performance gap. Consequently, VMkCwPIR achieves a performance level comparable to the single-keyword CwPIR. Experimental results demonstrate that when processing a query with eight keywords, VMkCwPIR achieves a server-side execution time comparable to executing only four independent single-keyword queries in CwPIR, while maintaining constant communication overhead for up to 16 keywords.

1. Introduction

Private Information Retrieval (PIR) [1] serves as a critical cryptographic primitive, enabling a user to fetch a specific entry from a remote database while ensuring the server remains oblivious to the identity of the retrieved item. Historically, the literature categorizes PIR frameworks into two primary architectures: multi-server [2,3,4,5,6,7,8] and single-server [9,10,11,12,13] configurations. Although multi-server systems achieve robust privacy through secret sharing across non-colluding entities, the stringent requirement for server independence often proves impractical in real-world deployments. Consequently, computationally secure single-server PIR has gained significant traction as a more feasible alternative. This study contributes to this domain by introducing a novel multi-keyword PIR protocol specifically optimized for single-server environments, effectively surmounting the structural bottlenecks of prior works. It is worth noting that the notion of efficiency in PIR varies across research communities. In the cryptographic community, particularly in works focusing on computational PIR (CPIR) or single-server models, the primary metric is often the total communication cost (the sum of query and response sizes), aiming to minimize the overall bandwidth overhead relative to the trivial solution of downloading the entire database. Conversely, the information-theoretic community, which frequently studies multi-server settings, has historically placed greater emphasis on minimizing the download cost (response size) and characterizing the PIR capacity, sometimes treating upload costs or server-side computation as secondary optimization targets [14].
Depending on how queries are structured, contemporary PIR research generally follows two distinct trajectories: Index PIR and Keyword PIR. Index PIR methodologies [15,16,17,18,19,20] are built on the assumption that the client possesses prior knowledge of the target record’s precise location (e.g., its physical offset). Within this paradigm, researchers prioritize minimizing communication and computational latency, often leveraging homomorphic encryption (HE) and vectorized query processing. In contrast, Keyword PIR [21,22,23,24] addresses more pragmatic scenarios where data is organized as associative key-value pairs. In these settings, the client retrieves information based on unique identifiers (keywords) rather than numerical indices, aligning more closely with the sparse data structures prevalent in modern database applications.
However, both classical Index and Keyword PIR paradigms are characterized by a fundamental architectural limitation: the absence of native support for multi-keyword queries. This constraint significantly impedes their practical utility in document retrieval systems, necessitating complex conjunctive queries, as well as in specialized domains such as legal e-discovery and sensor data filtering—all of which require the private retrieval of records satisfying multiple concurrent identifiers. The challenge can be defined as follows:
How to realize multi-keyword private information retrieval (PIR) that enables the client to retrieve multiple matching records from a database without maintaining any prior metadata or auxiliary information locally.
Focusing on a data model of { I n d e x , V a l u e , K e y w o r d s } , we introduce MkCwPIR to enable the private retrieval of records that match a specific collection of keywords. Distinct from existing methods, MkCwPIR allows for queries over non-primary-key fields, thus expanding the scope of searchable attributes within the database. The scheme is characterized by its zero-offline-cost for clients—requiring no pre-downloaded hints—and its robust support for dynamic server-side data updates, thereby achieving high practical availability. These capabilities directly address critical privacy needs in real-world scenarios. For instance, in healthcare applications, a patient can privately retrieve information about diseases associated with a specific set of symptoms without revealing their potential health conditions to the database server. Similarly, in e-commerce, consumers can search for sensitive products (e.g., medical supplies or specialized books) based on multiple attributes without leaving any trace of their browsing history or interests, thus preventing profiling and ensuring anonymity.

1.1. Our Contributions

For the case where keywords are non-unique attributes rather than primary keys, we introduce multi-keyword PIR construction. In summary, we make the following contributions:
  • Theoretical Novelty in Retrieval Functionality: We propose MkCwPIR, the first single-round multi-keyword PIR protocol. Distinct from existing schemes limited to single-identifier retrieval, our core theoretical contribution lies in a novel algebraic construction that leverages constant-weight codes. Crucially, we transform the challenge of conjunctive multi-keyword queries into a solvable framework based on Newton power sums and primitive root extraction. This mathematical approach enables complex logical filtering in a single interaction while strictly preserving keyword privacy against the server.
  • Structural Optimization via Vectorized HE: To reduce the inherent computational overhead in multi-keyword matching, we design a specialized optimization strategy rather than a generic implementation tweak. By adapting BFV vectorized homomorphic encryption, we restructure the protocol’s workflow to parallelize the generation of the matching vector. This approach ensures high computational efficiency while minimizing communication overhead, effectively bridging the performance gap between complex multi-keyword queries and standard single-keyword retrievals.
  • Simulation-Based Performance Benchmarking: We implemented both the baseline MkCwPIR and our optimized variant, VMkCwPIR, and conducted simulation experiments to measure the server-side computational costs at each step of the online phase. The results quantitatively demonstrate that the proposed vectorized workflow yields significant efficiency gains, validating the scalability of our algebraic construction for practical application scenarios.
  • State-of-the-Art Comparative Analysis: We performed comparative evaluations between VMkCwPIR and the leading single-keyword scheme, CwPIR [22]. These experiments confirm that our protocol achieves comparable end-to-end latency to state-of-the-art single-keyword systems while supporting significantly richer query semantics.

1.2. Related Work

Keyword PIR: Unlike previous keyword PIR methods prone to false positives, Mahdavi et al. proposed CW-PIR [22], a scheme that utilizes Constant Weight Codes (CWC) to encode keywords. This approach establishes a one-to-one mapping between keywords and CWCs and employs an equality operator to determine matches. The operator outputs 1 if the codes match and 0 otherwise; the resulting decision vector is then multiplied by the data vector to yield the final query result. However, CW-PIR only supports a bijective (one-to-one) relationship between keywords and data. In contrast, our scheme enables many-to-many mappings, serving as a functional extension of the CW-PIR framework.
CWC in Index PIR: Liu et al. proposed PIRANA [20], which applies the mapping of CWCs to indices in Index PIR to reduce the number of transmitted ciphertexts. By leveraging SIMD (Single Instruction, Multiple Data) properties and integrating the batching techniques proposed by Angel et al. [15], they constructed an efficient batch Index PIR system. While both PIRANA and our work utilize CWCs and SIMD technology, two critical distinctions must be noted. Application Context: PIRANA is designed for Index-PIR, representing the database as a two-dimensional matrix where CWCs are used to compress information across dimensions (rows or columns). In our work, CWCs serve as an alternative representation of keywords used directly within equality operator computations. Query Logic: The multi-query functionality in PIRANA is a batching technique, which is essentially the parallelization of multiple one-to-one queries. Conversely, our multi-keyword query performs a logical AND operation across multiple keywords—requiring all keywords to be satisfied simultaneously for a successful match. This constitutes a true many-to-many query capability. In summary, while we employ similar underlying primitives, PIRANA focuses on optimizing efficiency in traditional Index PIR, whereas this paper focuses on further extending the functional scope of Keyword PIR.

2. Preliminaries

2.1. Notations

Table 1 summarizes the primary notations and parameters used throughout this paper.

2.2. Constant-Weight Code

A constant-weight code (CWC) is defined as an error-correcting scheme where every codeword is characterized by a uniform Hamming weight, ensuring an identical count of non-zero elements across the codebook. Within the binary domain, such codewords consist of bitstrings with a fixed density of ones; typical examples include one-hot encodings and balanced codes, where the latter maintains an equivalent distribution of zeros and ones. For any two codewords ( x , y ) C W ( c , w ) with length c and Hamming weight w, the equality operator f P C W  [22] can be formulated as:
f P C W ( x , y ) = y [ i ] = 1 x [ i ] ,
In this construction, the operation is independent of the explicit values of the first operand x (maintaining obliviousness) while its execution logic is dictated by the structure of the second operand y.

2.3. Newton–Girard Identities

The Newton–Girard identities provide a fundamental recursive relationship between the elementary symmetric polynomials and the power sum symmetric polynomials. These identities are indispensable in various fields, ranging from Galois theory to numerical linear algebra and coding theory.
Let x 1 , x 2 , , x a be a set of variables that can be viewed as the roots of a monic polynomial P ( x ) F [ x ] . These coefficients relate to the polynomial expansion:
P ( x ) = i = 1 a ( x x i ) = b = 0 a ( 1 ) b e b x a b
where e b is the coefficient of the b-th term in the polynomial and e 0 = 1 . The symmetric polynomial b-th power sum, denoted by p b , is defined as:
p b = i = 1 a x i b = x 1 b + + x a b
The relationship between e b and p b is governed by the following recursive formula for any b 1 :
b e b = i = 1 b ( 1 ) i 1 e b i p i
Consequently, the set of elementary symmetric polynomials { e k } is computed recursively from the given power sums. This procedure enables the formulation of the locator polynomial P ( x ) , whose roots, representing the original values, are then recovered using standard algebraic solvers.

2.4. Fully Homomorphic Encryption (FHE)

Fully homomorphic encryption enables ciphertext computations, but faces noise accumulation challenges during operations. Current solutions employ bootstrapping [25,26,27] or leveled designs [28,29,30] to control noise growth and maintain decryption capability. The current study employs a Fully Homomorphic Encryption (FHE) construction grounded in the hardness of the Ring Learning With Errors (RLWE) problem. To distinguish our notation from the parameters listed in Table 1, we explicitly define N as the polynomial degree of the RLWE ring, Q as the ciphertext modulus, and T as the plaintext modulus. This cryptographic framework is formally established through a triplet of fundamental algorithms:
  • FHE . KeyGen ( 1 λ ) : Let R Q = Z Q [ X ] / ( X N + 1 ) . Sample a R Q , secret key s { 1 , 0 , 1 } N , and error e χ (where χ is a discrete Gaussian distribution over R Q ). Output the public key p k = ( p k 0 , p k 1 ) = ( a , ( a s + e ) ) and the private key s k = s .
  • FHE . Enc ( m , p k ) : Sample u , e 0 , e 1 χ ; compute Δ = Q / T and output c = ( c 0 , c 1 ) = ( p k 0 · u + e 0 , p k 1 · u + e 1 + Δ m ) .
  • FHE . Dec ( c , s k ) : Compute m = ( s · c 0 + c 1 ) mod Q ; output m = ( T · m ) / Q mod T .
Fully Homomorphic Encryption (FHE) facilitates both additive and multiplicative operations in the encrypted domain, supporting computations between two ciphertexts or between a ciphertext and a plaintext. A critical side effect of these evaluations is the cumulative expansion of internal noise. Should this noise surpass a predefined threshold, the integrity of the decryption process is compromised. Consequently, judicious parameter selection and rigorous management of noise growth during homomorphic processing are essential for maintaining protocol correctness.
To enhance efficiency, RLWE-based FHE schemes often leverage Single Instruction Multiple Data (SIMD) techniques, enabling the parallel processing of multiple data points within a single operation. By packing data into discrete ciphertext slots, this paradigm allows for vectorized computation [31,32], provided that the plaintext modulus T and the polynomial degree N satisfy the congruence T 1 ( m o d 2 N ) . The specific SIMD-supported homomorphic procedures are outlined below:
  • C t A d d C t ( c 1 , c 2 ) : This operation inputs two ciphertexts c 1 , c 2 R Q 2 and outputs the homomorphic addition results of the two ciphertexts, in which the ciphertexts in each corresponding slot are parallelized homomorphic addition.
  • C t M u l P t ( c , p ) : This operation inputs a ciphertext c R Q 2 and a plaintext p R T , and outputs the ciphertext result after homomorphic multiplication of the two. The plaintext and ciphertext in the corresponding slot are calculated in parallel with homomorphic multiplication.
  • C t M u l C t ( c 1 , c 2 ) : This operation inputs two ciphertexts c 1 , c 2 R Q 2 and outputs the homomorphic multiplication results of the two ciphertexts, in which the ciphertexts in each corresponding slot are parallelized homomorphic multiplication.
  • C t R o t a t e ( c , a ) : This operation inputs a ciphertext c R Q 2 and an integer constant a [ 1 , N 1 ] , and outputs the ciphertext result that all slots are shifted to the left a times. If the ciphertext starts with the encryption of [ x 0 , x 1 , x 2 , , x n 1 ] , it will eventually be the encryption of [ x a , x a + 1 , x a + 2 , , x n 1 , x 0 , x 1 , , x a 1 ] .

2.5. Threat Model

The MkCwPIRprotocol adopts a passive-adversary (also known as honest-but-curious)threat model to ensure both query privacy and computational correctness. Under this model, the adversary—typically the cloud server hosting the database—is assumed to follow the protocol execution honestly but attempts to infer sensitive information from the available data.
Specifically, the adversary can access the entire content of the database, monitor and persist all incoming encrypted queries and outgoing responses, and perform arbitrary offline analysis on these transcripts. The adversary is also capable of observing the server’s internal operations, including memory access patterns and CPU execution traces, and may attempt side-channel attacks (e.g., noise analysis or timing attacks) to bypass encryption. Furthermore, we assume the adversary can intercept, log, and analyze all network traffic between the client and the server.
We assume the adversary is not actively malicious, meaning it does not intentionally corrupt the stored data, tamper with the homomorphic evaluation logic, or modify network packets to disrupt the protocol. Consequently, while an active adversary could theoretically generate incorrect results to violate integrity, MkCwPIR focuses on guaranteeing privacy against the defined honest-but-curious behavior.
In our system setup, the parameters m , n , c , and w are considered public knowledge. This implies that the adversary is fully aware of these system configurations, including the dimensions of the underlying algebraic structures and any bounds related to the keywords or ciphertexts. The security of the protocol relies not on the secrecy of these parameters, but on the computational hardness of the underlying cryptographic problems.
Finally, we assume the adversary cannot compromise the client’s local environment or perform side-channel attacks on the client’s hardware, as such access would render query privacy trivial. We also rely on standard cryptographic assumptions, primarily the computational hardness of the RLWE problem, which ensures the semantic security of the underlying BFV encryption scheme.

3. MkCwPIR Design

In this section, we present the complete design of the entire protocol. We first introduce the privacy subset determination (PSD) method we have devised. Its function within our protocol is to precisely match the server’s data items while safeguarding client privacy.

3.1. Design Intuition of PSD

The PSD protocol is designed to verify whether a client’s keyword set S ck is a subset of any record’s keyword collection S i kw within the server-held database { ( idx i , val i , S i kw ) } i [ n ] . Specifically, the output is defined as 1 for a successful match ( S ck S i kw ) and 0 for an exclusion. To facilitate this, the server maps all keywords to Constant-weight code representations. Drawing upon the equality comparison logic introduced in Equation (1), we develop an optimized technique to ascertain the subset relationship between two sets S x and S y . This set inclusion logic is formally characterized by:
f P S D ( S x , S y ) = i = 1 S x j = 1 S y f P C W ( x i , y j ) ,
yielding a binary result:
f P S D ( S x , S y ) = 1 , i f S x S y 0 , e l s e .
The correctness of this approach can be readily verified through its underlying algebraic properties. Since the equality operator f P C W is designed to produce a binary 1 for identical constant-weight codewords and 0 for mismatches, it serves as a robust foundation for set inclusion testing. Specifically, the inclusion of an element x S x within the target set S y is determined by the summation of equality outputs; this inner sum results in 1 if a match exists and 0 otherwise. By taking the product of these individual membership results, we achieve a logical conjunction: the final output f P S D remains 1 if and only if every element in S x has a corresponding counterpart in S y . Formally, the condition S x S y ensures that each f P C W term equals 1, leading to a total product of 1. Conversely, the absence of any x S x from S y causes at least one summation to vanish, thereby nullifying the entire f P S D output.
In the practical execution of the PSD protocol, the client initiates the process by generating homomorphic encodings of the keyword set S ck and transmitting them to the server. Subsequently, the server performs a series of homomorphic evaluations to determine the containment of the encrypted S ck within each S i kw across the database indices i [ n ] . This secure computation of f P S D results in an n-dimensional indicator vector, where each component is a ciphertext representing a binary match (0 or 1). A pivotal departure from traditional PIR—which typically relies on a “one-hot” query vector containing a single ‘1’—is that our PSD mechanism frequently produces multiple positive indicators. This structural difference introduces a non-trivial challenge: an conventional inner product would aggregate several records into a single ciphertext, preventing the client from successfully isolating or disambiguating individual matches upon decryption.

3.2. Decomposition Method

The homomorphic inner product between one-hot ciphertext vectors and plaintext vectors in a database forms the underlying method for most PIR protocols, as it compresses n responses into one to enhance communication efficiency. However, when extended to the inner product between multi-hot ciphertext vectors and plaintext vectors, the client cannot uniquely decompose the final answer because it consists of the sum of multiple values. We introduce the Newton–Girard formula to address this issue.
Assuming the maximum number of matches is k, the server can perform power operations on the database’s plaintext during the offline phase. The original database { ( idx i , val i , S i kw ) } i [ n ] is transformed into the form { ( idx i , ( val i , val i 2 , , val i k ) , S i kw ) } i [ n ] through exponentiation.
Considering that homomorphic computations based on RLWE are performed within the plaintext domain T, all power operations must be reduced modulo T. Accordingly, the database is transformed into: { ( idx i , ( val i , v i 2 , , v i k ) , S i kw ) } i [ n ] where v i j = val i j ( mod T ) . Accordingly, the recursive construction of the polynomial must also be conducted within the finite field T. The recurrence identities are defined as follows:
k e k = i = 1 k ( 1 ) i 1 e k i p i ( mod T )
After computing f PSD ( · , · ) , the server obtains a multi-hot vector v m containing at most k ones, where k denotes the maximum number of matches. Subsequently, the server homomorphically computes the power sums:
p j = i = 1 n v i j × v m [ i ] , for j = 1 , , k
The server returns the k homomorphic power-sum result ciphertexts to the client. After obtaining k ciphertext results, the client performs decryption to derive k power-sum results { p i } i [ k ] . These power-sum results are then processed through recursive computation using Equation (4), ultimately constructing a univariate k-degree equation. Solving this equation yields the value corresponding to each matched data point.
It should be noted that this method can recover at most k values. Specifically, when the number of matches x k , the recovered output consists of the x original data values and k x zeros, a property dictated by Newton–Girard identities. Consequently, if x > k , the recovery process will fail. This poses a challenge: since the server must remain oblivious to the client’s query (as per PIR privacy requirements), it cannot determine the actual number of matches. To accommodate any potential query, the server must assume the worst-case scenario and set the maximum match capacity to k, leading to significant overhead in both storage and computation. Although transforming this into a coloring problem and partitioning the database into blocks—where each block recovers k values—can mitigate the computational burden to some extent, the worst-case scenario remains unavoidable. Theoretically, if every item in the database matches, all data must be returned. To ensure privacy, the response size must be invariant regardless of the actual number of matches; however, returning the entire database would violate the communication efficiency assumptions of PIR. Therefore, it is necessary to assume that the maximum number of matches is bounded by k, where k n . In practice, the server can proactively satisfy this assumption by partitioning the database into smaller segments.

3.3. MkCwPIR Protocol

After introducing how to generate matching vectors and recover the original numerical data when the matching vector is multi-hot, we now present the complete protocol for MkCwPIR without SIMD technology. All optimizations involving SIMD techniques will be detailed in the next section.

3.3.1. MkCwPIR Setup Phase

The algorithm implementation is as described in Algorithm 1.
Mahdavi [22] introduced the PerfectMapping algorithm, which establishes a bijective mapping between elements in [ n ] and constant-weight codes. In our scheme, the server maintains the database D = ( idx i , val i , S i kw ) i [ n ] and applies PerfectMapping to encode all keywords. In addition to mapping all keywords to constant weight codes, the server must also perform exponentiation calculations on all data items. The resulting parameters p a r m are subsequently transmitted to the client for query preparation.
Algorithm 1  MkCwPIR . Setup algorithm.
  • Input:  K and { S i kw , val i } i [ n ]
  • Output: encoded keywords S C W , exponent V, and parameter p a r m
  1:
Select p a r m = ( c , w ) and c w K     ▷c is the codeword length, w is the number of 1.
  2:
initialize S C W =
  3:
Parse ( kw 1 , kw 2 , , kw t ) = i = 1 n S i kw
  4:
for  i = 1 to t do
  5:
       c w i PerfectMapping ( kw i , c , w )
  6:
end for
  7:
S C W = ( c w 1 , , c w t )
  8:
for  i = 1 to k do
  9:
      for  j = 1 to n do
10:
            compute val j exponentiation to val j i
11:
      end for
12:
       v i = ( val 1 i , val 2 i , , val n i )
13:
end for
14:
V = ( v 1 , v 2 , , v k )
15:
return   ( S C W , V , p a r m )

3.3.2. MkCwPIR Query Phase

The algorithm implementation is as described in Algorithm 2.
Algorithm 2  MkCwPIR . GenQuery algorithm.
  • Input: a set of keywords S ck = { ck 1 , ck 2 , , ck m } , parameter p a r m from setup phase and public-key p k
  • Output: the query of keywords q
  1:
Parse p a r m = ( c , w )
  2:
for  i = 1 to m do
  3:
       c i PerfectMapping ( ck i , c , w )
  4:
end for
  5:
c = ( c 1 , c 2 , , c m )
  6:
q FHE . Enc ( c , p k )
  7:
return q
The client maintains a keyword set S ck = { ck 1 , ck 2 , , ck m } and a public-private key pair ( p k , s k ) . After receiving the parameters p a r m from the server, the client performs the following operations: first, it encodes S ck using the PerfectMapping algorithm to obtain the constant-weight code representation c = ( c 1 , c 2 , , c m ) ; then, it encrypts this coded vector c using the BFV homomorphic encryption scheme under the public key p k .
To enhance privacy against access pattern leakage, we introduce a robust padding strategy. More generally, let S ck denote the actual set of keywords queried by the client. When the cardinality of the queried set, | S ck | , is less than the system parameter m, a padding mechanism is employed to ensure that the number of ciphertexts sent depends solely on m. The padding process proceeds as follows:
Firstly, the client maps all keywords in the queried set S ck into their corresponding constant-weight codes using the PerfectMapping algorithm, obtaining an initial code sequence of length | S ck | . Secondly, if | S ck |   < m , the client pads this sequence by repeating the constant-weight codes already generated from S ck until the total number of codes reaches m.
This design guarantees that the server cannot derive any information regarding the actual query size from the ciphertext count, learning nothing beyond the public parameter m. From a computational logic perspective, since the multi-keyword search relies on conjunctive operations (logical AND), the insertion of duplicate keywords does not affect the correctness of the result. This is due to the idempotent property of the conjunction operation, where A A A ; thus, repeating a keyword condition in the homomorphic evaluation yields the same intersection result as querying it once.

3.3.3. MkCwPIR Answer Phase

The algorithm implementation is as described in Algorithm 3. Upon receiving the query q from the client, the server performs the following operations: First, it decomposes q into its components ( q 1 , q 2 , , q m ) . Then, for each i [ m ] and j [ t ] , the server executes the comparison function f P C W ( q i , c w j ) to evaluate the relationship between the client’s query terms and the server’s coded keywords. To optimize communication efficiency, the server performs vector compression by first forming a ciphertext vector v of length n, where each entry v m [ i ] is the ciphertext of 1 if S ck S i kw and the ciphertext of 0 otherwise. The server then computes the inner product between the v m and data items of different powers, generating a total of k ciphertext responses.
Algorithm 3  MkCwPIR . Answer algorithm.
  • Input: the query q from query phase and S C W , V from setup phase
  • Output: the answer A
  1:
Decomposition q into q 1 , q 2 , , q m
  2:
Parse S C W = ( c w 1 , , c w t )
  3:
for  i = 1 to m do
  4:
      for  j = 1 to t do
  5:
             e q i j f P C W ( q i , c w j )                                           ▷ Homomorphic multiplication
  6:
      end for
  7:
end for
  8:
Initialize the vector v m of length n
  9:
for  i = 1 to n do
10:
       v m [ i ] : = j = 1 m ( k = 1 S i kw e q j k )      ▷ e q j k f P C W ( q j , c w k ) , where c w k is the codeword of the element in S i kw
11:
end for
12:
for  i = 1 to k do
13:
       a i = v m · V [ i ]         ▷ Homomorphic inner product of ciphertext and plaintext vectors
14:
end for
15:
A = ( a 1 , a 2 , , a k )
16:
return A
Crucially, throughout this phase, the server exclusively performs homomorphic equality operator computations between the constant-weight code ciphertexts uploaded by the client and the locally stored plaintexts. These computation outputs are then utilized to construct a ciphertext match vector, which subsequently drives the inner product calculations with the pre-processed data items from the setup phase. A fundamental strength of this design is that the server’s computational procedure is entirely decoupled from the underlying plaintext content of the client’s ciphertexts. Specifically, the sequence of arithmetic operations, memory access patterns, and execution time remain strictly invariant, regardless of whether the received ciphertexts correspond to valid encryptions of the actual keyword set S ck , encryptions of all-zero vectors, or encryptions of randomly selected codewords. By executing an identical trace of homomorphic operations irrespective of the plaintext values, this mechanism effectively eliminates information leakage via timing or access-pattern side channels. This data-oblivious property ensures that no information regarding the query content can be inferred from the server’s execution behavior. We formalize this security guarantee in the following proof:
Let us define a security game G 0 between a challenger C and an adversary A (representing the honest-but-curious server) as defined in the standard indistinguishability framework.
The adversary A supplies two distinct keyword sets S 0 and S 1 of the same size | S |     m . The challenger C randomly selects a bit b { 0 , 1 } and constructs the query corresponding to S b . Following our padding mechanism, C maps the keywords in S b to constant-weight codes, pads the sequence to length m by repetition, and encrypts the resulting vector using the FHE scheme to generate the query ciphertext q b . The challenger sends q b to A . The adversary A executes the MkCwPIR.Answer Algorithm 3 on q b and outputs its guess b { 0 , 1 } .
The adversary wins the game if its guess is correct, i.e., b = b . Let W 0 be the event that b = b in G 0 . Let us also consider another game G 1 , which is identical to G 0 except for the construction of the query ciphertext. In G 1 , instead of encrypting the padded constant-weight codes derived from S b , the challenger constructs a vector v r a n d consisting of encryptions of random values (or alternatively, encryptions of all-zero vectors) of the same dimension m. The challenger sends the encryption of v r a n d to A . Let W 1 be the event that b = b in G 1 .
Evidently, Pr [ W 1 ] = 1 / 2 . This is because the ciphertext provided to the adversary in G 1 is statistically or computationally independent of the bit b chosen by the challenger (since the plaintext content is either random or fixed to zero regardless of b). Consequently, the adversary can do no better than a random guess.
Now, consider the transition from G 0 to G 1 . In G 0 , the query q b consists of valid FHE encryptions of the padded keyword codes. In G 1 , the query consists of FHE encryptions of random/zero values. The only difference observable by the adversary lies in the plaintext content encrypted within the ciphertexts. Crucially, as described in the Answer Phase, the server’s algorithm performs a fixed sequence of homomorphic equality operator computations and inner products. The control flow, memory access patterns, and number of arithmetic operations are strictly invariant regardless of the underlying plaintext values. Therefore, any advantage the adversary gains in distinguishing G 0 from G 1 relies solely on its ability to distinguish the FHE encryptions of the real keyword codes from the FHE encryptions of random/zero values.
By the semantic security (IND-CPA) of the underlying FHE scheme, the advantage of any probabilistic polynomial-time (PPT) adversary in distinguishing these two distributions is negligible, denoted as ϵ FHE . Thus, we have:
| Pr [ W 0 ] Pr [ W 1 ] | ϵ FHE .
Substituting the value of Pr [ W 1 ] = 1 / 2 , we get:
Pr [ W 0 ] 1 2 ϵ FHE .
Since ϵ FHE is negligible, the adversary cannot win the game G 0 with non-negligible advantage. This implies that the server cannot distinguish between queries generated from different keyword sets S 0 and S 1 , nor can it distinguish a real query from a dummy (random/zero) query. Consequently, the server learns nothing about the client’s actual keywords or the number of queried items (due to the padding), proving the query privacy of MkCwPIR.

3.3.4. MkCwPIR Reconstruction Phase

The algorithm implementation is as described in Algorithm 4. In the final phase, the client decrypts the server’s answer A to obtain the k power sums of distinct degrees. By applying Equation (4), the coefficients e i are computed recursively. These coefficients are then utilized to construct the polynomial P. Finally, the roots of P are solved, which correspond precisely to the matched data items.
Algorithm 4  MkCwPIR . Reconstruct algorithm.
  • Input: the answer A from answer phase and private-key s k
  • Output: a set of indices S idx
  1:
( p 1 , p 2 , , p k ) FHE . Dec ( A , s k )
  2:
initialize e 0 = 1
  3:
for  j = 1 to k do
  4:
       e j = 1 j i = 1 j ( 1 ) i 1 e j i p i
  5:
end for
  6:
P ( x ) = i = 0 k ( 1 ) k i e i x i .
  7:
Solve the equation P ( x ) = 0 for its roots ( x 1 , x 2 , , x k )
  8:
return   ( x 1 , x 2 , , x k )
It is worth noting that solving a polynomial with k integer roots over the finite field T is computationally efficient, with a worst-case complexity of only O ( k T ) . Given that the plaintext modulus T in the BFV scheme is typically chosen as a prime smaller than 2 20 , the computational overhead for the client to retrieve these roots remains negligible. Since the server pre-processes the data by raising it to successive powers and the client obtains the power sums through querying, this mechanism essentially reverses the process of constructing a polynomial from its known roots. Correct reconstruction is guaranteed as long as the number of aggregated data items in the power sums does not exceed k. Given that the maximum match threshold k is a necessary assumption to balance PIR performance and privacy requirements, the application of Newton–Girard identities to recover the original roots from the power sums is inherently robust and guaranteed to succeed under this framework.

4. Vectorized MkCwPIR

In the preceding section, we introduced the underlying computational principles of MKCWPIR, focusing primarily on functional realization without addressing the optimization of computation and communication. In this section, we present an enhanced protocol that leverages ciphertext vectorization to improve efficiency.

4.1. Communication and Computational Complexity of MkCwPIR

The baseline MkCwPIR involves the uploading of m ciphertexts and the retrieval of k ciphertexts. During the server-side computation phase, the total computational load for f P C W consists of ( w 1 ) m t homomorphic multiplications. In the f P S D phase, the complexity entails a m n homomorphic additions (where a denotes the average number of keywords per data item) and ( m 1 ) n homomorphic multiplications. The final inner product computation (homomorphic power sums) requires k n homomorphic ciphertext–plaintext multiplications and homomorphic additions. Notably, in the f P C W phase, a single ciphertext CWC cannot simultaneously perform equality operator computations with multiple plaintext CWCs; this is because the computation involves selecting specific ciphertexts corresponding to the positions of ‘1’s in a given plaintext CWC. Conversely, multiple ciphertext CWCs can be computed against a single plaintext CWC simultaneously, as the selected positions remain fixed for that specific plaintext CWC. This observation reveals a potential for parallelism. Furthermore, the additions and multiplications within f P S D can be efficiently parallelized using SIMD techniques. Detailed implementations are provided in the subsequent sections.

4.2. Packing Query Ciphertexts

Since vectorized encryption supports slot-wise data placement and each constant weight code has a length c, the m codes produced by the mapping algorithm can be aggregated into c m / N ciphertexts through SIMD batching, where N represents the number of available slots.
To illustrate our approach, we begin with a simplified example. Suppose the database contains six keywords, each mapped to a Constant-weight code with a length of 4 and a weight of 2. These are denoted as: c w 1 = 1100 , c w 2 = 1010 , c w 3 = 1001 , c w 4 = 0110 , c w 5 = 0101 , c w 6 = 0011 . The client holds two query keywords, whose corresponding CWCs are mapped as: c 1 = 1010 , c 2 = 1001 .
Without vectorized encryption, each of the eight bits would need to be encrypted individually. Alternatively, one could employ the oblivious ciphertext expansion proposed by Angel [15]; however, since this expansion method is incompatible with subsequent vectorized operations, we opt for vectorized encryption instead. For clarity in this representation, we assume the number of available slots in the vectorized ciphertext is 8. In practical implementations of existing BFV schemes, the number of slots equals the degree of the polynomial—typically 2 N where N [ 10 , 15 ] . We have scaled this down here for ease of demonstration.
After the client transmits the vectorized ciphertext to the server, the server performs ciphertext–plaintext multiplication using the plaintext vectors to isolate the values in the corresponding slots, as illustrated in Figure 1. It is important to note that these vectors refer to plaintext polynomials encoded with multiple plaintext data elements. During operations between plaintext and ciphertext polynomials, the slots are processed in parallel; thus, the i-th slot of the resulting ciphertext represents the computation result of the i-th plaintext slot and the i-th ciphertext slot. In this approach, we utilize masking plaintexts—defined as plaintext polynomials with ‘1’ at the target positions and ‘0’ elsewhere—to perform homomorphic multiplication with the ciphertext. Subsequently, each isolated value is shifted to the first slot through rotation operations. Importantly, as the server only performs homomorphic computations, it remains unable to access the information within the slots.
In summary, the adoption of vectorized encryption technology effectively reduces the communication overhead associated with codeword transmission. Additionally, the specific algorithms for ciphertext packing and ciphertext expansion are detailed in Algorithms 5 and 6.
Algorithm 5  VMkCwPIR . GenQuery algorithm.
  • Input: a set of keywords S ck = { ck 1 , ck 2 , , ck m } , parameter p a r m from setup phase and public-key p k
  • Output: the query of keywords q
  1:
Parse p a r m = ( c , w )
  2:
for  i = 1 to m do
  3:
       c i PerfectMapping ( ck i , c , w )
  4:
end for
  5:
for  i = 1 to c m / N  do
  6:
       c = ( c i | | c i + 1 | | | | c N / c )
  7:
       q i FHE . Enc ( c , p k )
  8:
end for
  9:
q = ( q 1 , q 2 , , q c m / N )
10:
return q
Algorithm 6  VMkCwPIR . Expand algorithm.
  • Input: the query q from query phase
  • Output: the expanded ciphertexts C
  1:
Initialize the vector pt of length N
  2:
for  i = 1 to c m / N  do
  3:
       p t = 0 *
  4:
      for  j = 1 to c do
  5:
             p t [ j ] , p t [ j + c ] , , p t [ j + ( N / c ] 1 ) c ] = 1
  6:
             q i j = C t M u l P t ( q i , p t )
  7:
             q i j = C t R o t a t e ( q i j , j )
  8:
      end for
  9:
end for
10:
C = q 1 1 q 1 2 q 1 c q 2 1 q 2 2 q 2 c q c m / N 1 q c m / N 2 q c m / N c
11:
return  C

4.3. Vectorization to Reduce Computation

Subsequently, the server computes the values of f P C W ( · , · ) by performing multiplications on the corresponding ciphertexts. Since homomorphic multiplication consumes significantly more computational time and noise budget than other homomorphic operations, subsequent computations will reuse these results to avoid performing homomorphic multiplication. As shown in Figure 1, the six constant weight codes in the database are computed against one of the constant weight codes sent by the client, yielding six results. Among these, a result of 1 indicates a successful match, while a result of 0 signifies a mismatch.
Next, we describe the computation process of f P S D under vectorized ciphertexts. First, the server selects the corresponding f P C W ( · , · ) values row by row, as illustrated in Figure 1. Within each row, each constant weight code selects the result of the equality operator that corresponds to its own input. For instance, in the first row, c w 2 selects the second equality operator value, c w 3 selects the third, and c w 4 selects the fourth, following this pattern for each subsequent row. Once the corresponding ciphertexts for a row are selected, a homomorphic addition is performed across all selected ciphertexts within that row. As shown in Figure 1, the resulting four ciphertexts represent the matching results between the query q and each row. Specifically, the yellow slots (1, 1, 0, 1) in the ciphertext represent the matching results for q 1 across each row (i.e., whether q 1 exists among the keywords of that row), where ‘1’ indicates a match and ‘0’ indicates otherwise. Similarly, the green slots (1, 0, 1, 1) represent the matching results for q 2 .
To obtain the final multi-keyword match, it is necessary to perform homomorphic multiplication on the matching results of the different query keywords q i . To avoid a large number of ciphertext–ciphertext multiplications, we first construct vectorized single-keyword matching ciphertexts through rotation and accumulation. These vectorized ciphertexts are then masked and multiplied homomorphically, which effectively reduces the number of ciphertext–ciphertext multiplications from n to n / N . In the provided example (Figure 1), the four ciphertexts containing single-keyword match results are rotated by strides of 0, 1, 2, and 3, respectively, and then summed homomorphically to produce a vectorized result. By multiplying this result with a masking plaintext polynomial (e.g., 00001111) and performing a rotation by a stride of 4, the match results are separated into two distinct vectorized ciphertexts. Finally, a single homomorphic multiplication between these two ciphertexts yields the final matching vector (1001). The general computation procedures are provided in Algorithms 7 and 8.
Algorithm 7  VMkCwPIR . PCW algorithm.
  • Input: the expanded ciphertexts C and S C W
  • Output: result of the equality operator E
  1:
Parse S C W = ( c w 1 , , c w t )
  2:
for  i = 1 to t do
  3:
      Initialize the vector e q i of length t
  4:
      for  j = 1 to c m / N  do
  5:
             e q i j = c w i [ z ] = 1 q j z                                            ▷ Homomorphic multiplication
  6:
      end for
  7:
end for
  8:
return  E
Algorithm 8  VMkCwPIR . PSD Algorithm.
  • Input: Equality set E; Keyword sets { S i kw } i = 1 n .
  • Output: Final matching vector ciphertext v m .
  1:
Initialize a
  2:
for  i = 1 to n do
  3:
      a i = 0
  4:
     for  j = 1 to | S i kw |  do
  5:
           select e j from E to denote the equality of keywords k j and q
  6:
            a i = a i e j
  7:
     end for
  8:
end for
  9:
Initialize b , d
10:
for  i = 1 to n / c  do
11:
      b i = 0
12:
     for  j = 1 to c do
13:
            b i = b i C t R o t a t e ( a j + ( i 1 ) c , j 1 )
14:
     end for
15:
     Initialize p t = 0 *
16:
     for  j = 1 to N / c  do
17:
            p t [ ( j 1 ) c + 1 , j c ] = 1
18:
            d i j = C t M u l P t ( b i , p t )
19:
            d i j = C t R o t a t e ( d i j , ( j 1 ) c )
20:
     end for
21:
end for
22:
Initialize h
23:
for  i = 1 to N / c  do
24:
     for  j = 1 to n / N  do
25:
           h i j = x = ( j 1 ) c + 1 j c C t R o t a t e ( d x i , ( i 1 ) c )
26:
     end for
27:
end for
28:
for  i = 1 to n / N  do
29:
      v m [ i ] = j = 1 N / c h j i
30:
end for
31:
return  v m
The multiplication here allows for the simultaneous processing of values across n slots. In contrast, non-vectorized ciphertexts would require n separate multiplication operations. Aside from the f P C W ( · , · ) computation common to both approaches, the preceding operations for generating this vectorized ciphertext consist solely of additions and rotations, the computational cost of which is significantly lower than that of ciphertext multiplication.

4.4. Vectorized Inner Product and Merging Response Ciphertext

After computing the final matching vector, the server needs to calculate multiple power sums for the corresponding data items, which is equivalent to the inner product of the vectorized matching ciphertext and the plaintext vector. While a non-vectorized inner product necessitates n ciphertext–plaintext multiplications and n ciphertext additions, the vectorized approach allows for parallel multiplications across all slots within a single ciphertext–plaintext operation. As shown in Figure 2, the resulting vectorized ciphertext then undergoes a series of rotations and additions with itself: the rotation offset starts at 1 and doubles in each subsequent step until log n iterations are completed. Consequently, the inner product of a vectorized ciphertext and a plaintext vector requires only one ciphertext–plaintext multiplication and log n rotation–addition operations.
Upon completion of the power sum computations, every slot in the resulting ciphertext vector is populated with the inner product value. The server then applies plaintext masking to these vectorized ciphertexts to isolate the values at specific indices. By summing these masked results, the server produces a consolidated ciphertext where each slot holds a distinct power sum, effectively packing the results for efficient transmission. Algorithm  9 presents the the details of power sum and packing, while Algorithm  10 outlines the overall Answer algorithm.
Algorithm 9  VMkCwPIR . PowSum algorithm.
  • Input:  v m and V
  • Output: the answer A
  1:
p t = 0
  2:
for  i = 1 to k do
  3:
      for  j = 1 to n / N  do
  4:
             a j = v m [ j ] V [ i ] [ 1 + ( j 1 ) N , j N ]
  5:
            for  z = 1 to l o g N  do
  6:
                   b = C t R o t a t e ( a j , 2 z )
  7:
                   a j = b a j
  8:
            end for
  9:
             a = a a j
10:
      end for
11:
       c i = C t M u l P t ( a , p t )
12:
end for
13:
A = c
14:
return A
Algorithm 10  VMkCwPIR . Answer algorithm.
  • Input: the query q from query phase and S C W , V , { S k kw } k = 1 n from setup phase
  • Output: the answer A
  1:
C ← VMkCwPIR.Expand(q)
  2:
E ← VMkCwPIR.PCW( C , S C W )
  3:
v m  ← VMkCwPIR.PSD( E , { S k kw } k = 1 n )
  4:
A ← VMkCwPIR.PowSum( v m , V )
  5:
return A

4.5. Efficiency Analysis

Communication between client and the server: First, we determine the number of ciphertexts that the client must transmit to the server. The client possesses m keywords, which are mapped to m constant weight codes. Since each constant weight code has a length of c, the total number of bits is c m . By utilizing vectorized encryption, a single ciphertext can accommodate N data slots, meaning that the client needs to send a total of c m / N ciphertexts. Next, we analyze the number of ciphertexts returned by the server. The server computes k power sums, and the response consists of k / N ciphertexts.
Server computational cost: We now analyze the computational overhead required by the server. Upon receiving the ciphertext, the server must extract the corresponding bits using a plaintext vector, requiring a total of c m ciphertext–plaintext multiplications and rotations. The server then computes the f P C W ( · , · ) values, where each f P C W ( · , · ) involves w 1 ciphertext multiplications; for every constant-weight code mapped from the server’s keywords, an f P C W ( · , · ) value is generated in conjunction with each CWC sent by the client, totaling ( w 1 ) t ciphertext–ciphertext multiplications when accounting for vectorized multiplication. Next, the server computes the f P S D matching vector, which involves a additions which a = i = 1 n | S i kw | followed by n rotations and additions. The corresponding results are then extracted and processed via ciphertext multiplications to compute a cumulative product, totaling m operations. Finally, power sum calculations and packing are performed; considering sharding, this requires k ciphertext–plaintext multiplications, as well as [ k log ( n ) ] rotations and additions. The complexity analysis of communication and computation is presented in Table 2.
In summary, the total number of ciphertext–plaintext multiplications is [ m + k ] , the total number of ciphertext rotations is [ m + n + k ] , the total number of ciphertext–ciphertext additions is [ a n + k log ( n ) ] , and the total number of ciphertext–ciphertext multiplications is [ ( w 1 ) t + m ] .

4.6. Privacy and Correctness Analysis

Privacy: The privacy guarantees of MkCwPIR and its vectorized variant VMkCwPIR rely on the synergy between the semantic security of the underlying homomorphic encryption and the data-oblivious nature of our protocol design.First, as formally established in the security games G 0 and G 1 above, the indistinguishability of client queries reduces directly to the IND-CPA security of the underlying FHE scheme (specifically BFV). Since the server only processes ciphertexts and the plaintext distribution is hidden by the encryption, the server cannot distinguish between queries for different keyword sets S 0 and S 1 , nor can it differentiate real queries from dummy padded entries. Second, the data-oblivious execution described previously ensures that no side-channel information is leaked via timing or access patterns. The server’s computational trace depends solely on the public system parameters (m and database size), remaining strictly invariant regardless of the specific keywords or the actual query cardinality (thanks to the padding strategy).
Correctness: The correctness of CWC-based subset determination and power-sum-based recovery holds inherently in plaintext. For homomorphic implementation, one must only ensure that the initial data does not exceed the plaintext space and the noise budget is sufficient. We address these by employing data fragmentation and selecting optimal homomorphic parameters, respectively. Consequently, these measures collectively ensure the overall correctness of the protocol.

4.7. Additional Optimization and Extensions

Query ciphertext halving: Building on the work in [21], the client’s request size can be reduced by 50% through the use of pseudorandom seeds. This is achieved by exploiting the fact that the first component c 0 of a fresh RLWE ciphertext is uniformly random. Instead of transmitting the entire component, the client only sends a short seed to generate it.
Modulus Switching for Response Compression: To minimize the communication overhead of the response, we employ the modulus switching technique during the final stage of the protocol. Since the response ciphertexts are solely intended for client-side decryption and involve no further homomorphic operations, the large ciphertext modulus Q is no longer necessary. By transforming the ciphertexts from R Q 2 to a smaller modulus space R Q 2 , the server can significantly reduce the data size. This technique is also adopted in [21,33].

5. Implementation and Experiment

5.1. Implementation Environment

Hardware and Software Environment: The proposed protocol was implemented in C++ using the Microsoft SEAL [34] library (ver 4.1). We utilized the BFV scheme and enabled SIMD batching to achieve vectorized encryption and operations. All experiments were conducted on a machine equipped with an AMD Ryzen 7 7840HS processor running Windows 11 and with a 32 GB memory capacity. Both client-side and server-side functionalities were deployed on this single workstation to simulate their interaction and computational processes. All experimental evaluations were performed on a single thread, as no multi-threading techniques were used for speed-up.
BFV Parameters: The operational efficiency of the protocol is primarily governed by the selection of encryption parameters. After evaluating various configurations, we set the polynomial degree to N = 16,384 to accommodate the required computational depth. The plaintext modulus is configured at 20 bits; during database partitioning, bit-level headroom is reserved for homomorphic additions. The initial ciphertext modulus is chosen as 438 bits, which conforms to the 128-bit security standard. Ultimately, modulus switching reduces the ciphertext modulus to 49 bits, achieving a compression ratio of over eight-fold for the response ciphertext.

5.2. Experiment

Baseline: Due to the lack of publicly available protocols for multi-keyword Private Information Retrieval, no direct external baseline was available for comparison. To evaluate the effectiveness of our optimizations, we established a non-vectorized version of our MkCwPIR protocol as the baseline. By comparing this with our vectorized variant, we demonstrate the performance improvements achieved through our vectorized encryption approach. Finally, we compare the optimized protocol with CwPIR [22] to demonstrate both the overhead introduced by the additional operations and the effectiveness of our optimizations.
Comparison between MkCwPIR and VMkCwPIR:During the comparison phase, we analyze the server-side runtime and communication overhead across four distinct stages: oblivious expansion, the computation of f P C W ( · , · ) , the computation of f P S D ( · , · ) , and the power sums and packing process.
During the expansion phase, the conventional MkCwPIR utilizes the oblivious expansion mechanism from SealPIR, which primarily consists of Galois transformations and ciphertext additions. In contrast, Vectorized MkCwPIR employs plaintext masking and rotations. Benchmarks of individual operations show that the execution time of a Galois transformation is comparable to that of the masking-and-rotation procedure. However, the latter can directly process multiple codewords transmitted by the client, whereas the former must recursively decompose all codewords. Table 3 presents the time expenditure of both protocols during this phase.
It can be observed that when the codeword length c is small and the number of codewords m is large, vectorized ciphertext expansion exhibits a significant advantage over oblivious ciphertext expansion; conversely, the advantage becomes less pronounced.
During the f P C W ( · , · ) computation stage, the conventional MkCwPIR calculates the f P C W ( · , · ) values for each client codeword and each server codeword individually. In contrast, Vectorized MkCwPIR simultaneously computes the values for multiple client codewords against each server codeword. This parallel computation of equality operators yields a speedup factor approaching N / c , which is consistent with our experimental results and analysis. Table 4 summarizes the time consumption of both protocols during this stage.
Taking the number of keywords t = 2048 as an example, as m increases from 2 to 8, the execution time of VMkCwPIR in the f P C W ( · , · ) stage remains constant at 114.8 s. In contrast, the time for MkCwPIR increases linearly from 229.6 s to 918.4 s. This demonstrates that VMkCwPIR achieves an 8× speedup over the conventional MkCwPIR when m = 8 .
During the f P S D ( · , · ) computation stage, the conventional MkCwPIR first sums the corresponding f P C W ( · , · ) values for each client’s codeword within each data row, followed by cumulative multiplications across the rows. In contrast, after completing the summation, Vectorized MkCwPIR employs rotations to align the partial sums and performs vectorized ciphertext multiplications, thereby minimizing the multiplication overhead. This parallel multiplication reduces the number of multiplications required for keyword accumulation by a factor of N. Since operations such as plaintext–ciphertext multiplication for truncation, rotation, and addition incur significantly lower latency than ciphertext multiplication, it is highly beneficial to replace expensive ciphertext multiplications with these additional lightweight operations during optimization. Table 5 summarizes the execution times of both protocols during this phase.
Focusing on the case where n = 4096 , the experimental results in Table 5 highlight the superior scalability of VMkCwPIR. Specifically, as the number of codewords m increases from 2 to 8, the execution time for the conventional MkCwPIR surges from 242.6 s to 1699.2 s, representing a nearly seven-fold increase in computational cost. In stark contrast, the execution time for VMkCwPIR remains nearly constant, shifting only slightly from 21.2 s to 21.8 s. Consequently, at m = 8 , VMkCwPIR achieves a remarkable 78× speedup over the standard protocol, effectively demonstrating its efficiency in minimizing multiplication overhead through vectorized operations and rotation-based alignment.
In the final power sum and packing phase, the conventional MkCwPIR performs plaintext-ciphertext multiplications between each row of data and the corresponding f P S D ( · , · ) values, followed by a homomorphic summation of the results from each row. Lacking vectorized encryption, it cannot execute ciphertext packing, which leads to the number of response ciphertexts scaling up to the maximum match count k. In contrast, the power sum computation in Vectorized MkCwPIR is efficiently achieved through a single ciphertext–plaintext multiplication followed by rotation-sum operations, as detailed in Section 4. The resulting k values are then packed into ciphertext slots. Table 6 summarizes the execution time and the number of response ciphertexts for both protocols during this stage.
A comparison of total server-side runtime is shown in Table 7 (with n = t ). The results indicate that by drastically reducing homomorphic ciphertext–ciphertext multiplications, the protocol runs nearly ten times faster, notwithstanding the overhead from additional ciphertext rotation and extraction.
Comparison Between with CwPIR [22]: Before proceeding with the comparison, we first analyze the differences between the two protocols. CwPIR only supports single-keyword queries based on primary keys, whereas our VMkCwPIR supports multi-keyword queries based on non-primary keys. During the server’s online computation phase, CwPIR only requires an f P C W ( · , · ) calculation followed by an inner product to obtain the results. In contrast, our protocol requires an additional subset decision step, followed by the computation of multiple power sums. Figure 3 illustrates the experimental results, comparing the server-side execution time and the communication overhead (comprising both upload and download costs) for the two protocols. The parameters are configured with a code length c = 2048 and a code weight w = 2 . In this evaluation, VMkCwPIR executes a unified multi-keyword query with the maximum match threshold set to 64, whereas CwPIR performs an independent single-keyword query for each keyword. Given that CwPIR involves fewer computational operations, its polynomial degree parameter N is set to 8192.
As illustrated, the execution time of VMkCwPIR closely approximates that of CwPIR when performing four independent single-keyword queries. Notably, the communication overhead of VMkCwPIR remains constant, whereas that of CwPIR scales linearly with the number of keywords being queried.

6. Discussion

It can be observed that even though we optimized the protocol implementation using vectorized encryption, a significant performance gap remains compared to state-of-the-art PIR protocols. The primary reason is that our private subset inclusion functionality is constructed based on constant weight codes and equality operators, where the equality comparison for constant weight codes constitutes a computationally intensive operation. Consequently, we leave the task of enhancing the performance of multi-keyword PIR protocols as an open problem for future research.

7. Conclusions

We introduce the first single-round multi-keyword PIR protocol and utilize vectorized encryption to reduce its overhead. While it marks an advancement, its efficiency remains far from that of established high-performance PIR protocols; thus, optimizing the performance of multi-keyword PIR continues to be an important challenge for future work.

Author Contributions

Conceptualization, J.L. and Y.H.; methodology, J.L. and S.Z.; software, J.L. and S.Z.; validation, J.L., Y.H., S.Z. and C.Z.; formal analysis, Z.J. and L.Z.; investigation, S.Z., L.Z.; resources, Y.H.; data curation, Y.H. and J.L.; writing—original draft preparation, J.L., Z.J. and S.Z.; writing—review and editing, C.Z., Z.J. and L.Z.; supervision, C.Z. and S.Z.; project administration, S.Z. and Z.J.; funding acquisition, S.Z. and C.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This research was funded by the National Natural Science Foundation of China (62472252), TaiShan Scholars Program (tsqn202211280, tstp20240828), Shandong Provincial Natural Science Foundation (ZR2024QF131, ZR2023LZH014), Department of Science & Technology of Shandong Province (SYS202201), and Research Project of Quan Cheng Laboratory, China (QCL20250204).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding authors.

Conflicts of Interest

Author Lili Zhang is employed by Inspur Group Co., Ltd. The remaining authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.

References

  1. Chor, B.; Kushilevitz, E.; Goldreich, O.; Sudan, M. Private information retrieval. J. ACM (JACM) 1998, 45, 965–981. [Google Scholar] [CrossRef]
  2. Beimel, A.; Stahl, Y. Robust information-theoretic private information retrieval. J. Cryptol. 2007, 20, 295–321. [Google Scholar] [CrossRef]
  3. Beimel, A.; Ishai, Y.; Kushilevitz, E.; Orlov, I. Share conversion and private information retrieval. In Proceedings of the 2012 IEEE 27th Conference on Computational Complexity, Porto, Portugal, 26–29 June 2012; IEEE: Piscataway, NJ, USA, 2012; pp. 258–268. [Google Scholar]
  4. Dvir, Z.; Gopi, S. 2-server PIR with subpolynomial communication. J. ACM (JACM) 2016, 63, 1–15. [Google Scholar] [CrossRef]
  5. Kales, D.; Omolola, O.; Ramacher, S. Revisiting user privacy for certificate transparency. In Proceedings of the 2019 IEEE European Symposium on Security and Privacy (EuroS&P), Stockholm, Sweden, 17–19 June 2019; IEEE: Piscataway, NJ, USA, 2019; pp. 432–447. [Google Scholar]
  6. Mozaffari, H.; Houmansadr, A. Heterogeneous private information retrieval. In Network and Distributed Systems Security (NDSS) Symposium 2020; U.S. National Science Foundation: Alexandria, VA, USA, 2020. [Google Scholar]
  7. Eriguchi, R.; Kurosawa, K.; Nuida, K. Multi-Server PIR with Full Error Detection and Limited Error Correction. In Proceedings of the 3rd Conference on Information-Theoretic Cryptography, ITC 2022; Cambridge, MA, USA, 5–7 July 2022, pp. 1:1–1:20.
  8. Gong, T.; Henry, R.; Psomas, A.; Kate, A. More is merrier: Relax the non-collusion assumption in multi-server pir. In Proceedings of the 2024 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 19–23 May 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 4348–4366. [Google Scholar]
  9. Corrigan-Gibbs, H.; Henzinger, A.; Kogan, D. Single-server private information retrieval with sublinear amortized time. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2022; pp. 3–33. [Google Scholar]
  10. Zhou, M.; Lin, W.K.; Tselekounis, Y.; Shi, E. Optimal single-server private information retrieval. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2023; pp. 395–425. [Google Scholar]
  11. Menon, S.J.; Wu, D.J. YPIR: High-Throughput Single-Server PIR with Silent Preprocessing. In 33rd USENIX Security Symposium (USENIX Security 24); USENIX Association: Berkeley, CA, USA, 2024; pp. 5985–6002. [Google Scholar]
  12. Mughees, M.H.; Ren, L. Vectorized batch private information retrieval. In Proceedings of the 2023 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 21–25 May 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 437–452. [Google Scholar]
  13. Lazzaretti, A.; Papamanthou, C. TreePIR: Sublinear-time and polylog-bandwidth private information retrieval from DDH. In Annual International Cryptology Conference; Springer: Berlin/Heidelberg, Germany, 2023; pp. 284–314. [Google Scholar]
  14. Cao, Q.; Tran, H.Y.; Dau, S.H.; Yi, X.; Viterbo, E.; Feng, C.; Huang, Y.C.; Zhu, J.; Kruglik, S.; Kiah, H.M. Committed Private Information Retrieval. In ESORICS 2023: 28th European Symposium on Research in Computer Security; Springer: Cham, Switzerland, 2024; Lecture Notes in Computer Science; Volume 14344, pp. 393–413. [Google Scholar]
  15. Angel, S.; Chen, H.; Laine, K.; Setty, S. PIR with compressed queries and amortized query processing. In Proceedings of the 2018 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 20–24 May 2018; IEEE: Piscataway, NJ, USA, 2018; pp. 962–979. [Google Scholar]
  16. Mughees, M.H.; Chen, H.; Ren, L. OnionPIR: Response efficient single-server PIR. In Proceedings of the 2021 ACM SIGSAC Conference on Computer and Communications Security, Virtual Event, Republic of Korea, 15–19 November 2021; pp. 2292–2306.
  17. Davidson, A.; Pestana, G.; Celi, S. Frodopir: Simple, scalable, single-server private information retrieval. Proc. Priv. Enhancing Technol. 2023, 2023, 365–383. [Google Scholar] [CrossRef]
  18. Henzinger, A.; Hong, M.M.; Corrigan-Gibbs, H.; Meiklejohn, S.; Vaikuntanathan, V. One server for the price of two: Simple and fast Single-Server private information retrieval. In 32nd USENIX Security Symposium (USENIX Security 23); USENIX Association: Berkeley, CA, USA, 2023; pp. 3889–3905. [Google Scholar]
  19. Zhou, M.; Park, A.; Zheng, W.; Shi, E. Piano: Extremely simple, single-server PIR with sublinear server computation. In Proceedings of the 2024 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 19–23 May 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 4296–4314. [Google Scholar]
  20. Liu, J.; Li, J.; Wu, D.; Ren, K. PIRANA: Faster multi-query PIR via constant-weight codes. In Proceedings of the 2024 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 19–23 May 2024; IEEE: Piscataway, NJ, USA, 2024; pp. 4315–4330. [Google Scholar]
  21. Ali, A.; Lepoint, T.; Patel, S.; Raykova, M.; Schoppmann, P.; Seth, K.; Yeo, K. Communication–Computation trade-offs in PIR. In 30th USENIX Security Symposium (USENIX Security 21); USENIX Association: Berkeley, CA, USA, 2021; pp. 1811–1828. [Google Scholar]
  22. Mahdavi, R.A.; Kerschbaum, F. Constant-weight PIR: Single-round keyword PIR via constant-weight equality operators. In 31st USENIX Security Symposium (USENIX Security 22); USENIX Association: Berkeley, CA, USA, 2022; pp. 1723–1740. [Google Scholar]
  23. Celi, S.; Davidson, A. Call me by my name: Simple, practical private information retrieval for keyword queries. In 2024 on ACM SIGSAC Conference on Computer and Communications Security; Association for Computing Machinery: New York, NY, USA, 2024; pp. 4107–4121. [Google Scholar]
  24. Hao, M.; Liu, W.; Peng, L.; Zhang, C.; Wu, P.; Zhang, L.; Li, H.; Deng, R.H. Practical Keyword Private Information Retrieval from Key-to-Index Mappings. In 34th USENIX Security Symposium (USENIX Security 25); USENIX Association: Berkeley, CA, USA, 2025. [Google Scholar]
  25. Gentry, C. Fully homomorphic encryption using ideal lattices. In Proceedings of the Forty-First Annual ACM Symposium on Theory of Computing, Bethesda, MD, USA, 31 May–2 June 2009; pp. 169–178. [Google Scholar]
  26. Van Dijk, M.; Gentry, C.; Halevi, S.; Vaikuntanathan, V. Fully homomorphic encryption over the integers. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2010; pp. 24–43. [Google Scholar]
  27. Gentry, C.; Halevi, S. Implementing gentry’s fully-homomorphic encryption scheme. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2011; pp. 129–148. [Google Scholar]
  28. Fan, J.; Vercauteren, F. Somewhat practical fully homomorphic encryption. Cryptol. ePrint Arch. 2012. [Google Scholar]
  29. Brakerski, Z.; Gentry, C.; Vaikuntanathan, V. (Leveled) fully homomorphic encryption without bootstrapping. ACM Trans. Comput. Theory (TOCT) 2014, 6, 1–36. [Google Scholar] [CrossRef]
  30. Cheon, J.H.; Kim, A.; Kim, M.; Song, Y. Homomorphic encryption for arithmetic of approximate numbers. In International Conference on the Theory and Application of Cryptology and Information Security; Springer: Berlin/Heidelberg, Germany, 2017; pp. 409–437. [Google Scholar]
  31. Smart, N.P.; Vercauteren, F. Fully homomorphic SIMD operations. Des. Codes Cryptogr. 2014, 71, 57–81. [Google Scholar] [CrossRef]
  32. Castryck, W.; Iliashenko, I.; Vercauteren, F. Homomorphic SIMD Operations: Single Instruction Much More Data. In Annual International Conference on the Theory and Applications of Cryptographic Techniques; Springer: Berlin/Heidelberg, Germany, 2018; pp. 338–359. [Google Scholar]
  33. Menon, S.J.; Wu, D.J. Spiral: Fast, high-rate single-server PIR via FHE composition. In Proceedings of the 2022 IEEE Symposium on Security and Privacy (SP), San Francisco, CA, USA, 22–26 May 2022; IEEE: Piscataway, NJ, USA, 2022; pp. 930–947. [Google Scholar]
  34. Microsoft. Microsoft SEAL: Release 4.1. 2024. Available online: https://github.com/microsoft/SEAL (accessed on 18 March 2026).
Figure 1. A multi-keyword matching example. Assume that the server receives the encrypted ciphertexts of c w 2 and c w 3 . The process is divided into seven steps. Step 1: Use plaintext vector multiplication to extract the corresponding bits and rotate the values into the first slot of each codeword. Step 2: The server performs vectorized computation to determine the values of f P C W ( q , c w i ) . Step 3: For each row, the server selects the corresponding f P C W ( · , · ) ciphertext based on the keywords. Step 4: Sum these ciphertexts (via homomorphic addition). Step 5: Rotate and accumulate these ciphertexts to align their positions with each row of data. Step 6: Extract and rotate the results associated with different keywords. Step 7: Compute the cumulative product of these results.
Figure 1. A multi-keyword matching example. Assume that the server receives the encrypted ciphertexts of c w 2 and c w 3 . The process is divided into seven steps. Step 1: Use plaintext vector multiplication to extract the corresponding bits and rotate the values into the first slot of each codeword. Step 2: The server performs vectorized computation to determine the values of f P C W ( q , c w i ) . Step 3: For each row, the server selects the corresponding f P C W ( · , · ) ciphertext based on the keywords. Step 4: Sum these ciphertexts (via homomorphic addition). Step 5: Rotate and accumulate these ciphertexts to align their positions with each row of data. Step 6: Extract and rotate the results associated with different keywords. Step 7: Compute the cumulative product of these results.
Information 17 00337 g001
Figure 2. Example for computing first- and second-order power sums and packing the results: Step 1: The server computes the element-wise product of the vectorized matching ciphertext and the database plaintext vector. Step 2: The server performs a sequence of rotations and additions on the ciphertext for log N iterations to accumulate the values across all slots. Step 3: The server utilizes a plaintext mask vector to extract (intercept) the target results. Step 4: The computed power sums are packed into a single ciphertext through homomorphic addition.
Figure 2. Example for computing first- and second-order power sums and packing the results: Step 1: The server computes the element-wise product of the vectorized matching ciphertext and the database plaintext vector. Step 2: The server performs a sequence of rotations and additions on the ciphertext for log N iterations to accumulate the values across all slots. Step 3: The server utilizes a plaintext mask vector to extract (intercept) the target results. Step 4: The computed power sums are packed into a single ciphertext through homomorphic addition.
Information 17 00337 g002
Figure 3. Experimental evaluation of the comparison between with CwPIR: (a) Variation in the execution time of the two protocols relative to the number of server-side keywords (t); (b) Variation in the communication overhead for both protocols as a function of the number of client keywords (m).
Figure 3. Experimental evaluation of the comparison between with CwPIR: (a) Variation in the execution time of the two protocols relative to the number of server-side keywords (t); (b) Variation in the communication overhead for both protocols as a function of the number of client keywords (m).
Information 17 00337 g003
Table 1. Summary of Notations.
Table 1. Summary of Notations.
NotationDescription
mNumber of client’s query keywords
nNumber of indices in the server database
tTotal number of distinct keywords in the database
p i The i-th power sum
( p k , s k ) The client’s public and secret key pair
DThe server-side database
idx i , i [ n ] The i-th index in database D
val i , i [ n ] The value associated with index idx i
S i kw The set of keywords corresponding to idx i and val i
S ck = { ck j } j [ m ] The set of keywords queried by the client
λ Statistical and computational security parameters
K The keyword domain defined by the server
kThe maximum match count
Table 2. Theoretical Analysis of Computational and Communication Complexity.
Table 2. Theoretical Analysis of Computational and Communication Complexity.
SchemeCommunication ct × ct ct × pt ct + ct Rotation
MkCwPIR O ( c m + k ) O ( m w n ) O ( k n ) O ( a m n + k n )
VMkCwPIR O ( ( c m + k ) / N ) O ( ( w 1 ) n ) O ( m + k ) O ( a n + k log n ) O ( m + n + k )
Table 3. Expansion time (s) evaluation of MkCwPIR and VMkCwPIR.
Table 3. Expansion time (s) evaluation of MkCwPIR and VMkCwPIR.
Methodmc
512 1024 2048 4096
MkCwPIR29.619.439.580.2
VMkCwPIR10.320.841.383.2
MkCwPIR419.439.580.2161.3
VMkCwPIR10.320.841.383.2
MkCwPIR839.580.2161.3322.6
VMkCwPIR10.320.841.3163.2
Table 4. Execution time (s) of the f PCW ( ) stage for MkCwPIR and VMkCwPIR with c = 2048 .
Table 4. Execution time (s) of the f PCW ( ) stage for MkCwPIR and VMkCwPIR with c = 2048 .
Methodmt
512 1024 2048 4096
MkCwPIR257.4114.8229.6459.2
VMkCwPIR28.757.4114.8229.6
MkCwPIR4114.8229.6459.2918.4
VMkCwPIR28.757.4114.8229.6
MkCwPIR8229.6459.2918.41836.8
VMkCwPIR28.757.4114.8229.6
Table 5. Execution time (s) of the f PSD ( ) stage for MkCwPIR and VMkCwPIR with c = 2048 .
Table 5. Execution time (s) of the f PSD ( ) stage for MkCwPIR and VMkCwPIR with c = 2048 .
Methodmn
512 1024 2048 4096
MkCwPIR229.759.5120.8242.6
VMkCwPIR2.95.810.621.2
MkCwPIR489.6179.0362.9728.3
VMkCwPIR3.16.010.821.4
MkCwPIR8208.9417.5846.61699.2
VMkCwPIR3.56.411.221.8
Table 6. Execution time (s) and response ciphertext count of the power sum and packing phase ( c = 2048 ).
Table 6. Execution time (s) and response ciphertext count of the power sum and packing phase ( c = 2048 ).
MethodknResp. Num
512 1024 2048 4096
MkCwPIR13.26.412.825.61
VMkCwPIR0.140.150.160.181
MkCwPIR412.825.651.2102.44
VMkCwPIR0.140.150.160.181
MkCwPIR1651.2102.4204.8409.616
VMkCwPIR0.140.150.320.641
MkCwPIR64204.8409.6819.21638.464
VMkCwPIR0.320.641.22.51
Table 7. Total execution time (s) comparison between MKCWPIR and VMKCWPIR.
Table 7. Total execution time (s) comparison between MKCWPIR and VMKCWPIR.
Methodk n / t
512 1024 2048 4096
MKCWPIR199.9200.1402.7807.6
VMKCWPIR42.0484.15166.86334.18
MKCWPIR4236.6473.7953.51910.4
VMKCWPIR42.2484.35167.06334.38
MKCWPIR16529.21059.32131.14268.2
VMKCWPIR42.6484.75167.62415.24
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Lu, J.; Zhao, S.; Huang, Y.; Jia, Z.; Zhang, L.; Zhao, C. VMkCwPIR: A Single-Round Scalable Multi-Keyword PIR Protocol Supporting Non-Primary Key Queries. Information 2026, 17, 337. https://doi.org/10.3390/info17040337

AMA Style

Lu J, Zhao S, Huang Y, Jia Z, Zhang L, Zhao C. VMkCwPIR: A Single-Round Scalable Multi-Keyword PIR Protocol Supporting Non-Primary Key Queries. Information. 2026; 17(4):337. https://doi.org/10.3390/info17040337

Chicago/Turabian Style

Lu, Junyu, Shengnan Zhao, Yuchen Huang, Zhongtian Jia, Lili Zhang, and Chuan Zhao. 2026. "VMkCwPIR: A Single-Round Scalable Multi-Keyword PIR Protocol Supporting Non-Primary Key Queries" Information 17, no. 4: 337. https://doi.org/10.3390/info17040337

APA Style

Lu, J., Zhao, S., Huang, Y., Jia, Z., Zhang, L., & Zhao, C. (2026). VMkCwPIR: A Single-Round Scalable Multi-Keyword PIR Protocol Supporting Non-Primary Key Queries. Information, 17(4), 337. https://doi.org/10.3390/info17040337

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop