A Blockchain and IPFS-Based Anticounterfeit Traceable Functionality of Car Insurance Claims System

Due to frequent traffic accidents around the world, people often take out car insurance to mitigate their losses and receive compensation in a traffic accident. However, in the existing car insurance claims process, there are problems such as insurance fraud, inability to effectively track and transmit insurance data, cumbersome insurance procedures, and high insurance data storage costs. Since the immutability and traceability features of blockchain technology can prevent data manipulation and trace past data, we have used the Elliptic Curve Digital Signature Algorithm (ECDSA) to sign and encrypt car insurance data, ensuring both data integrity and security. We propose a blockchain and IPFS-based anticounterfeiting and traceable car insurance claims system to improve the above problems. We incorporate the Interplanetary File System (IPFS) to reduce the cost of storing insurance data. This study also attempts to propose an arbitration mechanism in the event of a car insurance dispute.


Introduction
Traffic accidents cause driving injuries and property damage.According to World Health Organization (WHO) statistics, about 1.35 million people die in road traffic accidents each year [1], and road traffic accidents are currently estimated to be the eighth leading cause of death in all age groups globally.In addition to the millions of fatalities, the number of traffic accidents in each country is also quite large.In 2020, according to statistics from the National Highway Traffic Safety Administration (NHTSA), US police reported 5,250,837 traffic accidents [2].The China Statistical Yearbook published by the National Bureau of Statistics of China reported 244,674 traffic accidents [3].The data in the European Commission's annual statistical report on road safety are estimated at 757,566 traffic accidents [4].From the above data, it can be seen that traffic accidents are very dangerous to the global community.Because traffic accidents often require compensation for high medical bills and vehicle repair costs, people will need car insurance to protect themselves and reduce the burden of compensation.
At present, there are still many problems with car insurance.The first is that insurance fraud often occurs between policyholders and insurance companies during the insurance process, such as some policyholders obtaining insurance premiums by forging or falsifying information, and unscrupulous insurance officers forging policies to obtain insurance Sensors 2023, 23, 9577 2 of 22 premiums from policyholders.Car insurance fraud is estimated to cause $29 billion in losses each year [5], and these problems lead to distrust between the public and insurance companies.The second is that in the traditional insurance process, the insurance company has to assign an insurance officer to go out and negotiate with the policyholder on the insurance documents, which will result in the insurance company settling the claim at a much slower speed.When applying for insurance, policyholders often need to bring a lot of documents and spend time meeting and engaging in discussions with insurance personnel, which makes them perceive the process of dealing with insurance matters as troublesome and complicated, and thus they are reluctant to apply for insurance.Third, the insurance company has to bring the application documents and the insured's information to the medical institution to confirm the insured's identity when accessing the insured's medical records as well as to the police agency to obtain authorization for the insured's traffic accident-related information, which makes the process of obtaining the insured's information cumbersome and reduces the speed of the claim settlement.All of these problems have created problems for both the insurance company and the policyholder, so it is very important to address them.
To address the challenges mentioned above, a multitude of research efforts have been dedicated to combating car insurance fraud.Notable contributions have been made by Vandervorst et al. [6] and Faheem et al. [7], who employed sophisticated machine learning techniques for the detection of car insurance fraud.Vandervorst et al. focused on evaluating data misrepresentation risk: the insurance company can improve their decisionmaking process in the validation of insurance contracts with potentially misrepresented selfreported information.Faheem et al. focused on the Boruta algorithm, enabling insurance companies to achieve more effective fraud detection, identification, and examination.Additionally, Shaikh et al. [8] delved into the application of telematics, showcasing its potential to not only reduce instances of car insurance fraud but also improve accident investigation procedures.
Compared to traditional paper insurance documents and the need to repeatedly go out to negotiate, in recent years, many insurance companies have started to use online insurance to make insurance claims.The policyholder only needs to register on the insurance company's website and can directly start the insurance policy.This form makes the insurance process more convenient by reducing the time it takes the policyholder and the insurance company to process the insurance information and by reducing the generation of paper documents [9].
Although these practices have improved and optimized the car insurance claims process, there are still some unresolved issues.There is still a risk that policy information may be tampered with by the policyholder or the insurance company, and the insurance information may not be traceable.In the existing online insurance claims system, since the insurance information is stored in the insurance company, if the endpoint of the insurance company was to be attacked, the insurance information would likely be stolen or disappear.The policy information and related documents of the online insurance system are also stored in the insurance company, and a large amount of insurance information will cause the insurance company to pay high data storage costs.Additionally, the interaction between insurance companies and medical and police agencies is still weak, and there is no good way to quickly perform functions such as information sharing and transmission for all three parties.
For these reasons, this study uses blockchain technology to solve the above problems.Blockchain is a type of distributed ledger technology: it includes features such as decentralization, anonymity, traceability, and immutability.Decentralization will spread data across many nodes for storage instead of storing them in a single center, thus preventing centralized data control and allowing users on each node to enjoy the same rights.Anonymity is guaranteed since users on the blockchain use a string of English words and numbers as their names, thus protecting their privacy.Traceability is achieved because each block of data on the blockchain contains the hash value of the previous block of data Sensors 2023, 23, 9577 3 of 22 so that the data in the blockchain can be traced back.Immutability means that once the data have been uploaded, they cannot be corrected.Blockchain technology can also be applied to many fields, including financial services [10], manufacturing [11], logistics management [12], agricultural products [13], and insurance services [14,15].The introduction of blockchain technology can effectively improve the insurance process, improve the security of policy information, increase the efficiency of insurance claims, and reduce the problem of insurance disputes.
This study proposes an anticounterfeit traceable car insurance claims system through blockchain technology with IPFS and Hyperledger Fabric, and aims to achieve the following research objectives: (1) Immutability: For the security of the insurance data, the data are encrypted, using the hashing operation and uploading the data to the blockchain center to ensure that the data are not tampered with.(2) Decentralized data sharing: In this paper, we use a Hyperledger Fabric to form a consortium chain among insurance companies, medical institutions, and police agencies.If they want to exchange policyholder information, they can do so securely and efficiently through a Hyperledger Fabric mechanism.(3) Traceability: Blockchain technology allows insurance data to be uploaded and stored on the blockchain.If the policyholder or insurance company wants to trace insurance data or past medical information, they can go to the blockchain center and IPFS to compare the data and trace the data.(4) Non-repudiation: Due to the use of the elliptic digital signature algorithm, the data cannot be reversed after it has been transferred to the blockchain, thus providing non-repudiation of the data transfer.(5) Resist man-in-the-middle attacks: To prevent data transmission from being tampered with by malicious people and forming man-in-the-middle attacks, this paper uses digital signatures and asymmetric encryption techniques to protect against them [16,17].(6) Reduce storage costs: This article uses IPFS to store some of the data and images generated during the insurance process.Since IPFS is a decentralized storage system, it can reduce data storage costs and permanently store insurance data.
The organization of the rest of the study is as follows.Section 2 will introduce the technical knowledge used in this study, Section 3 will introduce the method and framework used in this study, Section 4 will analyze the security of the method; and Section 5 will compare the calculation and communication costs and finally conclude this study.

