Sensor networks will play an important role in the next generation pervasive computing. But its characteristic of wireless communication brings a great challenge to the security measures used in the communication protocols. These measures are different from conventional security methods. In this paper, we proposed a security architecture for self-organizing mobile wireless sensor networks. It can prevent most of attacks based on intrusion detection. Then an analysis of each layer in our security architecture is discussed and the secure measures in the link layer ...