The efficiency of tools used to collect private medical data on people has significantly improved over time. These include implanted, surfacemounted, or encircling devices that form a wireless body area network (WBAN). Although the most recent secure authentication techniques in the industry offer privacy and security, these schemes have a higher time cost for authentication and take longer to complete owing to the restricted computational power of WBAN devices. We provide a novel authentication method depending on the lightweight wearable device scheme for the WBAN environment. Wearable devices are used to capture sensor data from the patient's body in the beginning, after which any redundant data is removed by normalization. The method we suggest for encrypting the data is multi-fractional triphase duplex data encryption (MTDDE) with ant colony optimization (ACO). The method considers not only the security of the data but also the many limitations of sensor nodes, such as battery life, throughput, computing power limitations, and dynamic topology. The thorough research demonstrates that our suggested technique saves computing costs while maintaining security and privacy together with anonymous verification. The suggested system's effectiveness in protecting the privacy and confidentiality of patient health data in WBAN is demonstrated by the simulation model.