Network Encryption

Network encryption allows you to secure communication between the Nexus Controller and torch servers using AES-256 CBC encryption. This feature is optional and can be enabled at any time.

Overview link

Nexus uses GUID-based encryption keys to protect all network traffic between the controller and connected torch servers. When enabled, every message is transparently encrypted before transmission and decrypted upon receipt.

When to Enable Encryption link

Enable encryption if:

Encryption not necessary if:

Quick Start link

The fastest way to enable encryption:

  1. Controller SettingsNetwork Configs
  2. Check “Enable Network Encryption”
  3. Click “Generate New Key” button
  4. Copy the generated GUID
  5. On each torch server, check “Enable Network Encryption”
  6. Paste the same GUID in the “Network Encryption Key” field
  7. Restart controller and all torch servers

Detailed Setup Guide link

Step 1: Enable on Controller link

Location: Controller UI → Settings → Network Configs

  1. Find the “Network Configs” section
  2. Locate the “Enable Network Encryption” checkbox
  3. Check the box to enable
  4. Click the “Generate New Key” button
    • This creates a random GUID encryption key
    • The key automatically populates in the “Network Encryption Key” field
  5. Copy this GUID - you’ll need it for all torch servers

Example Key:

c7a2f5d8-1e9c-4b3a-9f2d-8e7c3a1b5f2d

Step 2: Configure Torch Servers link

Location: Torch Server Plugin UI → Network Configs section

For each torch server connecting to this controller:

  1. Open the torch server’s Nexus Global plugin panel
  2. Locate the “Enable Network Encryption” checkbox
  3. Check the box to enable
  4. Find the “Network Encryption Key” field
  5. Paste the EXACT same GUID you copied from the controller
  6. Verify the key matches character-for-character

Step 3: Restart Services link

  1. Restart the Nexus Controller
  2. Restart all torch servers
  3. Check controller and torch logs for “Network encryption initialized” messages

Example log entry:

[INFO] Network encryption initialized on controller
[INFO] Network encryption enabled for publisher
[INFO] Network encryption enabled for subscriber

Important Requirements link

Key Matching link

Warning

All connected torch servers MUST use the EXACT SAME encryption key for successful communication. If keys don't match, servers will fail to communicate and you'll see decryption errors in logs.

Consequences of mismatched keys:

Changing the Key link

If you need to change the encryption key:

  1. On the controller, generate a new key or set a new one manually
  2. Update all torch servers with the new key
  3. Restart controller and all torch servers in sequence
  4. Verify logs show encryption re-initialized

Disabling Encryption link

To disable encryption:

  1. On the controller: Uncheck “Enable Network Encryption”
  2. On all torch servers: Uncheck “Enable Network Encryption”
  3. Restart controller and all torch servers
  4. System will operate without encryption (no performance overhead)

How Encryption Works link

Encryption Algorithm link

Message Flow (Encrypted) link

Publishing (Encrypt):

Message Created
    ↓
Serialized to bytes
    ↓
Key parsed from GUID
    ↓
AES-256 encryption applied
    ↓
IV prepended to ciphertext
    ↓
Transmitted over network

Receiving (Decrypt):

Encrypted message received
    ↓
Extract IV from message
    ↓
Retrieve encryption key
    ↓
AES-256 decryption applied
    ↓
Deserialize decrypted bytes
    ↓
Message processed

Transparency link

Encryption is completely transparent to plugins and sync systems:

Troubleshooting link

“Failed to decrypt message” Error link

Cause: Encryption key mismatch between controller and server

Solution:

  1. Verify the key on controller (Settings → Network Configs)
  2. Compare with key on each torch server
  3. Ensure keys match exactly (copy/paste if needed)
  4. Restart services and retry

Server Won’t Connect link

Possible causes:

Solution:

Performance Degradation link

Encryption overhead is minimal (typically <1-2% for typical message volumes). If you notice performance issues:

  1. Check if other factors are causing slowdown (network bandwidth, CPU)
  2. Monitor with debug mode enabled to see message throughput
  3. If encryption is not required, disable it: Uncheck on controller and all servers

Keys Don’t Match After Restart link

Solution:

  1. On controller: Click “Generate New Key” to create a fresh key
  2. Copy the new key
  3. Update all torch servers with the new key
  4. Restart all services

Best Practices link