New Release: v1.0.1 (Stable)

USMP Protocol

Unified Secure Multi-transport Protocol. Highly optimized, secure, and transport-agnostic communication protocol. Designed from scratch for resource-constrained microcontrollers, bringing mutual authentication and AES-256-GCM encryption with just three function calls.

11.2 KBROM Footprint
0 BytesDynamic Heap RAM
3 FramesHandshake Duration
AES-GCMHardware Safe

Built for Extreme Environments

Standard security protocols (TLS, SSH) are too heavy for low-power MCUs. USMP fills this gap, offering robust modern cryptography with minimal resource overhead.

Zero Heap Allocation

Relies entirely on statically-sized static/stack buffers. Prevents heap fragmentation, ensuring year-round MCU uptime.

malloc() -> NULL safe

Transport Agnostic

Operates smoothly over TCP sockets, UDP datagrams, BLE attributes, raw UART, RS-485, or CAN bus.

Stream & Packet support

Mutual Authentication

Ensures both the server and client cryptographically verify each other before establishing a shared ephemeral session key.

Prevents Spoofing & MITM

Hardware Accelerable

Designed to map directly onto hardware acceleration blocks (AES/GCM) present on ESP32, STM32, and other SOCs.

AES-256-GCM / ChaCha20

Interactive Handshake Explorer

USMP initiates a secure session using Elliptic-Curve Diffie-Hellman (ECDH) mixed with a Pre-Shared Key (PSK). Click through the steps below to inspect how a session is established.

ClientServer
Client (ESP32/Arduino)Gateway Server (Python)
Simulated Frame Payload
JSON Representation
{
  "frame_type": "HANDSHAKE_HELLO",
  "protocol_version": "1.0.0",
  "client_ephemeral_pub": "04a8b1f2e96d...",
  "nonce": "4a28f89d10e5"
}

Integrates in Minutes

USMP is designed for simplicity. Initialize the session, bind to your transport, and start sending secure data.

Developer Experience

Clean, Expressive APIs

Whether you are compiling for pure C targets (like ESP-IDF or STM32), writing C++ sketches in Arduino, or setting up a gateway server in Python, USMP offers consistent APIs.

  • No dependency on huge standard libraries
  • Simple callback binding for custom physical transports
  • Includes built-in auto-retry & packet serialization
Read Installation Guide
// Initialize a USMP session (ESP-IDF / Pure C)
UsmpSession session;
usmp_init(&session, my_transport_write_callback);

// Perform secure mutual handshake
if (usmp_handshake(&session) != USMP_SUCCESS) {
    printf("Security handshake failed!\n");
    return;
}

// Send encrypted frames over any transport (UART, BLE, Sockets)
uint8_t payload[] = "telemetry_data";
usmp_send(&session, payload, sizeof(payload));

Flash ROM Usage (Kilobytes)

USMP (Core C)11.2 KB
TinyDTLS + CoAP48.0 KB
MbedTLS (v1.3 Client)180.0 KB
* ROM figures represent stripped release-optimized GCC compilations for the Xtensa LX7 (ESP32-S3) target. RAM figures are captured during active crypto payload framing cycles.
Performance Benchmarks

A Fraction of the Resource Cost

Standard TLS implementations require huge memory allocations for handshake buffers and crypt-state structures, which can trigger Out-Of-Memory crashes on small systems.

USMP bypasses the dynamic allocation altogether. Its static buffers fit comfortably in internal SRAM, even on low-cost microcontrollers.

Frequently Asked Questions

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

Yes, absolutely. USMP is completely transport-agnostic. It does not expect a socket connection. Instead, you register a simple write callback to transmit frames and call the receive handler when bytes arrive on your physical interface.
Replay protection is enforced via strict, cryptographically bound sequence numbering and session nonces. MITM is blocked by mutual authentication: during the handshake, both devices must prove ownership of the Pre-Shared Key (PSK) to successfully complete the ECDH key exchange.
Each encrypted frame adds exactly 28 bytes of overhead (12-byte IV for AES-GCM, 16-byte cryptographic authentication tag, and a 4-byte sequence identifier). This is drastically smaller than a TLS record or DTLS envelope.
Yes. While hardware-accelerated AES is most efficient on 32-bit cores (like ESP32 or ARM Cortex), USMP supports modular crypto backends. By swap-in ChaCha20-Poly1305 or light software routines, it runs efficiently on low-spec AVR/PIC devices.

Secure Your Embedded Sockets Today

Get started by reading our Quick Start guides, importing the library, or exploring the protocol design specs.