Next Article in Journal
Prediction of the Physical Properties of a Structural Member by the Impact Hammer Test
Next Article in Special Issue
A Machine Learning and Blockchain Based Efficient Fraud Detection Mechanism
Previous Article in Journal
An Interleaved Segmented Spectrum Analysis: A Measurement Technique for System Frequency Response and Fault Detection
Previous Article in Special Issue
A Survey of Dummy-Based Location Privacy Protection Techniques for Location-Based Services
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract

1
School of Information Engineering, Changchun Sci-Tech University, Changchun 130600, China
2
Department of Computer Science and Information Engineering, Chaoyang University of Technology, Taichung City 413310, Taiwan
3
School of Computer and Information Engineering, Xiamen University of Technology, Xiamen 361024, China
4
Computer Center, National Taipei University, New Taipei City 237303, Taiwan
5
Department of Computer Science and Information Engineering, National Taipei University, New Taipei City 237303, Taiwan
6
School of Civil Engineering and Architecture, Xiamen University of Technology, Xiamen 361024, China
7
Department of Computer Science, Jilin Normal University, Siping 136000, China
8
State Key Laboratory of Numerical Simulation, Siping 136000, China
*
Authors to whom correspondence should be addressed.
Sensors 2022, 22(18), 6754; https://doi.org/10.3390/s22186754
Submission received: 12 July 2022 / Revised: 5 August 2022 / Accepted: 5 September 2022 / Published: 7 September 2022
(This article belongs to the Special Issue Blockchain Security and Its Application in Internet of Things)

Abstract

:
As society advances, so does the total number of vehicles on the road, creating a massive consumer market for automobiles. According to statistics, a major portion of today’s traffic difficulties are caused by accidents caused by subpar cars and auto parts. As a result, each country has, over time, enacted equivalent rules and regulations to prevent such tragedies. However, in the face of profit, some people are desperate enough to employ illegal parts and illegally modified cars, and auto fraud is rampant. As a result, we employ the blockchain of the symmetrical Blockchain’s digital ledger and smart contract technology to build a decentralized supply chain system that can identify specific parts. In this study, we design and discuss the proposed system framework by user functions and the flow of parts based on blockchain, and we discuss communication protocols that use the symmetry and asymmetry cryptography, algorithms, properties, and security of the mechanism while providing related analysis and comparing the properties and costs of the system with other studies. Overall, the proposed method has the potential to successfully address the issue of automobile fraud.

1. Introduction

1.1. Background

As of 2020, according to the Bureau of Transportation Statistics (BTS) and National Bureau of Statistics of China statistics, the total number of vehicles in the US is about 276 million, and 280 million in China. In 2020, the world car production grew to 76 million [1,2,3].
With that many vehicles, a huge vehicle consumer market is produced, and the same with many traffic problems that are due to the vehicles and parts themselves. For example, in the National Motor Vehicle Crash Causation Survey (NMVCCS) [4], an estimated 44,000 crashes are caused by vehicles, which is about 2% of the crashes counted by NMVCSS; additionally, the National Highway Traffic Safety Administration in the literature [5] stated that the critical causes in 10.5% of crashes are steering, suspension, transmission, and engine failures, while about 21% of crashes are caused by various other vehicle failures or defects. Hoque and Hasan [6] stated that: as a percentage of the total number of crashes, vehicle defects caused 16.0% of the crashes and 29.0% of the total casualties by the same factor. It can be seen that unqualified parts would reduce the stability of the car, and then lead to the occurrence of traffic accidents.
Thus, to reduce traffic problems that are caused by a flaw in vehicles or parts, many countries limit illegally modified vehicles and the sale of non-compliant parts or other car equipment and devices by laws or regulations. For example, in the United States, where car control is relatively loose, California law considers it illegal to sell non-compliant car equipment and devices, and other states have similar laws and regulations [7]. Additionally, under the section 75 of the Road Traffic Act 1988 in the UK, it is an offense to alter a vehicle in such a way that the use of the vehicle on a road would be unlawful [8]. This is the same for other countries in the world, such as Japan or China [9,10].
However, some services such as repair and car maintenance require more professional car knowledge. Although the law regulates the sale of car modifications and parts, car repair frauds are still common, because the notion of every car mechanic or car repair company being honest is unrealistic. For example, in some auto repair shops, the owners use counterfeit auto parts instead of high-quality parts to decrease costs [11], and some auto manufacturers privately allow their automakers to modify vehicles privately [12]. In addition, some dealers also sell accident cars or used cars as new cars after modification to make profits [13]. These defective vehicles will increase the probability of traffic accidents, reducing the trust between consumers and car sales-as-a-service providers. This is very detrimental to the safety of life and property of the market and consumers.
Therefore, only having legal constraints is not enough. We need to take practical measures to supervise vehicles and parts to ensure the legality and qualification of vehicles and parts on the road. This in turn minimizes consumer exposure to car fraud and curbs illegal car modifications.
Existing supply chain usage generally involves tagging parts using radio-frequency identification (RFID) and one-dimensional or two-dimensional barcodes and then going to a centralized database for information access. Unfortunately, the data in the system can be easily tampered with or falsified, and it is not easy or even possible to trace the flow of parts. A decentralized blockchain-based system, however, is a superior solution to make the information more reliable and is traceable, immutable, secure and transparent. In addition, the Elliptic Curve Digital Signature Algorithm (ECDSA) [14] is used in our system to ensure data integrity and this system is built in Hyperledger Fabric [15].
All in all, in this study, we proposed a based-blockchain system that will accomplish the following:
(1)
Ensure data integrity.
(2)
Construct a simple quality identification scheme.
(3)
Enable traceable, identifiable parts service with efficiency and mutual trust.

1.2. Related Works

The automotive supply chain (ASC) has been an intricate system due to the various parts used in each vehicle, the need for many part supplies, and the many stakeholders that exist in the ASC. Before this study, lots of scholars on the issue have also combined blockchain with supply chain, as sown in Table 1.
Chen et al. [16] proposed a relatively complete theoretical framework for blockchain-based supply chains by elaborating on their proposed Supply Chain Quality Management (SCQI) and briefly discussing the issues that arise in the context of the case, but there is no mention of arbitration in the study. Sharma et al. [17] proposed a blockchain-based distributed architecture for the smart city automobile industry that examines the entire process from many perspectives and suggests a practical strategy. However, the research does not elaborate on the circulation process of parts and does not address the algorithms necessary to carry out the suggested circulation process. Kim et al. [18] handle the authentication of genuine vehicle parts via both Blockchain Governance Game (BGG) [19] and Fog Computing [20] techniques. However, the studies lack a thorough examination of the roles of the various blockchain tasks and do not suggest a comprehensive service structure. In the study by Miehle et al. [21], the authenticity and tracking and tracing of the source of parts are addressed, access control and licensing systems to secure private license chains are introduced, archiving using external chains and external databases is enabled, and the entry barrier for SMEs to the alliance chain is lowered, thereby effectively improving the supply chain’s comprehensiveness and integrity, but the regulation and the stalemate are not addressed. Hao developed a Blockchain-based logistics monitoring system (BLMS) in the study [22], which allows customers, logistics operators, and all other parties in the supply chain to track their parcels and information to ensure fairness and transparency, but not enough for the subsequent regulation of automotive services. Yahiaoui’s paper [23] describes a blockchain-based supply chain system and briefly explores the integration of its blockchain supply chain. Li and Ye [24] integrated blockchain technology into the ASC, customizing smart contracts to meet functional requirements, and demonstrating product traceability to consumers and regulators. Wang et al. [25] applied blockchain to auto service to emphasize the importance of component supply chain management, and subsequent service assurance, and offered a blockchain-based Product-Service System (PSS) framework for vehicles and several other application frameworks, but no privacy protection is provided for transactions between supply chain parties, and no specific algorithm or implementation is proposed.
Table 1. Comparison of existing auto parts traceability system.
Table 1. Comparison of existing auto parts traceability system.
AuthorsYearObjectiveTechnologiesMeritsDemerits
Chen et al. [16] 2015A theoretical framework for combining blockchain and supply chainBlockchainProposed intelligent quality management of supply chain based on the blockchain technology.There is no discussion on the regulation and analysis of services outside the supply chain.
Sharma et al. [17]2018a distributed framework model for the entire life cycle phases of the automotive industry blockchain-basedBlockchainAnalyzing the processes of the automotive industry from multiple perspectives and provided a miner node algorithm.There is no elaboration on the flow process of the parts and no proposed algorithm to be implemented for the flow process.
Kim et al. [18]2019A blockchain-based design for authentication of automotive partsBGG, Fog ComputingProvide service of authentic certification of auto parts and protection of blockchain.Lack of analysis of the role of stakeholders in the supply chain.
Miehle et al. [21] 2019A traceable parts supply chain application built on blockchain and smart contractsDistributed Ledger,
Smart Contract, Blockchain
Introduces access control and licensing systems to secure private license chains, and use external chains and external databases to archive.There is no solution to the regulation of all parties in the supply chain, and there is no corresponding analysis of the subsequent service of the car.
Helo and Hao [22]2019A Blockchain-based logistics monitoring system prototype JavaScript, BlockchainAll parties on the chain can track and access their package information.No corresponding solution is proposed for the regulation of subsequent car services.
Yahiaoui et al. [23]2020Blockchain and smart contract-based supply chain modelBlockchainAn ASC system based on blockchain and smart contracts is proposed and analyzed.There is no description of the parties of the ASC, algorithms, and car maintenance services.
Li and Ye [24]2020Combines blockchain and ASC for distributed storage of production and sales dataBlockchain,
Smart Contract
Ensures the security of ASC data, increases the mutual trust of the parties, and increases that process sensitive data.No analysis is made for the subsequent service of the car, and no specific algorithm is proposed.
Wang et al. [25]2020Blockchain-based Product-Service System service framework for vehicle productsBlockchain,
smart-contract
All parties to accurately update and verify vehicle information and easier to verify the condition of vehicles in usage. no specific algorithm or implementation is proposed.
In this paper, we use a symmetrical copy of the decentralized ledger for all users under the security of asymmetric cryptography. the contents of the other sections are as follows: Section 2 involves some related knowledge of this study. Section 3 describes the communication protocol and algorithm of each phase. We analyzed the characteristics and security issues in Section 4. In Section 5, we make some evaluations for communication costs and computation costs. Lastly, we conclude this paper in Section 6.

2. Preliminary

2.1. Blockchain and Smart Contracts

Blockchain Technology systems came from a paper on the cryptocurrency Bitcoin, “Bitcoin: A Peer-to-Peer Electronic Cash System” [26], proposed by a named Satoshi Nakamoto in 2008. It involves many disciplines, such as mathematics, cryptography, and computer science. In the blockchain, distributed computational storage, public and private keys, real-time broadcasting, and timestamping bring the characteristics of being decentralized, transparently developed, and tamper-proof, and the data structure Merkle tree is used to ensure the traceability of the blockchain. These features make blockchain that can be integrated with various fields.
Smart contacts were proposed by Nick Szabo, a well-known American computer scientist [27]. Smart contacts are codes that run on the blockchain are and automatically executed on the blockchain when conditions are met and cannot be accessed by anyone for execution [28,29]. It is the digital equivalent of traditional contracts, and combined with these blockchains, such as decentralization, tamper-evident, transparent traceability, perpetual operation, and mutual corroboration, smart contracts achieve the effect of decentralization from trusting third-party institutions to trusting the contract itself.

2.2. ECDSA

ECDSA was proposed by Rivest et al. It combines Digital Signature Algorithm (DSA) and Elliptic Curve Cryptography (ECC). Compared with traditional encryption methods, ECDSA has the characteristics of smaller parameters, keys and certificates, stronger key bit strength, and faster operating speed [15,30,31,32].
Suppose that A wants to send a message M to B. The signature is generated by sender A and verified by receiver B. Firstly, both parties must agree on the elliptic curve (CURVE, G, n), where G is the base point on the curve, n is the order of G, and H is the hash function.
Signature: A chooses a random integer d A as a private key with values in the range [0, n − 1], and generates the public key Q A = d A G .Computing: z = h m , k G = ( x 1 , y 1 ) , r = x 1 mod n and s = k 1 ( z + r d A ) mod   n . Then, the message m and the signature value ( r , s ) are sent to B.
Verification: B verifies the correctness of the message after receiving the signature value and message m from A. B calculates: z   =   h m , a 1   =   z s 1   mod   n , a 2 = r s 1   mod   n , ( x , y )   =   a 1 G   +   a 2 Q A . If the equation r = x mod n holds, the verification passes.

2.3. Hyperleader Fabric

Hyperleader Fabric was led by IBM and Linux, a blockchain-based open-source project. It is mainly to establish an enterprise-class distributed ledger system compatible with pluggable consensus mechanisms and supporting identity authentication, which is typical of current federated chains. Additionally, Hyperleader Fabric is modular, scalable, and provides privacy and confidentiality features to enable the platform to give social good, insurance, and finance, as well as supply chain logistics and other industry use cases to provide more effective and novel features.

3. Proposed Scheme

This study uses a symmetrical copy of the blockchain-based ledger technology to build a new automotive parts traceability system by building a Hyperleader Fabric federated chain to implement some functions following text. The system consists of the shareholder’s members of the federated chain Parts Manufacturer (PM), Automobile Manufacturer (AM), Car Dealer (CD), Car Owner (CO), and Repair Shop (RS), as well as Competent Authorities (CA) and Arbitrator (AB) and Blockchain Center (BCC). The system framework is shown in Figure 1.

3.1. System Architecture

(1) Parts Manufacturer (PM): PM obtains orders from automobile manufacturers (AM) and Repairers Shop (RS), and then produces the corresponding parts according to the order information and sells them to AM and RS.
(2) Automobile Manufacturer (AM): AM is responsible for the production of research and development of cars, ordering parts from PM for car production. In the meantime, AM also is the seller of car dealers.
(3) Car Dealer (CD): CD is the wholesale vehicle from AM and will sell the vehicle to the consumer (also known as the car owner (CO)).
(4) Car Owner (CO): The end-user of the car, who needs to buy the car from CD, is also the consumer of the Repair Shop (RS) and can go to RS for vehicle repair and parts replacement.
(5) Repair Shop (RS): Order parts from PM to repair the consumer’s vehicle.
(6) Competent Authorities (CA): If a member of the alliance chain is unsure of the legitimate source of a part, the auditor has the right to certify any problems with the flow of the part.
(7) Arbitrator (AB): A third-party arbitrator that receives complaints from members of the alliance chain, can find the flow of parts for cars via the Internet, and can find broken parts that are in circulation on the market.
(8) Blockchain Center (BCC): A blockchain that records key information about parts and vehicles as well as information about the distribution process, and the blockchain associates the ID of the recorded part or vehicle with the vehicle or part. The chain code in the BCC can check the status of the part during the transaction. At the same time, each member needs to register with the blockchain center and request a unique ID to be added to the blockchain.
Figure 1 shows the process of a car part passing through the manufacturer of the part to the car manufacturer, then the car manufacturer agrees to assemble it, then it passes through the dealership, the owner, and through the manufacturer of the part to the repair shop and then to the owner. Of course, in reality, there is more than one member in the alliance chain, and the diagram only shows the flow of parts or cars. And the numbers 1–9 of the Figure 1 is correspond to step 1–9. A description of the specific distribution process is as follows.
Step 1.
Each role must register an account on BCC; simultaneously, BBC records the specific information of each member and returns a pair of public and private keys.
Step 2.
When AM needs to produce a batch of cars or RS needs to receive a batch of parts, it needs to order parts from PM and send the order information to PM.
Step 3.
When PM receives the order information, it will produce the parts and engrave the ID number of each part on the part, and send the parts to AM or RS.
Step 4.
If the CD is obtaining a batch of cars from the AM, it needs to send the order information to the AM.
Step 5.
AM receives the order and delivers the products to CD.
Step 6.
CO goes to CD to buy the vehicle and CO needs to provide the identity for the transaction.
Step 7.
CO goes to RS to repair the vehicle.
Step 8.
If either party disputes the quality or origin of the parts, they may submit a request for arbitration to the AB.
Step 9.
Parts and vehicle-related information and circulation process information are recorded on BCC, AB can retrieve and verify the parts and vehicle-related records through BCC.

3.2. Data Definition

Figure 2 and Figure 3 are the basic structure of chain code in our designation. Figure 2 shows the product message structure of parts and vehicles. When the product of a vehicle or a part circulates in every Access Party (AP), its details will disclose this structure. In Figure 3, the left shows the storage structure of AP, and the right shows the definition of roles.

3.3. Registration Phase

All parties who join the system must register an account with BCC. When registration is successful, BCC records its message and returns a pair of public key and private key to the member of the register. The specific registration process is shown in Figure 4.
Step 1.
AP sends its message M I n f o A P (e.g., name, role type, etc.) to the blockchain center for the registration request.
Step 2.
BCC uses ECDSA to create a private key d A P using the key to calculate the public key Q A P :
Q A P = d A P G
If the creation is successful, add the role and trigger smart contact. The algorithm of the smart contract is as follows: Algorithm 1. Then, BCC sends I D A P , d A P , Q A P to AP.
Step 3.
AP receive and storage I D A P , d A P , Q A P .
Algorithm 1: Chaincode Registration of the proposed scheme.
func Registration (var Name string, var Detail string, var Role string)(UID string){
      UID = GenerateUID()
      count++
      AP[count].UID = UID
      AP[count].Name = Name
      AP[count].Detail = Detail
      AP[count].Role = Role
      return UID
}

3.4. Authentication Phase

Since the actors in the initial stage of the blockchain cannot verify each other’s true identity, both parties who need to perform actions need to be authenticated. The “signature” and “verification” are required when using the algorithm ECDSA implemented for authentication. We assume both users A and B need to authenticate. The specific implementation flow is shown in Figure 5. User A generates a random number k 1 and a message M A 1 and calculates h A 1 :
M A 1 = ( I D A , I D B , T S A 1 , M I n f o A )
h A 1 = H ( M A 1 )
Then, User A calculates the parameter of ECDSA and through “Sign” of Algorithm 2 generates a signature. The specific process of signature shows in Equations (4)–(6):
( x A 1 , y A 1 ) = k 1 G
r A 1 = x A 1 mod   n
s A 1 = x A 1 1 ( h A 1 + r A 1 d A ) mod   n
Then, A uses B’s public key P u k B to encrypt a message M A 1 :
C A 1 = E P u k B ( M A 1 )
Finally, A sends the information that is A generating C A 1 , r A 1 , s A 1 to B.
Step 1.
User B receives a message from A and uses B’s private key P r k B deciphering C A 1 to acquire the data ( I D A , I D B , T S A 1 , I n f o A ) within the message M A 1 . In the meantime, determine whether the timestamp is legal or not:
( I D A , I D B , T S A 1 , M I n f o A ) = D P r k B ( C A 1 )
T S N O W T S A 1 ? Δ T
If Equation (9) is true, the smart contract “Verify” of Algorithm 2 will trigger and verify the signature of ECDSA. The specific process of verification is shown in Equations (10)–(14):
h A 1 = H ( M A 1 )
a 1 = h A 1 s A 1 1   mod   n
a 2 = r A 1 s A 1 1 mod   n
( x A 1 , y A 1 ) = a 1 G + a 2 Q A
x A 1 = ?   r A 1 mod   n
If Equation (14) is true, the message is from A, which can be confirmed. Then, B generates a random number k 2 and a message M B 1 and calculates h B 1 :
M B 1 = ( I D B , I D A , T S B 1 , M I n f o B )
h B 1 = H ( M B 1 )
Then, B calculates the parameter of ECDSA and generates a signature through the “Sign” of Algorithm 2. The specific process of signature is shown in (17)–(19).
( x B 1 , y B 1 ) = k 2 G
r B 1 = x B 1 mod   n
s B 1 = x B 1 1 ( h B 1 + r B 1 d B ) mod   n
Then, B using the public key P u k A of A encrypts a message M B 1 :
C B 1 = E P u k A ( M B 1 )
Finally, B sends information C B 1 , r B 1 , s B 1 to A.
Step 2.
When A receives a message from B, it uses its own private key P r k A to decode C B 1 and acquire information ( I D B , I D A , T S B 1 , I n f o B ) within M B 1 . In the meantime, it is verified whether the following timestamp is true or not true:
( I D B , I D A , T S B 1 , M I n f o B ) = D P r k A ( C B 1 )
T S N O W T S B 1 ? Δ T
If Equation (22) passes, the smart contract “Verify” of Algorithm 2 will trigger and verify the signature of ECDSA. The specific process of verification shows in Equations (23)–(27):
h B 1 = H ( M B 1 )
a 1 = h B 1 s B 1 1   mod   n
a 2 = r B 1 s B 1 1 mod   n
( x B 1 , y B 1 ) = a 1 G + a 2 Q B
x B 1 = ?   r B 1 mod   n
If Equation (35) passes, we can confirm the message is A sending to B. The authentication between user A and user B is successful.
Algorithm 2: Chaincode Sign and Verify the proposed scheme
func Sign(var k string, var h string, var d string){
        (x, y) = k ∗ G
        r = x % n
        s = (1/k) ∗ (h + r ∗ d) % n
        return (r, s)
}
func Verify(var h string, var r string){
        a1 = (z/s) % n
        a1 = (r/s) % n
        (x, y) = a1 ∗ G + a1 ∗ G
        if x == r
                return “valid”
        else
                return “invalid”
}

3.5. Order and Transaction Phase

