# VANET Secure Reputation Evaluation & Management Model Based on Double Layer Blockchain
## 3 Basic Concept and Initial Settings
### System Operation  
_System initialization_: Vehicle nodes that join the system for the first time submit their identity information to the TA. Upon validation, the TA issues a pseudonym, digital certificate, and generates a private-public key pair through an elliptic curve to complete the vehicle identity registration. The vehicle's detail information is stored in the ledger of the blockchain in the form of {public key | pseudonym | network access time | reputation value | hash value | signed (public key | pseudonym | network access time | reputation value | hash value)} as a transaction.  
_Activities in the Network_: The activities of the vehicle nodes in the network can be divided into four parts, including:  
1. When a vehicle node observes events, such as traffic jams, traffic accidents, bad weather, etc., it records and broadcasts the event information to the RSU. Then RSU will broadcast the event content to the vehicle nodes near the target event for observing and verifying the authenticity of the event (if it is in a remote area without RSU coverage, it will be directly broadcast to the surrounding vehicles for cooperative verification);
2. When the vehicle node receives the verification request to observe the target event, it may form several different observation reports with different speeds, distance, and other factors. The multi-factor is quantified as unified through cosine similarity, and then the direct trust is calculated through Bayesian inference. The detailed algorithm for the calculation of direct trust is given in Section 4.2;
3. The vehicle node communicates cooperatively with other surrounding nodes, and the direct trust generated by other nodes for the event is regarded as indirect trust, weighted to obtain the overall indirect trust for the event. The details of the indirect trust computation are given in Section 4.3;
4. Following the calculation of direct and indirect trust, the overall trust of the target vehicle is obtained by fusion, and then all of the information is summarized and reported to the RSU. The activities of the RSU in the network can be divided into two parts, including:  
1. When the RSU receives the event observation report uploaded by the vehicle node, it queries the vehicle nodes near the target area and makes requests for verification;
2. Upon receiving the node trust of each cooperative certification vehicle and the calculated overall trust for the target vehicle, the historical reputation and social trust of the target vehicle are queried in the reputation chain and the new reputation value of the vehicle is obtained by integration. The event content and the reputation update content are recorded in the event chain and reputation chain, respectively. The specific algorithm will be given in Section 4.4.  
_Report format_: Assume that the network predefined a set of mutually exclusive basic event structures \(\Omega=\{e_{1},e_{2},...,e_{n}\}\), each \(e_{i}\) represents an event that can be detected by vehicles, and the report \(W_{i}\) broadcast by the vehicle nodes can be expressed as a set of one or more basic events, denoted as \(E_{i}\), and contain additional information of the vehicle's state when it observed an event, such as timestamp \(t_{i}\) and distance \(d_{i}\). The complete report format is denoted as \(W_{i}=\{E_{i},t_{i},d_{i},...\}\).  
_Termination_: No matter whether the vehicle node goes off automatically or is found to be a malicious node and forced to go off by the system, the RSU uploads the information from the vehicle node to the TA, and the TA revokes the key pair and the digital certificate of the node, and the node cannot participate in network activities any more. When a node wants to re-enter the network, it needs to re-register with the TA. Vehicle information will remain permanently in the reputation chain.