Design and Development of an Efficient Security Scheme for Distributed IoT Networks based on Blockchain and Cellular Automata