Inferensys

Glossary

Circuit PSI

A generic approach to constructing private set intersection protocols by securely evaluating a Boolean circuit that computes the intersection function, often using garbled circuits.
Hardware engineer integrating LLM with IoT sensors, circuit boards on desk, soldering iron nearby, maker lab aesthetic.
GENERIC SECURE COMPUTATION FOR SET INTERSECTION

What is Circuit PSI?

Circuit PSI is a generic approach to private set intersection that represents the intersection logic as a Boolean circuit evaluated using secure two-party computation techniques.

Circuit PSI is a generic construction for private set intersection that encodes the intersection computation as a Boolean circuit and evaluates it using a secure two-party computation protocol, typically garbled circuits. Unlike custom PSI protocols optimized for specific set operations, this approach expresses the logic as a circuit of AND and XOR gates, enabling arbitrary intersection variants—such as threshold matching or fuzzy PSI—to be computed privately without designing a bespoke cryptographic protocol for each variant.

The primary advantage of Circuit PSI lies in its flexibility and composability. By representing the intersection function as a circuit, developers can incorporate additional logic, such as filtering by associated metadata or computing PSI cardinality, directly into the secure evaluation. However, this generality incurs higher communication complexity and computational overhead compared to highly optimized dedicated protocols like KKRT, making Circuit PSI most suitable for complex intersection predicates where custom protocol design is impractical.

GENERIC SECURE COMPUTATION FOR SET INTERSECTION

Key Features of Circuit PSI

Circuit PSI represents a generic and highly flexible approach to private set intersection, constructing the intersection logic as a Boolean circuit evaluated securely between parties. This paradigm leverages general-purpose secure computation protocols to compute arbitrary functions over private sets.

01

Boolean Circuit Representation

The core idea is to express the intersection logic as a Boolean circuit. Each party's input set is encoded as a bit-vector or list of elements, and the circuit computes membership checks. This allows for arbitrary intersection variants beyond simple equality, such as threshold-based or fuzzy matching, by modifying the circuit logic rather than the underlying cryptographic protocol.

02

Garbled Circuit Evaluation

Circuit PSI protocols typically rely on Yao's Garbled Circuits for secure evaluation. One party (the garbler) encrypts the Boolean circuit, and the other party (the evaluator) computes it using oblivious transfer for input wire labels. This ensures that neither party learns anything beyond the final intersection output, maintaining semantic security against semi-honest adversaries.

03

Generic Functionality Support

Unlike specialized PSI protocols that only compute exact set intersection, Circuit PSI can compute any function over the intersection. This includes:

  • PSI Cardinality: Revealing only the size of the intersection
  • Labeled PSI: Returning associated metadata for matched elements
  • Threshold PSI: Matching elements that meet a similarity threshold
  • PSI-Sum: Computing aggregates over intersecting elements
04

OT-Based Input Encoding

Input wires in the garbled circuit are assigned labels using Oblivious Transfer (OT). For each bit of a party's input, the other party acts as the OT sender, providing two wire labels. The receiver selects the label corresponding to their actual input bit without revealing which one was chosen. OT extension techniques make this process highly efficient for large input sets.

05

Communication vs. Computation Trade-off

Circuit PSI protocols exhibit a distinct performance profile. The communication complexity scales with the circuit size, which is typically O(n log n) or O(n) in the number of elements. However, the computational cost is dominated by garbled circuit generation and evaluation. This makes Circuit PSI particularly suitable when the desired intersection function is complex and specialized protocols do not exist.

06

Malicious Security Extensions

While base garbled circuit protocols achieve semi-honest security, Circuit PSI can be upgraded to malicious security using techniques like cut-and-choose, where the garbler generates multiple circuits and the evaluator checks a random subset for correctness. More recent approaches use authenticated garbling or the LEGO protocol to achieve malicious security with better concrete efficiency.

CIRCUIT PSI EXPLAINED

Frequently Asked Questions

Explore the core concepts behind Circuit-based Private Set Intersection, a generic and flexible approach to secure two-party computation for finding common data elements.

Circuit PSI is a generic approach to constructing Private Set Intersection protocols by securely evaluating a Boolean circuit that computes the intersection function. Instead of relying on specialized cryptographic primitives like Oblivious Pseudorandom Functions (OPRF) , it represents the set intersection logic as a digital circuit. The two parties then use a general-purpose Secure Two-Party Computation (2PC) protocol, typically based on Garbled Circuits, to jointly evaluate this circuit. One party acts as the garbler, creating an encrypted version of the circuit, while the other acts as the evaluator, computing the output without learning the intermediate values. This method offers high flexibility, allowing the computation of arbitrary functions over the intersection, such as summing associated values or checking thresholds, directly within the secure computation layer.

PROTOCOL COMPARISON

Circuit PSI vs. Specialized PSI Protocols

Comparing the generic circuit-based approach to private set intersection against purpose-built specialized protocols across key performance and security dimensions.

FeatureCircuit PSISpecialized PSIHybrid Approaches

Underlying Primitive

Garbled circuits, OT

OT extension, OPRF, VOLE

Circuit + specialized sub-protocols

Communication Complexity

O(n log n) to O(n²)

O(n) to O(n log n)

Varies by composition

Computational Overhead

High (circuit garbling/evaluation)

Low to moderate (symmetric-key ops)

Moderate

Supports Arbitrary Functions

Malicious Security

Achievable with overhead

Native in many protocols (e.g., KKRT)

Depends on composition

Best for Unbalanced Sets

Round Complexity

Constant (2-3 rounds)

2-4 rounds typical

2-4 rounds typical

Maturity & Tooling

Moderate (MPC frameworks)

High (dedicated libraries)

Low (custom engineering)

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.