> For the complete documentation index, see [llms.txt](https://ghostwareos.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ghostwareos.gitbook.io/docs/cryptography/mpc.md).

# MPC

<figure><img src="/files/PFMDzWDtE7I2eBm9REm6" alt=""><figcaption></figcaption></figure>

Multi-Party Computation, or MPC, is a cryptographic method that lets several independent parties compute something together without any one of them knowing the others’ private data. In GhostWare, MPC ensures that no single node ever has complete access to sensitive information, such as encryption keys or routing data.

Instead of storing or processing everything in one place, MPC splits data into multiple secret parts that only make sense when combined. Even if one node is compromised, the attacker learns nothing useful.

### Why It Matters

Traditional systems rely on central servers or custodians to handle private data. That creates single points of failure if one system is hacked or forced to reveal data, privacy is lost.

MPC removes that weakness. Each participant holds only a small piece of a secret, and no one can see the full picture. This structure protects GhostWare users even under pressure or attack.

MPC also supports **forward secrecy** even if future nodes are compromised, past data stays protected because keys are rotated and never exist in full anywhere.

### How It Works

1. **Secret Sharing**\
   Sensitive data, such as a private key, is split into random pieces called *shares*. Each share is useless on its own.
2. **Distributed Computation**\
   When a computation is needed, each node performs its part locally using its share. The network then combines the results to produce an output, such as a signature or validation, without revealing the underlying data.
3. **Threshold Security**\
   Only a minimum number of nodes (a *threshold*) need to cooperate to complete the computation. Fewer than that cannot reconstruct the secret.
4. **Automatic Rotation**\
   Keys and secrets can be refreshed periodically, creating new shares so that no long-term data exposure occurs.

### Use in GhostWare

* **Key Management:** Wallet and session keys are distributed across nodes rather than stored in one place.
* **Forward Secrecy:** Older sessions remain safe even if current relays are compromised.
* **Transaction Mixing:** Relays can shuffle transactions collaboratively without any one knowing the full route.
* **Secure Proof Generation:** MPC can be used to generate zero knowledge proofs without a trusted coordinator.

### Advantages

* **No Single Point of Trust:** Privacy depends on collective honesty, not one trusted operator.
* **Resilience Against Attacks:** Compromising one node does not expose users.
* **Built-In Redundancy:** The system continues to function even if some nodes go offline.
* **Combinable with ZK Proofs:** MPC and ZK proofs together create trustless, private computation with verifiable integrity.

### Simple Example

Imagine three servers share control of a key. Each holds one piece. When a transaction needs to be signed:

1. Each server performs a small mathematical step using its piece.
2. They combine their partial results to form a complete signature.
3. The key itself is never reconstructed it only exists in the final signature result.

This process is invisible to the user but provides massive security benefits.

### In GhostWare’s Design

MPC is the final layer that makes GhostWare’s privacy model complete. It turns the network into a cooperative system where no single party holds too much power.\
Even under legal, technical, or physical pressure, GhostWare remains private by design.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ghostwareos.gitbook.io/docs/cryptography/mpc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
