Many effective strategies for enhancing network performance have been put forth for wireless communications' physical-layer security. Up until now, wireless communications security and privacy have been optimized based on a set assumption on the reliability or network tiers of certain wireless nodes. Eavesdroppers, unreliable relays, and trustworthy cooperative nodes are just a few examples of the various sorts of nodes that are frequently categorized. When working or sharing information for one another, wireless nodes in various networks may not always have perfect trust in one another. Modern wireless networks' security and privacy may be enhanced in large part by optimizing the network based on trust levels. To determine the path with the shortest total transmission time between the source and the destination while still ensuring that the private messages are not routed through the untrusted network tier, we put forth a novel approach. To examine the effects of the transmit SNR, node density, and the percentage of the illegitimate nodes on various network performance components, simulation results are provided.