Open Source Monday: Zero-Knowledge Proofs

For the third installment of our “Open Source Monday” blog series, we provide a demonstration and example code of how Zero-Knowledge Proofs can be applied to clean energy applications.


Zero-Knowledge Proofs (ZKPs) will be very familiar to blockchain experts and cryptocurrency enthusiasts. As we described last week, there are also non-financial applications for ZKPs in the clean energy sector. 

Imagine that you are an electric vehicle charging station company. You collect data from charging stations that have a huge amount of individual information. You collect and centralize that data for billing and maintenance. Some of the data could even be considered personally identifiable information. That is, time, location, vehicle type, etc. could be pieced together to identify an individual even without having a specific name of a person. 

In summary, your data is valuable. Others ask for it. The local utility wants access to help plan grid upgrades. The local government wants to use it to plan public transportation. Community groups want access to learn the impact on the environment. Do you hand over your data to them? A better approach would be to enable them to ask questions of your data in an anonymized way without you physically transferring the data. Fewer copies means less risk.

As an energy planner (e.g., utility, government, community group) how do I know the data is real if I never see it? This is where ZKPs come in. ZKPs can prove that the data is as expected without having to reveal the actual data itself. 

The video below shows an example of some of the steps to accomplish this. 

What you’ll see is:

  1. Two different “customer” datasets are provided to form a single dataset. Continuing the analogy above, this is like the EV charging station company storing two different customers’ data in the company’s database.
  2. That data is off-chain. A central Oracle creates a non-interactive proof.
  3. The Oracle also converts the proof into an image.
    The data is an array and each value in the array
    is represented by a proof in the form of a grayscale pixel.
  4. A new ZKP verification ERC721 compatible smart contract is created and an NFT of the image is minted.
  5. Using Truffle, a smart contract can be called to execute the validation of data without revealing the identity of the individual.

For our implementation, we take advantage of some recent advances in ZKPs. In particular, many ZKPs rely on some interaction with a prover and a verifier. They ask each other a series of questions to validate the data. Here, we apply an approach inspired by zk-SNARKs. The “N” in SNARK is for Non-Interactive. The genius behind this approach is that all the proof can be provided in a single message to the verifier, eliminating the traditional back and forth. There is a LOT of math behind this which is out of scope for our example. You can learn more about the math and how it works thanks to Zcash. For simplicity in this example (see GitHub), we use a simple hash implementation rather than a full zk-SNARK.

One other addition that we made here is that since the proof is a simple message, we can codify it as an image. We can then mint the image as an NFT. The big advantage of this approach is that proofs are visible to everyone and searchable by anyone on a platform like OpenSea or Coinbase without revealing any individual data. This removes a transaction headache for the data owner. They don’t need a new system or special hosting, etc. to handle inquiries about their data. 

And, the last addition, is that we have an example Polygon smart contract that enables an individual to validate their own dataset. What the validation code enables is that the EV charging company and / or energy planners who incentivize data owners to validate data get greater assurance that the data is real. This is a great use case of data privacy enabled through crypto.

The basic principles here can be applied to many sectors where there is centralized off-chain data, strict data privacy needs, and a need to prove the data is valid. Next week, you’ll see an expansion of this proof to leverage more of the zk-SNARK stack.

GreenTech National Funding Lab in Oklahoma Selects VIA for Clean Energy Program

VIA is proud to join the inaugural cohort of the GreenTech National Funding Lab. Considered a highly competitive program, VIA was one of only ten companies chosen from across the country to form the inaugural cohort.

GreenTech National Funding Lab is the latest program to be launched by OK Catalyst, an office out of the University of Oklahoma, which assists in identifying opportunities to work with several participating Federal agencies including the Department of Defense (DOD), NASA, Department of Energy (DOE), and National Science Foundation (NSF).

Support from GreenTech National Funding Lab will accelerate VIA’s focus on delivering clean energy solutions to the Southeastern U.S. including, Oklahoma, Mississippi, and Georgia. 

“Oklahoma in particular is a leader in clean energy generation technologies and forward thinking when it comes to data privacy issues,” said Joe Babiec, SVP Strategic Initiatives at VIA. He continued, “We’re thrilled that OK Catalyst has opened its doors for the first time to companies outside of Oklahoma to join one of their highly successful programs. We feel that VIA’s core technology will have immense value to support this community in their clean energy and data privacy goals.”

Though VIA’s participation in the GreenTech National Funding Lab is just getting underway, VIA has already identified a Web3 energy initiative within the state of Oklahoma. VIA envisions this application of the company’s blockchain technology as the first of many good things to come from its partnership with OK Catalyst and the GreenTech National Funding Lab.

