> For the complete documentation index, see [llms.txt](https://unitynetworkai.gitbook.io/unity-network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](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).

# 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.
