Abstract:An improved data transmission encryption algorithm MQTT-EA (MQTT Encryption Algorithms) is proposed. In this algorithm, the IoT device and server sides randomly generate their own private keys, then notify each other of their own private keys and combine them into the final session master key through the algorithm. The secure data is transmitted through DES encryption and decryption. The data transmission process is simulated by rivals A and B, and MQTT-EA is proved to be secure as long as the session key generation algorithm is not leaked.