H

H

Conversation with Mysten Labs Chief Cryptographer: How did cryptographic innovation become the core of Sui's design?

In this article, we interviewed Kostas Chalkias, co-founder and chief cryptographer of Mysten Labs, to discuss how cryptography innovation has become the core of Sui's design and what makes the upcoming features exciting.

Q: Can you briefly explain the role of cryptographers in building blockchain?

A: In fact, I have worked with one of the first developers of Satoshi Nakamoto, Mike Hearn. I have a PhD in cryptography and before the era of blockchain, my focus was mainly on academia. Due to this involvement, I can accurately tell you that cryptographic technology plays a role in blockchain infrastructure companies, usually divided into three key roles.

The first is research. You have to innovate in cryptography because it is usually very advanced mathematics. Part of it is finding cool new algorithms, while also researching and breaking algorithms. My previous role in a blockchain company involved reviewing the implementation of cryptography and acting as a white hat hacker to find attacks against them. The work involved saying, "You are a mathematician, you are a cryptographer. Go and look at the implementation of this specific digital signature algorithm or random beacon or whatever. Check if everything is fine." This falls under the research domain.

The second is implementation, applying the concepts of cryptography. Applied cryptographers do receive requests from product teams like, "Hey, we want a new, faster signature scheme, or we want to create a new privacy feature for our customers or community." Then applied cryptographers not only have to design and research, but also implement it. Sometimes applied cryptographers also have to be very strong software developers and need to do novel optimizations in coding.

The last is creating new products, based on the primitives that cryptographers understand, and coming up with their own innovative ideas.

In summary, we cover research, implementation, and product, which is the typical role of a blockchain cryptographer.

Q: Can the same person usually do these three things? Or are they divided into groups for implementation?

A: For Sui, because we introduce a lot of innovations, we need multiple people working on many workflows. I am the chief cryptographer of Mysten Labs and one of the founders of Sui, so I am involved in most of the work. However, you cannot do everything alone, and I am still learning from my team.

We don't just use one programming language. For example, we use Rust for concept validation, but then we realized that most people on the internet use JavaScript or TypeScript. Cryptographers cannot write everything themselves. But you can't delegate it to generalist software engineers either, because some optimizations require advanced mathematics and knowledge of cryptographic primitives, or you may need to interact with libraries that you are not familiar with, so you need someone else to take over that work.

Our research team consists of about 10 people, who are dedicated to innovation and implementation in their daily work. We have these "smart" minds, sometimes I am the one coming up with ideas, and sometimes I am also following the direction of other cryptographers. Our team can help with implementation, provide resources, or give tips on how to extend and apply a cool idea.

Two eyes are not enough because cryptography is an extremely critical part of blockchain infrastructure, and if there is a problem, it could be GAME OVER, so more eyes are needed. Additionally, many innovators are needed.

Q: What key progress and impact have external research and internal discussions made in Sui's design?

A: In terms of cryptography, external signals that have influenced us are the evolution of technologies like zero-knowledge proofs and general privacy-preserving techniques proposed in the literature. It's not just blockchain doing cryptography, there are research institutions and university departments all over the world doing theoretical work. I personally think Mysten Labs is very good at finding new theories in areas that have never been implemented before, some of which may be inaccurate assumptions, but we combine them with our existing technology to ultimately drive the creation of a novel product.

Sui has a new feature called ZK Login, which emerged from this. Some technologies were proposed externally, but they were not enough to provide a seamless identity verification mechanism for L1 blockchains. We invented new features on top of them, which is an internal vertical area of applied research, and in the end, we came up with a complete solution.

We are not a university, we are not just theoretical, we need to implement production-ready things, so we get feedback from both internal and external discussions. Many times we read scientific papers, we attend events, we are reviewers and presenters, and we receive feedback. Obviously, we translate all of these into implementations on Sui.

I realized that some of our code is subsequently used by others, other companies, or even people outside our industry, and eventually, we see big companies getting that code and injecting it into their own infrastructure, not necessarily blockchain infrastructure.

Internal innovation is usually triggered by the product team. They come to us and say, "This is currently impossible, we haven't seen any research in this area. Can you solve this problem?"

