A performance evaluation method for WSNs security