The Internet is an incredible platform available for sharing information and keeping track of data, but due to all that information and data floating around on the Internet and passing through multiple distinctive IoT devices, people can be tempted to steal that information for malicious use. With the help of 5G technology, we can reduce latency, increase speeds, and capacity for IoT devices for extensively used. Concurrently, these devices can power the security, decentralization, immutability, and consensus by using blockchains as foundational layers. In this paper, we discuss security issues in blockchain and IoT devices, and we propose the use of an interstitial model for flexibility and extensibility of the layered architecture for the growth of blockchain, and a SumKey algorithm to resolve the subset sum problem for whole numbers by combining with the partition problem. This method applies to entire sequential numbers in a multiset cardinality. In ERP Financial Systems, the Chartfield can be used for this purpose.