Skip to main content
For the complete documentation index, see llms.txt.

Hubble Network developer documentation: integrate Bluetooth devices with terrestrial and satellite connectivity.

SDK Encryption

Data integrity is ensured through encryption, with secure key management on the device, and message security is protected by an authentication tag included in every BLE payload. Each packet can also carry a customer-defined encrypted payload up to the supported size limit.


How It Works​

An application will get the encrypted advertisment data using hubble_ble_advertise_get in the Hubble Device SDK. This function performs the following steps to prepare the advertisement data:

  1. Derives the device ID, nonce, and encryption key using the KBKDF.
  2. Sets the BLE address using the derived device ID and sequence number.
  3. Encrypts the payload data using the device encryption mode (AES-256/AES-128 in CTR mode, or AES-128-EAX) with the derived encryption key and nonce.
  4. Computes the CMAC of the encrypted payload data to generate an authentication tag for AES-256/AES-128 CTR mode.
  5. Copies the authentication tag and encrypted data into the advertisement buffer.

Device Key Management​

Hubble employs a secure key management architecture to ensure the integrity and confidentiality of device communications. The Hubble Device SDK can be used to perform this functionality on the devices.

Key Derivation​

  • Master Key (Km): A root key stored securely in Hubble’s backend.
  • Derived Keys:
    • Device Key (Ke): Used for generating unique device identifiers.
    • Nonce Key (Kn): Ensures unique encryption for each message.
    • Encryption Key (Kd): Secures message payloads.
  • Derived keys are generated using AES-CMAC in counter mode, compliant with NIST 800-108.

Key Rotation​

  • Frequency: Keys rotate on every sequence number rollover to prevent reuse.
  • Process:
    • A new encryption key and nonce are derived for each message based on the sequence number.
    • This ensures compliance with AES-CTR mode security requirements.

When using "UNIX_TIME" counter source, i.e. time-based encryption, you must update advertising payload on your device at least once every 24 hours to maintain ID rotation.

Replay Protection​

  • Sequence Numbers:
    • Incremented with each transmitted packet.
    • Reset upon rollover, with the rollover counter incremented.
  • Server Validation:
    • The server authenticates packets against the last seen sequence number and rollover counter.
    • New packets are validated within a permissible range of sequence numbers to account for minor desynchronization.