Types and Differences of Blockchains
Blockchain can be divided into three main types: consortium chain, private chain, and public chain [18]: Consortium chain: Consortium chains are typically made up of multiple entities or organizations, and participants must undergo identity verification to join.Consortium chains often have a higher degree of control, as participants can influence and manage the entire blockchain system through consensus mechanisms.Furthermore, consortium chains generally exhibit higher levels of privacy, as only authorized participants have access to and can modify data within the blockchain.

2.
Private chain: Private chains are typically controlled by a single organization or enterprise, and only specific participants can join.Private chains usually have a higher degree of control, as the authority to control the blockchain is often held by a single entity or enterprise.Additionally, private chains generally exhibit higher levels of privacy, as only authorized participants have access to and can modify the data within the blockchain.

3.
Public chain: Public chains are blockchains that anyone can join, and they operate without centralized control.Public chains usually have lower control because the authority to control the entire blockchain is decentralized among numerous participants.
Additionally, public chains typically exhibit greater transparency, as all transactions on the blockchain are public, allowing anyone to view and verify transactions.
The choice between consortium chain, private chain, and public chain depends on the use case and requirements.In the context of this study, consortium chains are used as the framework.The study establishes a consortium chain involving an insurance company, a police agency, and a medical institution, facilitating the sharing of car insurance data among these three parties.

Hyperledger Fabric
Hyperledger Fabric [19] is a blockchain-based distributed ledger framework proposed by the Linux Foundation in 2015.Hyperledger Fabric provides a modular structure which mainly contains an orderer, peer, chaincode, certificate authorities, channel, etc.The orderer is a sorting node which sorts transactions and sends them to a peer.The peer can be part of the chaincode programming language, where smart contracts are implemented through chaincode.The certificate authorities provide a verifiable digital identity for each person who needs to interact with the network.The channel provides a channel for groups to interact with each other internally.

Elliptic Curve Digital Signature Algorithm (ECDSA)
The Elliptic Curve Digital Signature Algorithm was proposed by Don et al. in 2001 [20] as a cryptographic algorithm combining Elliptic Curve Cryptography (ECC) and the Digital Signature Algorithm (DSA).Compared to RSA, ECDSA has higher security than RSA with the same key length.In addition, ECDSA's small computation size, fast processing speed, and small storage space are all superior to RSA.
The following are the parameters defined in the ECDSA section: (r, s): Finally, obtain the signature result (r, s).
(2) Validation phase: Verify the values of r and s as well as whether Q A and z match.First, verify that (r, s) is between [1, n − 1]; then, calculate the following parameters: Finally, verify: If the two values are equal, then the signature and the sent message are correct.

