UNIFIED SECURE MULTI-TRANSPORT PROTOCOL

Bridge the IoT Security Gap.

USMP (Unified Secure Multi-transport Protocol) brings end-to-end encrypted, mutually authenticated, and forward-secret communication tunnels to ESP32, Arduino, and Python without the massive flash and RAM overhead of a full TLS stack.

USMP Handshake Trace
Live Telemetry Encrypter
Encrypted USMP Frame:
debug_session_monitorClient -> Server
>[ESP32] Initializing TCP connection to gateway.io:9000...
>[ESP32] TCP socket connected successfully.
>[ESP32] Generating ephemeral Curve25519 keypair...
>[ESP32] Keypair generated. Public Key pub_C derived.
>[ESP32] Sending PKT_HELLO (Type: 0x01, Length: 38 bytes) to Server...
Wire Frame Payload JSON:
{
  "header": {
    "magic": "0xABCD",
    "version": "0x01",
    "type": "PKT_HELLO (0x01)",
    "seq": 0
  },
  "payload": {
    "device_id": "04:a8:b1:f2:e9:6d",
    "pub_C": "4a28f89d10e5d9203e8a11f48c2b9a4f..."
  }
}
THE PROBLEM (The Compromise)

Stop choosing between performance and security.

For too long, IoT developers have been forced to compromise when connecting hardware.

Raw Sockets (TCP/UDP)

Extremely fast and lightweight, but completely open to eavesdropping, spoofing, and tampering.

Full TLS / DTLS

Rock-solid security, but massive. It consumes 60–100 KB of flash, wastes precious active RAM, slows down handshakes, and requires complex certificate authority (CA) infrastructures that are painful to manage on fleets of microcontrollers.

USMP fills this gap. It gives you production-grade cryptographic tunnels using a memory footprint so small it runs on standard breadboard controllers.

FeatureRaw SocketsTLS / DTLSUSMP
AuthenticationNone (Vulnerable)Certificate-based (Complex CA)Mutual Pre-Shared Key (HMAC-SHA256)
ConfidentialityNone (Plaintext)EnforcedEnforced (AES-256-GCM)
Flash Footprint~0 KB60 - 100 KB< 10 KB
Persistent RAM~0 KB20 - 40 KB112 Bytes
Handshake SpeedInstantSlow (Multiple Roundtrips)Fast (4-step, 10-30ms)
Forward SecrecyNoYesYes (X25519)
SECURITY ASSURANCE

Built-in Hardening. No "Insecure Mode."

Unlike other IoT protocols that treat encryption as an optional flag, USMP enforces modern cryptographic pipelines by default.

Mutual Authentication (HMAC-SHA256)

Both the device and the gateway prove their identity before a session is active. By using HMAC-SHA256 proofs bound to the handshake, you prevent Man-in-the-Middle (MITM) attacks. The pre-shared key (PSK) is never sent over the wire.

Perfect Forward Secrecy (X25519)

A new, ephemeral X25519 key exchange occurs at the start of every session. If the master PSK is leaked in the future, past recorded traffic remains completely secure and undecipherable.

Authenticated Encryption (AES-256-GCM)

All post-handshake payload data is encrypted. The GCM authentication tag ensures that if any part of the frame is modified or tampered with in transit, decryption fails instantly and the session drops.

Replay and Nonce Collision Protection

Strict, monotonic 32-bit sequence numbers are verified for every frame. AES-GCM nonces are constructed as seq (4 bytes) || session_id[0..7] to eliminate any risks of nonce collisions.

PHYSICAL LAYER AGNOSTIC

Decoupled from the network. Build once, run anywhere.

USMP runs at the session layer. It is designed to be completely transport-agnostic, wrapping your payloads inside a secure cryptographic envelope before handing it down to your interface.

TCP Sockets

Run secure, stream-oriented connections over standard TCP networks. Ideal for constant gateway reporting.

Production-ReadyWi-Fi / Ethernet

UDP Sockets

Secure your connectionless UDP packets. USMP includes transparent packet fragmentation, reassembly, and reliability overlays to ensure smooth delivery.

