## 4 Secure Authentication and Prescription Safety Protocol  
A novel protocol for TMIS is presented to protect patient's privacy and satisfy the security requirements. Mutual authentication enables the communicating parties to verify each other's identities. The proposed Secure Authentication and Prescription Safety (SAPS) protocol demonstrates that it is dynamic and overcomes the above-highlighted flaws in the existing schemes. In SAPS, user authentication and verification are performed by the trusted server (\(TS\)). The patient and doctor/nurse are the sender and receiver nodes, respectively, in the proposed scenario to establish the secret keys using SAPS. In this section, all the protocol steps are elaborated on, along with a description of the message contents of a SAPS scenario. It includes a trusted server (\(TS\)), patient (A), and a doctor/nurse (B). ASAP provides a secure link for the Patient (A) to communicate securely with a physician to obtain a medical opinion. We highlight that ECC-based mutual authentication is secure against numerous significant attacks and improves the communication and memory requirements of authentication. Considering the positive characteristics of ECC, such as the shorter secret key size and computational efficiency, it is attractive to establish an ECC-based anonymous 3-PAKE protocol to protect TMIS users. By exploring existing literature and studies, there is no such system based on ECC that gives anonymous 3-PAKE protocol to authenticate users without knowing their private information publicly. It achieves its security benefits due to the hardness property of the EC Discrete Logarithm Problem (ECDLP). A list of useful notation for SAPS is listed in Table 1.  
In the SAPS protocol, we have assumed that during the registration phase, the TS provides masked identities for both the patient and doctors at the point of registration. Participants provide some secret credentials, such as biometrics, to verify their original identities and record the time of service request. The TS uses the parties' secret credentials for future verification, keeping their original identities and private information secret. Besides this, the authentication protocol satisfies the following functions and security requirements to achieve credible and secure authentication and data sharing in TMIS. 1. Person anonymity: In an authentication mechanism, despite the fact that an attacker extracts some and can eavesdrop on the shared message within the communication network, the legal participant's identity is kept anonymous from the intruder. 2. Identity proof: the process in which both the user and authentication server prove their identities before accessing each other. Numerous steps are performed to achieve mutual authentication to check the integrity of all transmitted messages. 3. Session key management: When the verification method is consummated, the consumer and server must present the consultation key to each other. 4. Password verification manner: If a person has entered an incorrect password within the authentication section, the password has to be detected earlier than the check phase. 5. Person cordiality: An authentication mechanism system provides a password change method through which an individual may facilely change their password without communicating with the server. 6. Robustness: An authenticated key acquisition mechanism has been engendered, and has to be resistant to extraordinary types of assaults, insider attacks, off-line password conjecturing attacks, replay assaults, and consumer impersonation assaults. Besides this, in the proposed protocol, the TS partially establishes a session key between each party. Using the secret credentials generated by the TS, the ends parties establish a session key for the particular session which helps to protect participant identities and ensure un-traceability. During authentication, a new patient (A) and doctor (B) submit their original identity to the TS using a secure channel.