Interplanetary File System (IPFS)
IPFS is a system designed by Juan Benet in 2014 [21] to implement a network transfer protocol for the decentralized storage, sharing, and persistence of files.Large data stored on the blockchain can be transferred to IPFS to save storage costs.Files stored on IPFS are hashed to form a file address, and the file can be found by the hash value when accessed [22].

System Architecture
In this paper, we propose a new car accident insurance claims system using blockchain technology.The system architecture consists of nine main actors: (1) The policyholder (PH): People who are insured by an insurance company will receive a claim after a traffic accident.(2) Insurance Company (IC): Insurance companies are responsible for handling insurance claims.After a traffic accident, they will obtain information about the accident from police agencies and medical institutions and notify the bank of the claim.(3) Police Agency (PA): After the traffic accident, the police will go to the accident site to take photos and identify the traffic accident, which will be sent to the insurance company for processing claims.(4) Medical Institution (MI): After the traffic accident, the medical institution will make a medical diagnosis of the insured person, and the diagnostic documents will be submitted to the insurance company after the authorization of the medical institution.( 5) Bank (BK): After the accident, the insurance company will use a bank to pay the policyholder's claim.(6) Blockchain Center (BCC): All actors in the system need to register with the blockchain center.The blockchain center also receives data files for upload and storage.(7) Interplanetary File System (IPFS): Images uploaded to the blockchain, such as photos uploaded by PA, medical receipts, diagnoses uploaded by MI, etc., are transferred to IPFS.(8) Certificate Authorities (CA): Certificate authorities are used to issue personal identity IDs and public and private keys for each character after registration.(9) Arbitration Institution (AI): Any insurance claim dispute between the actors can be appealed to the arbitration institution.
The seamless functioning of the proposed car accident insurance claim system relies on the collaborative efforts of its various actors.The interactions among the PH, IC, PA, MI, BK, BCC, IPFS, CA, and AI form the foundation of a dynamic and interconnected network.As we enter the distinct phases of the system's operation, a closer look at the registration, insurance purchasing, traffic accident, claims processing, claims payment, and insurance dispute arbitration phases will illuminate the intricate collaboration and information exchange among these key actors.This collaborative ecosystem ensures the integrity and transparency of the insurance claim process, setting the stage for a more detailed exploration in subsequent sections.
Figure 1 shows the main operational structure of the system.Among this figure, a Ledger is a public database that records all transactions.Anchor typically refers to the process in a transaction in which participants confirm or acknowledge the transaction.Endorse typically refers to the process in a transaction where participants confirm or acknowledge the transaction.The following is a description of each phase.
registration, insurance purchasing, traffic accident, claims processing, claims payment, and insurance dispute arbitration phases will illuminate the intricate collaboration and information exchange among these key actors.This collaborative ecosystem ensures the integrity and transparency of the insurance claim process, setting the stage for a more detailed exploration in subsequent sections.
Figure 1 shows the main operational structure of the system.Among this figure, a Ledger is a public database that records all transactions.Anchor typically refers to the process in a transaction in which participants confirm or acknowledge the transaction.Endorse typically refers to the process in a transaction where participants confirm or acknowledge the transaction.The following is a description of each phase.(1) Registration Phase: The relevant actors in the system need to apply for an account with the BCC, and after confirmation, they will upload the account information to the BCC.The CA will issue the corresponding public key and private key.In this case, the MI administrator will organize the members of the MI, the PA, and the IC into a consortium chain to pass information about the insured to each other.(2) Insurance Purchasing Phase: After the PH purchases insurance from the IC, the IC and the PH will sign an insurance policy.The PH must provide the bank account to the IC.After signing the insurance policy, it is uploaded to the BCC, and the policy ID is submitted to the PH.(3) Traffic Accident Phase: When the PH is involved in a traffic accident, the PH should first notify the PA to deal with the accident.After the PA arrives at the scene, the PA will take photos to confirm the traffic accident, make a record of the accident, and finally upload the photos and identity records to the BCC.The medical receipts and diagnoses of the PH will be uploaded from the MI to the blockchain center.(4) Claims Processing Phase: When the PH submits a claim, the IC will request authorization of the PH's medical receipt information of the PH from the MI where the PH (1) Registration Phase: The relevant actors in the system need to apply for an account with the BCC, and after confirmation, they will upload the account information to the BCC.The CA will issue the corresponding public key and private key.In this case, the MI administrator will organize the members of the MI, the PA, and the IC into a consortium chain to pass information about the insured to each other.(2) Insurance Purchasing Phase: After the PH purchases insurance from the IC, the IC and the PH will sign an insurance policy.The PH must provide the bank account to the IC.After signing the insurance policy, it is uploaded to the BCC, and the policy ID is submitted to the PH.(3) Traffic Accident Phase: When the PH is involved in a traffic accident, the PH should first notify the PA to deal with the accident.After the PA arrives at the scene, the PA will take photos to confirm the traffic accident, make a record of the accident, and finally upload the photos and identity records to the BCC.The medical receipts and diagnoses of the PH will be uploaded from the MI to the blockchain center.(4) Claims Processing Phase: When the PH submits a claim, the IC will request authorization of the PH's medical receipt information of the PH from the MI where the PH was treated through the PH's ID.After authorization, the claim will be evaluated in conjunction with the accident identification records provided by the PA.(5) Claims Payment Phase: The IC notifies the BK to pay the PH's claim and then uploads the claim record to the BCC and notifies the PH. ( 6) Insurance Dispute Arbitration Phase: When an IC denies a claim or when there is an insurance dispute between the parties involved in the traffic accident, arbitration can be conducted through AI.

