In this paper, we consider the problem of resource allocation scheme for physical layer security in cooperative orthogonal frequency division multiple (OFDM) networks using amplify-and-forward (AF) strategy. To maximize the secrecy rate, the joint optimization of power allocation, subcarrier allocation and subcarrier pairing is proposed. The optimization problem can be solved efficiently by dual method. To reduce the complexity, two suboptimal algorithms are proposed. Monte Carlo simulations are carried out to validate our analysis.