In this paper, we investigate a multiuser peer-to-peer (MUP2P) two-way relay network (TWRN) in the presence of an eavesdropper. In this network, only the k∗th pair of users demand secure communication. Also, a multi-antenna eavesdropper aim to wiretap the confidential data of the k∗th pair in both cooperative phases. Our goal is to minimize the total transmit power provided that the secrecy rate for two secure users and the quality of service constraints of each user are met. For simplifying the problem and also omitting the confidential information leakage in the second phase, a null space beamforming (NSBF) scheme is employed. Despite this, the problem is still non-convex. We divided the problem into two subproblems to solve beamforming and users’ power formulated in two iterations, respectively. Three different methods are proposed to solve the first subproblem, semi-definite programming (SDP), second-order cone programming (SOCP), and sequential quadratic programming (SQP). We employ a sequential parametric convex approximation (SPCA) method to convert the users’ power subproblem into inequality form a linear programming (LP) problem to solve it. In the following, we evaluate the computational complexity of these methods. Simulation results confirmed the validity of the proposed methods.