Research Article

Trusted and Efficient Cross-Domain Access Control System Based on Blockchain

Algorithm 3

uploadPolicy.
(1)Input: devID, policy, sig
(2)output: bool
(3)% invoke by DMS to upload the device’s access policies.
(4)% policy = {“role1, op1&op2&op3”;…}
(5)%
(6)if verify (DMS_ID, sig) = true && devID.DO = = DMS_ID.DO then
(7){
(8)if stub.GetState (devPK) ! = null then
(9)  updateAHL (policy_update, devPK);
(10) stub.PutState (devPK, policy);
(11) return 0;
(12)}
(13)else
(14) return 1;