It used to be that the National Security Agency and its ilk had to pay through the nose for the latest in spying technology. The supercomputer specialist Cray (CRAY), for example, would receive government funds and come out with a new multimillion-dollar machine specially tuned for “pattern matching” and then sell the system to three-letter agencies. The machines were anything but general purpose and came with a premium price tag. Beyond that, the NSA has been known to run its own chip manufacturing plant and to pay for custom software.
While that type of thing still goes on, the NSA has another, much cheaper avenue for great spy technology at its disposal: open-source software. The popularity of open-source software among the latest generation of big-time Web players—including Google (GOOG), Facebook (FB), and Yahoo! (YHOO), three of those on the Prism list—means that private companies disclose for free much of the core technology behind their services to the public. In fact, products like Hadoop and MapReduce that appear on the leaked NSA presentation slides as the keys to the government’s data-mining operation are open-source applications first developed by Yahoo and Google, then modified by thousands of people over the last few years.
For the rest of the story: http://www.businessweek.com/articles/2013-06-12/spies-like-us-how-we-all-helped-build-prism#r=hp-ls