The loT environment that allows us to connect to anything through the internet regardless of where we are and when, is offered in the fields of Smart home, Smart retail, Smart city, Smart agriculture/forest, Smart water and Smart transportation. In particular, the number of devices related to the smart home environment has grown explosively. However, the network energy consumption that grows in proportion to the increase in smart home related devices and the need to establish a secure channel between low functioning smart homes and the service provider are issues. Merkle Hash Tree requires a small amount of calculation because through repeated hash that composes a tree with the data set that can be used for the authentication, verification of the data integrity and signatures based on the safety of the hash function. PUFs is a challenges-responses method that makes it impossible to copy or forecast based on the random characteristics that appear when manufacturing ICs. It is used for authentication or generation of random values or keys. It only requires a small amount of calculation and for each ICs, a different pair of responses to the challenges are generated. This paper takes into account the Merkle Hash Tree and PUFs used in smart home environments to reduce energy consumption of the device network while allocating keys and allowing for safe end-to-end mutual authentication through the smart home gateway. Based on this, the paper proposes a 3-way handshaking protocol.