Messages are transmitted among sensors in a wireless sensor network in a secure way by using cryptographic techniques. Communication complexity is the major challenge in transmitting messages between sensors into the Internet of Things (IoT). As IoT consists of different devices, there must be secure and proper communication between sensor nodes in WSNs. In this paper, a random key is used in practical time for reducing the communication complexity in IDEA algorithm. This paper proposes a model by combining the Reed Solomon (RS) code with IDEA encryption algorithm which used128 bit keys for transmitting the data.