SAN FRANCISCO (Reuters) - The U.S. National Security Agency is turning to Silicon Valley for topflight talent, but first it has to rebuild trust.

Anne Neuberger, special assistant to NSA Director Michael Rogers, said this week she feared the agency would no longer be able to recruit top technologists, since former contractor Edward Snowden blew the lid off the extent of its spying activities.

At a seminar organized by the non-profit LongNow Foundation in San Francisco, she extended a plea to an audience replete with tech workers to consider a career in government, or at least apply for a fellowship.

Silicon Valley has a reputation for disdain of government regulation, and many of its largest players from Google to Twitter have been outspoken in their criticism of the spy agency in the wake of Snowden's revelations.

Senior NSA officials have downplayed the repercussions of the revelations previously.

But Neuberger said that, in the long run, the agency might struggle to keep pace with technology.

Describing her role as an intermediary between the public and technology sectors, Neuberger promised to "rebuild trust" in the wake of what she called "media leaks."

The NSA spent months "soul-searching" and now plans to engage with the media. It is already in talks to extend privacy protections abroad and has started taking meetings, she added. The NSA is eager to make versions of previously classified documents available to the public.

With distrust, “our own workforce becomes demoralized. Our programs are curtailed,” she said. "We need to find a balance of experience and new ideas.”

(Reporting by Christina Farr. Editing by Andre Grenon)