Giving evidence to MPs before Christmas, Sir Iain Lobban, the director of GCHQ, used the analogy favoured by the security agencies to explain what they do. He likened the gathering of intelligence to building a haystack and said he was "very well aware that within that haystack there is going to be plenty of innocent communications from innocent people".

The latest revelations from the Edward Snowden files show this haystack also includes webcam images of millions of internet users, some of whom are involved in deeply adult forms of in flagrante "communication".

Surveillance of this kind puts a new spin on William Hague's defence of GCHQ's snooping programmes: "If you have nothing to hide, you have nothing to fear."

In some ways, the Guardian story about GCHQ's Optic Nerve operation brilliantly illustrates the tangle that ministers and the intelligence services have got themselves into. And it poses a big question mark over the repeated assertion that mass surveillance is proportionate and necessary.

The agencies do not regard the "unselected surveillance" as revealed by Optic Nerve as snooping. As Lobban said to MPs last November: "My people are motivated by saving the lives of British forces on the battlefield, they are motivated by fighting terrorists and serious criminals. If they were asked to snoop, I would not have the workforce. They would leave the building."

Nick Pickles, the director of Big Brother Watch, takes a different view. "Secretly intercepting and taking photographs from millions of people's webcam chats is as creepy as it gets.Orwell's 1984 was supposed to be a warning, not an instruction manual."

GCHQ insists the activity is legal. And doubtless it is, if you believe that the Regulation of Investigatory Powers Act, which was passed in 2000, was drafted with this kind of surveillance in mind.

But even the parliamentary intelligence and security committee – not a body known for challenging the agencies with any robustness – is now questioning whether ministers and the agencies can really use Ripa for cover. The collection of webcam material was probably secured by getting an "external warrant" under paragraph four of section 8 of Ripa.

In most Ripa cases, a minister has to be told the name of an individual or firm being targeted before a warrant is granted. But section 8 permits GCHQ to perform more sweeping and indiscriminate trawls of external data if a minister issues a "certificate" along with the warrant. It allows ministers to sanction the collection, storage and analysis of vast amounts of material, using technologies that barely existed when Ripa was introduced.