In the phase, we assume both roles that are User A and User B to simulate order and transaction actions. In this phase, A is the buyer purchasing products, and B is the seller. If the AM needs to perform car production and RS is short of parts for vehicle repair and needs to order parts from PM, then User A is AM and RS and User B is PM. If CD needs to order vehicles for sales activities, then User A is CD, and User B is AM at this time. The flowchart is as follows in Figure 6.
Step 1.
User A generates a random number k 3 and message M A 1 and calculates h A 1 :
M A 1 = ( I D A , I D B , T S A 1 , M O r d A 1 )
h A 1 = H ( M A 1 )
Then, User A calculates the parameters of ECDSA, and uses the “Sign” of Algorithm 2 to generate the signature:
( r A 1 , s A 1 ) = S i g n k 3 , h A 1 , d A 1
Afterward, User A uploads the order to the blockchain; in the meantime, it uses the public key P u k B of User B to encrypt a message M A 1 :
U p l o a d ( M O r d A 1 , I D O r d e r , h A 1 , r A 1 , s A 1 )
C A 1 = E P u k B ( M A 1 )
Finally, User A delivers C A 1 , r A 1 , s A 1 , which is A generated to User B.
Step 2.
User B receives the message from User A and using its private key P r k B to decrypt C A 1 to acquire data ( I D A , I D B , T S A 1 , M O r d A 1 ) of M A 1 , and verifies that the timestamp holds:
( I D A , I D B , T S A 1 , M O r d A 1 ) = D P r k B ( C A 1 )
T S N O W T S B R 1 ? Δ T
If Equation (34) is established, the smart contract “Verify” of Algorithm 2 is triggered to verify that the ECDSA signature is correct:
h A 1 = H ( M A 1 )
V e r i f y   h A 1 ,   r A 1 , s A 1
If it is correct, we can testify the message is from User A, and then User B generates a random number k 4 and uses order request information M c o n f and order information M O r d A 1 to generate a message M B 1 . The message is sent to A and User B calculates h B 1 :
M B 1 = ( I D B , I D B , T S B 1 , M O r d A 1 , M c o n f )
h B 1 = H ( M B 1 )
Then, User B calculates the parameters of the ECDSA and generates a signature by “Sign” of Algorithm 2:
( r B 1 , s B 1 ) = S i g n k 4 , h B 1 , d B 1
Afterward, User A encrypts a message M B 1 by the public key P u k A of User B:
C B 1 = E P u k A ( M B 1 )
Finally, B sends C B 1 , ( r B 1 , s B 1 ) to User A.
Step 3.
User A receives the message from User B and uses his private key P r k A to decrypt C B 1 to acquire data ( I D B , I D B , T S B 1 , M O r d A 1 , M c o n f ) within the message M B 1 , and verifies that the timestamp holds:
M B 1 = ( I D B , I D B , T S B 1 , M O r d A 1 , M c o n f )
T S N O W T S P R 1 ? Δ T
If Equation (42) is established, the smart contract “Verify” of Algorithm 2 is triggered to verify the signature of ECDSA that is correct:
h B 1 = H ( M B 1 )
V e r i f y   h B 1 ,   r B 1 , s B 1
If it is correct, the message is proved to have been sent by User B. Otherwise, the order is voided. At this point, the order is confirmed.
After the order phase mentioned above, both parties to the transaction have completed the task of placing and finalizing the order. In this phase, User B uploads the key information of the generated product to the blockchain. User A receives the product and information from User B and decrypts and verifies the correctness of the information. If it is accurate, the transaction is completed. The specific flowchart is as follows in Figure 7.
Step 1.
User A generates a random number k 5 , receives the product confirmation M c o n f , and creates a message M A 2 . Calculating h A 2 :
M A 2 = ( I D A , I D B , T S A 2 , M O r d A 1 , M c o n f )
h A 2 = H ( M A 2 )
Then, User A calculates the parameter of ECDSA and generates the signature by “Sign” of Algorithm 2:
( r A 2 , s A 2 ) = S i g n k 5 , h A 2 , d A 2
After User A uses the public key P u k B of User B to encrypt M A 1 :
C A 2 = E P u k B ( M A 2 )
At last, User A sends C A 2 , r A 2 , s A 2 to User B.
Step 2.
User B receives the message from User A and using his private key P r k B decrypts C A 1 to acquire the data ( I D A , I D B , T S A 2 , M O r d A 1 , M c o n f ) within M A 2 , in the meantime verifying if the timestamp is legal:
( I D A , I D B , T S A 2 , M O r d A 1 , M c o n f ) = D P r k B ( C A 2 )
T S N O W T S A 2 ? Δ T
If (50) is established, the smart contract “Verify” of Algorithm 2 is triggered to verify that the signature of ECDSA is correct:
h A 2 = H ( M A 2 )
V e r i f y   h A 2 ,   r A 2 , s A 2
If Equation (52) is correct, it proves that the order information is sent by User A, triggering smart contacts UploadParts or UploadVehicles within Algorithm 3 or Algorithm 4 to upload the information of products. If it is a transaction among AM, RS, and PM, UploadParts is triggered, and if it is a transaction between CD and AM, U p l o a d V e h i c l e s is triggered. In the meantime, the functions L i s t < U I D > ( U I D symbol I D C a r or I D P a r t ). Then, User B generates a random number k 6 and uses L i s t < U I D > , and O r d e r A 1 generates M B 1 , which is returned with information of the order. Calculating h B 1 :
M B 2 = ( I D B , I D A , T S B 2 , M O r d A 2 , L i s t < U I D > )
h B 2 = H ( M B 2 )
Then, User B calculates the parameter of ECDSA and generates a signature by “Sign” of Algorithm 2.
Algorithm 3: Chaincode UploadParts of the proposed scheme
var PI []PartInfofunc UploadParts(var pnum int, var PUID string, var PName string, var PParameter string, var PAgingStandard string, var PManuName string, var PProductionDate string, var PExfactoryDate string, var PAging bool){
        for (i = 0; i < pnum; i++){
                PI = append(PI, new PartInfo{
                PUID: PUID[i]
                PName: PName
                PParameter: PParameter
                PAgingStandard: PAgingStandard
                PManuName: PManuName
                PProductionDate: PProductionDate[i]
                PExfactoryDate: time.Now
                PAging: false})
                ListPUIDs = append(ListPUIDs, PI[i].ListPUIDs)
                return ListPUIDs
        }
}
Step 3.
User A acquires the message of User B, uses his private key P r k A decrypting C B 2 to obtain data ( I D B , I D A , T S B 2 , M O r d A 2 , L i s t < U I D > ) within M B 2 , and verifies if the timestamp is correct:
( I D B , I D A , T S B 2 , M O r d A 2 , L i s t < U I D > ) = D P r k A ( C B 2 )
T S N O W T S B 2 ? Δ T
If the verification passes the above, if the above verification holds, “Verify” of Algorithm 2 is triggered and checking if the signature of ECDSA is correct:
h B 2 = H ( M B 2 )
V e r i f y   h B 2 ,   r B 2 , s B 2
If it is true, the system triggers the smart contract Algorithm 5 and proves the information of the product. If it is successful, the transaction finishes.
Algorithm 4: Chaincode UploadVehicles of the proposed scheme
var VI []VehicleInfo
func UploadVehicles(var num int, var VUID string, var VName string, var VParameter string, var VAgingStandard string, var VManuName string, var VProductionDate string, var VExfactoryDate string, var VAging bool, var VPUIDs []string){
              for (i = 0; i < vnum; i++){
              VI = append(VI, new VehicleInfo{
              VUID: VUID[i]
              VName: VName
              VParameter: VParameter
              VAgingStandard: VAgingStandard
              VManuName: VManuName
              VProductionDate: VProductionDate[i]
              VExfactoryDate: time.Now
              VAging: false
              for(j = 0; i < pnum;j++){
                      VPUIDs[j]: VPUIDs[j]   }
              })
              ListVUIDs = append(ListVUIDs, VI[i].ListVUIDs)
              return ListVUIDs
        }
}
Algorithm 5: Chaincode Check_products of the proposed scheme
func CheckParts(var pnum int. ListPUIDs []string){
for(i = 0; i < pnum; i++){
        if(PI[i].PAging == True)
                return “invalid”    }
        return “valid”
}
func CheckVehicles(var vnum int. ListVUIDs []string){
        index = searchCar(VI, VUID)
        if(index ! = null)
                return “invalid”
        for(i = 0; i < vnum; i++){
                index2 = searchPID()
                if(PI[i].PAging == True)
        return “invalid”    }
                return “valid”
}

3.6. Sale Phase

In the phase, CO purchases vehicle in the CD. The specific process is as following Figure 8.
Step 1.
CO choices a product and sends M R e q C O to a CD. First, CO generates a random number k 7 and generates M C O . Calculating h C O :
M C O = ( I D C O , I D C D , T S C O , M R e q C O )
h C O = H ( M C O )
Then, CO calculates the parameter of ECDSA and generates a signature by “Sign” of Algorithm 2, and uses the public key of CD to encrypt:
( r C O , s C O ) = S i g n k 7 , h C O , d C O
C C O = E P u k C D ( M C O )
At last, CO sends C C O , r C O , s C O to CD.
Step 2.
CD receives data ( I D C O , I D C O , T S C O , M R e q C O ) from C C O , and verifies if the timestamp is correct:
( I D C O , I D C D , T S C O , M R e q C O ) = E P r k C D ( C C O )
T S N O W T S C O ? Δ T
If (74) is correct, the smart contract “Verify” of Algorithm 2 is triggered to verify if the signature of ECDSA is legal or not:
h C O = H ( M C O )
V e r i f y   h C O ,   r C O , s C O
If it is true, it proves the information of the order that sends from CO. Additionally, the system finds the vehicle of the request of the order. CD sends I D C a r to CO and a random number k 8 is generated by CD. In the meantime, according to U I D p a r t and M O r d C O 1 , which are created by CO, message M C D is generated. Returning the information of the order to CO calculate h C D :
M C D = ( I D C D , I D C O , T S C D , M O r d C O 1 )
h C D = H ( M C D )
Additionally, then CD calculates the parameter of ECDSA and generates a signature by “Sign” of Algorithm 2:
( r C D , s C D ) = S i g n k 8 , h C D , d C D
Afterward, the CD using the public key P u k C O of CO encrypts M C D :
C C D = E P u k C O ( M C D )
At last, CD sends C C D , ( r C D , s C D ) to CO.
Step 3.
CO receiving the message from CD, using its private key P r k C O , decrypts C C D to acquire data ( I D C D , I D C O , T S C D , M O r d C O 1 ) within M C D , and it verifies if the timestamp is correct:
( I D C D , I D C O , T S C D , M O r d C O 1 ) = D P r k C O ( C C D )
T S N O W T S C O ? Δ T ( 2 )
If (72) is established, the smart contract “Verify” of Algorithm 2 is triggered, in the meantime verifying if the signature of ECDSA is correct or not:
h C D = H ( M C D )
V e r i f y   h C D ,   r C D , s C D
If it is correct, Algorithm 6 is triggered, and the transaction is finished.