Registration Phase
In the registration phase, all roles must first register with the BCC first.
Step 1: Role X first generates an identity, ID X , and sends ID X to the BCC.The BCC generates an ECDSA private key d X and calculates the public key Q X of role X: Step 2: The BCC sends ID X , (Q X , d X ) back to role X, and role X stores the (Q X , d X ).

Insurance Purchasing Phase
When the PH purchases car insurance from the IC, the IC verifies the identity of the PH and signs a policy.The PH will provide the IC with their bank account and then send the generated CC and CD to the BCC.
Step 1: The IC first gives the PH an insurance policy M detail .The PH will first confirm the content of the policy.After confirmation, the PH will confirm and complete the basic insurance information in the policy to form M detail ; then, the PH selects a random value K PH−IC and uses the IC's public key PUK IC for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k PH−IC , d PH ) to the sign function of Algorithm 1 to obtain the signature value (r PH−IC , s PH−IC ).Finally, the PH sends ID PH , C PH−IC ,(r PH−IC , s PH−IC ), timestamp, TS PH−IC to the IC.
Step 2: The IC will check the validity of the timestamp after receiving the encrypted information from the PH: Use the IC's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter (token , (r PH−IC , s PH−IC ), Q PH ) to the veri f y function of Algorithm 2 to verify whether r PH−IC is correct.If it is correct, the IC will obtain the PH's information.Generate M Policy from (ID PH , ID IC , M detail , TS PH−IC ).Then, generate a claim certificate CC PH and claim detail CD PH .Finally, upload the policy identity ID Policy and (BC PH−IC , CC PH ,CD PH , M Policy ) to the blockchain.
After uploading the information, to allow the PH to view his insurance information, the IC will select a random value k IC−PH and use the PH's public key PUK PH to encrypt M Policy : Then, calculate the ECDSA parameters: Pass the parameter (token, k IC−PH , d PA ) to the Sign function of Algorithm 1 to obtain the signature value (r IC−PH ,s IC−PH ), which the IC sends ID IC , C IC−PH , (r IC−PH , s IC−PH ), TS IC−PH to the PH.
Step 3: The PH will check the validity of the timestamp after receiving the encrypted information from the IC: Use the PH's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r IC−PH , s IC−PH , Q IC to the veri f y function of Algorithm 2 to verify whether r IC−PH is correct; if it is correct, the PH will be able to view his insurance information.
x modn return true/false;

Traffic Accident Phase
After a traffic accident, the PH will notify the PA of the accident.The PH will provide the PA with his ID, complete the accident registration form and his public key, and provide his driver's license and vehicle registration to the PA for verification.The PA will take photos of the accident and make an accident identification record.The photos and identification will then be stored in IPFS, and the stored data will be hashed and uploaded to the blockchain with the PH's ID.
Step 1: The PH first fills out a traffic accident registration form, which is also filled out for the other owner of the vehicle involved in the accident, generating M PH−OS−PA .Then, the PH selects a random value k PH−PA and uses the IC's public key PUK PA for encryption: Then, calculate the ECDSA parameters: Step 2: The PA will verify the validity of the timestamp after receiving the encrypted information from the PH: Sensors 2023, 23, 9577 Use the PA's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r PH−PA , s PH−PA , Q PH to the Verify function of Algorithm 2 to verify whether r PH−PA is correct; if it is correct, the PA will obtain the PH's information and record the traffic accident identity ID TA .After that, the PA saves the photos of the accident M Picture and the traffic accident identification records to IPFS and obtains the hashed photos of the accident PIC PH and the accident identification certificate IDE PH .Finally, upload (ID TA , BC PH−PA , PIC PH , IDE PH , TA ID ) to the blockchain center.After uploading the information, to allow the PH to view his insurance information, the PA will generate the message M PA−PH with the relevant information, select a random value k PA−PH , and use the PH's public key PUK PH for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k PA−PH , d PA ) to the Sign function of Algorithm 1 to obtain the signature value (r PA−PH , s PA−PH ); then, the PA sends ID PA , C PA−PH ,(r PA−PH , s PA−PH ), TS PA−PH to PH.
Step 3: The PH will verify the validity of the timestamp after receiving the encrypted information from the PA: Use the PH's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r PA−PH , s PA−PH , Q PA to the Verify function of Algorithm 2 to verify whether it is correct.If it is correct, then the PH can view his traffic accidentrelated information.

