Skip to content

Comments

fast query gen skips negacyclic#22

Open
chenyue42 wants to merge 1 commit intogoogle:mainfrom
chenyue42:fix/fast_query_gen
Open

fast query gen skips negacyclic#22
chenyue42 wants to merge 1 commit intogoogle:mainfrom
chenyue42:fix/fast_query_gen

Conversation

@chenyue42
Copy link

In client query generation code, the function rlwe_to_lwe computes a negacyclic_matrix. Later, in run_simple_ypir_rgsw_on_params, the query_row_last_row vector only uses the b part of the LWE ciphertexts. The negacyclic matrices seem to be useless in this case. I am not sure about the use of the how_many variable in function generate_query_over_prime. Please make sure it is safe to ignore using this variable.

This similar fix appears in YPIR's implementation as well.

Here is a quick test that should work well:
cargo run --release --bin inspire -- -v --num-items 32768 --item-size-bits 32768 --dim0 32768

The online client time reduces from ~1000ms to ~30ms

@google-cla
Copy link

google-cla bot commented Dec 21, 2025

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@chenyue42 chenyue42 marked this pull request as draft December 21, 2025 13:59
@chenyue42 chenyue42 marked this pull request as ready for review December 21, 2025 14:00
@chenyue42 chenyue42 marked this pull request as draft December 22, 2025 05:01
@chenyue42 chenyue42 marked this pull request as ready for review December 22, 2025 05:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant