# Blockchain-Based Privacy-Preserving Approach Using SVML for Encrypted Smart City Data in the Era of IR 4.0

Authors: Zhang Xihua; S. B. Goyal; Miretab Tesfayohanis; Chaman Verma
Journal: Journal of Nanomaterials
 (2022)

---

## Abstract

The collection of amounts of useful data from various IoT devices through machine learning (ML) techniques has been extensively applied in lots of areas of the smart city. To improve the efficiency of machine learning, people realize efficient data classification by supporting the ML model, namely, the support vector machine (SVM) model, which is used in the realization of linear classification. However, data security and data protection are not addressed in SVM classifier training from multiple entity-labeled IoT data. In the existing solution, they depend on the implicit hypothesis that learning data can be dependable collected from complex data providers, which is often not the reality. To solve the question between the above problems, in this article, we put forward a secure support vector machine—a secure SECURE SVM training scheme for protecting the privacy on encrypted IoT data based on blockchain. Firstly, a secure and dependable data encryption sharing platform is established among complex data providers by using blockchain technology, which is recorded in a distributed ledger. Secondly, the homomorphic cryptosystem is used to design secure components, and the secure polynomial multiplication is improved to design a secure SVM training algorithm, which only needs two interactions in one iteration and does not need a trusted third party. Finally, the experimental results display that the plan ensures the confidentiality of sensitive data of each data provider and the confidentiality and validity of SVM model parameters of data analysts.


---

## Body

## 1. Introduction

The Industry 4.0 project is divided into three major themes: “intelligent factory,” which focuses on the implementation of intelligent production systems and processes and networked and distributed production facilities, and “intelligent production,” which involves production logistics management, human-computer interaction, and the application of 3D technology in industrial production processes. The plan will focus on attracting the participation of small- and medium-sized enterprises (smes), aiming to make smes become users and beneficiaries of the new generation of intelligent production technologies, as well as creators and suppliers of advanced industrial production technologies. Third, “intelligent logistics” will integrate logistics resources mainly through the Internet, the Internet of Things, and logistics networks, giving full play to the efficiency of the existing supply side of logistics resources, while the demand side will be able to quickly obtain service matching and logistics support.At present, the smart city can apply the new generation of information technology, such as Internet of Things infrastructure, cloud computing infrastructure, geospatial infrastructure, and other tools and methods such as Wiki, social network, Fab Lab, Living Lab, metaintegration method, and net-mobile all-media converged communication terminal. Smart cities are rapidly emerging throughout the world, and access to a large number of Internet of things (IoT) infrastructure is necessary to address the issues in smart cities. These infrastructures transmit data all the time, share, transform, and classify data, such as medical care, insurance, transportation, and meteorology [1–3]. There are a lot of internal relationships hidden in these data. If the information and relationship of some hidden data can be mined out, unexpected results will appear. For the sake of coping with the demand for Internet of Things data and its hidden information, machine learning (ML) is born accordingly. Due to the huge amount of Internet of Things data in the smart city, the efficiency of machine learning (ML) processing is very low. Support vector machine (SVM) was put forward in 1995. It is a broad sense linear classifier that binarily sorts data on the basis of supervised learning [4]. The principle of the algorithm is to first divide the decision boundary and then use the decision boundary to solve the maximum margin hyperplane in the learning samples, which is fused with machine learning. Finally, a machine learning model (SVM supervised ml classifier) is established and the information is classified. In this way, it is classified in a large number of Internet of Things information, which improves the efficiency and is widely used. The support vector machine (SVM) itself is a nonlinear data processing means; it can be widely used in image processing, signal processing, and text classification.The structure of SVM-superintended ML classifier (e.g., SVM) is referred to as the learning stage as a sample. It trains a specific classifier by a group of tagged samples. The results make known that the function of the ML classifier raises in pace with the order of magnitude of learning samples [5–7]. Because the learning datasets due to an individual entity are generally restricted in large amounts of data and diversity, a period of time, a valid machine-processed is needed to drill ML classifiers by combining datasets collected from lots of substances. Classifiers may be used to tell the difference in a range of abnormal data from communications between IoT equipment [4, 8, 9].In the training phase of the SVM-supervised ML classifier, data privacy has attracted a large number of followers with interest in the community of scholars and industrial circles. Now, available schemes [10–12] employ different privacy or encryption algorithms to defend the data privacy of every individual provider. They often rely on an implicit assumption that learning data can be reliably gathered from lots of data gathered for further analysis, with little focus on issues of data integrity and ownership. However, in reality, there are many potential data vulnerabilities. To solve the question between ideal suppose and actual limits, in the article, blockchain technology is used to set up a safe enjoy together platform. A blockchain is a distributed storage system in essence designed to allow tamper-proof records to be shared between multiple parties [13–15]. Features on the blockchain are immutable and traceable, which can be used to identify proprietary rights of data records. To reward the contribution of data providers, blockchain designs reward and punishment mechanism strategies to encourage the sharing of learning data. How to apply blockchain to such ML SVM is indeed a challenge; one is how to get the hash value of blockchain requirements—design a data format that SVM can receive, but to design an optimization algorithm how to use blockchain data to build accurate SVM and hide some sensitive information.The layout of the article is as follows:(1)
We realize Internet of Things data sharing through blockchain technology and provide a safe and reliable guarantee. First, every IoT data supplier encrypts the data locally with its self-private key and then records the encrypted data on the blockchain through transactions in a special format(2)
Using a homomorphic cryptosystem, we designed secure structure blocks for instance safe polynomial complex and secure contrast and constructed a secure SVM training algorithm that need only mutual restriction in one iteration and no trusted third parties(3)
A lot of experiments show that our strategy can safely learn SVM classifiers with face-to-face high precision. Through detailed data analysis, we show that the strategy guarantees the susceptible data confidentiality of each data supply, along with the confidentiality of the SVM model parameters of the data analys(4)
The other parts of this article is organized as below. We describe relevant theories in Section2 and list the whole process of problem-solving in detail in Section 3. The layout of the paper is organized as follows: in the next section, the relevant literature is described, and Section 3 is about problem-solving approach followed by result analysis and concluded with conclusion section


## 2. Basic Knowledge

### 2.1. Support Vector Machine

The full English name of SVM is support vector machines. We call it support vector machines. SVM is an algorithm for classification. Of course, some people use it for regression [16].


#### 2.1.1. Linear Classification

Linear separability: during data processing, first import data and learning objectives:(1)X=X1,⋯,XN,y=y1,⋯,yn.Every sample of import data includes complex features and thus consist of feature space:(2)Xix1,⋯,xn∈X.Learning objectives are binary variablesy∈−1,1 negative class and positive class [17–19].The decision boundary is as follows:wTX+b=0.The point-to-plane distance is as follows:yiwTX+b≥1.The data processing is provided with linear separability, and the parameters W and B are the vector and nodal increment of the superflat, respectively. The decision boundary which I satisfied this condition actually builds two simultaneous superflats as the interval boundary to distinguish the classification of samples [20–23]. We have shown this linear classification in Figure 1.
(3)wTX+b≥1,⇒yi=+1,wTX+b≤−1,⇒yi=−1.Figure 1
Linear classification.


### 2.2. Loss Function

During data processing, if it cannot have linear separability, the superflats as the decision boundary will bring sort loss. So, some support vectors may enter the inner boundary or on the incorrect side of the decision border, but no longer on the interval border. The loss function may be quantified for classified loss, and its mathematical form can be obtained as 0-1 loss function [24]:
(4)Ln=0n<0,1n≥0.Loss function with value of0-1 is not a serial function, which is disadvantageous to the solution of majorization problems. So, surrogate loss is usually chosen. Workable solutions contain hinge loss function, logistic loss function, and exponential loss function. SVM uses hinge loss function [25, 26]:
(5)Ln=max0,1−n,n=p1q1=lcmp1−1,q1−ωωB∇TλϕNw‐1=wφN‐1,Ln=max0,1−n.Studies on the uniformity of substitute for loss show that when the proxy loss is a ceaseless convex function and the superior bound of the 0-1 loss function under any short-cut process, the result obtained by processing the minimization of the proxy loss is also the solution of the 0-1 loss minimization [4, 19]. The hinge loss function satisfies the above conditions. We have shown this loss function in Figure 2.Figure 2
Loss function.


