Beneath the internet you use every day lies a hidden network of thousands of encrypted sites known as the Dark Web.

Unlike the so-called clearnet – where everything is open, indexed and searchable – the darknet offers anonymous access to information, products and services of all kinds, legal and illegal. Illicit drugs like opioids, creative chemists, child pornography and hacked personal information are all readily available, if you know where to look.

And get this. You helped pay for it.

The software primarily used for encrypting, hosting and browsing Dark Web sites is known as Tor or The Onion Router, named for its sites’ .onion suffix. The thing is, the tools were originally developed by the U.S. Naval Research Laboratory (NRL) and DARPA, the advanced research arm of the Department of Defense (DOD). And to this day, Tor is largely funded by the U.S. Government.

I’ll pause for a second to let that sink in.

Related: You Have Zero Privacy — Get Over It

If you’ve had lingering doubts about the good guys and the bad guys being two sides of the same coin, you can finally put them to rest. In onionland, crime and punishment don’t just go hand-in-hand. They operate side-by-side. They’re next-door neighbors. Frenemies.

I guess the spooks wanted a way to gather intelligence, track evil doers, and communicate with each other, confidential sources, whistleblowers and dissidents, without leaving an online trail of IP addresses. So in the mid-to-late 90s, they came up with what later became known as Tor, aka the anonymity network.

Wait, the story gets better.

Aside from the scientists, developers, researchers and project managers who handle the technical side of Tor’s suite of software tools, the 501(c)(3) nonprofit is essentially run by Shari Steele, a civil rights attorney and long-time head and legal director of the Electronic Frontier Foundation or EFF.

The EFF is an online civil liberties advocate – essentially a digital version of the American Civil Liberties Union (ACLU). The organization, also a 501(c)(3) NPO, has been involved in a long list of lawsuits against federal law enforcement agencies. Steele and the EFF have been responsible for spearheading and funding Tor since the NRL set the code free in 2004.

Related: Oh No, Flat-Earthers Believe the World Is Shaped Like a Pizza

Steele, incidentally, is married to Bill Vass, engineering VP of Amazon Web Services. Before joining Amazon and running a robotics company, Vass spent much of his career as a senior IT executive with the U.S. Army, the DOD and Sun Microsystems, where he was CIO and oversaw the company’s federal government operation.

Strange bedfellows, if you ask me.

Tor bills itself as the best thing since the First and Fourth Amendments, protecting anyone and everyone’s right to online privacy and freedom from prying eyes, web crawlers, IP trackers, search engines, site indexers, trolls and the like. That goes for evil-doers and do-gooders alike.

Whether you’re in the market for protected animals, selling hacked bank account data, peddling the latest designer drug, building a bomb, searching for a hitman, feeding your opioid addiction, a journalist trying to dig up dirt for a hit piece, or men in black, blue or camo, Tor’s Windows, Mac OS, Linux and Android-compatible hidden services can help you do your dirty deeds on the sly.

Keep in mind, .onion marketplaces don’t take Visa, MasterCard or American Express. Bitcoin is the currency of choice on the dark side of cyberspace.

Related: Take a Deep Breath: Bitcoin Will Not Replace the U.S. Dollar

The Dark Web is not all dark intentions run amuck, mind you. A report by venture-backed security firm Terbium Labs found that just over half the content on a random sampling of 400 of the more than 7,000 Tor sites was legitimate.

There are blogs, chat rooms and political forums free of censorship, political correctness and prying eyes. Facebook maintains a presence there for users living under repressive regimes that limit web access. And some people just don’t dig the idea of their online activity being tracked by Google.

The FBI has cleaned up a few sites, shutting down at least the first two versions of the infamous Silk Road black market. And while Tor may be the easiest way to get around the Dark Web, it’s not the only way (not that I know anything about that sort of thing). As Tor becomes more mainstream, dark forces will inevitably migrate to shadier networks.

Of all the bizarre and unlikely interactions in the Dark Web saga, the one that surprises me the least is that you and I helped pay for it.

A version of this originally appeared on FOXBusiness.com.