# ECDH Key Exchange for Secure Encryption Key Generation

1. **Key Pair Generation on Each Node**:
   * Each node generates a private-public key pair using **Elliptic Curve Diffie-Hellman (ECDH)**. The private key is kept secure on the node, while the public key is shared with Unity Network’s central server.
2. **Public Key Sharing**:
   * Each node sends its serialized public key to Unity Network’s central server over a secure communication channel (e.g., HTTPS or TLS). The central server will use this to establish the shared key.
3. **Central Server Key Pair Generation**:
   * Unity Network’s central server also generates its own private-public key pair using ECDH. It shares its public key with each node, allowing both sides to compute a shared secret key.
4. **Shared Secret Key Computation**:
   * Each node and the central server use their respective private keys and the other’s public key to compute a **shared secret key**. This shared secret will be used to derive a symmetric encryption key for securing the model updates.
5. **Symmetric Encryption Key Derivation**:
   * The shared secret key is passed through a **Key Derivation Function (KDF)** to produce a symmetric encryption key. This key is unique to each node-server pair, ensuring that updates are securely encrypted before transmission.


---

# 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://unitynetworkai.gitbook.io/unity-network/model-training/secure-training-and-updates/secure-transmission-of-encrypted-updates/ecdh-key-exchange-for-secure-encryption-key-generation.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.