Production-ReadyLossy Networks

Hot-Swappable

Swap physical transport layers dynamically at runtime (e.g. fallback from Wi-Fi TCP to cellular UDP, or wired UART) without changing a single line of your application logic or session state configuration.

Runtime InterchangeFailover Ready

UART, BLE & RF

Secure local serial buses and wireless Bluetooth smart devices. You can wrap UART or BLE packets with the exact same cryptographic envelope using only 5 platform hooks.

Coming SoonLocal Serial / RF
DEVELOPER EXPERIENCE

Three function calls to secure your sockets.

Zero boilerplate. USMP handles state machines, key derivation, and cryptographic wrapping under the hood.

Platform Drivers

Consistently simple APIs across targets.

USMP is built in clean, portable C99 and compiled natively into wrappers for Arduino (C++) and Python (asyncio). This allows the gateway and the device to share a symmetrical, highly optimized protocol layer.

main.c
// 1. Initialize TCP or UDP transport
usmp_transport_tcp_init(&transport, "gateway.io", 9000);

// 2. Load credentials and connect
ctx.psk = my_secure_psk;
ctx.psk_len = 32;
usmp_connect(&ctx, &transport);

// 3. Send encrypted payloads safely
usmp_send(&ctx, (uint8_t *)"hello", 5);
RESOURCE BENCHMARKS

Compiled Binary Size on MCU (Flash bytes)

USMP Core Driver< 10 KB
TinyDTLS Stack48 KB
MbedTLS Stack (Full TLS Client)100 KB
* ROM sizes calculated using stripped release-optimized GCC compiler on Xtensa LX7 cores. RAM usage represents persistent active memory required to maintain connection states.
PERFORMANCE OVERVIEW

Engineered for resource-constrained environments.

Low-power microcontrollers lack the multi-megabyte pools of RAM required to maintain active TLS sockets. We built USMP to guarantee security targets within strict memory boundaries.

112 Bytes Persistent RAM

The entire session context uses just 112 bytes of SRAM. Once the handshake is complete, the driver performs zero dynamic heap allocations, completely eliminating the risk of memory fragmentation on long-running devices.

Zero CPU Idle Cost

All post-handshake encryption and decryption is backed by the ESP32’s hardware-accelerated cryptographic engine, completing operations in under 1 millisecond.

Built-in Fragmentation

Transparently chunk large payloads (up to ~1.8 KB) into 4 sequential 452-byte frames and reassemble them at the destination.

FAQ

Frequently Asked Questions

Clear up common questions about integration, security properties, and protocol operations.

TLS is excellent but too heavy for resource-constrained controllers. It occupies 60–100 KB of Flash and requires up to 40 KB of active RAM, along with complex root certificate (CA) verification. USMP was built specifically for microcontrollers, requiring under 10 KB of Flash and exactly 112 bytes of persistent RAM while maintaining comparable cryptographic guarantees.
Yes. USMP uses Mutual Pre-Shared Key (PSK) authentication via HMAC-SHA256. To ensure secrecy, an ephemeral X25519 key exchange occurs at the start of each session. Even if the pre-shared key is leaked later, past sessions cannot be decrypted (Perfect Forward Secrecy).
Do not hardcode the PSK in your source code. We recommend writing the PSK to the ESP32's secure, encrypted Non-Volatile Storage (NVS) partition or a dedicated hardware security module (HSM) during manufacturing.
Extremely low. Once the 4-step handshake completes, USMP uses symmetric AES-256-GCM encryption. The ESP32's on-chip hardware cryptographic engines accelerate this math, allowing packets to be encrypted/decrypted in under 1 millisecond with negligible battery draw.
Yes. USMP automatically fragments payloads larger than 452 bytes into up to 4 sequential frames (maxing out at ~1.8 KB) and reassembles them transparently on the receiving side.
QUICK INSTALLATION

Securing your fleet is just a command away.

Import the client library into your embedded compiler or spin up a server gateway in minutes.

$pip install usmp