Coder Social home page Coder Social logo

artem-kirillov / piano-pir-new Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wuwuz/piano-pir-new

0.0 0.0 0.0 38 KB

Piano: Extremely Simple, Single-server Private Information Retrieval with Sublinear Server Computation (IEEE S&P 2024)

Shell 0.12% Go 93.73% Assembly 6.14%

piano-pir-new's Introduction

Piano: Extremely Simple, Single-server PIR with Sublinear Server Computation (IEEE S&P 2024)

This is a prototype implementation of the Piano private information retrieval(PIR) algorithm that allows a client to access a database without the server knowing the querying index. The algorithm details can be found in the paper (https://eprint.iacr.org/2023/452.pdf).

Note: This repo includes both versions of Piano (the initial version and the updated version). The new version is now described in the main body of the online version of our paper. We thank Jesko Dujmovic for helping us improve the scheme.

The initial version is now described as a variant in the online version of our paper (Appendix A). The legacy code is in client/client.go. Running the code will get the numbers we report in our conference version (https://www.computer.org/csdl/proceedings-article/sp/2024/313000a055/1RjEaufvKzm).

Warning: The code is not audited and is not for any serious commercial or real-world use case. Please use it only for educational purposes.

Prerequisite:

  1. Install Go(https://go.dev/doc/install).
  2. For developing, please install gRPC(https://grpc.io/docs/languages/go/quickstart/)

A Mini Tutorial

The tutorial implementation is in tutorial_new/tutorial_new.go.

Try go run tutorial_new/tutorial_new.go.

Running Experiments:

  1. In one terminal, go run server/server.go -port 50051. This sets up the server. The server will store the whole DB in the RAM, so please ensure there's enough memory.
  2. In another terminal, go run client_new/client_new.go -ip localhost:50051 -thread 1. This runs the PIR experiment with one setup phase for a window of $\sqrt{n}\ln(n)$-queries and follows with the online phase of up to 1000 queries. The ip flag denotes the server's address. The thread denotes how many threads are used in the setup phase.

Different DB configuration:

  1. The two integers in config.txt denote N and DBSeed. N denotes the number of entries in the database. DBSeed denotes the random seed to generate the DB. The client will use the seed only for verifying the correctness. The code only reads the integers in the first line.
  2. In util/util.go, you can change the DBEntrySize constant to change the entry size, e.g. 8bytes, 32bytes, 256bytes.

For example, setting N=134217728 and DBEntrySize=8 will generate a 1GB database.

Developing

  1. The server implementation is in server/server.go.
  2. The client implementation is in client_new/client_new.go.
  3. Common utilities are in util/util.go, including the PRF and the DBEntry definition.
  4. The messages exchanged by the server and client are defined in query/query.proto. If you change it, run bash proto.sh to generate the corresponding server and client API. You should implement those APIs later.

Contact

Mingxun Zhou([email protected])

Andrew Park([email protected])

piano-pir-new's People

Contributors

wuwuz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.