### 2.3. Support Vector Regression

Support vector regression (SVR) may be obtained by spreading SVM from classification processing to regression problem. At this point, the criterion algorithm of SVM is also held out support vector classification (SVC) [4, 27]. The hyperplane decision boundary is the regression model of SVR in SVC:
(6)fX=wTX+b.SVR is sparse. If the sample point is close sufficient to the regression model, that is, it falls within the interval boundary of the regression pattern, then the pattern does not calculate the loss, and the corresponding loss function is calledε-insensitive loss function(ε-insensitive loss):
(7)Lz=max0,z−ε.The hyperparameter fixes the region of the interval boundary [28–31]. It can be made out that the insensitive loss function is same to the coupling head loss function used by SVC, and the partial short-cut process near the base point is fixed as 0. Analogous to soft margin SVM, SVR is a quadratic convex optimization problem of the following form [27]: w,bmax.
(8)12w2s.t.yi−fX≤ε.


### 2.4. Blockchain

Blockchain is a decentralized data ledger that is securely shared. Blockchain technology can be shared data by a specific set of parties. It can share and collect transactional data from complex sources. Data can be subdivided into enjoy together blocks, interlinkage by unique identifiers in the modality of encrypted hash, and data integrity can be ensured by a singlet information source, data replication can be eliminated, and data security can be improved (as demonstrated in Table1).Table 1
Blockchain characteristics.
FeaturesAdvantagesDisadvantagesConsensus mechanismsImmutableNo privacyUniquenessUniquenessNot be revokedSmart contractExpandingDelayedDecentralizedDecentralizationDifficult to promote


#### 2.4.1. Consensus Mechanisms

The most easily understood feature of blockchain is its immutable nature. Immutable is based on a unique ledger of “blocks+chains”: blocks containing transactions are continuously added at the end of the chain by the order of chronological. To modify data in a block, you need to regenerate all the blocks that follow it [12].One of the important things consensus mechanisms do is make it so expensive to revise a great number of blocks that it is hardly impossible. In proof-of-work blockchain networks (such as Bitcoin and Ethereum), for example, only 51% of the computing power is needed to regenerate all blocks which are tampered with the data. Although players are not interested in large computing power to destroy data, this kind of practical design is reliable for data on the blockchain. In general, the transaction data in the blockchain ledger can be considered not to be “modified”; it can only be “corrected” by new transactions that are accepted. The process of correcting leaves traces, which is why blockchains are immutable. To tamper is to alter or distort them utilizing making it fake [13].


#### 2.4.2. The Value of Uniqueness Required to Represent

Whether it is exchangeable token (ERC20), nonexchangeable token (ERC721), or any of the other proposed token standards, Ethereum’s token shows an important blockchain feature: the value of uniqueness required to represent value [14].


#### 2.4.3. Smart Contract

After the emergence of the smart contract, the two users using blockchain are not just simple value transfers. By setting up smart contracts, users can set complex rules. At this time, smart contracts will be executed automatically and autonomously. At the same time, this greatly expands the application possibility of blockchain through the smart contract [15].


#### 2.4.4. Decentralized

The fourth feature of blockchain is decentralization. Until now, the organization and major blockchain projects’ operation have been related to this attribute. Many blockchain projects’ ideal is which becomes autonomous communities or ecosystems [16]. Table 1 describes blockchain characteristics.


### 2.5. Paillier Algorithm Principle

Paillier encryption algorithm is a public key encryption algorithm in view of the difficult problem of complex residual class. Compared with the general encryption algorithm, homomorphic encryption can not only realize the basic encryption operation but also realize many kinds of computing functions between ciphertext; that is, computing first and then decrypting can be equivalent to decrypting first and then computing; this feature is important for protecting the security of information. This satisfies the addition homomorphism, i.e., ciphertext multiplication equals plaintext addition:DEw1•Ew2=w1+w2; the detailed process is as follows:
(1)
Select two large prime numbersp1 and q1, gcdp1q1,p1−1q1−1=1(2)
To calculaten=p1q1=lcmp1−1,q1−1(3)
Define(4)
Pick a random positive integer g less than n2, and it exists(5)
The public key for(6)
The private key for(7)
Decryption: computes plaintext


