###### Abstract  
Smart farming is an agricultural technology integrating advanced technology such as cloud computing, Artificial Intelligence (AI), the Internet of Things (IoT), and robots into traditional farming. Smart farming can help farmers by increasing agricultural production and managing resources efficiently. However, malicious attackers can attempt security attacks because communication in smart farming is conducted via public channels. Therefore, an authentication scheme is necessary to ensure security in smart farming. In 2024, [PERSON] et al. proposed a privacy-centric authentication scheme for smart farm monitoring. However, we demonstrated that their scheme is vulnerable to stolen mobile device, impersonation, and ephemeral secret leakage attacks. This paper suggests a secure and privacy-preserving scheme to resolve the security defects of the scheme proposed by [PERSON] et al. We also verified the security of our scheme through \"the Burrows-Abadi-Needham (BAN) logic\", \"Real-or-Random (RoRdR) model\", and \"Automated Validation of Internet Security Protocols and Application (AVISPA) tool\". Furthermore, a performance analysis of the proposed scheme compared with related studies was conducted. The comparison result proves that our scheme was more efficient and secure than related studies in the smart farming environment. s 2 can also serve as early warning systems, recognizing potential problems and offering timely solutions [4]. Typically, smart farming architecture that integrates AI and IoT consists of a server, users, and IoT sensors [5]. Real-time data, such as the soil condition, humidity, weather patterns, and temperature, are collected by IoT sensors. The vast data gathered from sensors are transmitted to the server as the basis for the AI analysis [6]. The server stores and preprocesses data, providing the AI model. Based on the sensor data, widely used deep learning models, such as Convolutional Neural Networks (CNNs) and Long Short-Term Memory (LSTM) networks, can be employed to detect the location and types of diseases and pests in crops, including identifying infected areas on leaves, stems, or fruits. These models can further utilize the detection results to predict crop yields and estimate optimal harvest times [7]. The users are primarily farmers or farm managers who can remotely monitor their farms, making agricultural decisions regarding crop management and resource allocation. Farmers can establish more efficient strategies for crop selection and cultivation based on the result analyzed using the AI model [8]. Although smart farming with AI and IoT technology has considerable advantages for agriculture, it still faces several significant challenges. In smart farming architecture, the sensor data or results analyzed by AI models are transmitted via public channels [9]. The transmitted data includes the farmer's personal information and sensitive farm data [10], which are prone to exposure to security attacks [11]. Therefore, the system has security requirements to address these vulnerabilities, including confidentiality, integrity, authentication, data freshness, identity privacy preservation, and non-repudiation [12]. To date, much research has been conducted to solve these problems in IoT environments. Recently, research was conducted to verify the message sender through authentication at the physical layer [13]. As a physical layer authentication scheme, a deep learning-based radio frequency fingerprint identification framework was proposed to enhance the security for zero-trust edge IoT environments [14]. In this study, we concentrated on designing the authentication protocol to protect privacy in smart farming. Entities in a smart farming system can establish a shared session key to enable secure access to data via authentication.