Introduction
Carlo:Eryx, Zero Knowledge, and Cardano. This is going to be a quick view of everything that's going on with ZK on Cardano. I'm going to start by introducing myself. I am Carlo. I studied mathematics at the University of Buenos Aires, and then I also did my PhD there, and I've been working at Eryx on Web3 topics, particularly ZK, for almost three years now.
About Eryx
A bit about Eryx as well. It's a really special company because it's a worker-owned cooperative, meaning that we are both the developers and the owners of the company. We have a Web3 team focused on cryptography and smart contract development, composed of computer scientists and mathematicians such as myself, and we are ZK experts. We've been working with ZK across different ecosystems for three years.
What is Zero Knowledge?
A formal definition would be the following: a cryptographic protocol that allows one party to convince another party that a certain statement is true, without revealing any additional information beyond the truth of that statement itself. It does not reveal any underlying data or assumptions; one party simply becomes convinced that the statement is true.
So it's a way to prove knowledge without exposing data, which means you can preserve privacy. You can also prove the correct execution of a computer program written in a more or less standard programming language — for instance Haskell, which is the language in which Cardano is built.
ZK-SNARKs
All of this can be summarized in the concept of ZK-SNARKs. SNARK is an acronym for:
Zero Knowledge: It doesn't reveal any information beyond the statement that you are actually proving
Succinct: Meaning that the proof is small and compact
Non-interactive: There is no back-and-forth interaction — the proof is a single object that the prover gives to the verifier, and the verifier becomes convinced that the statement is true
Argument of Knowledge: Ensuring that the statement being proved really corresponds to some underlying knowledge
It's ideal for UTXOs because you can include the proof in a transaction and verify it on chain.
ZK Protocols in a Blockchain Context
ZK protocols allow us to delegate computations off chain. When you're writing your smart contract, at some point instead of doing all of a certain computation on chain, you can place a verifier there and deploy it. When you're submitting a transaction, you perform the computation on your device, or on a server if it is heavy, then you compute a proof of that computation and send it along with your transaction.
The smart contract on chain will process your transaction and, at the point where the heavy computation would normally happen, it simply verifies the proof and then continues. This way, not all of your computation needs to be done on chain; some of it can be safely moved off chain.
Benefits of ZK
1. Scalability
In a ZK protocol, verifying a proof is always cheaper than performing the original computation on chain. You can run very heavy computations off chain, generate a proof of the result, and then only send the proof to be verified on chain. This is what many ZK rollups are doing to scale other blockchains.
2. Privacy
Since computation can be done off chain, you can use it to process sensitive inputs such as your private keys, identity information, or healthcare data that you do not want to put on a public blockchain. The sensitive data stays off chain, and only a proof that the computation was done correctly is sent on chain.
ZK and Cardano
We think that what ZK brings to the table really strengthens many of Cardano's core values.
はじめに
カルロ:Eryx、ゼロ知識証明(Zero Knowledge)、そしてCardanoについてお話しします。これは、Cardano上で今起きているZKまわりの動きをざっくり眺めるための短いセッションです。まずは自己紹介から始めます。私はカルロと言います。ブエノスアイレス大学で数学を学び、同大学で博士号も取得しました。ここ約3年間、EryxでWeb3、とくにZK関連の開発に携わっています。
Eryxについて
Eryxについても少し触れておきます。Eryxはとてもユニークな会社で、労働者協同組合(worker-owned cooperative)です。つまり、私たちは開発者であると同時に、会社のオーナーでもあります。暗号技術やスマートコントラクト開発を行うWeb3チームがあり、私のようなコンピュータサイエンティストや数学者で構成されています。私たちはZKの専門家として、この3年間さまざまなエコシステムでZKに取り組んできました。
ゼロ知識証明とは?
ゼロ知識証明の形式的な定義は次のようなものです。ある当事者が別の当事者に対して「特定の命題が真である」ことを納得させる暗号プロトコルであり、その命題の真偽に関する情報以外はいっさい明かさない、というものです。つまり、裏にあるデータや前提条件は公開せずに、一方の当事者が「この命題は本当に正しい」と確信できるようにします。
これは、データをさらすことなく知識を証明する方法であり、プライバシー保護に役立ちます。また、一般的なプログラミング言語――たとえばCardanoが構築されているHaskellのような言語――で書かれたコンピュータプログラムの実行が正しいことも証明できます。
ZK-SNARKs
こうしたアイデアは「ZK-SNARK」という概念にまとめられます。SNARKは次の頭字語です。
Zero Knowledge(ゼロ知識): 実際に証明している命題以外の情報をいっさい明かさないこと
Succinct(簡潔): 証明が小さく、コンパクトであること
Non-interactive(非対話型): 対話的なやり取りを必要とせず、証明者が検証者に一度だけ証明を渡すだけで検証が完了すること
Argument of Knowledge(知識の論証): 説明しようとしている命題が、本当にある知識に基づいていること
UTXOモデルとは非常に相性がよく、トランザクションの中に証明を含めてオンチェーンで検証することができます。
ブロックチェーン文脈でのZKプロトコル
ブロックチェーンの文脈で見ると、ZKプロトコルは計算をオフチェーンに委譲することを可能にします。スマートコントラクトを書くとき、重い計算をすべてオンチェーンで実行する代わりに、その一部を検証器としてコントラクトに埋め込み、デプロイすることができます。
トランザクションを送るユーザー側では、計算自体は自分のデバイス、あるいはより重い処理であればサーバーで行い、その結果についての証明を作成してトランザクションに添付します。オンチェーンのスマートコントラクトはトランザクションを処理していく中で、本来なら重い計算を行う箇所で、その証明を検証するだけにして処理を続けることができます。つまり、すべての計算をオンチェーンでやる必要はなく、一部をオフチェーンに逃がすことができるのです。
ZKの利点
1. スケーラビリティ
ZKプロトコルでは、証明の検証コストは元の計算そのものをオンチェーンで実行するよりも常に安く済みます。重い計算はオフチェーンで行い、その結果についての証明だけを作ってオンチェーンで検証させる。このアプローチは、多くのZKロールアップが他のブロックチェーンをスケールさせるために採用しているものです。
2. プライバシー
さらに、計算をオフチェーンで行えるため、秘密鍵や本人確認情報、公開したくない医療データなどのセンシティブな入力を安全に扱うことができます。機密データはオフチェーンで処理し、オンチェーンには「計算が正しく行われた」ということを示す証明だけを送ればよいのです。
ZKとCardano
私たちは、ZKがもたらす機能は、Cardanoが大切にしている多くのコアバリューをいっそう強化するものだと考えています。
ゼロ知識証明ってなに?(かんたん版)
ゼロ知識証明を、できるだけやさしく説明してみようのコーナー。
ポイントは一つです。 「正しいことは証明するけど、中身のヒミツはバラさない」 という仕組みだ、ということです。
たとえ話:答えだけ合っているテスト
たとえば、あなたが難しい数学の問題を解けたとします。 でも、途中式は見せたくありません。ノートがぐちゃぐちゃだからです。
普通は、先生は「途中式も見せて」と言います。 なぜなら、本当に自分で解いたかどうか分からないからです。
でも、もし「途中式は見せないけれど、本当に自分で解いた」と 先生を納得させる不思議な方法 があったらどうでしょうか?
これが、ゼロ知識証明のイメージです。 「ちゃんと合ってることだけ伝える。中身の情報は渡さない」 という技術です。
ヒミツの鍵のロッカーの例
もう少し具体的なたとえを出します。
あなたは、友だちの持っているロッカーの「鍵」を知っています。 でも、その鍵は見せたくありません。
そこで、あなたはこう言います。
「ロッカーを一度だけ開けて、鍵を持っていることを見せるよ。
でも鍵そのものは見せないし、コピーも渡さないよ。」
ロッカーが本当に開けば、 友だちはこう思います。
「あ、この人は本当に鍵を知っているな」
でも、友だちは鍵の形も番号も知りません。
これがゼロ知識証明です。 「鍵を知っている」という事実だけを証明して、鍵の情報は渡さない のです。
ブロックチェーンと相性がいい理由
ブロックチェーンは「みんなが同じデータを見る」仕組みです。 なので、そのままだとプライバシーが守りにくいところがあります。
そこでゼロ知識証明の出番です。
- お金の計算が正しいことは証明したい(不正送金は防ぎたい)
- でも、だれがいくら持っているか、細かい中身は隠したい
こんなとき、 「計算が正しい」ことだけを証明し、中身の数字は出さない ということができます。
さらに、重い計算をオフチェーン(ブロックチェーンの外)でやって、 「ちゃんとやったよ」という証明だけをオンチェーンに載せることもできます。 これで、 ブロックチェーンの負担(手数料・処理時間)を軽くする こともできます。
ZK-SNARKをざっくり言うと
ZK-SNARK という言葉も、かんたんにだけ触れておきます。
- Zero Knowledge: ヒミツはバラさない
- Succinct: 証明が小さい(データ量が少ない)
- Non-interactive: 何度もやり取りせず、1回の証明でOK
- Argument of Knowledge: 本当に知っている人だけが作れる証明
ざっくり言えば、 「短くて・一発勝負で・ヒミツを守れる・ちゃんとした証明」 くらいに思っておくとイメージしやすいです。
Cardanoではどう役に立つ?
Cardanoは、もともと 「形式的にしっかりしていること」「安全性」「分散性」 を大事にしているチェーンです。
そこにゼロ知識証明が加わると、次のようなことが強くなります。
- 重い計算をオフチェーンに逃がして、チェーンを軽くする
- 個人情報やビジネスのヒミツを守りながら、「正しさ」だけをオンチェーンで保証する
- 規制・コンプライアンスにも配慮しながら、プライバシー重視のアプリを作りやすくする
つまり、 「まじめで安全なCardano」に、「プライバシー」と「スケーラビリティ」という 強い武器を足してくれるのがZK だ、というイメージです。
一言でまとめると
ゼロ知識証明とは、 「ヒミツは守ったまま、正しいことだけを世界に証明する技術」 です。
そしてそれは、 「みんなで同じ台帳を見る」ブロックチェーンと、とても相性がいい 技術です。
CardanoのようなチェーンにZKが入ってくることで、 「透明性」と「プライバシー」を同時に追いかける、新しいWeb3の形が作れる。 その入口に今いる、と考えるとワクワクしてきます。