A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract
Abstract
:1. Introduction
1.1. Background
- (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
Authors | Year | Objective | Technologies | Merits | Demerits |
---|---|---|---|---|---|
Chen et al. [16] | 2015 | A theoretical framework for combining blockchain and supply chain | Blockchain | Proposed 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] | 2018 | a distributed framework model for the entire life cycle phases of the automotive industry blockchain-based | Blockchain | Analyzing 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] | 2019 | A blockchain-based design for authentication of automotive parts | BGG, Fog Computing | Provide 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] | 2019 | A traceable parts supply chain application built on blockchain and smart contracts | Distributed 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] | 2019 | A Blockchain-based logistics monitoring system prototype | JavaScript, Blockchain | All 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] | 2020 | Blockchain and smart contract-based supply chain model | Blockchain | An 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] | 2020 | Combines blockchain and ASC for distributed storage of production and sales data | Blockchain, 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] | 2020 | Blockchain-based Product-Service System service framework for vehicle products | Blockchain, 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. |
2. Preliminary
2.1. Blockchain and Smart Contracts
2.2. ECDSA
2.3. Hyperleader Fabric
3. Proposed Scheme
3.1. System Architecture
- 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
3.3. Registration Phase
- Step 1.
- AP sends its message (e.g., name, role type, etc.) to the blockchain center for the registration request.
- Step 2.
- BCC uses ECDSA to create a private key using the key to calculate the public key :
- Step 3.
- AP receive and storage .
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
- Step 1.
- User B receives a message from A and uses B’s private key deciphering to acquire the data within the message . In the meantime, determine whether the timestamp is legal or not:
- Step 2.
- When A receives a message from B, it uses its own private key to decode and acquire information within . In the meantime, it is verified whether the following timestamp is true or not true:
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
- Step 1.
- User A generates a random number and message and calculates :
- Step 2.
- User B receives the message from User A and using its private key to decrypt to acquire data of , and verifies that the timestamp holds:
- Step 3.
- User A receives the message from User B and uses his private key to decrypt to acquire data within the message , and verifies that the timestamp holds:
- Step 1.
- User A generates a random number , receives the product confirmation , and creates a message . Calculating :
- Step 2.
- User B receives the message from User A and using his private key decrypts to acquire the data within , in the meantime verifying if the timestamp is legal:
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 decrypting to obtain data within , and verifies if the timestamp is correct:
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
- Step 1.
- CO choices a product and sends to a CD. First, CO generates a random number and generates . Calculating :
- Step 2.
- CD receives data from , and verifies if the timestamp is correct:
- Step 3.
- CO receiving the message from CD, using its private key , decrypts to acquire data within , and it verifies if the timestamp is correct:
3.7. Repair Phase
- Step 1.
- RS sends of the old parts and of new parts that need to be replaced to the CO, and generates random numbers :
- Step 2.
- CO receives the data of the message from RS and verifies whether the timestamp holds:
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
- 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
4.2. Non-Repudiation
4.3. Traceability and Unforgeability
4.4. Man-in-the-Middle Attack
4.5. Replay Attack
4.6. Counterfeiting Attack
5. Discussion
5.1. Communication Cost
5.2. Computation Cost
5.3. Function Comparison
6. Conclusions
- (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
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
Notations
A k bit prime number | |
Finite group of q | |
Elliptic Curves Defined on Finite Groups q | |
A generating points based on Elliptic Curve E | |
The ith random value on the elliptic curve | |
The ECDSA’s private key/public key of the party X | |
The ith ECDSA/Elliptic curve signature value of User A | |
The ith timestamp of X/current timestamp | |
The ith message is generated by X | |
User Info of X/Blockchain Message for X | |
order Confirmation/The ith order information from X | |
The ith encrypted ciphertext is generated by X | |
Unique ID of User X | |
Unique identification code of the vehicle/part/Order/Repair | |
One-way hash function | |
The ith hash value of X | |
X own public/private key that issued by BCC | |
Encrypt/Decrypt message M using X public/private key | |
Verify that A is equal to B/Check if A is less than B |
References
- 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).
- World Motor Vehicle Production, Selected Countries. Available online: https://www.bts.gov/content/world-motor-vehicle-production-selected-countries (accessed on 5 July 2022).
- 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).
- 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).
- 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]
- Hoque, M.S.; Hasan, M.R. Involvement of vehicle factors in road accidents. J. Civ. Eng. 2007, 35, 17–27. [Google Scholar]
- 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).
- 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).
- 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).
- Traffic Safety Measures Basic Law. Available online: https://elaws.e-gov.go.jp/document?lawid=345AC0000000110 (accessed on 5 July 2022).
- Car Repair Scams. Available online: https://www.fraudguides.com/cars/car-repair-scams/ (accessed on 5 July 2022).
- Liu, H. The “second-hand” and accident cars are modified and sold. China Qual. Miles 2015, 3, 27–28. [Google Scholar]
- 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).
- Johnson, D.; Menezes, A.; Vanstone, S. The elliptic curve digital signature algorithm (ECDSA). Int. J. Inf. Secur. 2001, 1, 36–63. [Google Scholar] [CrossRef]
- Hyperledger. Hyperledger-Fabricdocs. Available online: https://hyperledgerfabric.readthedocs.io/_/downloads/en/release-2.3/pdf/ (accessed on 6 August 2022).
- 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]
- 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]
- 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]
- Kim, S.-K. The trailer of strategic alliance for blockchain governance game. arXiv 2019, arXiv:1903.11172. [Google Scholar]
- 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]
- 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]
- 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]
- 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]
- Li, B.; Ye, C. Product traceability system of automobile supply chain based on blockchain. Comput. Eng. Appl. 2020, 56, 35–42. [Google Scholar]
- Wang, X.; Wang, Y.; Liu, A. Trust-driven vehicle product-service system: A blockchain approach. Procedia CIRP 2020, 93, 593–598. [Google Scholar] [CrossRef]
- Nakamoto, S. Bitcoin: A peer-to-peer electronic cash system. Decentralized Bus. Rev. 2008, 21260. [Google Scholar]
- 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).
- 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]
- 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]
- 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]
- 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).
- 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]
- 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]
- 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]
- Kaur, K.; Kumar, S.; Baliyan, A. 5G: A new era of wireless communication. Int. J. Inf. Technol. 2020, 12, 619–624. [Google Scholar] [CrossRef]
Phase | Party | Message | Hash Value | Verification | |
---|---|---|---|---|---|
Sender | Receiver | ||||
Authentication | USER A | USER B | |||
USER B | USER A | ||||
Order and Transaction phase | USER A | USER B | |||
USER B | USER A | ||||
USER A | USER B | ||||
USER B | USER A | ||||
Sale phase | Car Owner (CO) | Car Dealer (CO) | |||
Car Dealer (CD) | Car Owner (CD) | ||||
Repair phase | Repair Shop | Car Owner (CO) |
Phase | Party | Message | Signature | Verification | |
---|---|---|---|---|---|
Sender | Receiver | ||||
Authentication | USER A | USER B | |||
USER B | USER A | ||||
Order and Transaction phase | USER A | USER B | |||
USER B | USER A | ||||
USER A | USER B | ||||
USER B | USER A | ||||
Sale phase | Car Owner (CO) | Car Dealer (CO) | |||
Car Dealer (CD) | Car Owner (CD) | ||||
Repair phase | Repair Shop | Car Owner (CO) |
Phase | Party | Encryption | Decryption | |
---|---|---|---|---|
Sender | Receiver | |||
Authentication | USER A | USER B | ||
USER B | USER A | |||
Order | USER A | USER B | ||
USER B | USER A | |||
Transaction | USER A | USER B | ||
USER B | USER A | |||
Sale | Car Owner (CO) | Car Dealer (CO) | ||
Car Dealer (CD) | Car Owner (CD) | |||
Repair | Repair Shop | Car Owner (CO) |
Phase | Party | Send Time | Validation | |
---|---|---|---|---|
Sender | Receiver | |||
Authentication | USER A | USER B | ||
USER B | USER A | |||
Order and Transaction | USER A | USER B | ||
USER B | USER A | |||
USER A | USER B | |||
USER B | USER A | |||
Sale | Car Owner (CO) | Car Dealer (CO) | ||
Car Dealer (CD) | Car Owner (CD) | |||
Repair | Repair Shop | Car Owner (CO) |
Phase | Message Length | 3G (6 M bps) | 4G (100 M bps) | 5G (20 G bps) |
---|---|---|---|---|
Authentication | 2588 bits | 0.431 ms | 0.026 ms | 0.129 us |
Order | 2588 bits | 0.431 ms | 0.026 ms | 0.129 us |
Transaction | 2588 bits | 0.431 ms | 0.026 ms | 0.129 us |
Sale | 2588 bits | 0.431 ms | 0.026 ms | 0.129 us |
Repair | 1294 bits | 0.216 ms | 0.013 ms | 0.065 us |
Phase | Access Part 1 | Access Part 2 |
---|---|---|
Authentication | User A | User B |
Order | User A | User B |
Transaction | User A | User B |
Sale | Car Owner( CO) | Car Dealer (CO) |
Repair | Repair Shop (RS) | Car Owner (CO) |
Authors | Year | Objectives | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|---|
Chen et al. [16] | 2015 | A theoretical framework for combining blockchain and supply chain | N | Y | N | Y | N |
Sharma et al. [17] | 2018 | A distributed framework model for the entire life cycle phases of the automotive industry blockchain-based | N | Y | Y | Y | Y |
Kim et al. [18] | 2019 | A blockchain-based design for authentication of parts | N | Y | N | Y | N |
Miehle et al. [21] | 2019 | A traceable parts supply chain application built on blockchain and smart contracts | N | Y | N | Y | N |
Helo and Hao [22] | 2019 | A Blockchain-based logistics monitoring system prototype | N | Y | N | Y | Y |
Yahiaoui et al. [23] | 2020 | Blockchain and smart contract-based supply chain model | N | Y | N | Y | N |
Li and Ye [24] | 2020 | Combines blockchain and ASC for distributed storage of production and sales data | N | Y | N | Y | N |
Wang et al. [25] | 2020 | Blockchain-based Product-Service System service framework for vehicle products | N | Y | N | Y | Y |
Our method | 2022 | Blockchain-based ASC and service framework | Y | Y | Y | Y | Y |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
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
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 StyleChen, 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
APA StyleChen, C.-L., Zhu, Z.-P., Zhou, M., Tsaur, W.-J., Wu, C.-M., & Sun, H. (2022). A Secure and Traceable Vehicles and Parts System Based on Blockchain and Smart Contract. Sensors, 22(18), 6754. https://doi.org/10.3390/s22186754