## 2.1. Support Vector Machine

The full English name of SVM is support vector machines. We call it support vector machines. SVM is an algorithm for classification. Of course, some people use it for regression [16].


### 2.1.1. Linear Classification

Linear separability: during data processing, first import data and learning objectives:(1)X=X1,⋯,XN,y=y1,⋯,yn.Every sample of import data includes complex features and thus consist of feature space:(2)Xix1,⋯,xn∈X.Learning objectives are binary variablesy∈−1,1 negative class and positive class [17–19].The decision boundary is as follows:wTX+b=0.The point-to-plane distance is as follows:yiwTX+b≥1.The data processing is provided with linear separability, and the parameters W and B are the vector and nodal increment of the superflat, respectively. The decision boundary which I satisfied this condition actually builds two simultaneous superflats as the interval boundary to distinguish the classification of samples [20–23]. We have shown this linear classification in Figure 1.
(3)wTX+b≥1,⇒yi=+1,wTX+b≤−1,⇒yi=−1.Figure 1
Linear classification.


## 2.1.1. Linear Classification

Linear separability: during data processing, first import data and learning objectives:(1)X=X1,⋯,XN,y=y1,⋯,yn.Every sample of import data includes complex features and thus consist of feature space:(2)Xix1,⋯,xn∈X.Learning objectives are binary variablesy∈−1,1 negative class and positive class [17–19].The decision boundary is as follows:wTX+b=0.The point-to-plane distance is as follows:yiwTX+b≥1.The data processing is provided with linear separability, and the parameters W and B are the vector and nodal increment of the superflat, respectively. The decision boundary which I satisfied this condition actually builds two simultaneous superflats as the interval boundary to distinguish the classification of samples [20–23]. We have shown this linear classification in Figure 1.
(3)wTX+b≥1,⇒yi=+1,wTX+b≤−1,⇒yi=−1.Figure 1
Linear classification.


## 2.2. Loss Function

During data processing, if it cannot have linear separability, the superflats as the decision boundary will bring sort loss. So, some support vectors may enter the inner boundary or on the incorrect side of the decision border, but no longer on the interval border. The loss function may be quantified for classified loss, and its mathematical form can be obtained as 0-1 loss function [24]:
(4)Ln=0n<0,1n≥0.Loss function with value of0-1 is not a serial function, which is disadvantageous to the solution of majorization problems. So, surrogate loss is usually chosen. Workable solutions contain hinge loss function, logistic loss function, and exponential loss function. SVM uses hinge loss function [25, 26]:
(5)Ln=max0,1−n,n=p1q1=lcmp1−1,q1−ωωB∇TλϕNw‐1=wφN‐1,Ln=max0,1−n.Studies on the uniformity of substitute for loss show that when the proxy loss is a ceaseless convex function and the superior bound of the 0-1 loss function under any short-cut process, the result obtained by processing the minimization of the proxy loss is also the solution of the 0-1 loss minimization [4, 19]. The hinge loss function satisfies the above conditions. We have shown this loss function in Figure 2.Figure 2
Loss function.


## 2.3. Support Vector Regression

Support vector regression (SVR) may be obtained by spreading SVM from classification processing to regression problem. At this point, the criterion algorithm of SVM is also held out support vector classification (SVC) [4, 27]. The hyperplane decision boundary is the regression model of SVR in SVC:
(6)fX=wTX+b.SVR is sparse. If the sample point is close sufficient to the regression model, that is, it falls within the interval boundary of the regression pattern, then the pattern does not calculate the loss, and the corresponding loss function is calledε-insensitive loss function(ε-insensitive loss):
(7)Lz=max0,z−ε.The hyperparameter fixes the region of the interval boundary [28–31]. It can be made out that the insensitive loss function is same to the coupling head loss function used by SVC, and the partial short-cut process near the base point is fixed as 0. Analogous to soft margin SVM, SVR is a quadratic convex optimization problem of the following form [27]: w,bmax.
(8)12w2s.t.yi−fX≤ε.


## 2.4. Blockchain

