The home secretary, Theresa May, has defended the culture of secrecy surrounding the activities of intelligence services and insisted that the doctrine of “neither confirm nor deny” must remain in place.

May also defended the bulk collection of personal communications data by GCHQ, telling parliament’s intelligence and security committee that it did not mean Britain was subject to mass surveillance.

She said the bulk collection of personal communications data was not in itself an invasion of privacy. “We have to have a haystack to be able to find the needle that we need to keep the public safe,” May said.

The hour-long examination of the home secretary by senior peers and MPs was part of only the second series of public sessions held by the intelligence and security committee in its history. It was followed by a hour-long closed session during which they questioned the home secretary on “classified matters”.

But the grasp of the committee and the home secretary of the issues underlying the disclosures by the whistleblower Edward Snowden of mass data harvesting by GCHQ and the NSA – which triggered their inquiry into privacy and security – was thrown into doubt at more than one point in the proceedings.

Both May and committee members agreed that they needed technical advice before they could discuss where “emails are stored in the cloud”.

This week the former home secretary David Blunkett said public confidence in the intelligence services could no longer be sustained by invoking the “old-fashioned paternalism” of saying “we know, but you mustn’t”.

But May said the culture of secrecy had to remain. Even when she was invited by the chairman of the committee, the former Conservative defence secretary Sir Malcolm Rifkind, to publish data showing how often the mining of the bulk personal communications data collected by the agencies had led to the identification of potential terror or criminal suspects, she said she could do no more than “take away the issue and see if there is more we can do”.

She did tell the committee that she spent “a significant part of her day” as home secretary dealing with intercept and surveillance warrants, and said she had rejected only “a very small number”. She said she often questioned their need, but a rigorous process of checking by the Home Office and the agencies themselves went on before warrant requests reached her desk.

She was unwilling to go beyond this disclosure and said: “I think there are times when it is entirely right that the government should be silent on things … It is not time to change ‘we neither confirm nor deny.’”

May added: “I have just exposed more of the warrantry process but there are times, even when it is in the interests of government in the publicity sense to be able to say something – but it is right that we don’t.”