Skip to main content
. 2025 Aug 21;25(16):5188. doi: 10.3390/s25165188
Algorithm 1 Sensing layer algorithm for east–west interface trust evaluation
  • Require: Set of SDN controllers C={C1,C2,,Cn}, Probing frequency fp=1Δt,

       Threshold trust value θ, Public key Kpub of blockchain node

  • Ensure: Encrypted trust dataset Ψenc, Trust evaluation report Tr

  •   1: Initialize metric set M=, timestamp t=0

  •   2: for each controller CiC do

  •   3:     Initialize local metric buffer Mi=

  •   4: end for

  •   5: while network is active do

  •   6:     for each controller CiC do

  •   7:         Sample trust-critical parameters mt=[PDRt,Lt,CMIt,RCt,BASt]

  •   8:         Record timestamp tt+Δt

  •   9:         Append (t,mt) to Mi

  •   10:        if anomaly detected in mt then

  •   11:            Increase probing frequency fpfp+δ

  •   12:        else

  •   13:            Restore probing frequency fp1Δt

  •   14:         end if

  •   15:         Compress mt using CABAC: m^tCABAC(mt)

  •   16:         Encrypt m^t: EtEncKpub(m^t)

  •   17:         Generate integrity hash: htH(Et)

  •   18:         Create secure packet: Ψenct{Et,ht}

  •   19:         Send Ψenct to blockchain verifier

  •   20:     end for

  •   21:     for each received Ψenct at blockchain layer do

  •   22:         Decrypt Et using Kpriv, validate hash ht

  •   23:         if H(Et)=ht then

  •   24:            Validate sender identity via smart contract SC

  •   25:            if identity ∈ registry and signature matches then

  •   26:                Approve trust record: TrTr{Ci,t,mt}

  •   27:                Send ACK to Ci

  •   28:            else

  •   29:               Mark Ci as malicious

  •   30:                Remove Ci from network set C

  •   31:            end if

  •   32:         else

  •   33:            Reject data: Integrity violation

  •   34:         end if

  •   35:     end for

  •   36: end while

  •   37: return Final encrypted trust dataset Ψenc and report Tr