Distributed Private Compute: My White Whale

Introduction

Hello, my name is Osoro Bironga. I'm a software engineer from Nairobi, Kenya. Today, or whatever time one of you internet strangers gets to read this, I'm going to talk about one of my favourite free time pursuits: on-chain distributed computing.

I will structure my essay in these parts:

  1. Distributed Computing as I know It
  2. Zanzalu: A Detour into Cryptography in Zanzibar
  3. My White Whale

1. Distributed Computing as I Know It

In high school I was in the Science Congress club. This is a group of students that organise themselves each year (maybe twice a year?) for a science fair competition with other schools. I remember I joined because my bigger brother who had completed High School had won some Science Fair certificates for some of his projects, and I wanted one.

At the time I never really had original ideas, I was making my way into tournaments with his old projects. These projects were mostly in Physics. One project was about filtering gas particles from car exhausts; I stole that too (and presented it without a model ๐Ÿ˜…). I somehow landed on a website project idea after being frustrated that I never made it with the "borrowed" projects. I didn't know how to code at the time but my brother helped with that. This programming paradigm shifted how I thought about computers since then and I'm still in love!

A few years of experimenting with projects and software engineering later, my understanding of the distributed computing landscape matured. I started a project and pitched it as a framework for blockchain projects looking to access additional compute off-chain from IoT devices. Honestly, it was rough on the edges and its reception was lukewarm. I wanted to get the project grant funded. This did not work out and I suppose it did hurt my pride; I stopped experimenting with distributed computing.

Until recently.

2. Zanzalu: A Detour into Cryptography in Zanzibar

In the Web3 space there are pop-up villages.

During one of our weekly meetings my part-time employer (we're working on really cool tech, launching soon, Globe&Citizen) encouraged me to attend a pop-up village that was taking place near me. The event I attended is Zanzalu, a 2-week affair with like-minded people and interesting projects.

I don't usually attend social events for people in my profession. I have felt that time was wasted and I could have probably got the same result as someone watching a talk on YouTube. The other reason would be that the organised talks would only explore surface-level knowledge that most intermediate professionals already know.

I decided to go since if there's nothing intriguing at least I get to vacation on sandy beaches and work on my personal projects. The organizers at Zanzalu were the best, and I was also in really good company with the people who attended. In fact, I made friends that day who I'm planning to meet sometime this month in some of Nairobi's co-working spaces.

Special thanks goes to Eva Klaus and the team that made this possible. I'm a believer.

There was a talk given by Shramee (sorry, I don't have their full name), titled Why Everyone Can't Be On-chain. He explained why privacy is important for blockchain transactions and some of the solutions that provide privacy. He highlighted a distinct demarkation between Privacy, Anonymity and Confidentiality. In the talk he concludes by offering a solution he's working on that learns from these technologies and offers a holistic and well-structured Privacy solution. At least that's how I understood it.

In the talk, Homomorphic Encryption stood out to me. I suppose I had lived under a rock because a whole new universe had been opened to me. Here's an explainer video I would recommend you to watch.

My distributed computing ideas now seemed more tangible. I came back a man with a mission.

3. My White Whale

My work involves cryptography but I would not go as far as to say I'm a cryptographer. I don't implement encryption protocols; I do some open-source software shopping and use them in projects. I also receive and read this cryptography newsletter religiously, for intellectual pursuits only.

I have since experimented with FHE using libraries from Zama.ai. I have discovered that running a simple FHE computation on commodity hardware does not scale (and we're using the package example from the docs), so running complex applications would be magnitudes more expensive. I have since researched a lot by googling, reading research papers, and listening to cryptography talks.

The other technology I have played around with is TEE, which provides the privacy guarantees but might not be accessible in everyday commodity hardware. There are solutions in the market that offer this, like Phala Network which is on Polkadot. There's also a complete framework for working with WebAssembly and TEE called Enarx.

I know for a fact that our software and hardware will continue to improve. There are really smart people working on these innovations at think tanks, universities, and big tech. I also know I can work around this space in my own capacity, doing what I'm confident I can accomplish without being an expert.

I'm working on a project called Discrete Compute Automata, disca (I nuked the initial draft ๐Ÿงช). The tag line is: Abstracting programs for functional and data privacy. It is a blockchain solution on top of Polkadot (parachain to be more specific).

Both the hardware and software approaches have their champions from the examples I provided. disca works to:

  1. Provide a parser that turns a valid WASM-2.0 application into a logic circuit (I attribute this knowledge to creating a programming language) that provides enough intermediate representation for one to interface with an FHE or other encryption solution of their choice.
  2. Provide optional pluggable infrastructure at the node level to support hardware-interfacing TEE similar to Enarx, but in the blockchain runtime as a first-class citizen.

The reason Polkadot is a good sandbox is there's a lot of things I get for free, like shared security and the interoperability of Polkadot with other networks, while I experiment without really becoming an expert at blockchain infrastructure. A similar but not privacy-focused solution is Acurast, which offers a decentralised cloud.

I'm sure the project will still evolve as my understanding further matures, but I have since settled on a design and am working from the ground up. There's a lot of interesting things I'm still learning, and I encourage everyone to allow their imagination to wander.


Originally published on Medium.

← back to blog