Blockchain is a decentralized data ledger that is securely shared. Blockchain technology can be shared data by a specific set of parties. It can share and collect transactional data from complex sources. Data can be subdivided into enjoy together blocks, interlinkage by unique identifiers in the modality of encrypted hash, and data integrity can be ensured by a singlet information source, data replication can be eliminated, and data security can be improved (as demonstrated in Table1).Table 1
Blockchain characteristics.
FeaturesAdvantagesDisadvantagesConsensus mechanismsImmutableNo privacyUniquenessUniquenessNot be revokedSmart contractExpandingDelayedDecentralizedDecentralizationDifficult to promote


### 2.4.1. Consensus Mechanisms

The most easily understood feature of blockchain is its immutable nature. Immutable is based on a unique ledger of “blocks+chains”: blocks containing transactions are continuously added at the end of the chain by the order of chronological. To modify data in a block, you need to regenerate all the blocks that follow it [12].One of the important things consensus mechanisms do is make it so expensive to revise a great number of blocks that it is hardly impossible. In proof-of-work blockchain networks (such as Bitcoin and Ethereum), for example, only 51% of the computing power is needed to regenerate all blocks which are tampered with the data. Although players are not interested in large computing power to destroy data, this kind of practical design is reliable for data on the blockchain. In general, the transaction data in the blockchain ledger can be considered not to be “modified”; it can only be “corrected” by new transactions that are accepted. The process of correcting leaves traces, which is why blockchains are immutable. To tamper is to alter or distort them utilizing making it fake [13].


### 2.4.2. The Value of Uniqueness Required to Represent

Whether it is exchangeable token (ERC20), nonexchangeable token (ERC721), or any of the other proposed token standards, Ethereum’s token shows an important blockchain feature: the value of uniqueness required to represent value [14].


### 2.4.3. Smart Contract

After the emergence of the smart contract, the two users using blockchain are not just simple value transfers. By setting up smart contracts, users can set complex rules. At this time, smart contracts will be executed automatically and autonomously. At the same time, this greatly expands the application possibility of blockchain through the smart contract [15].


### 2.4.4. Decentralized

The fourth feature of blockchain is decentralization. Until now, the organization and major blockchain projects’ operation have been related to this attribute. Many blockchain projects’ ideal is which becomes autonomous communities or ecosystems [16]. Table 1 describes blockchain characteristics.


## 2.4.1. Consensus Mechanisms

The most easily understood feature of blockchain is its immutable nature. Immutable is based on a unique ledger of “blocks+chains”: blocks containing transactions are continuously added at the end of the chain by the order of chronological. To modify data in a block, you need to regenerate all the blocks that follow it [12].One of the important things consensus mechanisms do is make it so expensive to revise a great number of blocks that it is hardly impossible. In proof-of-work blockchain networks (such as Bitcoin and Ethereum), for example, only 51% of the computing power is needed to regenerate all blocks which are tampered with the data. Although players are not interested in large computing power to destroy data, this kind of practical design is reliable for data on the blockchain. In general, the transaction data in the blockchain ledger can be considered not to be “modified”; it can only be “corrected” by new transactions that are accepted. The process of correcting leaves traces, which is why blockchains are immutable. To tamper is to alter or distort them utilizing making it fake [13].


## 2.4.2. The Value of Uniqueness Required to Represent

Whether it is exchangeable token (ERC20), nonexchangeable token (ERC721), or any of the other proposed token standards, Ethereum’s token shows an important blockchain feature: the value of uniqueness required to represent value [14].


## 2.4.3. Smart Contract

After the emergence of the smart contract, the two users using blockchain are not just simple value transfers. By setting up smart contracts, users can set complex rules. At this time, smart contracts will be executed automatically and autonomously. At the same time, this greatly expands the application possibility of blockchain through the smart contract [15].


## 2.4.4. Decentralized

The fourth feature of blockchain is decentralization. Until now, the organization and major blockchain projects’ operation have been related to this attribute. Many blockchain projects’ ideal is which becomes autonomous communities or ecosystems [16]. Table 1 describes blockchain characteristics.


## 2.5. Paillier Algorithm Principle

