TLS
The protocol that encrypts a connection and lets each side check who the other is.
Transport Layer Security runs over a reliable byte stream such as TCP and provides confidentiality, integrity and authentication of the server (and optionally the client) using certificates and a handshake that agrees fresh session keys.
Examples
Moving the greenhouse broker from port 1883 to
mqtts://broker.local:8883hides payloads, usernames and passwords from anyone sniffing the Wi-Fi, though IP addresses and ports stay visible.
See also