Medical Phase
After filling out the traffic accident information, the PH will go to the MI to seek medical treatment.The PH will need to provide his ID and public key to the MI and fill in basic personal information.Medical receipts and diagnoses will be stored in IPFS by the MI, and the stored data will be washed and uploaded to the blockchain center with the PH's ID.
Step 1: The PH first fills out basic personal information and generates M PH−MI ; then, the PH selects a random value k PH−MI and uses the MI's public key PUK MI for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k PH−MI , d PH ) to the Sign function of Algorithm 1 to obtain the signature value (r PH−MI , s PH−MI ), which the PH sends ID PH , C PH−MI ,(r PH−MI , s PH−MI ), TS PH−MI to the MI.
Step 2: The MI will check the validity of the timestamp after receiving the encrypted information from the PH: The MI's private key is used to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r PH−MI , s PH−MI , Q PH to the Verify function of Algorithm 2 to verify whether r PH−MI is correct; if it is correct, the MI will obtain the PH's information and save the PH's medical diagnosis and medical receipt data to IPFS, and then it will obtain the hashed diagnosis CERT PH and receipts REC PH .Finally, the PH uploads the (ID TA , BC PH−MI , CERT PH , REC PH ) to the blockchain.After the PH uploads the information, to allow the PH to view his insurance information, the MI will generate the message M MI−PH with the relevant information, select a random value k MI−PH , and use the PH's public key PUK PH for encryption: Then, calculate the ECDSA parameters: Step 3: The PH will check the validity of the timestamp after receiving the encrypted information from the MI: Use the PH's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r MI−PH , s MI−PH , Q MI to the Verify function of Algorithm 2 to verify whether it is correct; if it is correct, then the PH can view his medical information.

Claims Processing Phase
When the PH has received the relevant documents from the PH and MI, he can notify the IC to proceed with the claim processing.The PH will authorize the IC to have access to the PH's information and to process the claim.

Request for Authorization of the Traffic Accident Identification Process
After the PA has processed the PH's accident identification data, the PH can notify the IC to proceed with claim processing.The IC will submit the relevant policyholder's claim documents and its ID to the PA to identify itself.After the PA agrees to authorize the information, the IC can obtain the policyholder's information regarding the identification of the traffic accident.
Step 1: The PH submits his identity ID PH and traffic accident identity TK ID to the IC for authorization.Once the information is available, the IC will provide the data access to the PA.
Step 2: The IC will send a message M IC−PA to the PA with the identity of the IC and the policy identity, claim certificate, claim details, ID, and traffic accident identity of the PH.The system encrypts the data content and generates C IC−PA ; then, the IC selects a random value k IC−PA and uses the PA's public key PUK PA for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k IC−PA , d IC ) to the Sign function of Algorithm 1 to obtain the signature value (r IC−PA , s IC−PA ).Finally, the IC sends ID IC ,C IC−PA ,(r IC−PA , s IC−PA ), TS IC−PA to PA: Step 3: The PA will check the validity of the timestamp after receiving the encrypted information from the IC: Use the PA's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r IC−PA , s IC−PA , Q IC to the Verify function of Algorithm 2 to verify whether r IC−PA is correct; if it is correct, the PA will obtain the application information from the IC.Finally, upload the (ID IC , BC IC−PA ) to the blockchain.After uploading the information, to allow the IC to view the PH's traffic accident identification, the PA will generate the message M PA−IC with the relevant information, select a random value k PA−IC , and use the IC's public key PUK IC for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k PA−IC , d PA ) to the Sign function of Algorithm 1 to obtain the signature value (r PA−IC , s PA−IC ); then, the PA sends ID PA , C PA−IC , (r PA−IC , s PA−IC ), TS PA−IC to IC.
Step 4: The IC will verify the validity of the timestamp after receiving the encrypted information from the PA: Use the IC's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r PA−IC , s PA−IC , Q PA to the Verify function of Algorithm 2 to verify whether r PA−IC is correct; if it is correct, then the IC can view the information related to the identification of the PH's traffic accidents.

