Secure Firmware Updates for LPWAN Devices

Introduction
The IoT security market will reach $84 billion by 2028 (Grand View Research), yet 62% of deployed devices lack proper update mechanisms (2024 Palo Alto Networks threat report). Critical challenges include:
- 50% longer update times from encryption overhead
- Bricking risks during power failures
- Malicious payload injection through RF side-channels
Briltech’s security lab has audited 40+ OTA implementations to develop this hardened framework.
Section 1: Cryptography for Constrained Devices
1.1 Algorithm Performance Comparison
| Method | Code Size (KB) | RAM (KB) | Update Time* |
|---|---|---|---|
| AES-128 | 3.2 | 0.5 | 1.0x |
| ChaCha20 | 4.1 | 0.8 | 1.2x |
| ECC P-256 | 8.7 | 2.4 | 3.5x |
*For 100KB image @ 50kbps
Case Study: Our dual-crypto approach in smart meters:
- AES-128 for bulk encryption (fast)
- ECC-256 for signatures (strong)
1.2 Secure Boot Implementation
void verify_update() {
if (sha3_256(firmware) != stored_hash) abort();
if (ecdsa_verify(sig, pubkey) == 0) abort();
flash_write(backup_sector); // Atomic switch
} Section 2: Update Reliability Engineering
2.1 Power-Failure Protection
| Strategy | Overhead | Recovery Capability |
|---|---|---|
| Dual Bank | +100% Flash | Full rollback |
| Delta Updates | 30% smaller | Partial recovery |
| CRC-32 Checks | 2% CPU | Detection only |
Briltech Recommendation:
- 256KB minimum flash for dual-bank updates
- Supercap backup (holds 500ms during brownout)
2.2 Bandwidth Optimization
- BSDiff binary patching (85% smaller updates)
- Compressed headers (CBOR encoding)
- Selective module updates
Section 3: Attack Surface Mitigation
3.1 Common Vulnerability Checklist
- Downgrade attacks (store version in secure element)
- Replay attacks (monotonic counters + 24h timeout)
- Timing attacks (constant-time crypto ops)
3.2 Regulatory Compliance
- ETSI TS 103 645 (IoT baseline security)
- NIST IR 8259A (core cybersecurity features)
- GDPR Article 32 (data integrity requirements)


