On the security of the ping-pong protocol