Request for Authorization of the Medical Diagnostic Information Process
The IC will request authorization for the PH's medical information from the MI after receiving the traffic accident identification records.Once the MI has authorized the information, the IC will obtain the medical diagnosis and receipts and combine them with the identification records to process the claim.
Step 1: The PH submits his identity ID PH and the identity of the MI ID MI where he was treated at the time of the traffic accident to the IC for authorization; once the information is available, the IC will enable the data access of the MI.
Step 2: The IC will send a message M IC−MI to the MI with the identity of the IC and the policy identity, claim certificate, claim details, and ID.The system encrypts the data content and generates C IC−MI ; then, the IC selects a random value k IC−MI and uses the MI's public key PUK MI for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k IC−MI , d IC ) to the Sign function of Algorithm 1 to obtain the signature value (r IC−MI , s IC−MI ); then, the IC sends ID IC , C IC−MI , (r IC−MI , s IC−MI ), TS IC−MI to MI.
Step 3: The MI will verify the validity of the timestamp after receiving the encrypted information from the IC: Use the MI's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r IC−MI , s IC−MI , Q IC to the Verify function of Algorithm 2 to verify whether r IC−MI is correct.If it is correct, the MI will obtain the application information from the IC.Finally, upload the (ID TA , BC IC−MI ) to the blockchain.After uploading the information, to allow the IC to view the medical diagnosis and medical receipts of the PH, the IC will generate the message M MI−IC with the relevant information, select a random value k MI−IC , and use the public key PUK IC for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k MI−IC , d MI ) to the Sign function of Algorithm 1 to obtain the signature value (r MI−IC , s MI−IC ); then, the MI sends ID MI ,C MI−IC ,(r MI−IC , s MI−IC ), TS MI−IC to the IC.
Step 4: The IC will check the validity of the timestamp after receiving the encrypted information from the MI: Sensors 2023, 23, 9577 13 of 22 Use the IC's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter token , r MI−IC , s MI−IC , Q MI to the Verify function of Algorithm 2 to verify whether r MI−IC is correct; if it is correct, then the IC can view the PH's medical diagnosis and medical receipts.

Claims Payment Phase
After the IC confirms the claim, they will notify the BK to pay the claim to the PH.The BK will notify the PH of the successful payment.
Step 1: The IC encrypts the PH's identification ID, bank account ID, and the insurance policy signed by the PH to generate a message M IC−BK ; then, the IC selects a random value k IC−BK and uses the public key PUK BK for encryption: Then, calculate the ECDSA parameters: Pass the parameter (token, k IC−BK , d IC ) to the Sign function of Algorithm 1 to obtain the signature value (r IC−BK , s IC−BK ); then, the IC sends ID IC , C IC−BK , (r IC−BK , s IC−BK ), TS IC−BK to BK.
Step 2: The BK will check the validity of the timestamp after receiving the encrypted information from the IC: Uses the BK's private key to decrypt the encrypted data and obtain the content: Then, calculate the ECDSA parameters: Pass the parameter (token , r IC−BK , s IC−BK , Q IC ) to the Verify function of Algorithm 2 to verify whether r IC−BK is correct; if it is correct, the BK will obtain the data and call the smart contract for payment of compensation.After the payment, the BK will upload (ID TA , BC IC−BK ) to the blockchain center; then, the BK will send a notification M BK−PH to the PH, and the BK will select a random value k BK−PH ; then, calculate the ECDSA parameters: Pass the parameter (token, k BK−PH , d BK ) to the Sign function of Algorithm 1 to obtain the signature value (r BK−PH , s BK−PH ); then, the BK sends ID BK , M BK−PH , (r BK−PH , s BK−PH ), TS BK−PH to the PH.
Step 3: The PH will check the validity of the timestamp after receiving the encrypted information from the BK: Then, calculate the ECDSA parameters: Pass the parameter (token , r BK−PH , s BK−PH , Q BK ) to the Verify function of Algorithm 2 to verify whether r BK−PH is correct; if it is correct, the PH receives the BK remittance notification and successfully obtains the claim.

Insurance Dispute Arbitration Phase
When a dispute arises between the PH, the IC or the BK, the PH can propose an arbitration application to the AI.The PH will provide related information for the AI to confirm the PH's information and identity.
When arbitrating insurance disputes, the AI confirms the accuracy of each phase of operation by comparing the information and signatures on the blockchain.Figure 2 shows the flow chart during the insurance dispute arbitration phase.
Sensors 2023, 23, 9577 7 of 23 was treated through the PH's ID.After authorization, the claim will be evaluated in conjunction with the accident identification records provided by the PA. ( 5) Claims Payment Phase: The IC notifies the BK to pay the PH's claim and then uploads the claim record to the BCC and notifies the PH. ( 6) Insurance Dispute Arbitration Phase: When an IC denies a claim or when there is an insurance dispute between the parties involved in the traffic accident, arbitration can be conducted through AI.

Registration Phase
In the registration phase, all roles must first register with the BCC first.
Figure 2 shows the flow chart of the operation in the registration phase.Step 1: Role X first generates an identity, X ID , and sends X ID to the BCC.
The BCC generates an ECDSA private key X d and calculates the public key X Q of role X: Step 2: The BCC sends ,( , ) ID Q d back to role X, and role X stores the ( , )