Paillier encryption algorithm is a public key encryption algorithm in view of the difficult problem of complex residual class. Compared with the general encryption algorithm, homomorphic encryption can not only realize the basic encryption operation but also realize many kinds of computing functions between ciphertext; that is, computing first and then decrypting can be equivalent to decrypting first and then computing; this feature is important for protecting the security of information. This satisfies the addition homomorphism, i.e., ciphertext multiplication equals plaintext addition:DEw1•Ew2=w1+w2; the detailed process is as follows:
(1)
Select two large prime numbersp1 and q1, gcdp1q1,p1−1q1−1=1(2)
To calculaten=p1q1=lcmp1−1,q1−1(3)
Define(4)
Pick a random positive integer g less than n2, and it exists(5)
The public key for(6)
The private key for(7)
Decryption: computes plaintext


## 3. Problem-Solving Approach

To solve the intensive comparison operation in the traditional SVM optimization algorithm (such as the sequential minimum optimization algorithm) of unencrypted data, the interaction in encrypted data is reduced. Therefore, we put to use a face to face of uncomplicated majorization algorithm, namely, trained, as the majorization algorithm in security support vector machines. Security polynomial multiplication and security comparison were designed using the homomorphic character of Paillier. Using the up-mentioned constructor blocks, iterations of SVM required only two interactions, which importantly reduced corresponding and pay expenses.


### 3.1. Establish Datasets

In the construction of smart city, many Internet of Things devices are transmitting information and collecting some useful information, but the information contains some privacy data. The theory of linear separability in SVM is used to assume the above dataset; datasetD is the size of an unordered set of N records, and ω and B are defined as two correlative parameters of SVM. ∇T is the descent gradient in the iterative calculation of the SVM learning algorithm, and λ is the learning rate. The homomorphic cryptosystem in Paillier algorithm is used as the cryptosystem, so that M represents the encryption of M under Paillier written down on the blockchain. Table 2 describes all of notations.Table 2
All of notations.
NotationsExplanationNotationsExplanationXDatasetxDataset dimensionxii-th record in datasetyiClass label∇TGradientλLearning ratewSize of datasetDa,bThe model parameterswThe encryption of m(N) under PaillierφNThe Euler phi-function


### 3.2. Implement Blockchain to Share Encrypted Data

#### 3.2.1. The Composition of Blocks

To protect the privacy of every participant safely without losing universality, we suppose that data cases of the identical processing data are local train SVM model pretreatment and pretreatment by the similar feature vector [11]. By defining a transaction structure, encrypted IoT data is stored in the blockchain. The transaction a is shown in Table 3:Table 3
Things structure.
AddressDataSizeTypeInputSaddressEncrypt the data256IoTDMOutputDAaddressDecrypt the data256IoTDMAfter a new transaction is built, blocks are published by the blockchain, and using the features of the blockchain and using the characteristics of the blockchain and the existing POW mechanism consensus algorithm, a specific node and transaction will be packaged into a new block, and the block will be added to the chain. Take note that each block may contain complex transactions. Programming to realize SGD is shown Figure3.Figure 3
Programming to realize SGD.


#### 3.2.2. Secure Polynomial Multiplication

For the sake of securely learn the SVM model, we represent the secure polynomial multiplication by the safe SVM learning algorithm. Using Paillier’s homomorphic character, it may gain safe extra and safe subtractions immediately. The extra homomorphic features in Paillier may be represented asw1+w2=w1×w2modN2, and the subtraction homomorphic properties can be described as w1−w2=w1×w2−1modN2. m−1 is the modularized multiplicative inverse, which precasts member that w×w−1modN2=1 in Paillier. w−1 can be computed by function φN, w−1=wφw−1. So, the safe polynomial multiplication may be obtained through ciphertext manipulation, as shown in the following equation:
(9)aw1+bw2=w1a×w2bmodN2.The safety of safe polynomial complex built by Paillier replies on Paillier’s on paper indistinguishable. Thus, secure polynomial multiplication is statistically unable differentiate, as Paillier is on paper unable distinguishable [14].


#### 3.2.3. Contrast of Safety

The contrast of secure in our safety SVM is defined; constant 1 is compared with the encrypted (and unsigned) numberw, as Table 4 shows. For sections A and B participating in the safe comparison algorithm, both parties may only get the information implied in the input.Table 4
The conditions of contrast of safety.
InputOutputAα,1a<−1BSK,PK—The flow chart for the above solution is shown in Figure4. Contrast of safety is shown Figure 5, and SVM train time is in Figure 6.Figure 4
The flowchart.Figure 5
Secure comparison.Figure 6
Time of SVM.


