In Senate testimony last July, for example, Michael V. Hayden, the C.I.A. director from 2006 to 2009, admitted that he was perplexed by the “dilemma” over what he was or was not permitted to say, in this case about the targeted killing of Qaeda operatives using drones — officially classified but reported in the news media every day and occasionally discussed by Mr. Obama.

“So much of that is in the public domain that right now this witness, with my experience, I am unclear what of my personal knowledge of this activity I can or cannot discuss publicly,” Mr. Hayden said. “That’s how muddled this has become.”

The trade-offs and tensions over government secrets in a democracy are nothing new. In 1971, when the Nixon administration went to court to try to stop The New York Times from publishing the Pentagon Papers, a classified history of the Vietnam War, Max Frankel, then the Washington bureau chief for The Times, filed an affidavit on how officials and reporters exchange secrets.

“Without the use of ‘secrets’ that I shall attempt to explain in this affidavit, there could be no adequate diplomatic, military and political reporting of the kind our people take for granted, either abroad or in Washington, and there could be no mature system of communication between the government and the people,” Mr. Frankel wrote 42 years ago.

Before Mr. Obama took office, prosecutions for disclosing classified information to the news media had been rare. That was a comforting fact for national security reporters and their sources, but a lamentable one for intelligence officials who complained that leaks damaged intelligence operations, endangered American operatives and their informants and strained relations with allied spy services.

By most counts, there were only three cases until recently: against Daniel Ellsberg and a colleague for leaking the Pentagon Papers in 1971; against Samuel Loring Morison, a Navy intelligence analyst, for selling classified satellite photographs to Jane’s, the military publisher, in 1985; and against Lawrence Franklin, a Defense Department official, who was charged in 2005 with passing secrets to two officials of a pro-Israel lobbying group, who shared some of them with reporters.

Thus Mr. Obama has presided over twice as many such cases as all his predecessors combined, though at least two of the six prosecutions since 2009 resulted from investigations begun under President George W. Bush. An outcry over a series of revelations last year — about American cyberattacks on Iran, a double agent who infiltrated the Qaeda branch in Yemen and procedures for targeted killings — prompted Mr. Holder to begin new leak investigations that have not yet produced any charges.