InsPIRe Protocol Visualization

Interactive visualization of PIR communication costs

Key Privacy Property (Paper model): For a given database and parameter set, every query uses the same amount of communication, regardless of which entry is requested. Query size scales with database size N (via N/t indicator vector), and response size scales with entry size. If sizes varied with the target index, traffic analysis could reveal what's being queried.

1. Protocol Flow

Key: One round-trip: client sends encrypted query, server computes on ciphertexts, returns encrypted result.

PIR Protocol Flow Diagram Animated sequence diagram showing client-server communication: Query (LWE indicator, optionally with RGSW for InsPIRe), Server Processing (external product), Response (RLWE ciphertext), and Client Extraction.

2. Size Breakdown

Key: Three paper protocols (InsPIRe_0, InsPIRe^(2), InsPIRe) with different query structures. InsPIRe_0 and InsPIRe^(2) use LWE indicators only; InsPIRe adds RGSW for polynomial evaluation.

Paper model: query breakdown includes the LWE indicator vector, which scales with N/t.

Sizes shown reflect single-modulus serialization (crt_moduli length 1). The default CRT mode stores two residues per coefficient and approximately doubles the serialized size.

Upload Keys Breakdown Chart Bar chart showing the size breakdown of uploaded keys including packing matrices and key-switching matrices.
Upload Query Breakdown Chart Bar chart showing the size breakdown of uploaded query components including LWE indicators and optional RGSW ciphertexts.
Download Response Breakdown Chart Bar chart showing the size breakdown of downloaded response containing RLWE ciphertexts.
Upload Keys (packing/KS matrices)
Upload Query (indicator / RGSW)
Download (RLWE response)

3. Parameter Effects (InsPIRe^1)

Key: Sizes scale linearly with ring dimension (d) and gadget length (l). Select variant in Section 2 to update calculations.

1024 2048 4096
32 B 64 B 128 B
2 3 4
Query Size (seeded)
96 KB
Response Size (binary)
512 KB
Total per Query
742 KB

4. Server Processing Visualization

Key: Server processes one shard using parallel external products. Processing time is ~3ms regardless of total database size.

Step 1: Shard Selection

Shard Selection visualization showing database partitioning Visual grid of database shards with the target shard highlighted. Each shard contains entries encoded as polynomials.

Step 2: External Product (Parallel)

Server Processing Pipeline showing parallel external product operations Animated diagram showing how the server computes external products between query ciphertexts and database polynomials in parallel.

Step 3: Response Assembly

Response Assembly showing ServerResponse structure and network transmission Diagram showing how RLWE ciphertexts are assembled into the server response and transmitted back to the client.

4.5. LWE-to-RLWE Packing (InsPIRe^1/^2)

Key: Pack d LWE ciphertexts into 1 RLWE using Galois automorphisms. Two approaches available.

Why packing? After external product, each column's value is in coefficient 0 of its RLWE. Simple "shift and add" fails because noise spreads to ALL coefficients. Automorphisms permute coefficients in a controlled way that preserves encryption structure.
Tree Packing Algorithm showing how 8 LWE ciphertexts are combined into 1 RLWE Animated tree diagram showing the hierarchical packing process using Galois automorphisms to combine multiple LWE ciphertexts into a single RLWE ciphertext.

Algorithm Steps

  1. Extract LWE from each column RLWE (coeff 0)
  2. Convert LWE a-vectors back to RLWE form
  3. Recursively pair: ct_even + y·ct_odd
  4. Apply automorphism τ_t and key-switch
  5. Add scaled b-values to final result

Result

Column k's value appears at coefficient k of the packed RLWE, scaled by d.

coeff[k] = message[k] × d

Complexity

Keys: log(d) automorphism key-switching matrices
Operations: O(n·log(d)) key-switches for n columns
For d=2048: 11 KS matrices, ~948ms server time

5. Database Size Comparison

Key: Query size scales with N/t (indicator vector length). Response size scales with entry size. For a fixed database, all queries use the same communication regardless of which entry is requested.

Paper model: query grows with N/t; totals increase with database size.

Database Size Entries Shards Query Size Response Size Total Server Time
Varies with N --> O(N/t) query, O(entry) response O(log N)
32 KB 1,024 1 192 KB 32 KB 224 KB ~1 ms
2 MB 65,536 32 192 KB 32 KB 224 KB ~1.5 ms
32 MB 1,048,576 512 192 KB 32 KB 224 KB ~3 ms
3.2 GB 100,000,000 48,829 192 KB 32 KB 224 KB ~3 ms
73 GB (Ethereum) 2,400,000,000 1,171,875 192 KB 32 KB 224 KB ~3 ms

All Variants Summary (d=2048, 32-byte entries)

Variant Query Response Total Reduction Notes
InsPIRe^0 192 KB 545 KB 737 KB baseline Full query + unpacked
InsPIRe^1 192 KB 32 KB 224 KB 3.3x Packed response
InsPIRe^2 96 KB 32 KB 128 KB 5.7x Seeded + packed

Appendix: Lattice Cryptography Foundations

InsPIRe's security is based on the hardness of lattice problems. These visualizations explain the core concepts.

A.1 Lattice Basics & Shortest Vector Problem

A lattice is a regular grid of points. Security comes from the hardness of finding short vectors.

2D Lattice visualization showing basis vectors and the Shortest Vector Problem Interactive 2D lattice grid showing basis vectors and demonstrating the Shortest Vector Problem which underlies lattice-based cryptography security.

A.2 RLWE Error Distribution

Gaussian noise hides the secret. Without noise, the problem would be easy linear algebra.

Discrete Gaussian Error Distribution histogram with adjustable sigma parameter Histogram showing the discrete Gaussian distribution used for RLWE noise. The sigma parameter controls the spread of the distribution.

A.3 Polynomial Ring Structure

R_q = Z_q[X]/(X^d + 1): Polynomials with cyclic structure. Multiplication by X rotates coefficients.

Polynomial Ring Structure showing cyclic coefficient rotation when multiplying by X Interactive visualization of the polynomial ring R_q showing how multiplication by X causes cyclic rotation of coefficients with sign change.