Wireless sensor networks are usually applied in hostile areas where nodes are easy to be moni-tored and captured by adversary. Key distribution is an essential primitive to provide most of security mechanism. However, the characteristic of limited resources of sensors restricts the direct use of conventional key distribution schemes. In this paper, a complete security key distribution scheme based on asymmetric cryptography technology is proposed in both static and mobile scenarios. Mutual authentication is guaranteed using challenge-response mechanism. The per-formance evaluation and security analysis show that the proposed scheme with low complexity not only provides better security for wireless sensor networks, but also reduces storage overhead and key exposure risks.