# Multiparty Computation: Collaborative Execution Without Centralized Machines
Most computation that you execute is either done on a single machine or in a datacenter. In the case of a single machine, you are in control of what happens to the data and how it's used. When your program runs on a remote machine in a datacenter, you still technically control the data but must trust the datacenter provider's physical security measures to ensure your data remains secure. And when your program executes across multiple remote machines, possibly in several datacenters, you have to extend that trust across all these machines and facilities even though you ostensibly have control over your data. As an industry, we've spent the past 20-odd years building vast cloud-based architectures to give developers and companies access to substantial computing power. But the biggest tradeoff has been trusting these service providers with your data. Now, there's a better way to maintain control of your data while drastically reducing your dependence on these service providers: Multiparty Computation (MPC).
Multiparty computation enables you to write programs that are inherently distributed across several machines while ensuring each machine doesn't know the inputs into the program. MPC allows you to decouple where and how you perform computation from the need to store your data in the cloud. This goes beyond simply allowing you to store data wherever and however you choose—it even allows you to forgo storing any data altogether, giving your users more control over their own data while still enabling you to compute using that data.
## How MPC Works


MPC accomplishes this through an interactive process between the client (who owns the data) and the distributed set of machines that will perform the computation. The key steps are:
1. The client first encrypts their data locally using their own encryption mechanism. This ensures the client maintains control over their data.
2. The client then sends the encrypted data to the distributed machines that will perform the computation. At this point, the client can go offline—they're no longer directly involved in the computation.
3. The distributed machines, which you as the developer have pre-programmed with the agreed-upon function to compute, execute the computation on the encrypted data. They do this through a secure, interactive process among themselves, without ever having access to the unencrypted data.
4. Once the computation is complete, each machine sends its share of the encrypted results back to the client.
5. Finally, the client can decrypt the final result using their own decryption mechanism and make use of it as needed.
While the above flow shows multiple distributed machines, many practical implementations use just two parties (known as 2PC) - such as a client and a server - while maintaining the same security properties.
This MPC approach allows the client to maintain control over their data while still enabling computation to be performed on that data in a scalable, distributed manner. The client never has to relinquish their unencrypted data, and the distributed machines performing the computation never have direct access to the unencrypted inputs. This provides a privacy-preserving way to leverage distributed compute resources.
## The Developer Experience
As a developer implementing MPC, you're responsible for designing and writing the computation logic that will be executed across the distributed machines. This is the same function you pre-program into the MPC network as mentioned earlier. You'll use a specialized programming model or language designed for MPC, and your code will be compiled to run in a distributed, secure execution environment. You can choose to deploy and manage this infrastructure yourself or leverage third-party MPC services that provide the necessary tooling and runtime.
MPC allows you to offer scalable compute while ensuring privacy for your users. This approach has an immediate benefit: you no longer need to consider the storage and compliance costs for storing user data in your application architecture. This allows you to build scalable, privacy-first applications without sacrificing user experience or the safeguarding of user data.
## The Future of MPC
MPC research has been ongoing for over 30 years, and many advances have been made to make it more accessible to developers. Adopting MPC requires you to think in a fundamentally new way while learning new tools: application development and systems design architecture without access to the underlying data, with communication costs as the main limiting factor. As users become increasingly aware of how their data is being used across their favorite internet services, the tradeoffs involved in building applications with MPC are becoming increasingly worthwhile.