Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Private Join and Compute

Private Join and Compute is a cryptographic protocol that allows multiple parties to privately join their datasets and compute aggregate statistics without revealing individual data points.
Chainscore © 2026
definition
PRIVACY-PRESERVING ANALYTICS

What is Private Join and Compute?

Private Join and Compute (PJC) is a cryptographic protocol enabling collaborative data analysis between multiple parties without exposing their raw, sensitive datasets.

Private Join and Compute is a multi-party computation (MPC) protocol that allows two or more parties to perform a private set intersection (PSI) and then run computations on the overlapping data. The core innovation is that it reveals only the final, aggregated result—such as a sum, average, or count—while keeping the underlying individual data points and the membership of the intersection completely confidential. This makes it a powerful tool for privacy-preserving analytics, enabling entities like financial institutions, healthcare providers, or advertisers to collaborate on sensitive data with strong cryptographic guarantees.

The protocol operates in two distinct phases. First, the Private Join phase uses cryptographic techniques like homomorphic encryption or oblivious transfer to identify common identifiers (e.g., user IDs) across the datasets without revealing which specific identifiers are shared or unique to each party. Second, the Compute phase performs calculations on the aligned, encrypted data associated with those matched identifiers. For example, a bank and a retailer could compute the total spending of their shared customers on a specific product category without either party learning the other's transaction details or the identities of non-overlapping customers.

Key technical components include additive homomorphic encryption, which allows arithmetic operations on ciphertexts, and diffie-hellman key exchange principles for secure identifier matching. The protocol is designed to be non-interactive after the initial setup, meaning the parties do not need to be online simultaneously for the computation phase. This architecture is critical for scalability and practical deployment in business environments where data sovereignty and regulatory compliance (like GDPR or CCPA) are paramount.

A primary use case is federated learning and model training, where multiple organizations can improve a machine learning model using their combined data without centralizing it. Other applications include fraud detection across banks, secure advertising attribution between publishers and advertisers, and cross-institutional medical research. By providing a verifiable, trust-minimized framework for data collaboration, Private Join and Compute addresses a fundamental tension between data utility and individual privacy in the digital economy.

Implementations of Private Join and Compute, such as Google's open-source library, abstract the complex cryptography into developer-friendly APIs. The protocol's security model typically assumes semi-honest (honest-but-curious) adversaries, meaning participants follow the protocol but may try to learn extra information from the messages they receive. For scenarios requiring security against malicious actors, additional zero-knowledge proofs or commitment schemes can be integrated, though this often increases computational overhead.

how-it-works
PRIVACY-PRESERVING ANALYTICS

How Private Join and Compute Works

Private Join and Compute (PJC) is a cryptographic protocol that enables two or more parties to perform computations on the combined data of their private datasets without revealing the underlying raw data to each other.

The protocol begins with a Private Set Intersection (PSI) phase, where participating parties—such as a blockchain oracle and a data provider—securely identify the common identifiers (e.g., user IDs or wallet addresses) present in both of their datasets. This is achieved using cryptographic techniques like homomorphic encryption or oblivious transfer, which allow the parties to learn only the intersection of their sets, not the elements unique to the other party. This ensures that no private information about non-intersecting records is leaked during the initial matching process.

Following the secure join, the protocol enters the compute phase. The parties perform computations, such as sums, averages, or custom aggregations, exclusively on the aligned data from the intersection. Critically, all computations are performed on encrypted data or through secure multi-party computation (MPC) protocols. This means that while the statistical result (e.g., the average transaction value for a shared user cohort) is revealed, the individual data points contributing to that result remain confidential and are never exposed in plaintext to the other party.

A practical application is in DeFi credit scoring, where a lending protocol (Party A) holds on-chain transaction histories and a traditional credit bureau (Party B) holds off-chain financial data. Using PJC, they can confidentially match users present in both systems and compute a combined risk score without Party A seeing the raw credit history or Party B seeing the specific wallet transactions. The protocol's security guarantees are rooted in well-established cryptographic assumptions, making it resilient against attempts to infer private inputs from the output.

The architectural implementation often involves a client-server model or a peer-to-peer MPC network. One common pattern uses additively homomorphic encryption, where data is encrypted in such a way that mathematical operations on the ciphertexts yield an encrypted result that, when decrypted, matches the result of operations on the plaintexts. The final decryption key may be held by a single party or require collaboration, depending on the trust model. This enables functions like SUM(encrypted_value_A + encrypted_value_B) to be computed securely.

In the blockchain context, PJC is a foundational primitive for oracle systems like Chainlink Functions, enabling smart contracts to request and use confidential data for on-chain logic. It solves the critical dilemma of needing to compute over sensitive data for decentralized applications—such as calculating median prices from private trade feeds or KYC/AML checks—while upholding the privacy mandates of data providers and end-users, thereby unlocking new classes of confidential on-chain computations.

key-features
PRIVATE JOIN AND COMPUTE

Key Features

