## 1 Introduction  
Cooperative communications are used to effectively improve the quality of a wireless network. The reliability and capacity of wireless communications are substantially increased by deploying the cooperative communication technique. In a cooperative communication system, each user can directly transmit data and collaborate with other users (i.e., relays) to transmit its data to a destination for enhancing the quality of transmissions [1]. In this case, an intermediate relay is used to support the transmissions between the source and the destination. Cooperative communications can offer remarkable advantages for wireless networks such as high energy efficiency and extended network lifetime [2; 3]. Recently, several studies have showed that cooperative communications can help to enhance the capacity and reliability of the wireless networks [4; 5; 6]. The physical layer is the lowest layer in the Open Systems Interconnection (OSI) model. It can be used to verify the physical properties of a transmission in the network. However, the broadcast nature of wireless communications leaves the physical layer vulnerable to threats, e.g., eavesdropping, node tampering, hardware hacking, and jamming attacks [7]. In an eavesdropping attack, the eavesdropper can overhear the confidential information of legitimate users and occupy the data in the transmission area of a node. In node tampering, the attacker can replace the entire physical node or part of the node. Hardware hacking can damage nodes via malicious entities such that the nodes can lose their expected functionality, leaving them vulnerable to other risks. In jamming attacks, a jammer attempts to prevent users from accessing wireless network resources and reduces network availability by generating interference signals on the channels. This exhausts the energy of the nodes in the network [8; 9]. A cooperative communications network is particularly vulnerable to malicious attacks in the physical layer. Moreover, jamming is one of the more serious attacks that greatly degrade network performance. In order to tackle the jamming attacks, frequency hopping spread spectrum and direct sequence spread spectrum are widely utilized [10]. However, the same sequence can be used by the jammer to attack its target if the hopping sequence is exposed. Thus, the random rendezvous [11] and the uncoordinated frequency hopping [12] are used to safely share the hopping sequence. Nevertheless, these techniques result in the time wastes for the communications. Therefore, other secret sharing protocols are proposed such as public key cryptography, certificate and authentication protocol but they cause the large overheads and computational [13]. [PERSON] [14] proposed an efficient coding method that provides protection against malicious users. [PERSON] et al. [15] applied the uncoordinated spread spectrum (USS) techniques to prevent jamming of the communications between transmitter and receiver. USS achieved effective anti-jamming by discarding the require secrets before sharing, at the expense of a decreased communications throughput. However, USS techniques require the complex frequency synthesizers. [PERSON] derived optimal power allocation policies for transmitter and receiver pairs, where the active jammer is formulated as a one-shot zero-sum game for anti-jamming in secret key-generation systems [16]. Almost all the previous works on anti-jamming focus on how to design physical layer technologies (e.g., spread spectrum) [10; 12; 15; 17; 18; 19]. If the signals are widely spread, it will become harder for the jammer to interrupt the transmission link; meanwhile, the complexity in spread spectrum technique may be enlarged and thus it is not easy to deploy in the reality. Recently, various jammer localization schemes have been proposed in wireless communications [20; 21]. The authors in [20] use spatial information as the basis for detecting the attacks to verify the number of attackers and localize the ambient adversaries.