For example, an interesting problem is enabling discoverable blockchain addresses with privacy. How can I send something to your email or phone number even before you create an account? Imagine a Venmo-style feature where I send assets to you and then you go and claim them when you realize they are there. Solving this problem requires internal brainstorming and discussing how to do it correctly with a privacy mindset. We take theories from external sources and combine them all into a set of tools. Most of the time, we are actually very successful in this. We manage to solve the above problem and rarely encounter product issues without solutions.

Q: How does Move help you create these cryptographic innovations and provide a more secure experience for developers using Sui?

A: I used to be a Solidity developer, writing Ethereum contracts, and I was also passionate about breaking smart contracts on Ethereum. My first job was auditing lottery contracts on Ethereum, and I successfully broke some algorithms. At that time, you could almost say that the randomness algorithm was unfair and opaque. This actually made me realize that smart contract developers are usually engineers who write small scripts. Smart contracts are not big programs or complex databases. Usually, anyone who receives a few days of training can write smart contracts and deploy them, but it requires careful auditing, and there may be hidden pitfalls in web2-web3 interactions.

We realized that on Ethereum, some security features of Solidity have issues due to two special factors. First, engineers are optimizing for gas cost reduction, which may cause them to miss certain edge cases without coverage. And there is also the issue of reentrancy attacks, where one smart contract pays another smart contract without updating its state. This attack vector has caused significant financial losses in the past, including the Ethereum DAO years ago, which led to a fork in Ethereum.

Move doesn't have these issues, especially when it comes to reentrancy, we protect the source code from the ground up. Additionally, we made a lot of modifications to the original Facebook Move by creating a more object-oriented Move language, which greatly helps with code reusability. Instead of copying and pasting smart contract code and making adjustments, you can call the original code and get better consistency.

Also, in Move, we provide objects for everything. In Solidity, when you transfer something from one contract to another, usually you don't know what it is without context. Is it an address? Is it a number? Is it an image URL? When you treat everything as objects, similar to Java and C++ and all object-oriented languages, you can convert existing client projects into a smart contract-based world without worrying about triple optimization compression mechanisms. Because you can literally see that it is a "tiger" object and I am transferring a "tiger" object to you.

And what about cryptography? When you have these items, when I send something from one wallet to another address, you will see a pop-up window saying, "You are transferring a tiger NFT. This tiger NFT has X features." Due to the object-oriented design, no matter which object you touch, you can see exactly what you are doing, which can help you identify any issues in transactions. Many users are tempted by malicious software or applications that try to convince you to sign something in another blockchain wallet that you don't want to sign. But with Move, that becomes a bit difficult, as users can clearly see what is happening, enhancing the security for end users.

Another thing that really helps in designing more interesting and cool algorithms is parallelization achieved through objects. Let's say I have some bills, a $10 bill and a $100 bill. If I want to give the bills to two people next to me, I can do this in parallel.

On Ethereum, the basic concept is a central account balance from which you can transfer things. So if I want to send or receive funds, I have to order these transactions. I will send $100 first, then submit the $10 transaction. At the same time, if someone sends me funds, these three transactions need to be ordered, and this process is expensive.

This is the direction we get all the cool things from the Move language, and as a cryptographer, we can use the parallelization and object-oriented programming provided by Move to create better security and cooler innovative algorithms. That's the whole idea. For example, we created a lottery scheme. Although it may seem easy at first glance, doing it correctly is often very, very difficult, especially when building multiplayer lotteries with complex edge cases, which is also a shining point for excellent cryptographers. We need some randomness, you need to buy tickets, and these tickets can be bought in parallel. How do you do this on the blockchain? Move and its available cryptographic primitives help provide a better and more secure cryptographic ecosystem.

I am well aware that something like a lottery system can be used in a product, for example, there are 300 tickets available, but thousands of people want them, and you want them to be randomly distributed? This system is the foundation of Sui, and any company can add it to their product.

The benefit here is that, due to the object-oriented nature of Sui, you can call the same contract from many different other smart contracts. We have the concept of composability, which actually helps you use the same ticket in two different lotteries, which is very useful for creating new experiences that didn't exist before.

