# Private Key Sharding

Mozi enhances security by implementing Private Key Sharding, a method that splits a user's private key into multiple shards. These shards are distributed across secure locations, ensuring that no single entity has access to the complete key.

#### How It Works

1. **Key Generation**:
   * When a user creates a wallet, Mozi generates a private key.
   * This key is then divided into multiple shards using Shamir's Secret Sharing algorithm.
2. **Sharding Distribution**:
   * The shards are securely distributed across multiple servers and user-controlled devices.
   * No single server or device holds the entire private key.
3. **Transaction Authorization**:
   * To authorize a transaction, Mozi retrieves the necessary shards.
   * A quorum of shards is combined to reconstruct the private key temporarily for transaction signing.
   * Once the transaction is signed, the key is immediately discarded.
4. **Security Benefits**:
   * Reduces the risk of key compromise, as an attacker would need access to multiple shards from different locations.
   * Enhances fault tolerance, allowing for recovery even if some shards are lost.
5. **User Control**:
   * Users can opt to store certain shards on their personal devices for added control.
   * Mozi provides options to manage shard recovery and backup.

### Security Features

* **Encryption**: All data transmitted and stored within Mozi is encrypted using industry-standard protocols.
* **Private Key Sharding**: Provides an additional layer of security by distributing private key shards across multiple locations.
* **Backup and Recovery**: Secure backup options to ensure you can recover your wallet in case of device loss.


---

# Agent Instructions: 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:

```
GET https://mozi-1.gitbook.io/mozi/protocol/private-key-sharding.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