## 3.1. Establish Datasets

In the construction of smart city, many Internet of Things devices are transmitting information and collecting some useful information, but the information contains some privacy data. The theory of linear separability in SVM is used to assume the above dataset; datasetD is the size of an unordered set of N records, and ω and B are defined as two correlative parameters of SVM. ∇T is the descent gradient in the iterative calculation of the SVM learning algorithm, and λ is the learning rate. The homomorphic cryptosystem in Paillier algorithm is used as the cryptosystem, so that M represents the encryption of M under Paillier written down on the blockchain. Table 2 describes all of notations.Table 2
All of notations.
NotationsExplanationNotationsExplanationXDatasetxDataset dimensionxii-th record in datasetyiClass label∇TGradientλLearning ratewSize of datasetDa,bThe model parameterswThe encryption of m(N) under PaillierφNThe Euler phi-function


## 3.2. Implement Blockchain to Share Encrypted Data

### 3.2.1. The Composition of Blocks

To protect the privacy of every participant safely without losing universality, we suppose that data cases of the identical processing data are local train SVM model pretreatment and pretreatment by the similar feature vector [11]. By defining a transaction structure, encrypted IoT data is stored in the blockchain. The transaction a is shown in Table 3:Table 3
Things structure.
AddressDataSizeTypeInputSaddressEncrypt the data256IoTDMOutputDAaddressDecrypt the data256IoTDMAfter a new transaction is built, blocks are published by the blockchain, and using the features of the blockchain and using the characteristics of the blockchain and the existing POW mechanism consensus algorithm, a specific node and transaction will be packaged into a new block, and the block will be added to the chain. Take note that each block may contain complex transactions. Programming to realize SGD is shown Figure3.Figure 3
Programming to realize SGD.


### 3.2.2. Secure Polynomial Multiplication

For the sake of securely learn the SVM model, we represent the secure polynomial multiplication by the safe SVM learning algorithm. Using Paillier’s homomorphic character, it may gain safe extra and safe subtractions immediately. The extra homomorphic features in Paillier may be represented asw1+w2=w1×w2modN2, and the subtraction homomorphic properties can be described as w1−w2=w1×w2−1modN2. m−1 is the modularized multiplicative inverse, which precasts member that w×w−1modN2=1 in Paillier. w−1 can be computed by function φN, w−1=wφw−1. So, the safe polynomial multiplication may be obtained through ciphertext manipulation, as shown in the following equation:
(9)aw1+bw2=w1a×w2bmodN2.The safety of safe polynomial complex built by Paillier replies on Paillier’s on paper indistinguishable. Thus, secure polynomial multiplication is statistically unable differentiate, as Paillier is on paper unable distinguishable [14].


### 3.2.3. Contrast of Safety

The contrast of secure in our safety SVM is defined; constant 1 is compared with the encrypted (and unsigned) numberw, as Table 4 shows. For sections A and B participating in the safe comparison algorithm, both parties may only get the information implied in the input.Table 4
The conditions of contrast of safety.
InputOutputAα,1a<−1BSK,PK—The flow chart for the above solution is shown in Figure4. Contrast of safety is shown Figure 5, and SVM train time is in Figure 6.Figure 4
The flowchart.Figure 5
Secure comparison.Figure 6
Time of SVM.


## 3.2.1. The Composition of Blocks

To protect the privacy of every participant safely without losing universality, we suppose that data cases of the identical processing data are local train SVM model pretreatment and pretreatment by the similar feature vector [11]. By defining a transaction structure, encrypted IoT data is stored in the blockchain. The transaction a is shown in Table 3:Table 3
Things structure.
AddressDataSizeTypeInputSaddressEncrypt the data256IoTDMOutputDAaddressDecrypt the data256IoTDMAfter a new transaction is built, blocks are published by the blockchain, and using the features of the blockchain and using the characteristics of the blockchain and the existing POW mechanism consensus algorithm, a specific node and transaction will be packaged into a new block, and the block will be added to the chain. Take note that each block may contain complex transactions. Programming to realize SGD is shown Figure3.Figure 3
Programming to realize SGD.


