You might not know this, but the US Military created much of the encryption technology that we use today, including TOR, the cloaking software used by Edward Snowden and others. They also created SSL and the RSA algorithm. The US Military even invented the internet, in 1969. It was called ARPANET then. And they had a hand in funding everything from the laser to UNIX.
This does not mean that programmers working for the military wrote all of these programs and made all of these devices. Instead the American Department of Defense awarded contracts to mathematicians, companies, and cryotograpers who developed all of this, except Navy programmers wrote TOR.
The Data Encryption Standard was created in 1975 when the NSA solicited proposals for how to protect government data. The NSA is part of the Department of Defense. IBM responded with a proposal. The NSA published their algorithm and put it out for public comment. The best mathematical minds and cryptographers tried to find its weaknesses. A series of back and forth comments led to several revisions so that today we have the AES standard, yet DES remains in use. AES256, for example, is used in all kinds of encryption, like disk drive encryption.
OpenSSL is by far the major encryption tool in use today. It is an open source set of tools that does everything from convert PKI keys from one format to another, generate keys used in SSH encryption, and encrypt web pages with SSL, hence the name: OpenSSL.
OpenSSL subroutines are included with the Debian Linux operating system, which is what powers most web sites around the world. It’s also used in all forms of Linux, Windows, Android, etc.
OpenSSL was and still is an open source project, like DES and the other government-funded projects. That means it’s free. But someone needed to fund its development, which the Department of Defense and US Department of Homeland Security did and still does, although other’s contribute as well. OpenSSL is said to be short on money and staff today. But that situation will not last long, because it is so important.
Making theses projects opensource makes their encryption stronger because it lets researchers probe it for weaknesses. It also lets a software publisher or hardware manufacturer compile the code themselves into their product thus ensuring that the NSA has not planted any backdoor there to decryption communications.
Technically it is illegal to export OpenSSL and other encryption to certain foreign countries, like North Korea. You are supposed to get a license from the American Department of Commerce. But that is widely ignored since anyone can download it. That leads to the irony that the USA has developed weapons that its enemies are using against it.
The US Government requires its employees traveling abroad to use TOR (The Onion Router) to communicate with their home offices. TOR not only encrypts traffic, it hides the IP address of the user, by bouncing the signal across the network of TOR routers. Anyone with a computer can set up a TOR router, but they cannot read the encrypted traffic that passes through it.
The US Navy Research Labs funded the development of TOR. Initially it was written by its own employees. But then TOR was spun off as its own project. Then the Electronic Freedom Foundation and others continued its funding. But the majority of funding then and today continues to come from the US Military. That has led to reckless reporting that TOR has been comprised by the US government. But that has shown not to be the case. And as we just explained, since anyone can read and compile the source code, they can see that there is no US government code there. (But someone would need to use the source code and not the already-compiled binary to be sure.)
There is no doubt that the NSA has set up its own TOR routers, since anyone is free to do that. But they cannot read the data that passes through it, which if you study the technical details of that becomes obvious. However there are two weak points in TOR: the first and last router in a transmission. Those two are the only ones that both know the destination and source IP address. That is logical to deduce since the router at the end would need to know where to send the data on the return trip and would need who should receive the first leg of the transmission. TOR encrypts routing information. Other routers along the path only know the IP address of the adjacent router and not the final destination.
The other way that the NSA can figure out who is talking to who over TOR is statistical analysis. If they are monitoring all the telecom traffic in different countries, which they are doing says Edward Snowden, then their computers can find a pattern when two people are chatting as there is a rhythm to the back and forth typing.
Perhaps the largest example of where the US Military has entered the academic and research community is RAND. Encryption starts with mathematics. John Nash worked at RAND. He was the mathematician depicted in the film “A Beautiful Mind.” John von Neumann is another mathematician who worked with RAND. He is one of the world’s most famous mathematicians. He and John Nash clashed over how to approach game theory. Neumann said games were Zero-Sum games, where one person wins and everyone else loses. The military and the government use game theory in planning everything from treaties with foreign nations to nuclear war. Nash came up with the Nash Equilibrium, which is the point at which each participant in some game, like a treaty, achieves their maximum utility, meaning the point that benefits everyone best. So everyone wins and it it need not be a zero sum game.
Nash and Von Neumann also worked with Bell Labs, which was the research arm of AT&T, who invented the telephone and had a monopoly over that market in the USA for 100 years. Bell Labs invented the laser, microwave, UNIX, C, C++, semiconductor, laser, and cell phones. Their engineers also showed that physicists were right about the Big Bang when they found the radiation left behind due to that (The noise was messing up their antennae.). Many of the problems that Bell worked to solve were for the US Military.