For the past decade, Internet of Things (IoT) had an important role in our lives. It connects a large number of embedded devices. These devices fulfill very difficult and complicated tasks, which facilitate our work. Till now the security of IoT faces many challenges such as privacy, authentication, confidentiality, trust, middleware security, mobile security and policy enforcement. In order to