Considering a game with quadratic cost functions, this paper presents a distributed algorithm with security, whereby each player updates its strategy variable without using its private data and still achieves the Nash equilibrium. By using the theory of differential inclusions, Lyapunov function and invariance principle, the algorithm is proved to be convergent. Our algorithm can be used when it is required to seek the Nash equilibrium without disclosure of private data.