Smart Messages (SMs) are migratory execution units used to describe distributed computations over mobile ad hoc networks of embedded systems. The main benefits provided by SMs are flexibility, scalability, and the ability to perform distributed computations over networks composed of heterogeneous, resource constrained, unattended embedded systems. A key challenge that confronts SMs, however, is how to define a security architecture that protects both the SMs and the hosts, while preserving the SM benefits. In this paper, we present a basic SM security architecture which sets up a framework for the security related issues of SMs and provides solutions for authentication, authorization, and secure SM migration. Since this paper is the first attempt to investigate the unique security challenges posed by a system based on mobile code executed over mobile ad hoc networks, we also discuss the main issues that remain to be solved for a more comprehensive SM security architecture.