Security and Privacy Challenges using IoT-Blockchain Technology in a Smart City: Critical Analysis

░ ABSTRACT- A smart city is a comprehensive concept created by multiple digital industries. Smart city is a new generation of information technologies such as the Internet of Things, cloud computing, big data, and geospatial information to promote smart new ideas for urban planning, construction, management and services, power city operation and administrative management, industrial development, and public services in various fields. It is a modern high-end urban development form. A smart city is to establish a city center system by connecting terminals, applying information technology and network, and ultimately promoting the efficiency improvement and economic structure optimization in various fields. However, in the construction of smart cities, due to the sharing of a large amount of data, a lot of data leakage is caused, and data protection faces many challenges. The article first introduces the structure of smart cities, the challenges faced by smart cities in data protection and data privacy protection; then summarizes the characteristics, applications, and challenges of blockchain technology in the application of blockchain in smart cities, and makes reference to references. The corresponding comparisons are made, and the future challenges are finally summarized and proposed.


░ 1. INTRODUCTION
In recent years, Statistics provided by the United Nations show that the growth of the world's urban population has seriously affected people's lives [1]. Many researchers started to look for new and intelligent ways to improve people's quality of life. These intelligent methods are the source of the concept of smart city. There are different opinions on the concept of smart city, the most accepted definition is that they are "methods of developing sustainable cities using modern advanced INFORMATION and communication technology services to improve the standard of living of the masses [2]". The focus of this study is to protect smart cities using emerging blockchain technology.
Back in 2008, an article about bitcoin: The article "A Point-topoint Electronic Cash System" [3] has attracted wide attention in the academic circle. The form of human social activities will be subverted by blockchain in a broad sense, bringing profound changes to finance, science and technology, culture, politics and other fields. Blockchain technology, which is almost impossible to tamper with due to its immutable decentralized edge, is suitable for protecting smart cities. This decentralized ledger is a chain structure consisting of one associated block with a block header, transaction counters, and transactions [4]. Applications of smart city need transparent transactions, automatic making decision, no single points of failure, and data protection to ensure transaction integrity and authorization. The information collected by sensors and other relevant sources constitutes an intelligent database system. The main function of intelligent control system is to organize and schedule resources. Intelligent interfaces are designed to provide citizens with access to information. The application of blockchain technology is security to ensure to every component. Meanwhile, the application blockchain technology protects data collected from all devices in smart database systems [5].

Base layer
The basic layer includes: equipment layer, urban network, computational storage; Equipment layer: refers to all kinds of terminal equipment.Access to the urban system through the Internet of Things. Urban network: refers to the basic network construction in the city. Computational storage: refers to the use of cloud computing technology for the operation and management of large-scale software, hardware and data.The detailed content of the base layer is shown in figure 1:

Data Layer
The data layer includes: basic data, subject data. The detailed content of the data layer is shown in figure 2:

Figure 2: Data Layer
Basic data: refers to the general bottom of the data, such as population data, legal person data.
Subject data: refers to the special data after data governance and analysis.

Platform layer
Platform layer includes: application support platform, big data platform and public support platform. The detailed content of the Platform layer is shown in figure 3: (1) Application support platform Refers to the unified application services provided for the upper-level business or product.
Apass: mainly used to quickly build the upper-level business. Mobile base: providing the ability of rapid development and deployment online for mobile programs.
Development framework: to provide standard development process and framework.
(2) Big data platform Mainly from the data collection, data governance, data computing, data sharing of these four aspects of comprehensive processing. There are three concept names, data center, data center, data center, data exchange center, it is easy to be confused.
Data middle platform is to integrate data from various business departments into a platform from the aspects of data collection, governance, computing, etc., and open it as an interface for external sharing.
Data exchange refers to data in the form of open permissions to support upper-level services to call lower-level data, realizing "multiple data runs" in a real sense.
The data center, generally referred to as the "city brain center," is a basic base, a connector, responsible for integrating the interfaces of the underlying data into the center. It also does not handle the data, while providing the data call capability for the upper level business.
(3) Public support platform It refers to the ability to provide a standard for the upper-class business from the perspective of public support.The public support platform can be continuously expanded with the capacity of access to share the standard capacity of each manufacturer.
Unified messaging: refers to unified messaging notifications within an application.
Unified user: a user can obtain the permissions of all upperlayer applications with one account.
Unified gateway: refers to a single gateway to all business modules.
Unified security: refers to the three-level end-to-end, tubecloud security standard.
Unified access: Third-party services are connected to the system in a unified manner.
Unified process: refers to the unification of process business standards to realize the collaboration between data and business.