3.7. Repair Phase

At this stage, CO goes to RS for vehicle maintenance. The specific process is shown in Figure 9.
Step 1.
RS sends I D p a r t 1 of the old parts and I D p a r t 2 of new parts that need to be replaced to the CO, and generates random numbers k 9 :
M R S = ( I D R S , I D C O , T S R S , I D p a r t 1 , I D p a r t 2 )
h R S = H ( M R S )
Then, the user CO calculates the parameters of ECDSA, generates a signature through “Sign” of Algorithm 2, and then encrypts it with the CO’s public key:
( r R S , s R S ) = S i g n k 9 , h R S , d R S
C R S = E P u k C O ( M R S )
Finally, RS sends C R S , ( r R S , s R S ) , which is generated and sent to CO.
Step 2.
CO receives the data ( I D R S , I D C O , T S R S , I D p a r t 1 , I D p a r t 2 ) of the message M R S from RS and verifies whether the timestamp holds:
( I D R S , I D C O , T S R S , I D p a r t 1 , I D p a r t 2 ) = E P r k C O ( C R S )
T S N O W T S R S ? Δ T
If established, it triggers the smart contract “Verify” of Algorithm 2 to verify that the ECDSA signature is correct:
h R S = H ( M R S )
V e r i f y   h R S ,   r R S , s R S
If the verification is passed, a random number k 10 is generated after confirming the information M C O , a message is generated, and then the maintenance message is signed and uploaded.
M C O = ( I D r e p a i r , M R S )
h C O = H ( M C O )
( r R S , s R S ) = S i g n k 10 , h C O , d R S
U p l o a d ( I D C O , I D R S , I D r e p a i r , M R S , r R S , s R S )
Trigger the smart contract after uploading Algorithm 6.
Algorithm 6: Chaincode Modify_parts of the proposed scheme
func ModifyPart(var VUID string, var newPUID string, var oldPUID string){
        index = searchCar(VI, VUID)
        if(index! = null)
                index2 = searchVheiclePUIDs(VI[index].VehiclePUIDs,oldPUID)
                if(index2! = null)
                        replace(VI[index].VehiclePUID[index2],newPUID)
                        index3 = searchPUID(PI,oldPUID)
                        PI[index]. Paging = True
                        return “valid”
                else
                        return ”invalid”
        else
                return ”invalid”
}

3.8. Arbitration Phase

When either party doubts the validity of a part, they can arbitrate its legitimacy through Arbitration. The process of arbitration is shown in Figure 10, and the numbers 1–4 correspond to step 1–4. The precise details of this process are as follows:
Step 1.
AP provides the UID of a specific part to AB.
Step 2.
AB sends a TID request message with its signature to BCC.
Step 3.
BCC checks the signature of AB, and if the signature is valid, BBC delivers the signature list to AB.
Step 4.
AB checks the validity of each signature in the signature list. The order of the checks is as follows.
(a)
Verify the signature of PM, if it is not legal, the record is proved to be forged by PM.
(b)
Otherwise Verify the signature of AM, if it is not legitimate, the record is forged by AM.
(c)
Verify the signature of the CD, if it is not legal, the record is proved to be forged by the CD.
(d)
Verify the signature of RS, if it is not legal, the record is proved to be forged by RS.
(e)
Verify the signature of CO, if it is not legal, the record is proved to be forged by CO.
(f)
If all the above signature is valid, then the process of circulation of the part is proven and verified by AU.

4. Analysis

4.1. Data Integrity

We use ECDSA and hash functions to ensure data integrity. In a blockchain, each participant has a pair of public and private keys. The sender must compute a hash and generate a set of signatures using the receiver’s public key before sending the message, and the receiver needs to verify the message and the signatures using his private key to ensure the validity of the message. If the attacker tampers with the data to send to the receiver, then the receiver will verify if the hash value and signature are not passed. All phases’ detailed information is listed in Table 2.

4.2. Non-Repudiation

In this paper, we use Verify of ECDSA to resolve the repudiation issue. In the blockchain mechanism, all messages transmitted by the sender must sign with their private key, and the receiver using the sender’s public key verifies the messages. That ensures messages cannot be denied. Table 3 is the non-repudiation verification of the proposed scheme.

4.3. Traceability and Unforgeability

Based on blockchain characteristics, we learn that all transaction records are stored and chained to the ledger of every peer, and the records are traceable and unforgeable. In the meantime, data can be verified and transparent. For example, AB can trace records to verify whether blockchain data are legal or not. In Figure 10, if the signature cannot pass the verification, the signatures are forged.

4.4. Man-in-the-Middle Attack

Man-in-the-middle attack (MIMT) generally refers to the attacker intercepting the normal network communication data between the client and the server [33]. In the communication protocol, each communication message on the blockchain uses asymmetric encryption for defense against MIMT, i.e., the receiver’s public key encrypts the message when it is sent, and the receiver decrypts the message with his or her private key to ensure that the source of the message is correct.
Scenario: An attacker tampers with the communication messages or eavesdrops between the communicating parties.
Analysis: In the blockchain, the sender uses the public key of the receiver to encrypt messages. Additionally, if the attacker did not use a match private key to decrypt, it did not learn the content of the message. The private key only is known to the receiver.
For example, in the authentication phase, User A encrypts the message M A 1 with User B’s public key P u k B , then generates a ciphertext C A 1 and sends it to User B. B then uses his private key P r k B to decrypt the ciphertext to obtain the original message M A 1 . The related details are shown as follows:
C A 1 = E P u k B ( M A 1 )
M A 1 = D P r k B ( C A 1 )
Therefore, it is guaranteed that the attacker cannot decrypt the message without the receiver’s private key. Each stage of asymmetric encryption and decryption is shown in Table 4.

4.5. Replay Attack

A replay attack is a type of network attack that uses malicious or fraudulent ways to repeat or delay valid data and the attacker intercepts the message of the communication and retransmits the data to the receiver [34]. In this study, to prevent the replay attack, we add a timestamp to each message, and the receiver needs to calculate the difference of the timestamp when receiving the corresponding message and compare it with the set threshold value, and if the time difference exceeds the threshold value it identifies that the message is being replayed.
Scenario: An attracter listens to messages between sender and receiver and, after that, it re-sends the same message to the receiver.
Analysis: If the receiver receives the ciphertext and decrypts it to acquire the timestamp T S X of the sender, the receiver verifies that the difference between the current timestamp T S N O W and the timestamp in the message is less than a threshold Δ T . When this does not hold, the communication that suffered a replay attack is confirmed.
For example, in the verification phase, the timestamp T S A 1 when User A sends the data will be detected T S N O W T S A 1 ? Δ T when User B receives the data, and if it passes, it proves that the data are not under replay attack. Table 5 is the timestamp verification for each stage, where the timestamp after the receiver receives the data is collectively called.

4.6. Counterfeiting Attack

In this paper, the counterfeiting attack is the behavior of an attacker using falsified and uploaded fake parts’ information or disguising as a parts owner to trade on the system. We verify the legitimacy of the data during the transaction process to prevent this attack.
Scenario 1: The attacker fakes and uploads fake parts’ information, and uses these parts to trade.
Analysis 1: Uploading parts’ information is a unique function of PM. Other users cannot sign and upload parts without a PM private key. Additionally, because the alliance chain is used, each role needs to be authenticated, and the chances of an attacker disguising PM successfully are not possible. At the same time, based on the characteristics of the blockchain, the source of the parts can be traced. Therefore, when that counterfeit part appears on the blockchain, we can quickly locate the attacker.
Scenario 2: Malicious RS or rental car users replace expensive parts with low-cost fake parts.
Analysis 2: In our proposal, the part and the vehicle to which it belongs are bound together and belong to the same owner. As shown in Figure 11, when malicious RS replaced expensive parts reappear on the supply chain and conduct transactions, the buyer of the part will check again whether the source of the part is legitimate. If not, the system will notify the original owner of the part, who can quickly apply for arbitration with an arbitration institution.