Private Join and Compute is a cryptographic protocol that enables secure multi-party computation on overlapping datasets without revealing the underlying private data.

01

Privacy-Preserving Data Union

The protocol allows multiple parties to securely join their private datasets based on a common identifier (e.g., a user ID). The core innovation is that the raw data from each party is never revealed to the others. Only the intersection of the datasets is identified and used for computation, while non-matching records remain completely private.

02

Secure Multi-Party Computation (MPC)

Once the private join is established, the protocol performs computations on the combined data using Secure Multi-Party Computation (MPC). This allows functions like sum, average, or model training to be executed on the joint dataset. The computation's result is revealed, but the individual inputs from each party remain encrypted and confidential throughout the process.

03

Cryptographic Foundations

The protocol is built on established cryptographic primitives:

  • Homomorphic Encryption: Enables computations on encrypted data.
  • Private Set Intersection (PSI): Discovers common elements in private sets.
  • Zero-Knowledge Proofs (ZKPs): Can be used to verify computations were performed correctly without revealing data. These tools ensure the process is both cryptographically secure and verifiable.
04

Real-World Applications

This technology unlocks collaboration in sensitive domains:

  • Financial Compliance: Banks can jointly screen transactions for money laundering without sharing customer lists.
  • Healthcare Research: Hospitals can aggregate patient data for studies while preserving HIPAA/GDPR compliance.
  • Advertiser Analytics: Competing brands can measure campaign reach across platforms without exposing user-level data.
05

Contrast with Traditional Methods

Unlike traditional data sharing, Private Join and Compute avoids major pitfalls:

  • No Trusted Third Party: Eliminates the need for a central data custodian.
  • Minimized Data Exposure: Only the necessary aggregated output is revealed, not the raw datasets.
  • Regulatory Alignment: Designed to satisfy data minimization and purpose limitation principles in regulations like GDPR.
examples
PRIVATE JOIN AND COMPUTE

Examples and Use Cases

Private Join and Compute (PJC) is a cryptographic protocol enabling collaborative data analysis without exposing the underlying raw data. These examples illustrate its practical applications across industries.

03

Supply Chain Optimization

Competing companies in a supply chain can privately analyze combined logistics data to identify systemic inefficiencies. They can compute metrics like:

  • Average delivery times across all partners
  • Bottleneck identification without revealing proprietary routing or cost data
  • Aggregate demand forecasting using encrypted sales data from multiple retailers
04

Ad Campaign Measurement

An advertiser can measure the effectiveness of a campaign by joining their conversion data with a platform's ad exposure data, without either party learning the other's full dataset. This enables calculating crucial Return on Ad Spend (ROAS) metrics and attribution models in a privacy-preserving manner, addressing increasing regulatory constraints.

05

Academic Collaboration

Universities can collaborate on research involving proprietary or sensitive data. For instance, economics departments can join encrypted datasets on corporate financials and employment records to study wage trends, computing aggregate results without disclosing the underlying confidential information from each institution's private surveys.

06

Cross-Organizational Security Threat Intelligence

Companies can privately share and compute over indicators of compromise (IoCs) like malicious IP addresses or file hashes. Using PJC, participants can determine if an attack targets multiple organizations without revealing which specific threats are in their own, potentially sensitive, threat logs. This enables a more effective collective defense.

PRIVACY-PRESERVING COMPUTATION

Comparison with Related Techniques

A comparison of Private Join and Compute with other cryptographic techniques for secure multi-party data analysis.

FeaturePrivate Join and ComputeFully Homomorphic Encryption (FHE)Secure Multi-Party Computation (MPC)Zero-Knowledge Proofs (ZKPs)

Primary Function

Join private datasets & compute on intersection

Compute on encrypted data

Jointly compute a function over private inputs

Prove a statement's truth without revealing data

Data Input Format

Encrypted datasets (CSVs, tables)

Encrypted ciphertexts

Secret-shared values among parties

Witness (private data) and statement

Output Visibility

Aggregate results to all parties

Encrypted result to data owner

Designated output to one or all parties

Proof verifiable by any party

Computational Overhead

High for join, moderate for compute

Very High

High (communication rounds)

High (proof generation), Low (verification)

Suitable For

Analytics on aligned records (e.g., cohort analysis)

Outsourced computation on encrypted data

Secure auctions, voting, benchmarking

Identity verification, transaction privacy

Reveals Intersection?

No, only its size & aggregated metrics

N/A

Depends on protocol design

No, only the proof outcome

Cryptographic Base

Partially Homomorphic Encryption, PSI

Lattice-based cryptography

Secret sharing, Garbled circuits, OT

Elliptic curves, SNARKs/STARKs

security-considerations
PRIVATE JOIN AND COMPUTE

Security Considerations and Limitations

While Private Join and Compute (PJC) enables secure multi-party computation, its implementation involves critical trade-offs and assumptions that must be understood.

01

Trust in Cryptographic Assumptions

