IoT allows creating a network of sophisticated smart devices or sensors. Data is the main component generated by the IoT. In order to function, an IoT network is required to send and receive large amounts of data; some of it is sensitive data. Blockchain has the potential to significantly increase both the security and level of automation of data transactions. It is a powerful way to get decentralized security and trust to smart sensors on the IoT by recording the data on the blockchain.