5. Discussion

5.1. Communication Cost

In this section, we calculate the different communication costs for different network rates as shown in Table 6. Firstly, we assume that the length of the ECDSA key and signature is 160 bits, the length of asymmetrically encrypted data is 1024 bits, and other information (ID, timestamp, etc.) is 80 bits. The total size is 160 bits × 2 + 80 bits × 2 + 1024 bits × 2 = 2588 bits. It takes 0.431 ms in 3G (6 Mpbs), communication environment, 0.026 ms in 4G (100 Mpbs) communication environment, and 0.129 us in 5G (20 Gpbs) communication environment [35].

5.2. Computation Cost

Table 7 shows the computational cost analysis of the roles in each phase. Taking the authentication phase as an example, in this phase both User A and User B need to perform the signature operation, verification operation, encryption, and decryption operation, comparison operation once each, and hash operation twice.

5.3. Function Comparison

Table 8 shows the comparison with the previous researchers. In this paper, we proposed a blockchain-based automotive and parts supply chain service framework, related algorithm, and communication protocol and analyzed related cost and security.

6. Conclusions

The quality of vehicles and parts is closely related to traffic safety. To solve safety hazards caused by flaws in vehicles and parts and information asymmetry between providers and consumers, we proposed an automotive supply chain framework that is based on blockchain and smart contracts, in the meantime also designing communication flows and algorithms in the blockchain. In our analysis and discussion, this study-proposed system has excellent performance and security.
In this blockchain system, all access parties must register with BC to require a pair of public-private keys and a unique ID; in the meantime, both communicating parties should authenticate each other’s identities before communicating. In addition, during communication, each role signs and encrypts the information to be sent and uploads it to the chain, and decrypts and verifies the validity of the received message. Furthermore, when a dispute arises with a participant in the system, the participant can apply for arbitration by AB. Additionally, then AB, using the participant, provides a message to acquire blockchain information, confirming the legality.
By the proposed method and framework, we accomplish the features as follows:
(1)
Proposed a completely auto supply framework based-blockchain.
(2)
Using asymmetrical encryption/decryption to ensure data integrity.
(3)
Design some algorithms for simple quality identification of cars and parts.
(4)
Analyzing costs of computation and communication.
(5)
Parties can verify the legality of an asset by an arbitrator.
(6)
Simulate defense against known attacks.

Author Contributions

Conceptualization, C.-L.C. and Z.-P.Z.; methodology, C.-L.C., Z.-P.Z. and M.Z.; validation, W.-J.T., C.-M.W. and H.S.; investigation, C.-L.C., Z.-P.Z. and H.S.; data analysis, W.-J.T., C.-M.W. and H.S.; writing—original draft preparation, C.-L.C. and Z.-P.Z.; writing—review and editing, W.-J.T., C.-M.W. and H.S.; supervision, C.-L.C. and M.Z. All authors have read and agreed to the published version of the manuscript.

Funding

This work was supported in part by the Ministry of Science and Technology in Taiwan (No. MOST 111-2218-E-305-001-MBK and MOST 110-2410-H-324-004-MY2), the Science and Technology Project of Jilin Provincial Department of Education (JJKH20210457KJ), Jilin Province Science and Technology Development Plan Project (20220508038RC), Undergraduate Training Programs for Innovation and Entrepreneurship Project of Jilin Province (J202210203JSJ02) and CERNET Innovation Project (NGII20180315), the National Natural Science Foundation for Young Scientists of China (Grant No. 51808474).

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest

The authors declare no conflict of interest.

Notations

q
A k bit prime number
G F q
Finite group of q
E
Elliptic Curves Defined on Finite Groups q
G
A generating points based on Elliptic Curve E
k i
The ith random value on the elliptic curve
d X / Q X
The ECDSA’s private key/public key of the party X
x A i , y A i / r A i , s A i
The ith ECDSA/Elliptic curve signature value of User A
T S X i / T S N O W
The ith timestamp of X/current timestamp
M X i
The ith message is generated by X
M I n f o X / M B C X
User Info of X/Blockchain Message for X
M C o n f / M O r d X i
order Confirmation/The ith order information from X
C X i
The ith encrypted ciphertext is generated by X
I D X
Unique ID of User X
I D C a r / I D P a r t / I D O r d e r / I D r e p a i r
Unique identification code of the vehicle/part/Order/Repair
H ( M )
One-way hash function
h X i
The ith hash value of X
P u k X / P r k X
X own public/private key that issued by BCC
E P u k X ( M ) / D P r k X ( M )
Encrypt/Decrypt message M using X public/private key
A = ? B / A ? B
Verify that A is equal to B/Check if A is less than B

