A privacy-preserving search system based on MIT's Tiptoe paper. This implementation allows you to search through data while maintaining query privacy - the server never learns what you're searching for. For more details, see our blog.
simplepir
– a Rust implementation of SimplePIR (Henzinger et al.)tiptoe
– implements Tiptoe and queries real-time stock/crypto prices from Yahoo Finance's API.
- Privacy-preserving search using PIR
- Local embedding generation
- Clustering-based optimization for faster searches
- Documents are converted into embeddings and clustered for efficient searching
- The client downloads cluster centroids (~32 kB for a 1 GB database)
- The client locally compares query vectors to centroids to find relevant clusters
- Using SimplePIR, the client privately retrieves matching documents
- All queries remain private - the server never sees what you're searching for
Architecture overview of private search with homomorphic encryption. The query is encrypted before being sent to the server, which processes it without being able to see the contents. The encrypted results are sent back to the client for decryption.
The system uses a combination of:
- Sentence transformers for embedding generation
- K-means clustering for search optimization
- SimplePIR for private information retrieval
- Queries are never revealed to the server
- Document retrieval patterns remain private
- All sensitive computations happen client-side
- Server only sees encrypted PIR queries
The clustering-based approach provides significant performance improvements:
- Reduces the number of PIR operations needed
- Allows for efficient searching in large document collections
- Maintains privacy while providing fast results
Contributions are welcome! Please feel free to submit a Pull Request.
This project is open source and available under the MIT License.