Wireless sensor networks provide a low-signature communications system that can be used for a wide variety of military applications. These networks are vulnerable to intrusion, however, and must balance security with performance and longevity. The neighbor discovery process is vital for nodes to maintain network connectivity but introduces security vulnerabilities therefore, a lightweight security protocol is necessary to prevent unauthorized nodes from accessing network data and resources. In this thesis, we focus on the management of encryption keys in a resource-limited, peer-to-peer, decentralized network. Existing protocols for securing the neighbor discovery process use public key encryption, which is too computationally expensive for low-powered, resource-constrained IEEE 802.15.4-enabled devices. We therefore develop a key management scheme that modifies the Neighbor Discovery Protocol NDP and Secure Neighbor Discovery SEND protocol and implements the Diffie-Hellman key exchange algorithm for symmetric key management. We simulate our scheme in MATLAB to demonstrate its effectiveness insecuring the neighbor discovery protocol while providing energy efficiency, key security, and error resistance.