## 3.2.2. Secure Polynomial Multiplication

For the sake of securely learn the SVM model, we represent the secure polynomial multiplication by the safe SVM learning algorithm. Using Paillier’s homomorphic character, it may gain safe extra and safe subtractions immediately. The extra homomorphic features in Paillier may be represented asw1+w2=w1×w2modN2, and the subtraction homomorphic properties can be described as w1−w2=w1×w2−1modN2. m−1 is the modularized multiplicative inverse, which precasts member that w×w−1modN2=1 in Paillier. w−1 can be computed by function φN, w−1=wφw−1. So, the safe polynomial multiplication may be obtained through ciphertext manipulation, as shown in the following equation:
(9)aw1+bw2=w1a×w2bmodN2.The safety of safe polynomial complex built by Paillier replies on Paillier’s on paper indistinguishable. Thus, secure polynomial multiplication is statistically unable differentiate, as Paillier is on paper unable distinguishable [14].


## 3.2.3. Contrast of Safety

The contrast of secure in our safety SVM is defined; constant 1 is compared with the encrypted (and unsigned) numberw, as Table 4 shows. For sections A and B participating in the safe comparison algorithm, both parties may only get the information implied in the input.Table 4
The conditions of contrast of safety.
InputOutputAα,1a<−1BSK,PK—The flow chart for the above solution is shown in Figure4. Contrast of safety is shown Figure 5, and SVM train time is in Figure 6.Figure 4
The flowchart.Figure 5
Secure comparison.Figure 6
Time of SVM.


## 4. Result Analysis

Electronic education is based on the blockchain, issued by the Certificate Certification Center Network Identification System and management of the digital identity. It can identify a person on a website or remotely without disclosing any sensitive information. On the one hand, it connects various government systems, provides “start-up” services, and improves the efficiency of the services provided. On the other hand, it provides a secure authentication platform for people. By training the SVM classifier on IoT data, the problems of data privacy, integrity, and ownership are solved. The data analyst trains the SVM classifier and may call on the data encrypted in the process of communicating with the corresponding data provider. It ensures that data analysts cannot get the Internet of Things data on the plaintext blockchain of any data. To realize the learning task depended on encrypted data, we need to build two key operation security protocols in SVM training, namely, secure polynomial multiplication and safe contrast. By using these blocks, you may create a privacy-protecting SVM learning method for safe support vector machines without having to rely on a third party. Secure support vector machines can train SVM classifiers without compromising accuracy since the learning process is based on Paillier. Secure SVM, a new privacy-protected SVM training program that utilizes blockchain technology to build secure SVM training algorithms for collecting IoT data from multiple data providers, addresses the throwing down the gauntlet of data privacy and data integrity. A quick and precise privacy-preserving SVM learning algorithm is constructed by using the homomorphic cryptosystem Paillier.


### 4.1. Secure Comparison

We have shown snapshot of secure comparison in Figure7.Figure 7
Secure comparison.Privacy-preserving SVM training algorithm Ps is shown in Figure8.Figure 8
SVM training.


## 4.1. Secure Comparison

We have shown snapshot of secure comparison in Figure7.Figure 7
Secure comparison.Privacy-preserving SVM training algorithm Ps is shown in Figure8.Figure 8
SVM training.


## 5. Conclusion and Recommendations

In this article, it presents a new privacy-protected SVM learning scheme, secure SVM, which uses blockchain technology to build secure SVM training algorithms for collecting IoT data from complex data. It solves the problems of data privacy and data integrity. A quick and precise privacy-preserving SVM learning algorithm is constructed by using the homomorphic cryptosystem of Paillier. We demonstrate the efficiency and security of secure support vector machines. In future, we will research and develop a generic framework capable of building a scope of application of privacy-preserving ML learning algorithms on multipart encrypted datasets and demonstrate the efficiency and security of secure support vector machines. In the future work, we plan to develop a generalized framework which enables constructing a wide range of privacy-preserving ML training algorithms on multipart encrypted datasets.



---

*Source: 7463513-2022-07-30.xml*