Application layer
The application layer refers to the specific performance of the final product in each industry. The detailed content of the Application layer is shown in People's livelihood services, c-terminal user applications. The representative products are "Zhili Ban", "Health code", "city service" and so on.
Urban governance: application for 5G terminal users. Government affairs office, intelligent transportation, leadership cockpit, representative products and so on.
Industrial economy, for the application of b-end industries. Smart park, smart logistics, smart manufacturing, smart water, etc. Representative products are "park access", "face access control" and so on.
Ecological environment, oriented to the application of ecological environmental protection, harmonious life. Smart community, energy and environmental protection, smart tourism, etc. Representative products are "qing Qing online", "one button parking".

░ 3. CHALLENGES OF SECURITY AND PRIVACY IN SMART CITIES
In recent years, the development of smart cities has made a great contribution to improving the environment, but almost every smart application is vulnerable. For example, smart metering infrastructure in smart grid can monitor residents' private life, including their living habits and working hours [6]. Similarly, in smart homes and healthcare, device manufacturers and service providers have access to sensitive data [7]. In addition, a large amount of trajectory information collected by intelligent mobility applications can be used to infer the location and mobility patterns of users [8]. In addition, there are hacker attacks such as background knowledge attacks, collusive attacks, Sybil attacks, eavesdrop attacks, spam attacks, likability attacks, inside curious attacks, outside forgery attacks, identity attacks. According to the above issues, the security and privacy of smart cities are classified: (1) Security challenges: refers to the list of intentional and unintentional issues and challenges in IoT and cloud-based smart city architectures (such as sensing, transmission, storage and processing layer) that unauthorized parties can use to attack systems.
(2) Privacy challenges: In general, the privacy debate involves considering acceptable practices for obtaining and disclosing citizens' personal and sensitive information in the context of data perception and data analysis [9].

De-centration
The concept of blockchain decentralization is as follows: the entire operation process of blockchain is based on the joint completion of all nodes of the entire distributed system, and the trust relationship between distributed nodes is dependent on pure mathematical methods rather than central institutions, so that the distributed system becomes a decentralized and trusted system [10]. In contrast to centralized applications, users are both information providers and information participants.

Immutable
Use hash value chain to ensure that the block chain data cannot be tampered with, each a block the size of blocks in the chain of preservation with a block size of the hash value, and the bigger contains stored in all transactions in this block, once one of the deals have been tampered with, hash value is bound to change, must get rid of all the hash value of the block size to stay behind, This creates a huge amount of work for tampering with data [11].

Trusty
The blockchain's data exchange relies entirely on mathematical algorithms, or the computing power of each node, to form a powerful system that can defend against external attacks without human intervention. Participants can complete transactions without trust, even in complete anonymity. Blockchain protects the privacy of both parties and guarantees the security and credibility of both parties. In addition, each node on the blockchain stores all transactions in their entirety, and as long as no more than 51 percent of all nodes in the blockchain are manipulated by hackers, the data in the blockchain is trusted.

Type of blockchain
According to the characteristics of blockchain, we usually divide blockchain into public chain, federation chain and private chain, as shown in Table 1.

The key technology of blockchain 4.3.1 Consensus mechanism
Consensus mechanism [11] is the core content of blockchain. In a centralized network, there is only one central node, so there is almost no need to consider the issue of consensus. However, in a distributed system, it is difficult for nodes to reach consensus to ensure data consistency. Proof-of-work (PoW), the consensus mechanism used by the original Bitcoin, is most commonly used in blockchains to ensure consistency of data between ledgers and prevent forks in the blockchain. Consensus mechanism of thought is through the block between nodes in the chain of the data to calculate force competition agreement, all nodes can be involved in the "dig" contest, by calculating a random number (Nonce), so that the size of the double SHA256 hash value less than or equal to a certain value, the rapid calculation of the random number node to get the billing and the piece reward.

