Who said what they're doing is illegal? The whole problem is that the entire surveillance regime is completely secret and completely legal.