  With the rapid development of the Internet of things (IoT), more and more IoT
devices are connected and communicate frequently. In this background, the
traditional centralized security architecture of IoT will be limited in terms
of data storage space, data reliability, scalability, operating costs and
liability judgment. In this paper, we propose an new key information storage
framework based on a small distributed database generated by blockchain
technology and cloud storage. Specifically, all encrypted key communication
data will be upload to public could server for enough storage, but the
abstracts of these data (called "communication logs") will be recorded in "IoT
ledger" (i.e., an distributed database) that maintained by all IoT devices
according to the blockchain generation approach, which could solve the problem
of data reliability, scalability and liability judgment. Besides, in order to
efficiently search communication logs and not reveal any sensitive information
of communication data, we design the secure search scheme for our "IoT ledger",
which exploits the Asymmetric Scalar-product Preserving Encryption (ASPE)
approach to guarantee the data security, and exploits the 2-layers index which
is tailor-made for blockchain database to improve the search efficiency.
Security analysis and experiments on synthetic dataset show that our schemes
are secure and efficient.
