Security

The XLRS protocol implements several security measures to ensure reliable and secure communication.

Pairing

The system uses a binding phrase-based pairing system.

  • Binding Phrase: A user-defined string (default: "FPV_BIND_2024").

    Coming Soon: Runtime binding configuration via WebUI (USB Serial) is planned, allowing you to change the binding phrase without recompiling firmware.

  • Binding UID: The binding phrase is hashed to create a unique binding UID.
  • Pairing Process:
    1. Both TX and RX must be configured with the same binding phrase.
    2. During pairing, devices exchange the binding UID.
    3. Upon successful validation, they generate a shared encryption key.
    4. The pairing key and device IDs are stored in EEPROM.

Encryption

  • Algorithm: AES-128 encryption.
  • Key: A 16-byte shared key derived from the pairing process.
  • Scope: Channel data (MSG_CHANNELS) is encrypted.

Authentication

  • Algorithm: HMAC-SHA256.
  • Truncation: The HMAC is truncated to 4 bytes to fit within the packet size constraints.
  • Purpose: Ensures the integrity and authenticity of the message.

Replay Protection

  • Sequence Numbers: Each packet includes a sequence number.
  • Validation: The receiver validates the sequence number to prevent replay attacks.
  • Device ID: Each packet includes the sender's device ID (8 bytes) to prevent spoofing.