Enhancing data credibility by a lightweight security mechanism underlying the framework of the internet of things