Skip to main content
. 2026 Feb 16;26(4):1285. doi: 10.3390/s26041285
Algorithm 1 Branch-based layer selection with adaptive intrusion detection
  • Require: 

    Branch type u{human,machine,selective_encryption,fully_encrypted}

  • Require: 

    Intrusion flag intrusion_detected{0,1}

  • Ensure: 

    Activated layer list

  •  1:

    activated_layers[]

  •  2:

    if intrusion_detected=1 then

  •  3:

        activated_layers[2,3,5]                                                ▹ Force full encryption

  •  4:

    else

  •  5:

        if u=human then

  •  6:

            activated_layers[2,3]

  •  7:

        else if u=machine then

  •  8:

            activated_layers[1,3]

  •  9:

        else if u=selective_encryption then

  • 10:

            activated_layers[1,3,4]

  • 11:

        else if u=fully_encrypted then

  • 12:

            activated_layers[2,3,5]

  • 13:

        end if

  • 14:

    end if

  • 15:

    return activated_layers