Intelligent contract
Smart contract [13,14] can be understood as a computer program that can be automatically executed and deployed in blockchain. Smart contract can be programmed according to the needs of developers, which is a core part of blockchainrelated application development at present. According to the definition of smart contract, Cao Binyan et al. [13] put forward the operation principle model of smart contract, as shown in figure 1. Blockchain-based smart contract technology can be applied to multiple scenarios [15], such as sharing economy, Internet of Things, financial asset processing, digital payment, multi-signed contract, cloud computing and other application scenarios. Current smart contracts use if-then contracts that follow a fixed set of logic and are not intelligent. In the future, with the continuous development of artificial intelligence technology, the contract mode of IFTHEN will be replaced by the mode of What-if [12], making the smart contract more intelligent to meet more complex demand scenarios in the future.The detailed content of Smart contract model is shown in figure 5:

Merkle Tree
The nodes with billing rights package legitimate transactions in the system into blocks and add the blocks to the blockchain.
The Merkle tree in the blockchain contains the Root Hash, as well as the individual branch hashes and the individual leaf hashes that make up the branch hashes, the leaves being each individual transaction. This structure enables Merkle trees to verify the existence and integrity of transaction data in blocks.

Asymmetric Encryption
Asymmetric encryption in cryptography requires a key pair, namely public key and private key, in which the public key can be disclosed compared with the private key, while the private key can only be known to the owner, and the private key cannot be calculated from the public key. Common asymmetric encryption algorithms include RSA, Rabin, Elgamal, elliptic curve cryptography and digital signature. The sender of a message encrypts the plaintext with a public key or private key and sends the ciphertext to the receiver, who can decrypt it with the corresponding key.

░ 5. APPLICATIONS OF IOT AND BLOCKCHAIN IN SMART CITIES
The following advantages of blockchain technology are used in cities. First, in access control of the blockchain, each participant has access to the database. In smart cities, data generation is very laborious due to the participation of many devices, and blockchain can provide partial/complete/no access to lots of data in a single database without raising any security and privacy issues. Second, an incentive mechanism that can be used to motivate citizens was created by blockchain technology, to use different smart city-based applications. Third, blockchain technology can help detect abnormal users by looking at users who are trying to change their data. At present, intelligent system is applied in many aspects, security and privacy issues must be considered.

Smart Healthcare
Licensed blockchains make it easier to keep track of healthcare providers' professional certificates and any other necessary information, and when local provider information is updated in one place, it is automatically updated across all areas of the blockchain. Using blockchain for this purpose can also reduce the operating costs of keeping directories up to date while keeping information secure.

(1) Electronic health Record
Moving electronic health records between healthcare facilities has always been a difficult and time-consuming task, but getting that information on a blockchain could make the process simpler and more convenient. With these new delivery modes, patients have greater control over their medical history data and can more easily manage and understand that data. Placing electronic health records on the blockchain also assigns patients an identification code so that their data is always associated with their local identifier.
(2) Drug tracking In addition to blockchain sharing of medical history data, drug information can be stored and transferred via blockchain to track prescriptions, identify stolen or counterfeit drugs, and publicly share clinical trial results. Each new thing added to

International Journal of Electrical and Electronics Research (IJEER)
Open Access | Rapid and quality publishing Survey Report | Volume 10, Issue 2 | Pages 190-195 | e-ISSN: 2347-470X the block in the drug traceability category is immutable and time-stamped, making it easy to track the drug and ensure that the information does not change.
(3) Health care process From drug manufacturing, to clinical trials, patient data management, and medical insurance reimbursement, blockchain technology is actively promoting. The priority use cases are efficiency and office day after tomorrow, with an emphasis on improving processes by simplifying and reducing costs. These are conservative use cases that can prove the efficacy of blockchain. The plan for the future is to open up the network to any organization that can benefit from participating, extending it to all healthcare payers and providers worldwide.

Smart Logistics and Supply Chains
As the logistics industry faces a lack of transparency throughout the supply chain, blockchain offers an opportunity to transform the supply chain and the industry as a whole. Specifically, Bitcoin aligns well with the fundamental need for reliability and integrity in the supply chain.