Swiss Cognitive, World-Leading AI Network Selects VIA for Guest Article

Swiss Cognitive, World-Leading AI Network selected VIA’s CEO, Colin Gounden, to share his point of view on the relationship between clean energy and blockchain technologies. The importance of clean energy in today’s economy and VIA’s long-standing expertise in this area were the primary reasons VIA was invited to write on this topic for Swiss Cognitive’s readers. In the article, Colin talks about how the decentralization of energy through rooftop solar panels and electric vehicles has created the ideal environment for blockchain to achieve solutions in clean energy:

In a way, energy has evolved to become more adaptable to working with blockchain. Decentralization is at the core of Web3 and blockchain technologies – there are many players, in many locations, who interact but aren’t centrally controlled. As keen followers of energy and clean technologies will know, the last five years has seen an exponential increase in the decentralization of power.” – Colin Gounden, CEO of VIA

Colin’s guest article can be found on the Swiss Cognitive’s website.

Mastery Monday: Why You Should Care About Zero-Knowledge Proofs

This is the second installment of our blog series, “Mastery Monday with VIA” where we share with you some of the inside details of our technology and math in 5 minutes or less. So, are you ready to become a master?


Math impacts everything we do. You never really see the math, but you experience it.

AI is the math that helps us control our TVs with our voice and drive our Teslas. We watch Netflix and listen to Spotify, courtesy of compression algorithms that send more and more data through increasingly crowded bandwidth.

One of the invisible math innovations that is changing the world is Zero-Knowledge Proofs or ZKPs. 

If you’re not familiar with ZKPs, these videos from UCLA Professor Amit Sahai and Up and Atom do an excellent job of explaining the concept easily. We particularly like how Prof. Sahai gets a 5 year old and a 13 year old to repeat back his definition of a ZKP, after he explains it. It’s a testament to great teaching.

So, why should you care about ZKPs?

The short answer is that if you care about privacy and fairness, then you care about ZKPs. It’s the math for you.

For example, ZKPs are used every day by millions of people in bitcoin and other cryptocurrency trading. It’s how two parties who don’t know each other can verify that the right amount of funds were transferred from one to another without the need of an intermediary like a bank. There are other, non-financial uses of ZKPs, as well. 

Given VIA’s mission to enable cleaner, safer, and more equitable communities, let’s use an example from the clean energy sector. VIA blog readers will know that our software platform enables energy data to be analyzed in such a way that an analyst will never see the source data (read more about that here).

This has obvious data privacy benefits to the data owner. Data owners don’t have to physically transfer their data to anyone or let an analyst see it in any way.

But, what about the analysts? How do they know that the data is legit? 

Well, one way is that an analyst could just trust the data owner. That works well if you both know the data owner and believe that they are reputable. For example, if you know the data owner is your public utility, and trust them, then as an analyst, you may say, “the data must be OK.”

What if the data owner isn’t someone you trust? They don’t necessarily have to be “untrustworthy.” You just don’t know them. So, the new energy retailer in your neighborhood, or the EV charging station start-up, or the microgrid operator may be perfectly legitimate. But, how do you know? How can you make sure they are playing fair?

This is where ZKPs come in. You don’t have to know. You don’t have to trust them. With ZKPs, you can mathematically verify that the data stored by the utility corresponds to the data offered to the analyst. Also, ZKPs, given a verifier, enable us to validate that the values of the data provided by the utility are indeed what the verifier is expecting. 

To take the example even further, think about consumer data. Energy is decentralizing rapidly to the individual level (e.g., rooftop solar and EVs). Your energy data is literally personally identifiable information so data privacy is paramount. At the same, you can’t possibly know and trust every other individual consumer as a data owner. ZKPs can address this.

So, is there a ZKP for energy data that energy analysts can use? Stay tuned for next week’s post …

 

Tech on Reg Interviews VIA CEO Colin Gounden for Podcast on Decentralizing the Energy Industry

Dara Tarkowski, host of Tech on Reg, invited VIA’s CEO Colin Gounden as a guest on Episode 48 of the podcast. During the episode, “Decentralizing The Energy Industry” Colin talks about how Web3 is the next internet frontier, signaling a decentralized approach to the web, underpinned by blockchain technology. Colin explores where we are heading with Web3, what it means for data privacy, and how it’s taking shape in different industries.

One of our favorite quotes from Dara Tarkowski during the podcast was how VIA and clean energy relate:

“What VIA is doing is really combining up-and-coming technologies that have become so newsworthy that average consumers are starting to talk about this technology in a way that technologies have done for sometime with the desperate need for clean energy that has been so topical and the topic of every political race around the world. And VIA is right at the intersection.”

To listen to the full podcast, visit the Tech on Reg website

Open Source Monday: Homomorphic Encryption Meets NFT

For the second installment of our “Open Source Monday” blog series, we are offering up a smart contract-based homomorphic encryption example. Check it out below!


Since you’re reading today’s blog, we’re betting you’ll have seen the fun math video we shared last week explaining how homomorphic encryption (HE) works. And, if you’re a long-time VIA follower, you will recall that we first released our own HE library back in 2020*.

Moving from math to code, here is an example of how to use the library using a smart contract. The great thing about this particular example is that you can use a standard ERC-1155 token. 

In summary, here’s what you’ll see:

  1. Two NFTs (bird images) that have one encrypted number each in their metadata.
    a. The NFTs are hosted on IPFS and searchable on OpenSea.
    b. The metadata also includes the public key and a sequence of coordinates on an elliptical curve.
    c. VIA uses NIST-compliant, 2048-bit RSA equivalent, elliptic curve cryptography (ECC).
  2. Polygon is used to create a standard ERC-1155 contract and mint all NFTs. The sum of the encrypted number NFT is represented as a third image (an egg).
  3. For this example, a Polygon scanner was used to enter the encrypted numbers and then sum them with VIA’s HE library. NOTE: In a live setting we would use an Oracle to execute the computation programmatically. 
  4. The encrypted sum gets placed in the metadata of a new NFT and minted. 
  5. The sum can be decrypted by the private key owner as verified by an Oracle.

OpenSea has the NFTs with encrypted data. For everyone’s reference, here are the unencrypted NFTs.

Of course, NFTs don’t have to be the source of the addition. This illustration, however, should resonate with Web3 game designers and NFT minters alike. For example, you could offer treasury chest NFTs based on breeding and only provide the reward, decrypted value, to the owner of the NFT.

You can also substitute another HE library, other than VIA’s, if you prefer. The VIA library has a number of advantages that we described in our original 2020 post.

Some of the key advantages of VIA’s HE library include:

  • NIST-compliant ECC
  • No limit on digits for addition
  • Fixed point calculations
  • Benchmarked as significantly faster than many other HE libraries

Reach out if you’d like to learn more about the VIA library.

Weigh in!

We’re considering hosting an Oracle to enable this functionality in general for anyone on a public blockchain. Would this be of interest to you? If so, Support this post (via LinkedIn) and RT (via Twitter).

*As one update to the 2020 HE post, VIA was issued patents on its homomorphic encryption approach in 2021 and additional patents in February 2022.

Mastery Monday: Homomorphic Encryption

This is the first installment of our blog series, “Mastery Monday with VIA” where we share with you some of the inside details of our technology and math in 5 minutes or less. So, are you ready to become a master?


So, what is homomorphic encryption (HE)? 

HE is a way to compute something without knowing what the numbers are (i.e., keeping them encrypted). For example, adding two numbers or multiplying two numbers and learning the exact result while keeping each of the two input numbers secret.

Why does it matter? 

Unencrypted data is unsafe. With cybersecurity increasing, the last remaining case where data routinely remains unencrypted is during computations. Encryption is already commonly used when data is stored and when it’s sent from one place to another. 

When would you use it? 

Anytime you use math. Which is everywhere. A simple example is a census. I want to know how many people live in a town without knowing how many people live on any single street, in a particular building, or in their own home. AI is all math. So, voice and face recognition while the data is private is a more complicated example.

How does it work?

Check out this less than 4 minute video below! 

Please note: this video was filmed in VIA’s new office space, hence considerable echo. We recommend using the closed captions.

Want to learn more?

VIA holds several issued patents in homomorphic encryption. 

Other details related to VIA’s approach to HE are available from VIA’s earlier blog from 2020.

Next week, we’ll be sharing some code and a use for HE.

 


Below is a transcript of the “Homomorphic Encryption Explained” video.

Everybody, everywhere is asking about homomorphic encryption.

Said no one ever.

It’s not actually a thing that anyone ever asks about, but it’s super important, nonetheless.

And the reason is because keeping our data safe is super important.

So, the idea that we keep data safe when it’s at rest – that happens. Where the data is not safe is when you actually try to do some math on numbers.

For example, you have some data or information [Becky] and you have some data or information [Sam] and you want to do a comparison.