In the gaming space, you need randomness, and Sui is actually one of the best blockchains for that. For board games, even seemingly deterministic games like chess, you need to know who moves first. Who is white, who is black (as we know, white has an advantage in chess). It requires a certain level of transparency to match different players correctly in the same game. There are also government applications. Imagine the tax office doing some statistical sampling and selecting audit targets. Can they really provide evidence that statistical sampling is done in a fair and transparent manner?

If there is an algorithm with undeniable transparency that provides good randomness, every draw or random sampling will have a new fairness.

Q: In a recent tweet, you discussed the importance of storing NFTs on-chain so that they remain dynamic and change over time. Can you share more about this viewpoint, especially how Sui's data structure enhances the utility of NFTs?

A: This is a controversial topic. I tried to explain that the attributes enabled by different infrastructures for NFTs are different. When it is just a static image, when you don't perform any high-traffic operations on it, traditional structures are indeed very good. But in certain cases, like in games, players want to get more value out of NFTs, and traditional structures are not good enough.

Sui has algorithms that allow dynamic NFTs, where their fields are updated with each transaction. When you play a game and have a hero, you win, pass a level, and you may get some new weapons or powers, all of this can be recorded in the state on the blockchain, creating a whole new type. Additionally, because storage costs on Sui are cheap, NFTs can be stored on-chain. This makes it easier to read and write to different smart contracts on-chain and achieve composability.

On other chains, you would face a problem because changes are not in the state. To let another smart contract read your contract, they need to know your structure, and you need an off-chain resolver, which adds complexity to the user experience. There are also conditional logic in some cool applications, where you don't know which NFT you are interacting with when submitting a transaction, so what can I provide from the off-chain world becomes not easy to scale.

There is also the issue of threat models. In fact, some specific applications may tolerate compression and off-chain storage. But in practice, when we store certain content off-chain, we are changing the threat model. The reason is usually centralization. Imagine one day, if you store it on AWS, and then... Amazon goes down. Amazon is a single company, and if it fails and you cannot access that specific off-chain data, you won't be able to use it on-chain; even if you can, you may even need data to generate proof that you do have the off-chain data because sometimes you just need proof, right? To prove it, you need to get the content from AWS, hash it, and send a very small amount of data to the blockchain, which is somewhat verified, but if you don't have the data, you cannot prove what the content of my NFT is.

So there are some centralization issues, although some people say it's not because we can store it in different places. I agree, if we can somehow have a specific design that encodes all these threat models into the blockchain, but another issue is latency. In on-chain practice, we need to get content with minimal latency. If you store NFTs on other chains, it would double the latency, which is not what we want. We want everything to be stored on-chain while reducing latency.

Q: What are you most excited about for the future of Sui?

A: This is my favorite question. The main reason I joined Mysten Labs is that I prefer places where innovation drives product development. We are bringing something new to the community. I even named my son Kryptos.

If you specifically ask me about cryptographic innovation in Sui, one thing is certain, and that is we allow multiple ways of authentication. Usually, most blockchains only support one signature algorithm, Ethereum has its own algorithm, Cardano and Solana support another algorithm. We are trying to make Sui talk to other public chains, which means we allow all existing algorithms, which means we are compatible with more wallets. Existing wallets don't need to reinvent the wheel. If you like algorithms based on Ethereum, we support that algorithm, so go ahead and use it. If you use an iPhone, you don't even need a wallet. iPhones and more advanced Android devices have a secure chip that only supports specific algorithms, and we support that too.

Then we have the concept of multi-signature ourselves. If you care about security, the cryptographic authentication part is one of Sui's flagship features, creating new authentication experiences.

Another thing I personally love is that we have introduced zero-knowledge proofs and privacy-preserving techniques internally from day one in Sui. So people can now create KYC systems with as much privacy as possible, they can even create confidential amount transfers, while also giving them the opportunity to comply with legal and auditor requirements, and we put everything out there for developers to use.

Apart from all these algorithms, our developer solutions engineering team actually provides very good support. We work with teams every day who are not cryptography experts, they don't have cryptographers, but they have some very cool ideas, and if we get some feedback, we help them implement. If something is not available or there are issues, we also resolve them at a very fast pace.

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.