Blockchain-Based DNS Root Zone Management Decentralization for Internet of Things
Algorithm 2. DelegateVerification().
Input:
CurDelegationTxn
Output:
bool
1: if CurDelegationTxn has invalid field value then
2: return false
3: end if
4: if prevtx !=; then
5: verify_key = prevtx.AuthKey
6: sig = CurDelegationTxn.Signature
7: if VeriSig(verify_key, sig) != true then
8: return false
9: end if
10: / validity period of prevtx needs to cover the validity period of CurDelegationTxn /
11: if prevtx.ValidFrom < CurDelegationTxn.ValidFrom or prevtx.ValidTo > CurDelegationTxn.ValidTo then
12: return false
13: end if
14: if op_type == Transition or Revocation then
15: if ConfirmOPs of CurDelegationTxn do not satisfy prevtx.TransitionPolicy/RevocationPolicy then
16: return false
17: end if
18: end if
19: if op_type == RenewalPolicy then
20: if CurDelegationTxn.TimeStamp - prevtx.TimeStamp > prevtx.RenewalGracePeriod then
21: return false
22: end if
23: end if
24: if op_type == RedemptionPolicy then
25: if (ConfirmOPs of CurDelegationTxn do not satisfy prevtx.RedemptionPolicy) or (CurDelegationTxn.TimeStamp - prevtx.TimeStamp > prevtx.RedemptionGracePeriod) then