🏠 Home
~3 min read
Whale Tracking: Secure Satellite Communication Using the Bobb Protocol

Whale Tracking: Secure Satellite Communication Using the Bobb Protocol

Simulating Satellite-Based Communication Networks for Real-Time Whale Tracking and Marine Conservation

Introduction

This project implements the Bobb Protocol to enable secure and efficient data transmission through Low Earth Orbit (LEO) satellites. By simulating whale tracking using Raspberry Pi devices, the project showcases a satellite communication model for real-time data transfer in challenging open-sea environments.

The system is primarily designed for marine researchers and conservationists to monitor whale behavior, migration patterns, and their environmental responses using waterproof IoT sensors. The simulation incorporates core security features such as ECDH key exchange, AES-GCM encryption, and HMAC for integrity verification.

  • Use Case: Humpback Whales (25-30% surface time for communication)
  • Network Simulation: Raspberry Pis act as satellites, performing device discovery and multi-hop routing.
  • Key Algorithms: ECDH for key exchange, AES-GCM for encryption, and HMAC for verification.

Technical Workflow

1. Whale Data Collection and Communication

The whale tracking system uses waterproof IoT devices equipped with sensors to gather real-time parameters:

  • Geographical Coordinates: Latitude and Longitude
  • Depth: Water depth measured in meters
  • Speed: Whale movement speed (m/s)
  • Heart Rate: Measured heartbeats per minute
  • Water Temperature: Current sea temperature
  • Heading: Whale directional heading in degrees

The IoT device transmits this data to the nearest LEO satellite using the Bobb Protocol.

Example Data Format:

{ "whale_id": "whale-001", "timestamp": 1697083106, "latitude": 34.56, "longitude": -120.45, "depth": 200, "speed": 3.2, "heart_rate": 50, "energy_level": 80, "water_temperature": 18.5, "heading": 120.5 }

2. Device Discovery in Simulated LEO Network

In real LEO systems, satellites rotate and establish connections using line-of-sight. To simulate this:

  • Raspberry Pis ping all IPs in a local network range.
  • Devices running the Bobb Protocol respond and are added as neighbors.
  • Dynamic updates include satellites going out-of-range or coming into range.

Discovery Code Example:

def discover_satellites(ip_range): discovered = [] for ip in ip_range: if ping(ip): if verify_bobb_protocol(ip): discovered.append(ip) return discovered

Bobb Protocol Workflow

1. Satellite Handshake

The protocol begins with a handshake:

  • IoT devices exchange public keys and metadata (IP, Ports).
  • Trust establishment occurs to ensure secure communication.

Example Handshake Sequence:

Device A: "Request Connection"
Device B: "Public Key, IP, Metadata"
Device A: "Shared Secret via ECDH"

2. Key Exchange and Encryption

Secure communication relies on the Elliptic Curve Diffie-Hellman (ECDH) algorithm. After the handshake:

  • ECDH generates a shared secret key between the IoT device and satellite.
  • The secret is passed through HKDF to derive an AES-GCM encryption key.

Code for ECDH Key Exchange:

shared_key = ECDH.exchange(device_private_key, satellite_public_key) encryption_key = HKDF(shared_key)

3. Multi-Hop Routing and Heartbeats

If the satellite cannot directly reach the base station, it routes data through neighboring satellites. This routing dynamically adjusts based on heartbeat messages:

  • Heartbeat: Sent every 30 seconds to check connectivity.
  • Timeout: 3 consecutive missed heartbeats mark a satellite as out-of-range.
  • Constellation Update: Neighbors share an updated network map during heartbeats.

Heartbeat Code Example:

def send_heartbeat(neighbors): for neighbor in neighbors: if not ping(neighbor): mark_as_disconnected(neighbor) else: update_constellation(neighbor)

Security Features

The Bobb Protocol ensures robust security through:

  • Encryption: AES-GCM secures data transmission.
  • Key Exchange: ECDH for shared key generation.
  • Integrity Verification: HMAC detects tampering.

Example AES-GCM Encryption:

from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes encryptor = Cipher(algorithms.AES(encryption_key), modes.GCM(nonce)).encryptor() encrypted_data = encryptor.update(data) + encryptor.finalize()

Challenges and Solutions

  • Dynamic Routing: Ensuring seamless communication when neighbors disconnect.
  • Latency Simulation: Introducing realistic delays using randomness.
  • Data Generation: Creating synthetic but realistic whale sensor data.

Key Highlights

  • Dynamic multi-hop routing for satellite communication.
  • Advanced encryption using AES-GCM and ECDH for key exchange.
  • Heartbeat messages for real-time constellation management.
  • Robust simulation using Raspberry Pi devices for LEO satellites.

GitHub Repository

Access the full codebase and detailed documentation here: GitHub Repository

Developed with a focus on secure communication and marine conservation research. Explore more on GitHub.