Developers behind Pinscope found a way to keep an ESP32 securely connected without the memory cost of TLS. The approach uses the Noise protocol instead.

The team behind Pinscope faced a constraint: they needed an ESP32 to stay securely connected to a server, but the chip did not have enough spare RAM to run TLS alongside everything else it was doing. Their answer was a workaround that delivers remote access without TLS.
The team observed that they did not need the full range of TLS features. TLS is designed to connect any client and server securely using certificates, which makes it heavy for a device that only talks to a single server for maintenance. What the device really needed was to confirm it was speaking with the genuine server, to make sure credentials travelled encrypted, and to prevent messages from being replayed, read, reordered, or altered in transit.
To meet these goals, the team chose the Noise protocol, specifically the Noise_NK_25519_ChaChaPoly_SHA256 pattern. In this setup the server holds a static key that the device already knows. Only the holder of the matching private key can complete the handshake, so the device can verify it is talking to the real server. According to the report, the full handshake takes about 0.3 seconds on the ESP32 and sends just 100 bytes over the wire.
The memory savings are significant. Staying connected via TLS required 23.6 KB of RAM on the ESP32, while the Noise-based approach reduced that to 9.4 KB. Developers who need to ease the load on a remotely connected ESP32 may find this work useful, and the project files are available on GitHub.
Source: Hackaday