So, both of you have kitten collectible porcelain statues. And now we want to know which one of you has more without either of you revealing your own number because your porcelain kitten collection data is intensely personal.

[Becky] How did you know? 

[Sam] True.

As a person who’s doing, you know, high academic research, I’m really interested in the total sum of kitty collectors in this world and how many porcelain kitties there are in the world. That’s my thing! I’m super interested in it.

Don’t judge me.

Okay, so here’s what we’re going to do. We’re going to now add up the number of porcelain kitties in your collection [Becky] and the number of porcelain kitties in your collection [Sam]. And Becky, you’re not going to tell Sam how many. And Sam, you’re not going to tell Becky. And neither of you are going to tell me. And, even so, as a world-class researcher, I am going to be able to tell how many there are in the world without knowing either of those things.

And that’s one definition of homomorphic encryption, which is the ability to add up or multiply or divide or subtract or be able do some math without ever actually revealing any individual number.

So, the way that we are going to do that is we’re going to pretend this is my homomorphic encryption specialist device.

It’s actually my calculator on my phone here.

And as an example, what I’m going to do first is type in a number that is only visible to me, the researcher. And to you, the audience, only. So just let’s keep it between us. 

And now, I’m going to pass this to Becky. Add to whatever number I sent you. I want you to type it in and add the number of porcelain kitties that are in your collection.

Now you’re going to pass that to Sam.

Sam, I want you to add how many are in your collection.

Ok, now you’re going to pass it back to me.

And just to be clear, Becky, do you know how many porcelain kitties Sam has?

[Becky] No idea.

[Sam] Do you know how many porcelain kitties Becky has? (shakes head)

And, I don’t know how many they have either individually but I do know that together we have 24 is my guess. But is that true? That’s what I have in my calculator. Let’s see.

Becky, how many were in your collection actually? 

[Becky] 8.

And how many were in your collection?

[Sam] 16.

So 8 and 16, I’m pretty sure is 24. So we got the number! Even though neither of you knew each other’s numbers and I didn’t know what your numbers were.

And, there’s a lot of things you can do together to continue to obfuscate and hide the original numbers.

And we’ll talk later about some use cases.

We have an upcoming piece just on a use case of homomorphic encryption and NFTs in gaming. So, we’ll look forward to sharing some code and why that may be useful next time.

But, here was a little bit of a theory of homomorphic encryption particularly applied to addition.

Thanks for watching!

VIA’s Joe Babiec and Advisor General Tom Blackstock Participate in 3-Day JETC Conference

VIA was proud to participate in this year’s JETC Conference. This is the first time the conference has been in person in three years, with over 2,000 attendees participating.

To kick off the event, VIA’s SVP, Strategic Initiatives, Joe Babiec and Advisor, General Tom Blackstock, set up shop in the exhibit hall that included over 150 participating companies. The duo had excellent conversations with fellow attendees about the ways JARVIS™ supports facilities management.

A peek into VIA’s booth at JETC.

On Day 2, General Tom Blackstock moderated the panel, “SMEs in Installation Facility Management and AI” with Joe Babiec, Major General William T. Nesbitt, and Lowell Ursey, Integration Branch Chief, NDR PMO. The panel covered how to prioritize facility investments in an environment where demands on today’s military facilities are increasing and budgets to support improvements to critical infrastructure are tight.

General Tom Blackstock moderating the panel discussion (photo courtesy of JETC Conference committee).

For a full recap on the event including a fun 2-minute video, visit the JETC website.

Colin Gounden Joins Wharton’s Sarah Hammer for Conversation about AI, Blockchain, and Clean Energy

VIA’s CEO Colin Gounden joined The Wharton School’s Sarah Hammer for a conversation about how the use of blockchain, crypto, and AI connects to clean energy. Speaking specifically about technology in the crypto space, Colin commented:

“In general, we see the technology and tech stack evolving so fast in the crypto space that it’s where innovation is happening. Anytime that you want to provide a technology solution, you want to go to where the innovation is happening fastest.”

For more great questions and insights from Colin and Sarah’s chat, check out the full recording here.

Open Source Monday: How to Spot Malware in Your NFT

Like the internet and GPS that we use every day, VIA’s data privacy and security platform was first tested at scale by the U.S. Department of Defense.

A major U.S. intelligence agency has been actively testing the ability of VIA’s blockchain platform to detect potential cyber threats to data sources. 

We can’t disclose much that we did in detail. Actually, we can’t disclose anything in detail. After six months and well over 350 tests, there is one insight, however, that we feel is important to share publicly:

