Hierarchical and Dynamic Elliptic Curve Cryptosystem (HiDE) is a self-certified public key method used in the security of medical data. HiDE offers a hierarchical cluster-based system consisting of a Backbone Cluster and numerous Area Clusters to support a high number of sensors. A Secure Access Point (SAP) in an Area Cluster receives medical data from Secure Sensors (SSs) in the sensor network and sends it to a Root SAP in the Backbone Cluster. As a result, the Root SAP may service a large number of SSs without having to create separate secure connections with each one. HiDE provides the Elliptic Curve Cryptosystem based Self-certified Public key scheme (ESP) for creating secure sessions between each pair of Cluster Head (CH) and Cluster Member (CM) to enable dynamic secure sessions for mobile SSs joining SAP (CM). Without knowing the CM's secret key, the CH may issue a public key to a CM and calculate a Shared Session Key (SSK) with that CM in ESP. This approach meets the Zero Knowledge Proof, allowing CHs to construct secure sessions with CMs without having to manage the CM's secret keys. According to our research in realistic implementations and network simulations, ESP requires fewer computational and network resources than the Rivest-Shamir-Adleman (RSA) based public key method. Furthermore, security research reveals that the keys in ESP are properly safeguarded. HiDE can therefore maintain sufficient network performance for wireless sensor networks while protecting the confidentiality of critical medical data with minimum processing cost.