For the last twelve months I’ve worked almost fulltime on one of my projects that I started in 2006 and have been postponing since 2007. I’m now in the final stages of preparing for an alpha release of the source code and accompanying documentation. It’s one of the most ambitious and complex projects I’ve worked on up until now, especially considering the goals that I have for it.
Back in 2006 around the time when I wrote my post “P2P is the Future of the Internet” I set out to develop a new peer to peer (P2P) software platform. I noticed that the existing platforms were vulnerable and had all kinds of issues that needed to be solved, and I wanted to build something that would solve most, if not all, of those problems. I wrote a document outlining what I wanted to build and started coding in my free time. I was already working as a freelancer back then, and I had to give priority to projects from clients so that I could pay the bills. Sometime in 2007 I got so busy that I couldn’t work on my P2P project at all. Life happened and it wouldn’t be until 2013 when I would finally pick up where I left off and start coding again, but not for long because other projects got in the way again.
In early 2017 I finally started working again on my P2P project, and this time I mostly started over from scratch. I decided to discard almost all the code I had written in an older version of C/C++ and started fresh in C++17. I was thinking about the fact that it took over 10 years for me to actually start working on this project again with significant results, and for certain reasons I’m glad it went like this. I now know a lot more about life and the reality that we find ourselves in than I did 10 years ago (I’ve learned a lot), and I feel better prepared than I was back then. I now know and realize in so much more depth why I should be working on this project. It’s been a very interesting twelve months so far and in the coming period I’m going to be blogging about various aspects of the project.
So what is it?
The project is called QuantumGate, short for Quantum Gateway. When it’s finished it’ll be a new P2P platform upon which developers can build decentralized and distributed applications. More specifically it’ll resemble a mesh network, where every node (or peer) has connections to other nodes on the network. Each node functions as both a client and a server simultaneously, and can function as a gateway to other nodes and relay communications on their behalf. So every point in the network can potentially be a gateway to another part of the network, and this makes the gateway the elementary entity of the network, hence the name QuantumGate.
I’m not going into all the details here though; I already have most of the documentation up on GitHub and you can read a detailed overview of the project there. There’s currently over 180 pages of detailed technical documentation up in that repository and there’s more coming in the next few weeks. The source code will be uploaded there by October at the latest.
I’ve designed QuantumGate to be very modular and configurable, and I’ve tried to keep the Application Programming Interface (API) as simple as possible for developers. The QuantumGate library will be separate from the QuantumGate platform itself. Developers can choose to build their services for the QuantumGate network, but can also use the same code and build a separate and fully independent and customized application using the QuantumGate library. And when they do that, they’ll be able to enable just the functionality that they need for their application and make it as efficient as possible.
For example, it’ll be possible to build traditional client-server applications using the QuantumGate library, where developers can just take advantage of the low level secure communication facilities. And they can enable features such as peer discovery and relay functionality as needed.
The main reason why I came up with QuantumGate is to provide an answer to all the abuse by governments and corporations that we’ve seen in recent years. I mentioned some of it in my 2006 post “P2P is the Future of the Internet” and I frequently blog about these problems. Things like censorship, surveillance/spying, privacy violations, social manipulation and exploitation of private data. QuantumGate aims to provide a fundamental infrastructure that will make it extremely difficult for governments and corporations to continue doing all of those things unless they specifically target an individual. Much will also depend on the developers of the services (“extenders”) that run on the network; I can’t (and wouldn’t want to) force them to write their software in a specific way, but the fundamental infrastructure will certainly help and encourage them to do the right thing.
One of the more complex things that I had to write was the relay/routing functionality. It was especially complex because of the flexibility that I wanted to build into it allowing for ad-hoc and random relays to easily be made, without the need for any kind of authority outside of each node (like the directory servers in TOR). The universe/nature is fundamentally a P2P system with no central point of authority, and any system that we build and want to be sustainable for the long term will have to be modeled similarly. You can find detailed information about the relay functionality in the documentation on GitHub. As you can see in the image below it allows multiple peers to communicate with each other by routing data through a single connection between the peers. From the outside (the NSA‘s view (but also the view of the GCHQ, CIA, FBI, Mossad, governments, and similar terrorists)), you’d never guess that, for example, peer E is also communicating with peer D, or that peer A is communicating with peer D. But they actually are through indirections, which can be many.
The above is a simplified case. In a network that looks like the image below, you can imagine that tracking communications becomes one hell of a task, especially with the anti-traffic analysis features built into QuantumGate such as “noise”.
Right now everyone who wants to write a networked application has to reinvent the wheel and build their own networking code that provides security and sometimes also authentication, relay or onion routing functionality and protections against various forms of attacks such as traffic analysis. With QuantumGate I want to provide a fundamental library and API that solves most of these problems and that anyone can easily use to build their own custom applications on top of. If I really manage to succeed in making something good, people could even want to migrate existing services to using QuantumGate as their underlying communications protocol. For example, having BitTorrent or Bitcoin work over QuantumGate.
If you read the overview of the project on GitHub, you’ll see that this is quite an ambitious project in scope and goals. I intend to take my time to develop this software and arrive at the end goals in (small) incremental steps. I also don’t expect to do this all by myself but hope that others will also contribute in various ways, especially things like peer reviewing the code, doing security audits and providing improvements.
While I intend to support multiple platforms, right now I’m focusing on the Windows platform and will gradually provide support for other platforms in the future beginning with Linux. My priority is first to get QuantumGate feature complete on Windows.
With regard to the funding of this project, I’m hoping people will find this useful enough to want to donate money or other resources to keep development going. I’m going to release the source code and everything else related to this project on GitHub with a MIT license, so it’ll be open source and free for everyone to use and integrate in their projects without restrictions.
These days I’m busy finishing up the documentation and setting up the repository on GitHub, preparing the code for the first alpha release and writing example code to illustrate how to use the QuantumGate library and API. I even have some test extenders, one of which provides a Socks5 interface to tunnel through QuantumGate nodes and browse websites or use FTP.
If you’re interested and want to help, what you can do right now is check out the documentation in the wiki on GitHub and give me any feedback you have. If something it’s clear or not explained well enough, let me know. Stay tuned for more on QuantumGate.