###### Abstract
One such method is to use the concept of clustering, in which a group of nearby WSN nodes selects the main WSN node called Cluster Head (CH) to use it as a means of sending data to the AP. This mechanism contributes to improving communication between nodes by exploiting short distances and a good signal for transmission. As the weak signal in communications contributes to increased power consumption [17]. Moreover, there are several factors that the studies have relied on to improve this performance (Clustering) to improve the efficiency and increase the Quality of Service (QoS) of WSN networks. Among these factors are the distances between the nodes, the signal strength, the nodes' power level and more [17; 18; 19; 20; 21]. Concerning WSN mobile nodes, some studies have been conducted to improve the clustering method and raise its efficiency [22; 23; 24; 25]. In addition, others have automated the process of clustering and the process of security complexity based on the state of the nodes [26]. Others use the principle of trust between nodes to facilitate communication processes and reduce costs while maintaining the security of the network [27]. Building trust is based on filtering each node to its neighbors using a combination of factors such as monitoring the messages sent and received, the node's behavior and others [28]. Some studies have looked at improving trust by suggesting a lightweight trusted algorithm [29]. Others have been interested in using a complex set of parameters for security assurance using a trust model [30]. However, most of these studies discuss the partial issues related to optimizing one part (such as security and trust) and neglect its negatives over the rest of the parts (energy and CPU). Therefore, in this paper, we will discuss the issue of adapting the trust term to the situation in which the WSN node is to ensure security and maintain the network lifetime as long as possible. Our proposal is called \"Trusted-CH\" which initially builds trust between nodes based on monitoring the packet loss rate and acknowledgment messages generated at each connection establishment. After Trust is built, the choice of CH depends on several factors, including full trust. Then the nodes that contain the absolute trust communicate with a single master key and a low level of encryption. Conversely, CH communicates with the rest of the nodes that have not reached the degree of absolute trust using a lightweight security algorithm proposed in [26], without using its encryption automation. Trust contributes to ensuring the security of WSN nodes and reducing cryptographic complexity, which in turn extends the lifetime of the network while maintaining security. Itis also important to note that the proposed algorithm achieves data integrity, data freshness and authentication. Here is a summary of the main paper's contributions:  
* Propose an automatic security model for wireless sensor networks based on the level of trust between nodes. Building this trust depends on monitoring communications acts in a WSN environment. However, the main objective of this proposal is to provide security for the wireless sensor network as well as reduce its cost as much as possible. * A new method for CH selection based on trust and other factors has been proposed. * Suggest an adaptive encryption method based on the trust ratio of neighbouring nodes. * The results were analysed based on the lifetime of the network and compared with existing algorithms. The remainder of the paper is organized as follows; Section 2 presents an overview of the related work. Section 3 describes the proposed scheme in Trust-building, clustering and adaptive encryption techniques. A discussion of the performance evaluation, outcomes and security analysis is declared in Section 4. Finally, Section 5 includes the conclusion of the research paper.