This video shows the MODBUS/TCP Security. The network library uses LWIP altcp (application layer TCP). This library combines SSL/TLS (Mbed TLS) with the original TCP library.
The modbus server uses Raspberry Pi Pico W, and the Clinet uses Node-RED and Raspberry Pi Pico W for testing. In this project, Wireshark is used to capture packets to compare the unencrypted ADU packets and the ADU packets encrypted by Transport layer security.