Skip to content

Demostration of using ChalametPIR - Keyword Private Information Retrieval

License

Notifications You must be signed in to change notification settings

itzmeanjan/chalametpir-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

chalametpir-demo

Demostration of using ChalametPIR - Keyword Private Information Retrieval, the Rust Library Crate @ https://github.com/itzmeanjan/ChalametPIR.

Introduction

This binary crate demonstrates usage of Keyword Private Information Retrieval using the ChalametPIR library crate. It showcases a client-server architecture where the client can query a database of key-value pairs without revealing the queried keyword to the server.

Prerequisites

Rust stable toolchain; see https://rustup.rs for installation guide. MSRV for this crate is 1.85.0.

# While developing this demonstration, I was using
$ rustc --version
rustc 1.85.0 (4d91de4e4 2025-02-17)

Running the Demo

  1. Run the PIR server.
cargo run --profile optimized --bin server db/crypto.json
  1. In a separate terminal window, run the PIR client.
cargo run --profile optimized --bin client
  1. Query the Database: The client will prompt you to enter keywords. Type in a keyword present in your database and hit Enter. The client will then display the corresponding value. Type 'quit' to exit the client.

Note

For fetching the value associated with the queried keyword, client first prepares a PIR query using its local hint database, which it downloaded from the PIR server, when setting up the PIR client. Then it attempts to decode the received PIR response from the PIR server. If you prompt it to fetch value associated with some key which is absent in the database, the client will not be able to decode the response. During this execution of the protocol, server will never learn which keyword was queried by the client.

screencast.webm.mp4

About

Demostration of using ChalametPIR - Keyword Private Information Retrieval

Topics

Resources

License

Stars

Watchers

Forks

Languages