## 5 Ndn-Bda
### Producer Registration  
The producer vehicle registration process in NDN-BDA involves multiple steps, which we discuss in detail below. Figure 7 provides a visual representation of the steps that are involved in the producer registration process.  
_Step 1_: The producer vehicle \(PV\) sends an _Interest_ packet \(si_{1}\) with a name similar to:  
\"/NDN-BDA/MS/join/(CID/VID)\(K_{MS}\)\" and signs it with the vehicle owner's private key \(K_{CID}^{-1}\). The name of the signed _Interest_ starts with /NDN-BDA/MS to indicate the destination, which is, in this case, the \(MS\). Keyword join indicates to the \(MS\) that this message is a request to join the network of producers. The Interest's name also includes the CID and VID information, encrypted with the MS's public key \(K_{MS}\). This ensures that the information remains confidential during transmission, and only the \(MS\) can read it.  
_Step 2_: Once the \(MS\) receives the signed _Interest_ from the producer vehicle \(PV\), it decrypts the associated CID and VID information using its private key: \(decrypt((\text{CID}/\text{VID})\)\(K_{MS},K_{MS}^{-1})\). Following that, the \(MS\) sends a signed _Interest_\(si_{2}\) with a name \"/NDN-BDA/MS/join/CID/VID\" to the \(VRE\) to verify whether the association CID and VID exist or not in the VRE's database. It checks whether the vehicle's owner, identified by its CID, possesses the vehicle identified by the received VID. Following the reception of the signed _Interest_\(si_{2}\), the \(VRE\) checks the CID/VID association in its database. If it exists, the \(VRE\) responds with a _Data_ packet \(d_{1}\) containing the citizen's certificate. Otherwise, it notifies the \(MS\) that the received CID/VID association does not exist.  
_Step 3_: After the reception of _Data_ packet \(d_{1}\), the \(MS\) stores the received certificate, if it exists, and sends a notification to \(PV\) regarding the outcome of its request, indicating whether it was accepted or not.  
_Step 4_: The fourth step of the process involves \(PV\) generating an asymmetric key pair \((k_{VP},K_{VP}^{-1})\). Once the key pair is generated, \(PV\) sends to the \(MS\) a signed _Interest_ packet \(si_{3}\) with the name \"/NDN-BDA/MS/sign/{VID/<key>}\(K_{MS}\)\". The name contains the keyword sign, which indicates that the \(PV\) requests a certificate for its generated public key. The  
Figure 6: Overview of the trust schema used by NDN-BDA.  
name of \(si_{3}\) embeds the value of the public key encrypted with the \(MS\)'s key \(K_{\text{MS}}\) to ensure information integrity and secrecy.  
Step 5 When the sign request is received, the \(MS\) first verifies the authenticity of \(si_{3}\) using the certificate that it stored in _Step 3_. Then, the \(MS\) decrypts the information of the key that the \(PV\) intends to sign, which is performed by using the \(MS\)'s private key: \(decrypt(\{\text{VID}/\text{<key>}\}K_{\text{MS}}\),  
\(K_{\text{MS}}^{-1})\). Following that, the \(MS\) generates a signed _Interest_ packet \(si_{4}\) with a name that is identical to \"/NDN-BDA/SCA/sign/CID/VID/<key>\" and sends it to the System Certification Authority (\(SCA\)) to create a certificate for the public key \(K_{VID}\).  
Step 6 Upon the reception of \(si_{4}\), the \(SCA\) generates a certificate for the received public key value in <key> and sends back to the \(MS\) a _Data_ packet \(d_{3}\) containing the generated certificate.  
Step 7 When it receives the generated certificate from the \(SCA\), the \(MS\) creates a new block in the blockchain \(BC\) containing the certificate of the \(PV\). Afterward, the \(MS\) transmits the newly generated certificate to the \(PV\) within a _Data_ packet \(d_{4}\). With the reception of \(d_{4}\), the process of the \(PV\) registration is complete, and the \(PV\) can now generate and send _Data_ into the network.