Insurance Purchasing Phase
When the PH purchases car insurance from the IC, the IC verifies the identity of the PH and signs a policy.The PH will provide the IC with their bank account and then send the generated CC and CD to the BCC.
Step 1: The IC first gives the PH an insurance policy det ail M .The PH will first confirm the content of the policy.After confirmation, the PH will confirm and complete the basic insurance information in the policy to form  Step 1: To confirm the authenticity of the event, the PH must first submit ID PH , ID Policy , and ID TA to the AI.After confirming receipt of the PH's documents, the AI will verify them.If the verification fails, it means that the PH has provided incorrect information; otherwise, the verification is successful, and it will begin signing verification. Step If the verification fails, it means that the PH did not perform the action of medical treatment, and if the verification is successful, the procedure will proceed to the next step.

Decentralized Data Sharing
In this study, we combine the Hyperledger system, where members of the consortium chain must register before sharing data.The flow of information is open and transparent for all members of the same consortium chain.Information cannot be withheld between nodes of the consortium chain.In this way, the trust relationship between nodes is realized.
The study uses the MI, the PA, and the IC as a consortium chain to enable the three parties to transmit the PH's information to each other.The need for data transfer and updates on Hyperledger Fabric requires the agreement of other peer nodes, which is a process also known as consensus.When the consensus of the group reaches 66.6% or more, the data will be sorted by order nodes and transferred to the node to complete the data transfer.Through this mechanism, the decentralized data-sharing feature is achieved.

Traceability
Once the data are uploaded to the blockchain, they cannot be tampered with, and the data on the chain are traceable.
For example, if the PH wants to trace blockchain data during the insurance purchase phase, the PH can verify it by comparing BC PH−IC = h(r PH−IC , s PH−IC ) and BC IC−PH = h(r IC−PH , s IC−PH ).

Immutability
During the signature phase, the sender encrypts the message to be transmitted and adds it to the signature program to obtain the signature value to be transmitted to the receiver.If the receiver finds that the comparison is unsuccessful during data validation, it means that the value of the hash function may have been tampered with and the transmitted message is not the original in order to prevent data tampering.Table 2 shows the data manipulation prevention components in each phase of this document.

Man-in-the-Middle Attacks
To prevent malicious people from altering the content of the data during data transmission and forming a man-in-the-middle attack, this study uses digital signatures and asymmetric cryptography to defend against the attack.When the sender transmits data, the public key can be used to encrypt the data content, and the receiver can use the private key to decrypt the data after receiving them.In this study, the public key is used to encrypt the data, and middlemen cannot obtain the data and manipulate it, so the data can be protected from attack.Table 3 shows the man-in-the-middle attack defense in each phase of this study.
Request the traffic accident identification process Request the medical diagnostic information process

Computation Cost
Table 4 presents the computational cost analysis for each phase of this study, which summarizes the computational time cost of signature verification, function judgment, hashing, and multiplication for each phase.

Communication Cost
Table 5 shows the total communication cost for each stage of the study.For example, the insurance purchasing phase contains two times ECDSA encryption, two times asym-metric encryption, two times IPFS file hash value, four times ID and other information in the transmission of the message, and the total message length is as follows: 2 × 1024 bits + 2 × 512 bits + 2 × 368 bits + 4 × 80 bits = 4128 bits In a 4G communication environment, the time taken for the insured phase is 0.04 ms, while in a 5G communication environment, it takes 0.2 µs to demonstrate the communication speed of each phase.

Performance Analysis
In this section, a reasonable blockchain chain code performance evaluation test will be conducted on the processes in this study.The testing tool is Hyperledger Caliper version 0.5.0, and the runtime environment used for Caliper is Node.jsversion 16.The blockchain platform used is Hyperledger Fabric version 2.2.The server performance is Core i9 9920X@4.5GhzCPU and 24 GB RAM, and the operating system is Ubuntu 20.04.
First, the required data and photos will be stored in IPFS.After storing the data in IPFS, the IPFS ID is obtained.Then, we obtain the blockchain address of the data stored in the blockchain; the IPFS ID and blockchain address are written into a chaincode.We configure the environment required for Hyperledger Fabric and Caliper and set up the various node organizations.Each node organization joins the chaincode for performance testing.The throughput on the blockchain represents the TPS (transactions per second) that can be loaded on the system, and the transaction latency is the time it takes from the time a transaction is initiated to the time a confirmation is received that the transaction is valid.
In this test, we chose 10 sending rate groups from 50 to 500 tps and used load balancing to optimize CPU usage to reduce the server load with a transaction duration of 3 s and several clients of 6.In Figure 3, we analyze the relationship between sending rate and transaction latency.The minimum delay in writing data is 0.42 s, and the maximum delay is 7.13 s.The minimum delay for writing data is 0.42 s, and the maximum delay is 7.13 s.The minimum delay for querying data is 0.01 s, and the maximum delay is 0.02 s.Thus, it can be seen that the latency of the write phase will increase with the sending rate when the sending interval is a certain size, while the latency of the read phase remains stable.In Figure 4, the relationship between the transmit rate and throughput is analyzed.The minimum throughput of a write is 31.8tps and the maximum is 112.8 tps, while the minimum throughput of a read is 51.1 tps and the maximum is 491 tps.
From the above tests, it can be concluded that the proposed claims system can store and read a large amount of data in the actual insurance data, and the consortium chain members in the system can effectively store the policyholder data on the blockchain and can quickly access the data and interact with other parties if they want to access the data.