It’s ridiculously easy to inject malware into a file that can then be downloaded as an NFT!

As NFTs have exploded in popularity (23% of millennials in the U.S. collect them), adding malware to an NFT is an easy and fast way for malicious users to spread chaos.

So, today, VIA is making a malware check for NFTs code available for free, for anyone: https://github.com/viascience/nftscan. Special thanks to the steganography open source community for their help to create this NFT vulnerability scanner.

This initial version on GitHub has three separate malware checks. There are instructions on how to submit a pull request for you to add your own additional malware checks. If you’re interested in using the code on your website, write to us at info@solvewithvia.com

Want to learn more about how hidden text and malware code can be easily transferred when not checked? Watch this 43 second video.

If you’re interested in making the NFT community safer, please share this blog with your networks!

Stay safe out there everyone!

VIA CEO Colin Gounden Invited to Fireside Chat with Sarah Hammer of The Wharton School

What’s the role of blockchain in driving the clean energy transition? Don’t miss Colin Gounden’s fireside chat with The Wharton School’s Sarah Hammer on May 9th at 1:00pm ET to find out. Register here: https://bit.ly/3K8yM4a.

That Tech Pod Interviews VIA CEO Colin Gounden

Laura Milstein and Gabi Schulte of That Tech Pod interviewed VIA’s CEO Colin Gounden for the latest episode of their podcast which covers topics ranging from data privacy to tech innovations. During their chat, Colin described how valuable Web3 is for the future of data privacy and more specifically, how it plays a critical role in making data more accessible:

“It doesn’t matter how good your AI is, your math is, or your quant skills are if you can’t get access to data … the most successful companies in the world, the biggest market caps, the ones that have grown fastest, they did it by saying data is valuable, we need to learn from that data. Blockchain and Web3 are making vast amounts of data available to everyone, not just a select few.”

For the full 34 minute episode, play it here.

Why Switzerland?

Yes, we love chocolate, cheese, and clean mountain air.
That (alone), however, is not why VIA is spending so much time in Switzerland.
Switzerland is the leader in three areas core to VIA: clean energy, data privacy, and blockchain.

Clean Energy

More than 190 countries around the world have pledged to reduce carbon emissions. Switzerland is one of the few that has legislation, a deadline, and active programs to move towards net zero. Not only is this commitment aligned with VIA’s mission, it enables VIA to actively support the clean energy transition and exactly where that transition is happening the fastest. As part of VIA’s commitment to energy and Switzerland, we’re pleased to have been admitted to the Association of Swiss Electrical Companies last week.

Data Privacy 

Arguably no country in the world has a stronger reputation for data privacy than Switzerland. The laws around data privacy continue to evolve and become stricter over time. By being aware of the leading edge of privacy regulations, VIA’s platform is in a position to support any jurisdiction.

Blockchain

Switzerland’s Crypto Valley is to blockchain what Silicon Valley is to software. With over 1,000 blockchain companies and one of the world’s first countries to enact crypto and blockchain legislation, Switzerland is an ideal location to lead blockchain initiatives. Earlier this year, VIA was admitted to the Swiss Blockchain Federation (see photo below). It’s in everyone’s interest to participate in an active innovation community that also has a clear regulatory framework.

Pictured above at the general assembly of the Swiss Blockchain Federation in Zurich: Ray Neubauer, Expansion Manager at VIA, Markus Riner, Head of Digitalization at VSE (Swiss Association of Electricity Suppliers), and Dr. Fabian Streiff, Head of Economic Development Agency of the Canton of Zurich.

If you’re interested in hearing more about how and why we chose Switzerland as our European headquarters, you can watch this ten minute video with our CEO, Colin Gounden being interviewed by the Swiss Ambassador to the U.S.

Swiss Ambassador Markus Börlin Interviews VIA CEO Colin Gounden

VIA’s CEO Colin Gounden was invited by Ambassador Markus Börlin, Consul General of Switzerland to join him for an interview in New York City. During the interview, Colin talks about the reasons we selected Switzerland as a European office for VIA and why blockchain and AI are critical to the clean energy transition happening in Switzerland. Watch the full interview below.

VIA Expansion Manager Ray Neubauer Invited to Participate at SUEID Conference

For the 5th consecutive year, VIA has been invited to participate in the Swiss-US Energy Innovation Days (SUEID) Conference. VIA’s Expansion Manager, Ray Neubauer, will present at the event which will take place in person in Bern, Switzerland and cover the challenges we face as we accelerate the clean energy transition. For more information, visit the event website: https://www.energyinnovationdays.com/sueid-2022/