Smart Home
Internet of Things technology and Internet appliances related to smart city have made important contributions to the development of smart home. New technologies to improve life quality through home network [16,17], smart home reflects the continuous development of diversified use and integration. The benefits of integrating blockchain technology into your smart home are clear. Ferdous et al. [18] pointed out that blockchain contributes to trust and traceability in smart home. With environmental sensing, smartphone apps and iot sensors can easily generate data, including user activity, energy use, security measures and human physiology. All data can be recorded on the blockchain and can also be used for sharing economy services [19]. Digital signatures can be used to detect suspicious activity and securely assign each smart home device its own identity [20]. The decentralized, transparent, and secure features of blockchain provide a unique platform for smart home sensors, actuators, and devices to communicate seamlessly and easily share information across platforms. Makhdoom et al. [21] studied the advantages of this technology in multiple applications such as smart home and developed an innovative privacy protection platform based on blockchain called "Private Sharing". In addition, blockchain has the potential to address the lack of interoperability between smart home objects. This is a prerequisite for smart home integration, communication and proper functioning. In this regard, Park et al. [22] highlight the key role of blockchain in facilitating interactions between smart homes, facilitating automated energy trading activities within smart homes, and facilitating more sustainable practices between smart homes and within smart cities.

Smart Education
As information communication technology (ICT) permeates education extensively, the digitization of educational records increases the pressure to ensure the security and privacy of online storage using IoT [25], [26], [27]. Education has witnessed great challenges because of the need to protect personal data, which is rich in important details such as citizenship, immigration, financial and social information collected by educational institutions. Concerns about the use of student information have risen as the collection of learning analysis and big data has become more common in higher education [23], [28]. Blockchain technology provides a highly secure design for processing large amounts of educational data. Thus, this technology represents a secure educational ledger file, such as student transcripts, certificates, and degrees that allows everyone to own and share his/her own digital certificates on peer-to-peer networks [24]. Blockchain is helping to transform the higher education model into a sustainable platform for lifelong learning.

░ 6. DISCUSSION
With wisdom city construction, based on the application of intelligent city block chain is also more and more, in the future, chain technology should be able to manage the block chain complex operations, including consensus, intelligent contract execution, a large transaction concurrency management, fair and efficient mining of reward mechanism and rapid processing of heterogeneous data types/format data. Each smart city application has its own special requirements based on its nature. Therefore, in smart city applications which develop a robust blockchain is a challenging task. Blockchain architecture should be intelligent, reliable, fast, and scalable. Additional research work is needed to design a robust blockchain architecture that is highly secure, less complex, and protects privacy.

░ 7. CONCLUSION & FUTURE WORK
Based on research questions and to achieve research objectives, we will follow the major methodology steps as follow Blockchain technology is used to realize different applications such as smart cities, smart homes, smart transportation systems, healthcare systems, agricultural fields, supply chain systems and so on. Innovations in smart devices with wireless connectivity, storage space and some processing power allow them to use them in real time. However, security and privacy concerns for IoT systems exist at different levels. Based on research questions and to achieve research objectives, we will follow the major methodology steps as follows: First, a smart city can be vulnerable to many security attacks and threats, Integrity, confidentiality, authenticity, and accountability etc. We will do the state-of the art about the existing data security& data privacy issues in various subparts of smart cities like urban planning, to waste management using compound heterogeneous network of interconnected multiple sensors, devices, protocols, tools and software. Second, we need to depth literature survey of different blockchain applications to applicable security in various context in smart cities like healthcare, manufacturing

International Journal of Electrical and Electronics Research (IJEER)
Open Access | Rapid and quality publishing Survey Report | Volume 10, Issue 2 | Pages 190-195 | e-ISSN: 2347-470X industries, waste management, energy generation, public services etc.
Thirdly, we need to analyze different security and privacy aspects of existing protocols, methods and prove their pros and cons faced while applying in various sections of smart cities as well to identify different open issues and consider blockchain as a major security solution for smart cities.
Finally, we need to propose a blockchain based mechanism for smart cities to handle different sections like garbage management, healthcare, industries, energy, etc. of smart cities to integrate with security concerns and offer a reliable atmosphere for user data authentication & accountability etc. for user's data transaction.
In process, there are several milestones will be written as paper and then issued at publications and conferences of proceedings. Finally, thesis will be presented for reviewed and discussion.