Sharded Seal Lookup aims to help folks learn how to implement private information retrieval using homomorphic encryption. None of this code should be used in production, but it should be a good starting point for learning about the topic.
- First install bun, a fast batteries-included runtime for JavaScript and TypeScript.
- Run
bun installto install the dependencies. - Now
EXPLAIN=1 bun run test.tsshould get you started. test-values.tsis the same astest.tsbut with values instead of just the presence of mobile numbers.
For more detailed explanations, you can increase the explain parameter above, i.e. EXPLAIN=2 bun run test.ts.
I've tried as much as possible to make the code easy to read and understand. Start from test.ts and make your way through the other files.