Comparison Table of the Characteristics of Related Work
In this section, we compare our proposed solution with other articles on the application of blockchain in insurance in Table 6.

Conclusions
The study used Hyperledger Fabric combined with IPFS for system performance analysis.In the experimental environment, the system demonstrated a minimum throughput of 31.8 tps and a maximum throughput of 112.8 tps for write operations.For read operations, the minimum throughput was 51.1 tps and the maximum throughput reached 491 tps, confirming the feasibility of the system performance.Furthermore, the latency time for write operations was recorded at 7.13 s, while read operations had a latency time of 0.02 s, both falling within acceptable time ranges.Such insurance data, whether in terms of latency time or throughput, can provide efficient transmission results for insurance data.Additionally, blockchain technology ensures the anticounterfeit traceable functionality of insurance data.The system also incorporates ECDSA encryption technology, achieving the goal of non-repudiation.
For any insurance company, this study can reduce the time cost of meeting with the policyholder, increase the speed of claim settlement, improve corporate reputation, and quickly obtain relevant authorization information from police agencies and medical institutions.For the policyholder, it can save the complicated claim application procedure and reduce the time required for insurance, and because the insurance documents and traffic accident information are stored on the blockchain and IPFS, the policyholder does not need to carry a lot of insurance documents in the process of applying for insurance claims.

)
Pass the parameter (token, k PH−PA , d PH ) to the Sign function of Algorithm 1 to obtain the signature value (r PH−PA , s PH−PA ), which the PH sends ID PH , C PH−PA ,(r PH−PA , s PH−PA ), TS PH−PA to the PA.
Pass the parameter (token, k MI−PH , d PA ) to the Sign function of Algorithm 1 to obtain the signature value (r MI−PH , s MI−PH ), which the MI sends ID MI , C MI−PH ,(r MI−PH , s MI−PH ), TS MI−PH to the PH.

Figure 2 .
Figure 2. The flow chart during the insurance dispute arbitration phase.
the PH selects a random value PH IC K − and uses the IC's public key IC PUK for encryption:

Figure 2 .
Figure 2. The flow chart during the insurance dispute arbitration phase.

2 :
The AI will first pass the PH's ID TA and obtain the signature values (r PH−MI , s PH−MI ), (r MI−PH , s MI−PH ), (r IC−PA , s IC−PA ), (r PA−IC , s PA−IC ), (r IC−MI , s IC−MI ), (r MI−IC , s MI−IC ), (r IC−BK , s IC−BK ), and (r BK−PH , s BK−PH ), and then it will verify according to the signature value.The AI will first verify BC PH−MI and BC MI−PH : BC PH−MI ?= h(r PH−MI , s PH−MI ) (69) BC MI−PH ?= h(r MI−PH , s MI−PH ) If the PH wants to trace the blockchain data during the traffic accident phase, they can verify it by comparing BC PH−PA = h(r PH−PA , s PH−PA ) and BC PA−PH = h(r PA−PH , s PA−PH ).If the PH wants to trace the blockchain data during the medical phase, they can verify it by comparing BC PH−MI = h(r PH−MI , s PH−MI ) and BC MI−PH = h(r MI−PH , s MI−PH ).Through the above matching method, we can ensure the traceability of data.
add Fig.3and Fig.4.The captions of Fig.3and Fig.4as the attached file "Correctness.doc".Line 3 of page 20 should be corrected into Fig.4.Other narratives remain unchanged.The renewal is correct as the attached file "Correctness.doc".

Figure 3 .
Figure 3. Latency time in different workloads

Table 2 .
Prevention of data manipulation in each phase.ID PH , M detail , TS PH−IC ) IC PH token = h(ID PA , C IC−PH , TS IC−PH ) ID PH , C PH−PA , TS PH−PA ) PA PH token = h(ID PA , C PA−PH , TS PA−PH ) ID PH , C PH−MI , TS PH−MI ) MI PH token = h(ID MI , C MI−PH , TS MI−PH )

Table 3 .
The man-in-the-middle attack defense in each phase.

Table 4 .
Cost in time for each stage of computing.Notes: T asy : Signature generation/validation calculation time.T amp : Calculation time of the determination of the function.T h : Hash calculation time.T mul : Multiplication time.

Table 5 .
Communication cost for each stage.

Table 6 .
Compare other related articles.