# Leveraging Blockchain Technology for Secure 5G Offloading Processes +
## 3 Blockchain-Based Secure 5G Offloading Mechanism
### Blockchain for Secure Authentication Among Operators
#### 3.2.2 Operation  
Figure 6 shows the authentication related operations (credential issuance from primary operator and verification from secondary operator) considering the polling alternative among SSI controller and SSI agent. For simplicity, it is supposed that DIDs for all the agents have already been created and they have already been on-boarded, and therefore they can communicate with each other.  
As previously discussed, the SSI controllers are periodically polling their respective ACA-Py agents, allowing the user and operators to make conscious decisions. On the one hand, the credential issuance operation requires the following steps:  
1. The SSI controller of the primary operator receives the information by the offloading event with all the information required to issue the identity credential.
2. The SSI controller of the primary operator notifies the SSI agent to create the credential with the required attributes.
3. The SSI agent obtains the schema and DID information of the UE from the Hyperledger Indy Blockchain network.
4. The SSI agent of the primary operator issues the identity credential to the UE SSI agent.
5. Periodically, the SSI controller of the UE is polling the SSI agent for news.
6. For the polling request in which the SSI agent of the UE has already received the credential, the UE SSI controller decides to accept or not the credential.
7. If the credential is accepted, the SSI agent locally stores it and the release of resources can happen in the primary operator.  
On the other hand, the credential verification operation to happen on the selected secondary operator requires the following steps:  
1. The SSI controller of the secondary operator receives the information from the offloading event with all the information required to request an identity proof to the particular UE (UE identifier).
2. The SSI controller of the secondary operator notifies the SSI agent to create an identity proof request to the UE.
3. The SSI agent obtains the schema and DID information of the UE from the Hyperledger Indy Blockchain network.
4. The SSI agent of the secondary operator sends the identity proof request to the UE SSI agent.  
Figure 6: SSI-based authentication mechanism with polling.  
Periodically, the SSI controller of the UE is polling the SSI agent for news.
* For the polling request in which the SSI agent of the UE has already received the identity proof request, the UE SSI controller decides to accept or not the issuance of a proof response.
* If the proof request is accepted, the SSI agent lof the UE sends the associated proof response to the SSI agent of the secondary operator.
* Periodically, the SSI controller of the secondary operator is polling the SSI agent for news.
* For the polling request in which the SSI agent of the secondary operator has already received the proof response, the SSI controller decides to accept or not it.
* If the proof response is accepted, the SSI agent of the secondary operator verifies the signatures of the received proof response against the Hyperledger Indy Blockchain network to be sure of its authenticity.
* The SSI controller of the secondary operator continues polling its agent periodically.
* For the polling request in which the SSI agent has already verified the proof response, the SSI agent sends the verification result to the SSI controller, which analyses the offloading parameters and provides the required and agreed resources to the UE.