Advances in sensing, networking, and the ambient intelligence of wireless sensor networks (WSNs) have been taking place in many applications recently. Growing health-care systems need wireless-based sensor networks to provide data on the health status and living environment of patients during periods of illness. Mainly WSNs use the mechanism of clustering to reduce the energy consumption required with hierarchical structures to enhance network performance. The second prevalent challenge concerns the security of WSN cluster nodes because of the big attacks and security investigations come in WSN-health care applications as a challenging and motivating problem. This paper focuses on two essential platforms adopted within WSN applications. The hardware platform characterizes the WSN cluster nodes specifying automatically encrypted nodes during routing. The software platform is a simulation performed with two features: one identical to the hardware platform to enhance the results and compare between them, a second structure implementing three encryption algorithms as a reasonable technique to secure cluster nodes: Caesar cipher, RC4, and advanced encryption standard (AES). The first goal achieved by our plan is our private and secure medical protocol, which depends on identity-based cryptography, accomplished via the hardware platform. The second goal derived from the simulation is increasing the number of PEGASIS chains when the time needed to perform the task is limited particularly in cases of emergency to preview history and data of patients, but more chains get many frames of data aggregation, which causes overlap. Eventually, the system provides a rapid, efficient, flexible, secure, and authoritative infrastructure where our results showed that data retention in the node and by using the appropriate cryptographic algorithms in the group achieved privacy and security in the health care centers.