The security of PJC protocols relies on computational hardness assumptions, such as the difficulty of solving the Discrete Logarithm Problem or breaking homomorphic encryption. A future breakthrough in quantum computing or algorithmic cryptanalysis could potentially compromise the privacy guarantees, rendering previously private data exposed.

02

Input Validation & Garbage-In-Garbage-Out

PJC guarantees privacy of the computation, not the correctness or quality of the inputs. Malicious or erroneous data submitted by a participant will corrupt the final result. The protocol cannot inherently distinguish between a legitimate private value and a fabricated one, leading to a garbage-in-garbage-out scenario where the output is private but meaningless or malicious.

03

Limitations of the Trusted Dealer Model

Many PJC setups use a Trusted Dealer to generate and distribute secret keys or parameters. This creates a single point of failure and a trust assumption. If the dealer is compromised or acts maliciously, they can undermine the entire system's security. Trusted Execution Environments (TEEs) are sometimes used to mitigate this, but introduce their own hardware-level attack vectors.

04

Information Leakage from Output

Even with encrypted inputs and computation, the final output itself can reveal sensitive information. For example, computing a joint average of salaries reveals the average, which participants may consider confidential. Differential privacy techniques can be layered on top to add statistical noise and bound the information leakage, but this reduces output accuracy.

05

Performance & Scalability Overhead

The cryptographic machinery of PJC incurs significant computational and communication overhead compared to plaintext computation. Operations like homomorphic encryption or multi-party computation rounds can be orders of magnitude slower and require substantial bandwidth. This limits the complexity of functions that can be practically computed and the size of the datasets involved.

06

Collusion Resistance Limits

PJC protocols are designed to be secure against a threshold number of malicious participants (e.g., "secure against t-out-of-n collusion"). If more than the threshold collude and pool their secret shares or keys, they can reconstruct other participants' private data. The system's security model must clearly define and enforce this adversarial assumption.

technical-details
CRYPTOGRAPHIC PROTOCOL

Private Join and Compute

A cryptographic protocol that enables collaborative data analysis between multiple parties without revealing their underlying private datasets.

Private Join and Compute (PJC) is a cryptographic protocol that enables two or more parties to compute aggregate statistics over the intersection of their private datasets without revealing the individual, non-matching data entries. It combines a private set intersection (PSI) protocol with homomorphic encryption or secure multi-party computation (MPC). The core process involves parties first privately identifying which records they have in common (the 'join'), and then performing computations—such as sums, averages, or counts—on the values associated with those matched records (the 'compute'), all while keeping the raw input data encrypted.

The protocol's security model ensures that participants learn only the final aggregated result and potentially the size of the dataset intersection, but no other information about the other party's data. This makes it particularly valuable for scenarios requiring privacy-preserving collaboration, such as fraud detection across financial institutions, secure analytics for advertising campaign measurement between platforms and publishers, or medical research where hospitals wish to combine patient data for studies without sharing personally identifiable information (PII).

Technically, a common implementation uses additively homomorphic encryption, like the Paillier cryptosystem. In this setup, one party encrypts its dataset identifiers and associated values. The other party, using cryptographic techniques like oblivious transfer or bloom filters, can determine which identifiers match without learning the identifiers themselves. It then performs computations on the encrypted values, returning an encrypted result that only the first party can decrypt. This ensures the second party never sees plaintext data from the first.

In blockchain and Web3 contexts, PJC enables privacy-preserving decentralized applications (dApps). For instance, it can allow a decentralized identity provider to verify a user's credentials against a private allowlist held by an institution without either party revealing their full lists. It is also foundational for confidential decentralized finance (DeFi) operations, where parties might need to prove creditworthiness or compute risk metrics based on private transaction histories held across different chains or institutions.

The primary challenges for Private Join and Compute involve balancing computational overhead and communication complexity, which can be significant for large datasets, and carefully defining the trust model and adversarial assumptions (e.g., semi-honest vs. malicious participants). Despite these challenges, it represents a critical tool for enabling data collaboration in a privacy-first digital ecosystem, moving beyond simple data sharing to secure, computation-centric partnerships.

PRIVATE JOIN AND COMPUTE

Frequently Asked Questions

Private Join and Compute (PJC) is a cryptographic protocol that enables collaborative data analysis between multiple parties without exposing the underlying raw data. It is a cornerstone of privacy-preserving computation in Web3 and enterprise contexts.

Private Join and Compute (PJC) is a cryptographic protocol that allows two or more parties to combine their private datasets and perform computations on the overlapping data without revealing any individual data points not in the intersection. It works by using a combination of private set intersection (PSI) and secure multi-party computation (MPC). First, PSI allows the parties to privately discover the common identifiers (e.g., user IDs) across their datasets. Then, MPC techniques are applied to perform computations—such as sums, averages, or machine learning model training—on the attributes associated with those matched identifiers, ensuring the raw data from each party remains encrypted and confidential throughout the process.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Private Join and Compute: Privacy-Preserving Data Protocol | ChainScore Glossary