Essentially, their duty is to spy on everyone and everything under the guise that they're maintaining digital security. It's up to you to decide whether or not it's spying or protecting.
I, personally, think it's spying. Companies are essentially forced to hand over their master encryption codes to the agency in the name of national security. The agency, from these master codes, has developed a massive database of information collected from the ongoings of every day digital life. It probably includes every bit of information about our online habits, websites we visit, and the way that every American is tracked on the web.
This article on the New York Times website talks about the efforts being taken to bar the N.S.A. from spying on American citizens, and whether or not it is ethical for them to collect and keep these encryption codes. Read the article and let me know what you think. Is this the Big Brother agency? And is it spying or protecting?