Skip to content

Conversation

yunbo99
Copy link
Contributor

@yunbo99 yunbo99 commented Oct 20, 2025

No description provided.

Copy link

Summary of Changes

Hello @yunbo99, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces the Threshold ECDH Private Set Intersection (PSI) feature, which enhances the standard ECDH PSI protocol by allowing participants to specify a maximum size for the resulting intersection. This ensures that the final intersection count does not exceed a predefined threshold, providing an additional layer of control over data exposure. The implementation includes new C++ components for both sender and receiver roles, along with updated configuration structures and examples, making it a robust extension to the existing PSI framework.

Highlights

  • Threshold ECDH PSI Implementation: Introduced a new feature for Threshold ECDH Private Set Intersection (PSI), which allows users to specify a maximum size for the intersection result, enhancing privacy controls.
  • Configuration Extensions: Added new configuration fields, intersection_threshold and count_path, to the PsiConfig protobuf message to support the new threshold functionality.
  • New C++ Components: Developed dedicated C++ classes including ThresholdEcdhPsiReceiver, ThresholdEcdhPsiSender, ThresholdEcdhPsiCtx, and ThresholdEcdhPsiCache to handle the specific logic and data management for the threshold-based protocol.
  • Dynamic Protocol Selection: Integrated the new Threshold ECDH PSI into the psi_launcher application, enabling dynamic selection between standard ECDH PSI and the threshold-aware version based on the provided configuration.
  • Base Class Refactoring: Modified the access specifiers of key methods in the base EcdhPsiReceiver and EcdhPsiSender classes from private to protected to facilitate proper inheritance and extension by the new threshold-specific implementations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a significant new feature: Threshold ECDH PSI, which allows limiting the size of the intersection result. The implementation is well-structured, extending the existing ECDH PSI functionality through inheritance. The changes include new protocol logic, configuration options, comprehensive tests, benchmarks, and documentation. The overall approach is solid. I've identified a few areas for improvement, such as correcting some copy-paste errors in logging, removing unused code, improving code clarity, and fixing typos in comments. These suggestions should help enhance the quality and maintainability of the new feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant