Research Article

TEE-Watchdog: Mitigating Unauthorized Activities within Trusted Execution Environments in ARM-Based Low-Power IoT Devices

Algorithm 1

Translating the application’s manifest file to memory-mapped access table
Input:,   ⊳ CBOR-encoded Manifest File and list of system peripherals
Output: Access Table
procedure Policy_Converter ,
 = Decode
3 Initialize Access Table                   ⊳ Initialize the Access Table data structure
token = Tokenize            ⊳ Begin converting text into tokens and get first token
while token do
if token==“UniqueID” then
  token = Tokenize                         ⊳ Get next token
  Access Table [i].app_ID = token
else if token==“Policies” then
  while 1 do
   token = Tokenize                        ⊳ Get next token
   
   while ti is less than sizeof (Peripherals) do
    if token==Peripherals[ti].name then
     Access Table [i].peripheral = Peripheral[ti].addr
     token = Tokenize                      ⊳ Get next token
     if token==“RW” then
      Access Table [i].perm = = “RW”
       ++
      break
     else if token==“RO” then
      Access Table [i].perm = = “RO”
       ++
      break
     else
       ++
      break                            ⊳ Invalid permission
     end
    else
      ++
    end
   end
   if token has terminator then
    break
   end
  end
 else
  do nothing
 end
end
end procedure