Conf42 Web 3.0 2022 - Online

Zenroom: cryptographic VM for blockchain interop

Video size:

Abstract

Zenroom, is a cryptographic virtual machine programmable in an English-like DSL. Zenroom performs a range of cryptographic flows (different signatures, zero knowledge proof, quantum proof crypto) and can produce a raw transaction for Ethereum and Bitcoin.

Summary

  • Xandrum can do a lot of blockchain interoperability for Ethereum, bitcoin and more. Zenroom can also do advanced cryptography such as xeonology proof. It can be programmed in can English like domain specific language inspired by BDD. Features that you can use to create microservices using the Xenrome ecosystem.
  • Zentsworm is a project within the EPSI project. EPSI stands for european blockchain service infrastructure. We have developed a swarm of blockchain oracles technology. For example for blockchain interoperability or feeding the blockchain with data from the Internet.
  • Zantmo storage is a distributed key value storage for caching and sharding. All the code you've seen is open source. The last thing I want to show you is our w three CD method.

Transcript

This transcript was autogenerated. To make changes, submit a PR.
Hi everybody, this is Andrea from Forkbomb and I'm here to tell you about the Xandrum virtual machine and its ecosystem. I am on the Xandrum homepage, xandrum.org, and I'm going to jump to the specs. So I'm scrolling down here to the specs section and I'm going to start from the bottom right. So Xandrum is written entirely in c, meaning that we have binaries command line for all servers on all the architectures. We have libraries for Android, iOS, and we also have a transcompiled version of Xandrum running as a Wasp module inside an NPM package, meaning that Xandrom can also run in the browser or in an old application. Xandrom can also run in very small IoT chips like Cortexm, and we have bindings for most languages that you can ever need. Zenroom has a very tiny payload, so the binary is usually around a megabyte and it usually needs around 500 k's of ram to do its computation. It's fully deterministic, meaning that given the same inputs, you will get the same output on any platform you run it on, which is crucial for a blockchain virtual machine. What can Zendrum do? So, first of all, a lot of cryptography, meaning a lot of different kind of signatures, ECDSA used by bitcoin, Ethereum, EdDSA, schnorr. We can also do quantum proof signatures using the deletium algorithm, which is one of the algorithms selected by the NIST competition this year. And very important, Xandrum can do a lot of blockchain interoperability for Ethereum, bitcoin and more. Zenroom can also do advanced cryptography such as xeonology proof or offline xeonology proof like ZK snarks. It can do multi signature w to receive verifiable credentials and more. Possibly the most interesting feature of Zen room is that it can be programmed in can English like domain specific language inspired by BDD or Gerkin, which is designed to be read and written by people with no programming background. I'm going to scroll down a little bit further. So here you have all the latest downloads for all the platforms, and here you have instructions to use Xandrum in JavaScript, Python, along with bindings for a bunch of different languages. I will jump to a demonstration of the Zen code using our online ide and playground API room. I'm going to reload the page here, so when you land on Apirom net you will see something like this. So you want to start from the examples here we have an extensive library of examples to be used as a cookbook to write smart contracts. So in the beginning you have generic scripts to do all sort of computation. Here we have a section for cryptography. So hashes, as you can see, we can do different kind of hashes as SHA 256 and twelve kdf, PBKDF, HMac, and we have currently added a couple more, which we haven't documented yet. Here you have features that you can use to create microservices using the Xenrome ecosystem. I'm going to go back to this. You have a quantum proof section, so deletium signature and key exchange mechanisms such as kyber and interop. Our Xeonoj proof Zkatesnarx flows multi signature and verifiable credentials. So I'm going to jump to an example that can be easy to use by most people. So I'm going to produce ECDSA signatures of a string and an array of strings. So this is what a Zen code script looks like. The script is divided in three steps. The given step where I load the data. This step is strictly read only. In the second step, which is the when step, all the computation happens. And in the third step, which is the then step, the data produce in the previous step is formatted and printed out. So here I am stating my identity and loading my key ring, which you can see here. This is a bunch of private keys that can be used to do cryptography and bitcoin as a blockchain. Interoperability. Then I'm loading a string which is nested inside the JSON object, and I'm loading an array of strings which is this. In the one section I am first creating an ECDSA signature of the array, which I'm later renaming, and then I am creating a signature of the string embedded in the JSON object. In the last four lines I am printing out the string, sorry, the array of strings, the signature of the array of strings, the string, and then the signature of the string. When I press run, the output of Zen proof comes out and this is the string loaded. This is its ECDSA signature with the usual RNS formatting. And the same thing happens for the array. In the bottom we have a bunch of information about the execution. So the xenrome version, the git commit, the curves loaded at the moment, as well as the memory usage and the execution time. So very important to understand is that this smart contract that I just executed runs here in the browser. So this application in this situation it's using zenroom transcompiled in WASM and embedded into a node package, an NPM package. So I run it again. You see that the memory usage is always the same and the execution time is always between 30 and 40 milliseconds. I want to tell you more about the blockchain interoperability. To do this, I'm going to jump to the zenroom documentation page so that zenroom.org when you start here, you want to scroll down. We have an extensive documentation of the Zen code language as well as how to integrate Xen proof in different kind of applications. I'm first going to jump to the Ethereum scenario. So a scenario is in xen room, an internal library that can be loaded at runtime and contains several contains functionalities. So here I am producing an Ethereum private key. When I create the Ethereum key, then I will create the Ethereum public key. And based on that, so based on the private key, I'm going to create the Ethereum address. This is what the script looks like here. If you scroll down, you will see how to create the transaction and how to sign the transaction. And the same thing we can do for Ethereum, bitcoin, as well as hyperledger fabric, Hyperledger, Sotooth, Yota and Planet Mint, which is a new blockchain, a rewriting of big can DB. You will now wonder what you can use Xandrum for in this situation. So using Xandrum, you can effortlessly build a browser based multi blockchain wallet. So imagine metamask supporting bitcoin, all its derivatives, ethereum and all its derivatives plus fabric. And so, and the same wallet can run in the browser, or you can embed it in a PWA and have it run in a mobile. And with very little code modifications, you can also run it on react native or as a backend application. So here you have examples on how to embed Xenro. For example in a node application, the backend, how to run it in the browser. Yeah, so there is an NPM package called Xen proof, and we have examples to call Xen proof from Javascript, Python and other languages as well. Okay, this was the basics of xandrum. Now I'm going to jump to the xandrum ecosystem. So I'm going to jump to the forkbomb on page forkbomb eU. Here we have the summary of what I've just told you about the Zenroom stack. This is again a page about Zenroom. So I'm going to jump over, I'm going to jump over to Zentswarm. What is Zentsworm within the EPSI project? EPSI stands for european blockchain service infrastructure. We have developed a swarm of blockchain oracles technology. So we have packaged a Zandro microservice into a node based application to do mostly blockchain interoperability. So the oracle listens to a blockchain, waits for an event, and when a certain event is produced, then the oracle is triggered. A smart contract is executed on the Oracle, and the oracle can reply by computing something, for example for blockchain interoperability or feeding the blockchain with data from the Internet. For this, we have also developed a dashboard. So here you have a screenshot of the list of oracles active at the moment, and the screenshot was taken. We have built in monitoring for each oracle. Something you cannot really see here because the screenshot is too small, is that when each oracle goes online, it announces itself to the network using a w three c did document, which is something I'm going to go back on in a second. Okay, back to the forkbomb u homepage after xanthworm, I'm going to show you Zantworm storage. Zantmo storage is a distributed key value storage for caching and sharding. Something I didn't mention is that all the code you've seen is open source. So here you have the source code of Zanswarm. This is the source code of densmore storage. And under GitHub.com slash dine slash zendrum, you find the source code of Xandrum. So what is densmore storage is a tarantool based distributed caching and sharding application that allows you to do key value storage where both the storage and the retrieval are based on policies that are coded in the application. The last thing I want to show you is our w three CD method. So we have implemented our w three CD method initially for the appsy project. The very first implementation we did was in order to allow the oracles to identify themselves, and we're now growing it to be more generic in order to accommodate human users, to accommodate web services, or to accommodate objects of different kinds. Our debut receded method has a focus on cryptography. So in the w three did document we have embedded public keys for all the signatures that we are capable of working with, including the quantum proof delithium signature scheme. And the w three ceded method provides you blockchain anchoring, meaning that when a did document is produced, the did service stores the did document also on blockchain and it stores the blockchain transaction in the did document, meaning that the validity of the did document can be checked on blockchain at any time. Okay, I think that this is all I will conclude showing you the GitHub repo of Xandrum. So if you go here, you do GitHub.com, dime Sandrum and here you can follow the development. Thank you very much.
...

Andrea D'Intino

Co-founder @ Forkbomb

Andrea D'Intino's LinkedIn account Andrea D'Intino's twitter account



Awesome tech events for

Priority access to all content

Video hallway track

Community chat

Exclusive promotions and giveaways