References

  1. Number of U.S. Aircraft, Vehicles, Vessels, and Other Conveyances. Available online: https://www.bts.gov/content/number-us-aircraft-vehicles-vessels-and-other-conveyances (accessed on 5 July 2022).
  2. World Motor Vehicle Production, Selected Countries. Available online: https://www.bts.gov/content/world-motor-vehicle-production-selected-countries (accessed on 5 July 2022).
  3. Statistical Bulletin on National Economic and Social Development of the People’s Republic of China in 2020. Available online: http://www.stats.gov.cn/xxgk/sjfb/zxfb2020/202102/t20210228_1814159.html (accessed on 5 July 2022).
  4. Singh, S. Critical Reasons for Crashes Investigated in the National Motor Vehicle Crash Causation Survey; National Center for Statistics and Analysis: Washington, DC, USA, 2015; Available online: https://trid.trb.org/view.aspx?id=1346216&source=post_page (accessed on 6 August 2022).
  5. National Highway Traffic Safety Administration. National motor vehicle crash causation survey: Report to congress. Natl. Highw. Traffic Saf. Adm. Tech. Rep. DOT HS 2008, 811, 59. [Google Scholar]
  6. Hoque, M.S.; Hasan, M.R. Involvement of vehicle factors in road accidents. J. Civ. Eng. 2007, 35, 17–27. [Google Scholar]
  7. Unlawful Vehicle Modifications: State Laws. Available online: https://www.findlaw.com/traffic/traffic-tickets/unlawful-vehicle-modifications-state-laws.html (accessed on 5 July 2022).
  8. Modifying Your Vehicle’s Emissions: The Legal, Safety, and Health Implications. Available online: https://www.gov.uk/government/publications/modifying-your-vehicles-emissions/modifying-your-vehicles-emissions-the-legal-safety-and-health-implications (accessed on 5 July 2022).
  9. Road Traffic Safety Law of the People’s Republic of China. Available online: http://www.gov.cn/banshi/2005-08/23/content_25575.htm (accessed on 5 July 2022).
  10. Traffic Safety Measures Basic Law. Available online: https://elaws.e-gov.go.jp/document?lawid=345AC0000000110 (accessed on 5 July 2022).
  11. Car Repair Scams. Available online: https://www.fraudguides.com/cars/car-repair-scams/ (accessed on 5 July 2022).
  12. Liu, H. The “second-hand” and accident cars are modified and sold. China Qual. Miles 2015, 3, 27–28. [Google Scholar]
  13. Duboka, Č. Forensic evidence in road accidents caused by vehicle’s mechanical failures. In Proceedings of the 26th JUMV International Automotive Conference, Belgrade, Serbia, 19–20 April 2017; pp. 259–268. Available online: https://www.researchgate.net/publication/316740151_FORENSIC_EVIDENCE_IN_ROAD_ACCIDENTS_CAUSED_BY_VEHICLE%27S_MECHANICAL_FAILURES (accessed on 6 August 2022).
  14. Johnson, D.; Menezes, A.; Vanstone, S. The elliptic curve digital signature algorithm (ECDSA). Int. J. Inf. Secur. 2001, 1, 36–63. [Google Scholar] [CrossRef]
  15. Hyperledger. Hyperledger-Fabricdocs. Available online: https://hyperledgerfabric.readthedocs.io/_/downloads/en/release-2.3/pdf/ (accessed on 6 August 2022).
  16. Chen, S.; Shi, R.; Ren, Z.; Yan, J.; Shi, Y.; Zhang, J. A blockchain-based supply chain quality management framework. In Proceedings of the 2017 IEEE 14th International Conference on e-Business Engineering (ICEBE), Shanghai, China, 4–6 November 2017; pp. 172–176. [Google Scholar]
  17. Sharma, P.K.; Kumar, N.; Park, J.H. Blockchain-based distributed framework for automotive industry in a smart city. IEEE Trans. Ind. Inform. 2018, 15, 4197–4205. [Google Scholar] [CrossRef]
  18. Kim, S.-K.; Yeun, C.Y.; Damiani, E.; Al-Hammadi, Y.; Lo, N.-W. New blockchain adoptation for automotive security by using systematic innovation. In Proceedings of the 2019 IEEE Transportation Electrification Conference and Expo, Asia-Pacific (ITEC Asia-Pacific), Seogwipo-si, Korea, 8–11 May 2019; pp. 1–4. [Google Scholar]
  19. Kim, S.-K. The trailer of strategic alliance for blockchain governance game. arXiv 2019, arXiv:1903.11172. [Google Scholar]
  20. Yi, S.; Li, C.; Li, Q. A survey of fog computing: Concepts, applications and issues. In Proceedings of the 2015 Workshop on Mobile Big Data, Hangzhou, China, 21 June 2015; pp. 37–42. [Google Scholar]
  21. Miehle, D.; Henze, D.; Seitz, A.; Luckow, A.; Bruegge, B. PartChain: A decentralized traceability application for multi-tier supply chain networks in the automotive industry. In Proceedings of the 2019 IEEE International Conference on Decentralized Applications and Infrastructures (DAPPCON), Newark, CA, USA, 4–9 April 2019; pp. 140–145. [Google Scholar]
  22. Helo, P.; Hao, Y. Blockchains in operations and supply chains: A model and reference implementation. Comput. Ind. Eng. 2019, 136, 242–251. [Google Scholar] [CrossRef]
  23. Yahiaoui, S.; Fedouaki, F.; Mouchtachi, A. How blockchain make better the supply chain in the automotive industry. Int. J. Eng. Adv. Technol. 2020, 9, 2912–2917. [Google Scholar] [CrossRef]
  24. Li, B.; Ye, C. Product traceability system of automobile supply chain based on blockchain. Comput. Eng. Appl. 2020, 56, 35–42. [Google Scholar]
  25. Wang, X.; Wang, Y.; Liu, A. Trust-driven vehicle product-service system: A blockchain approach. Procedia CIRP 2020, 93, 593–598. [Google Scholar] [CrossRef]
  26. Nakamoto, S. Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev. 2008, 21260. [Google Scholar]
  27. Szabo, N. The Idea of Smart Contracts. Nick Szabo’s Papers and Concise Tutorials. 1997, Volume 6, p. 199. Available online: http://www.fon.hum.uva.nl/rob/Courses/InformationInSpeech/CDROM/Literature/LOTwinterschool2006/szabo.best.vwh.net/smart_contracts_idea.html (accessed on 5 July 2012).
  28. Qiao, L.; Dang, S.; Shihada, B.; Alouini, M.-S.; Nowak, R.; Lv, Z. Can blockchain link the future? Digit. Commun. Netw. 2021, in press. [Google Scholar] [CrossRef]
  29. Rivest, R.L.; Hellman, M.E.; Anderson, J.C.; Lyons, J.W. Responses to NIST’s proposal. Commun. ACM 1992, 35, 41–54. [Google Scholar] [CrossRef]
  30. Mehibel, N.; Hamadouche, M.H. A new enhancement of elliptic curve digital signature algorithm. J. Discret. Math. Sci. Cryptogr. 2020, 23, 743–757. [Google Scholar] [CrossRef]
  31. Pornin, T. Deterministic Usage of the Digital Signature Algorithm (DSA) and Elliptic Curve Digital Signature Algorithm (ECDSA). 2013. Available online: https://www.rfc-editor.org/rfc/rfc6979.html (accessed on 6 August 2022).
  32. Kang, B.; Shao, D.; Wang, J. A fair electronic payment system for digital content using elliptic curve cryptography. J. Algorithms Comput. Technol. 2018, 12, 13–19. [Google Scholar] [CrossRef]
  33. Nayak, G.N.; Samaddar, S.G. Different flavors of man-in-the-middle attack, consequences and feasible solutions. In Proceedings of the 2010 3rd International Conference on Computer Science and Information Technology, Chengdu, China, 9–11 July 2010; pp. 491–495. [Google Scholar]
  34. Malladi, S.; Alves-Foss, J.; Heckendorn, R.B. On Preventing Replay Attacks on Security Protocols; Department of Computer Science, Idaho University: Moscow, ID, USA, 2002. [Google Scholar]
  35. Kaur, K.; Kumar, S.; Baliyan, A. 5G: A new era of wireless communication. Int. J. Inf. Technol. 2020, 12, 619–624. [Google Scholar] [CrossRef]
