Addressing the security and efficiency challenges in Internet of things