Since sensor nodes suffer from limited resources, in memory storage, computing power, energy capabilities, and transmission rates, available network security protocols are inadequate. Symmetric algorithms cannot provide the same degree of security as public-key algorithms, the fact of which has led us to devise a new algorithm, SHESP, which uses public keys within the limitations of sensor nodes. This paper aims to present a way to utilize existing public-key algorithms in the field of wireless sensor network security by dividing the network into clusters. Our algorithm supplies data confidentiality, node authentication and data integrity while remaining within acceptable memory, time and energy constraints. Also, an important feature we opted to establish, which was lacking in most security protocols, was enabling secure node-to-node communication, without the need to route through a distant base station. We provide theoretical as well as experimental evidence to validate our algorithm.