Figure 1. System architecture diagram.
Figure 1. System architecture diagram.
Sensors 22 06754 g001
Figure 2. The chaincode structure of the parts and car.
Figure 2. The chaincode structure of the parts and car.
Sensors 22 06754 g002
Figure 3. Chaincode structure of the accessing party and the enumeration of the role type.
Figure 3. Chaincode structure of the accessing party and the enumeration of the role type.
Sensors 22 06754 g003
Figure 4. The flowchart of the registration phase.
Figure 4. The flowchart of the registration phase.
Sensors 22 06754 g004
Figure 5. The flowchart of the authentication phase.
Figure 5. The flowchart of the authentication phase.
Sensors 22 06754 g005
Figure 6. The flowchart of the order phase.
Figure 6. The flowchart of the order phase.
Sensors 22 06754 g006
Figure 7. The flowchart of the transaction phase.
Figure 7. The flowchart of the transaction phase.
Sensors 22 06754 g007
Figure 8. The flowchart of the sale phase.
Figure 8. The flowchart of the sale phase.
Sensors 22 06754 g008
Figure 9. The flowchart of the repair phase.
Figure 9. The flowchart of the repair phase.
Sensors 22 06754 g009
Figure 10. The validation flow in the arbitration phase.
Figure 10. The validation flow in the arbitration phase.
Sensors 22 06754 g010
Figure 11. Trading illegal parts handling process.
Figure 11. Trading illegal parts handling process.
Sensors 22 06754 g011
Table 2. Verification of the data integrity of the proposed scheme.
Table 2. Verification of the data integrity of the proposed scheme.
PhasePartyMessageHash ValueVerification
SenderReceiver
AuthenticationUSER AUSER B M A 1 = ( I D A , I D B , T S A 1 , I n f o A ) h A 1 = H ( M A 1 ) V e r i f y ( h A 1 , r A 1 , s A 1 )
USER BUSER A M B 1 = ( I D B , I D A , T S B 1 , I n f o B ) h B 1 = H ( M B 1 ) V e r i f y ( h B 1 , r B 1 , s B 1 )
Order and Transaction phaseUSER AUSER B M A 1 = ( I D A , I D B , T S A 1 , O r d e r A 1 ) h A 1 = H ( M A 1 ) V e r i f y h A 1 , r A 1 , s A 1
USER BUSER A M B 1 = ( I D B , I D B , T S B 1 , M O r d A 1 , M c o n f ) h B 1 = H ( M B 1 ) V e r i f y   h B 1 ,   r B 1 , s B 1
USER AUSER B M A 2 = ( I D A , I D B , T S A 2 , O r d e r A 1 , I n f o C o n f i r m ) h A 2 = H ( M A 2 ) V e r i f y   h A 2 ,   r A 2 , s A 2
USER BUSER A M B 2 = ( I D B , I D A , T S B 2 , O r d e r A 2 , L i s t < U I D > ) h B 2 = H ( M B 2 ) V e r i f y h B 2 , r B 2 , s B 2
Sale phaseCar Owner (CO)Car Dealer (CO) M C O = ( I D C O , I D C D , T S C O , R e q u e s t ) h C O = H ( M C O ) V e r i f y h C O , r C O , s C O
Car Dealer (CD)Car Owner (CD) M C D = ( I D C D , I D C O , T S C D , O r d e r C O ) h C D = H ( M C D ) V e r i f y   h C D ,   r C D , s C D
Repair phaseRepair ShopCar Owner (CO) M R S = ( I D R S , I D C O , T S R S , I D p a r t o l d , I D p a r t n e w ) h R S = H ( M R S ) V e r i f y   h R S ,   r R S , s R S
Table 3. Non-repudiation verification of the proposed scheme.
Table 3. Non-repudiation verification of the proposed scheme.
PhasePartyMessageSignatureVerification
SenderReceiver
AuthenticationUSER AUSER B M A 1 = ( I D A , I D B , T S A 1 , I n f o A ) S i g n ( k 1 , h A 1 , d A ) V e r i f y ( h A 1 , r A 1 , s A 1 )
USER BUSER A M B 1 = ( I D B , I D A , T S B 1 , I n f o B ) S i g n ( k 2 , h B 1 , d B ) V e r i f y ( h B 1 , r B 1 , s B 1 )
Order and
Transaction
phase
USER AUSER B M A 1 = ( I D A , I D B , T S A 1 , O r d e r A 1 ) S i g n k 3 , h A 1 , d A 1 V e r i f y h A 1 , r A 1 , s A 1
USER BUSER A M B 1 = ( I D B , I D B , T S B 1 , O r d e r A 1 , I n f o C o n f i r m ) S i g n k 4 , h B 1 , d B 1 V e r i f y   h B 1 ,   r B 1 , s B 1
USER AUSER B M A 2 = ( I D A , I D B , T S A 2 , O r d e r A 1 , I n f o C o n f i r m ) S i g n k 5 , h A 2 , d A 2 V e r i f y   h A 2 ,   r A 2 , s A 2
USER BUSER A M B 2 = ( I D B , I D A , T S B 2 , O r d e r A 2 , L i s t < U I D > ) S i g n k 6 , h B 2 , d B 2 V e r i f y h B 2 , r B 2 , s B 2
Sale phaseCar Owner (CO)Car Dealer (CO) M C O = ( I D C O , I D C D , T S C O , R e q u e s t ) S i g n k 7 , h C O , d C O V e r i f y h C O , r C O , s C O
Car Dealer (CD)Car Owner (CD) M C D = ( I D C D , I D C O , T S C D , O r d e r C O ) S i g n k 8 , h C D , d C D V e r i f y   h C D ,   r C D , s C D
Repair phaseRepair ShopCar Owner (CO) M R S = ( I D R S , I D C O , T S R S , I D p a r t o l d , I D p a r t n e w ) S i g n k 9 , h R S , d R S   V e r i f y   h R S ,   r R S , s R S
Table 4. Encryption and decryption to prevent a man-in-the-middle attack.
Table 4. Encryption and decryption to prevent a man-in-the-middle attack.
PhasePartyEncryptionDecryption
SenderReceiver
AuthenticationUSER AUSER B C A 1 = E P u k B ( M A 1 ) M A 1 = D P r k B ( C A 1 )
USER BUSER A C B 1 = E P u k A ( M B 1 ) M B 1 = D P r k A ( C B 1 )
OrderUSER AUSER B C A 1 = E P u k B ( M A 1 ) M A 1 = D P r k B ( C A 1 )
USER BUSER A C B 1 = E P u k A ( M B 1 ) M B 1 = D P r k A ( C B 1 )
TransactionUSER AUSER B C A 2 = E P u k B ( M A 2 ) M A 2 = D P r k B ( C A 2 )
USER BUSER A C B 2 = E P u k A ( M B 2 ) M B 2 = D P r k A ( C B 2 )
SaleCar Owner (CO)Car Dealer (CO) C C O = E P u k C D ( M C O ) M C O = D P r k C D ( C C O )
Car Dealer (CD)Car Owner (CD) C C D = E P u k C O ( M C D ) M C D = D P r k C O ( C C D )
RepairRepair ShopCar Owner (CO) C R S = E P u k C O ( M R S ) M R S = D P r k C O ( C R S )
Table 5. Timestamp validation to prevent replay attack.
Table 5. Timestamp validation to prevent replay attack.
PhasePartySend TimeValidation
SenderReceiver
AuthenticationUSER AUSER B T S A 1 T S N O W T S A 1 ? Δ T
USER BUSER A T S B 1 T S N O W T S B 1 ? Δ T
Order and TransactionUSER AUSER B T S A 1 T S N O W T S A 1 ? Δ T
USER BUSER A T S B 1 T S N O W T S B 1 ? Δ T
USER AUSER B T S A 2 T S N O W T S A 2 ? Δ T
USER BUSER A T S B 2 T S N O W T S B 2 ? Δ T
SaleCar Owner (CO)Car Dealer (CO) T S C O T S N O W T S C O ? Δ T
Car Dealer (CD)Car Owner (CD) T S C D T S N O W T S C O ? Δ T
RepairRepair ShopCar Owner (CO) T S R S T S N O W T S R S ? Δ T
Table 6. Communication costs of the proposed scheme.
Table 6. Communication costs of the proposed scheme.
PhaseMessage Length3G (6 M bps)4G (100 M bps)5G (20 G bps)
Authentication2588 bits0.431 ms0.026 ms0.129 us
Order2588 bits0.431 ms0.026 ms0.129 us
Transaction2588 bits0.431 ms0.026 ms0.129 us
Sale2588 bits0.431 ms0.026 ms0.129 us
Repair1294 bits0.216 ms0.013 ms0.065 us
Table 7. Computation costs of the proposed scheme.
Table 7. Computation costs of the proposed scheme.
PhaseAccess Part 1Access Part 2
AuthenticationUser AUser B
T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D
OrderUser AUser B
T s i g + T v e r + T u p l o a d + T c m p + 2 T E / D + 2 T h a s h T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D
TransactionUser AUser B
T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D + T c h d T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D + T u p l o a d
SaleCar Owner( CO)Car Dealer (CO)
T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D + T c h d T s i g + T v e r + 2 T h a s h + T c m p + 2 T E / D
RepairRepair Shop (RS)Car Owner (CO)
T s i g + T h a s h + T E / D T s i g + T h a s h + T E / D
Note: T s i g : Signature operation; T v e r : Verify operation; T E / D : Encryption/Decryption operation; T h a s h : Hash function operation; T c m p : Comparison operation; T c h d : Check data function; T u p l o a d : Upload data operation.
Table 8. Comparison with surveyed related works.
Table 8. Comparison with surveyed related works.
AuthorsYearObjectives12345
Chen et al. [16]2015A theoretical framework for combining blockchain and supply chainNYNYN
Sharma et al. [17]2018A distributed framework model for the entire life cycle phases of the automotive industry blockchain-basedNYYYY
Kim et al. [18]2019A blockchain-based design for authentication of partsNYNYN
Miehle et al. [21]2019A traceable parts supply chain application built on blockchain and smart contractsNYNYN
Helo and Hao [22]2019A Blockchain-based logistics monitoring system prototypeNYNYY
Yahiaoui et al. [23]2020Blockchain and smart contract-based supply chain modelNYNYN
Li and Ye [24]2020Combines blockchain and ASC for distributed storage of production and sales dataNYNYN
Wang et al. [25]2020Blockchain-based Product-Service System service framework for vehicle productsNYNYY
Our method2022Blockchain-based ASC and service frameworkYYYYY
Notes: 1: Communication protocol, 2: Blockchain-based architecture, 3: Algorithm, 4: Complete architecture or framework, 5: Analysis, Y: Yes, N: No.
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Chen, C.-L.; Zhu, Z.-P.; Zhou, M.; Tsaur, W.-J.; Wu, C.-M.; Sun, H. A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract. Sensors 2022, 22, 6754. https://doi.org/10.3390/s22186754

AMA Style

Chen C-L, Zhu Z-P, Zhou M, Tsaur W-J, Wu C-M, Sun H. A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract. Sensors. 2022; 22(18):6754. https://doi.org/10.3390/s22186754

Chicago/Turabian Style

Chen, Chin-Ling, Zhi-Peng Zhu, Ming Zhou, Woei-Jiunn Tsaur, Chih-Ming Wu, and Hongyu Sun. 2022. "A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract" Sensors 22, no. 18: 6754. https://doi.org/10.3390/s22186754

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop