A wireless sensor network (WSN) is an ad hoc wireless network composed of a large number of small sensor nodes. Sensor nodes are usually severely resource limited and power constrained, and as such security enforcement in WSNs is a challenging task. To facilitate security enforcement, we propose a heterogeneous architecture for WSNs, where a WSN is partitioned into clusters, each having a high-end cluster head. The cluster heads are further equipped with trusted computing technology (TC), such that they act as online trusted parties, thereby expected to help enforce security in a more effective manner. To show this, we discuss various examples on both content security and context security. Copyright © 2010 John Wiley & Sons, Ltd.