*Corresponding author: randashaker1984@gmail.com http://journal.esj.edu.iq/index.php/IJCM 72 Iraqi Journal for Computer Science and Mathematics Journal Homepage: http://journal.esj.edu.iq/index.php/IJCM e-ISSN: 2788-7421 p-ISSN: 2958-0544 Secure Heart Disease Classification System Based on Three Pass Protocol and Machine Learning Randa shaker Abd-Alhussain* 1 ,Hadab Khalid Obayes 2 , Farah Al-Shareefi 3 1 College of science for women, University of Babylon,Babylon,51002, Iraq 2 College of education for humanities studies, University of Babylon,Babylon, 51002, Iraq 3 College of science for women, University of Babylon,Babylon, 51002, Iraq *Corresponding Author: Randa Shaker DOI: https://doi.org/10.52866/ijcsm.2023.02.02.003 Received November 2023 ; Accepted Jenury 2023 ; Available online Februry 2023 1. INTRODUCTION Globally, heart diseases are the major cause of human morbidity and mortality. In order to save the patients' life and prevent further deterioration in their health, an early and accurate diagnosis is undeniably vital. Currently, the leading technologies supported by Artificial Intelligence (AI) are utilized in diagnosing heart diseases accurately[1]. One of the AI applied algorithms is machine learning. A range of strategies are used in machine learning to assist in enhance making decisions in the diagnosis process according to medical data[2][3]. However, choosing a machine learning technique with the most precise performance is still under scrutiny. In addition, any diagnosis process needs to determine a very cautiously selected set of characteristics representing the disease conditions. Along with the diagnosis related concerns, more attention should be paid to protect the patients' bio-medical data from any unauthorized access by hackers and criminals. In order to ensure the security of data, encryption methods can be used. Cryptography often uses mathematical techniques to carry out encryption and decryption on sent data, also known as messages[4].Cryptography is classified into two types: symmetric-key cryptography, and public-key cryptography [5]. A common and secure symmetric-key technique for encrypting important data is called Advanced Encryption Standard (AES). Key distribution, however, is one of the problems connected with this technique [6].In other words, the AES assumes that the key is securely dispensed among the participants and that there is an implicit trust established between them, which is not true in all cases. Fortunately, the cryptography algorithms are used by protocols, called cryptographic protocols. These protocols achieve one or more security services, such as: key distribution, authentication, secrecy, etc. [7]. One of these protocols is Three-Pass (TP) protocol, which is developed to exchange secret messages between the sender and the receiver without a prior key exchange between them[8]. According to the above debate, this paper focuses on executing the TP protocol to tackle the AES’s issue and to reinforce the confidentiality of patient’s information. Furthermore, this research shows how to build an effective and safe healthcare system while taking advantage of the dataset on heart disorders already accessible, in order to create an algorithm that aids in the diagnosis and classification of heart patients using a set of clinical markers. Compared to previous relevant research and mainly for the need to improve the performance accuracy. essentially, we analyze the ABSTRACT: Heart disease is one of the worst life-threatening conditions. Correct and early diagnosis of this disease is crucial for saving patients’ life and avoiding other complications. On the other hand, keeping the patient’s data, diagnosis process, and treatment plan secured is equally important to the defacto medical procedure. This research proposes a system that is consisting of two phases: security provision and patients’ condition diagnosis. Typically, the first phase exercises a security protocol, called three-pass protocol, to ensure that the people who can access the patient's information are authorized. In order to obtain a high accuracy level in the diagnosis process, artificial intelligence with machine learning methods are employed in the later phase. The proposed system relies on a data set which includes a number of vital indicators, by which the patient's status can be classified as having heart disease or not. The K-Nearest Neighbor (KNN) algorithm and the random forest tree algorithm are applied to carry out the classification task. The accuracy scale results reveals that the random forest tree algorithm (99%) gave higher accuracy than KNN (97%). Keywords: Hear t Disease, KNN, Random Forest, Three Pass Protocol, Security