Abstract
This thesis proposes EcoSec, a thin security layer for supportingsecure access and macroprogramming of wireless sensor networksconsisting of ultra-compact, resource-constrained nodes with agateway. The user names the requested resource in the WSN in theform of a uniform resource identifier (URI). The user must beauthenticated first and access rights checked by a trustedauthentication mechanism, which sends a signed request back to theuser along with the code fragment for access. The gateway checks andrewrites code to enforce access rights and sends the code to thenode; the node checks the code signature before execution. Thisapproach is lightweight enough to run on some of the mostresource-constrained wireless sensor platforms such as Eco.Moreover, it is sufficiently lightweight that it can be easilyintegrated with a lightweight macroprogramming and interactive programming environment called EcoCast.Experimental results show that EcoSec in conjunction with EcoCastrun with minimal overhead while taking only a few KB of code anddata memory.