Research Article
A Secure and Efficient Access Control Scheme for Shared IoT Devices over Blockchain
Figure 2
Secret key negotiation confirmation process in the smart contract. Note: (I) The user calls the interface AddOrderUserSKV() of the user to verify the negotiation key, updates the authentication message of the user’s negotiation key UserSKV and sets the authentication message update flag of user UserSKV\_flag as true. (II) The IoT device calls the interface AddOrderIoTSKV() of the IoT device to verify the negotiation key, updates the authentication message of the user’s negotiation IoTSKV, and sets the authentication message update flag of the IoT device IoTSKV\_flag as true. (III) When the user or IoT device calls the interface to verify the negotiation key, they can judge whether both parties have finished the update of SKV by verifying the message update flag UserSKV\_flag and IoTSKV\_flag. If the update is not finished, it notifies the user or IoT device to wait for another to update the SKV within a certain period of time. (IV) When the SKV of both the user and IoT device has been updated, it judges whether UserSKV is equal to IoTSKV; if the SKVs of both parties are not equal, it means that the secret key negotiation between the parties fails, the fee will be refunded to the user, and both parties will be notified of the failure of this service. (V) If the SKVs of both parties are equal, the service starts and start time is recorded. Furthermore, it pays for GWN to provide services for the secret key negotiation.