Indeed, but the enemy usually has the intelligence services to know it anyway, leaving your citizens uninformed as the only real side-effect.
I don't think secrecy is important in national security anymore. On the other hand, the secrecy is used for evil, such as keeping citizens in the dark around government plans to control popular opinion in their favor, falsely positioning themselves as the people's superiors.
Depends per subject and intelligence service and enemy (there is more than one).
> I don't think secrecy is important in national security anymore.
Why?
Think of it this way. I'm Dutch. Our secret services hacked into the GRU's camera system. This allowed attribution. Our secret services also did the physical last mile infiltration of Stuxnet.
Did I, as random Dutch citizen have to know this? No. As the enemy does not know it, and will know it when the Dutch population knows. These are two examples where a need to know basis makes sense, and is very limited.
By contrast, with something like a secret mass surveillance program, there is no "end" where you keep something a secret for 18 months but then everybody finds out about it through official channels, so things like that don't get to be a secret. One way or another the public needs to timely find out what's being done in their name.
When is something whistleblowing, when is it a leak, when is it malicious, and when is it espionage? It's easy to allow leaks about illegal acts, but if you start allowing leaks about secret but legal acts too, then things get blurry.
I personally don't think a government, ultimately a servant of the people, should be allowed to keep secrets from the people, but that's currently legal for e.g. military reasons, and thus needs to be considered.
Imagine for a second a parallel universe where the government wasn't evil, and while some of the released documents was showing illegal activity, others did not and in fact contained secret information about national security matters where releasing the information undermines the work (e.g. Russia/China/... monitoring, intercept measures, etc.).
> So a whistleblower has to spend how many years in exile before they get their vindication?
The legal system would be fundamentally broken if you could evade judgement by going into hiding, regardless of reason.
Snowden should have been pardoned a long time ago, but his time in hiding is and should be inconsequential from a legal standpoint until laws are changed and pardons are made. It's up to the citizens of the U.S. to fix their country and welcome him home.