Key establishment among neighboring sensors is the most challenging issue for security services such as authentication and confidentiality in wireless sensor networks (W). To date, several key establishment schemes have been proposed. Some of these have appropriate connectivity and resistance against key exposure, but the resources needed in the sensors are substantial. Others are appropriate from the resource consumption perspective, but have weak performance. In this thesis, at first, a comprehensive framework for key management protocols in W is introduced. The goal of this framework is to exploit a variety of techniques to design new key management protocols considering sensor limitations and their usages. In the second part, we propose four new key management protocols for various networks. The proposed protocols take advantage of prior knowledge about sensor deployment, and use some new models to generate and distribute the secret information for each sensor. Using these models, sensors can simply determine whether or not they can generate a common key with other sensors. In addition, they can simply find an agent to generate an indirect common key when required. In the last part, we evaluate and compare the performance of different protocols. Key Words Key management protocol, Wireless sensor network, Symmetric polynomial, Blom scheme, Perfect security, Key pre-distribution.