Zero Knowledge - 肖恩·鲍谈SNARKs、可信设置与椭圆曲线密码学 封面

肖恩·鲍谈SNARKs、可信设置与椭圆曲线密码学

Sean Bowe on SNARKs, Trusted Setups & Elliptic Curve Cryptography

本集简介

本周节目中,我们特别邀请到嘉宾肖恩·鲍。肖恩是Electric Coin公司的工程师,也是Zcash的Sprout和Sapling可信设置的设计者,并参与了该协议底层密码学的大量工作。我们聊到了他的背景、入行契机、与SNARK技术共事的乐趣与挑战,以及启发他的创意理念。 节目还探讨了Zcash的发展历程、Powers of Tau可信设置、多方计算(MPC)、漏洞事件始末、SONICs协议、ZEXE方案,以及BLS12-381椭圆曲线构造。 节目开头提到的Radiolab关于Zcash可信设置特辑:https://archive.org/details/radiolab_podcast17crypto_zcash_ceremony 听众提问通道:https://twitter.com/AnnaRRose/status/1122818062061797376 节目中提及的往期零知识专题节目:https://www.zeroknowledge.fm/zkseries 特别鸣谢本期赞助商:Trail of Bits Trail of Bits为需要专业安全支持但尚未组建专职团队的初创科技公司提供服务,包括:开设#security频道答疑解惑、审查高风险PR请求、将最新持续测试方案集成至构建流程。详情请访问www.trailofbits.com。 如果您喜欢我们的节目: Twitter关注@zeroknowledgefm Telegram交流群:https://t.me/joinchat/B_81tQ57-ThZg8yOSx5gjA Gitcoin资助:https://gitcoin.co/grants/38/zero-knowledge-podcast Patreon支持:https://www.patreon.com/zeroknowledge 或直接捐赠至: ETH: 0xC0FFEE1B5083230a5154F55f253B6b6ae8F29B1a BTC: 1cafekGa3podM4fBxPSQc6RCEXQNTK8Zz ZEC: t1R2bujRF3Hzte9ALHpMJvY8t5kb9ut9SpQ

双语字幕

仅展示文本字幕,不包含中文音频;想边听边看,请使用 Bayt 播客 App。

Speaker 0

欢迎收听《零知识》,这是一档探索区块链技术与去中心化网络最新动态的播客节目。

Welcome to Zero Knowledge, a podcast where we explore the latest in blockchain technology and the decentralized web.

Speaker 0

本节目由我安娜主持。

The show is hosted by me, Anna.

Speaker 1

还有我弗雷德里克。

And me, Frederic.

Speaker 1

In

Speaker 2

本期节目中,我们特别邀请到Electric Coin公司的肖恩·博,他将与我们分享他从可信设置、多方计算到零知识系统(如Sonic和Elliptic)乃至整个密码学领域的工作成果。

this episode, we sit down with Sean Beau from the Electric Coin Company for a very special episode where we talk about all the things that he's worked on from trusted setups and MPCs to zero knowledge systems like Sonic and Elliptic or cryptography in general.

Speaker 0

节目开始前,我们要感谢本周赞助商Trail of Bits。

Before we start, we wanna say thank you to this week's sponsor Trail of Bits.

Speaker 0

Trail of bits提供一项服务,他们会为您的公司配备专业安全团队。

Trail of Bits is offering a service where they will staff a security team inside your company.

Speaker 0

他们会定期跟进,确保各项工作朝着正确方向推进。

They'll check up on you from time to time and make sure things are headed in the right direction.

Speaker 0

让安全专家参与设计评审会议,审查您的代码提交,或在适当之处贡献安全改进。

Have a security expert on design review calls, reviewing your PRs, or contributing security improvements where it makes sense.

Speaker 0

当您超出服务需求时,他们还会通过准备技能测试样本、主持部分面试并提供专业雇佣建议,帮助您替换他们的角色。

Once you outgrow the service, they'll also help you replace them through prepping the work sample test, hosting some interviews, and giving you an educated recommendation on who to hire.

Speaker 0

这不是审计服务。

This is not an audit.

Speaker 0

这是一项低成本月度订阅服务,旨在帮助您在内部建立安全团队。

It's a low cost monthly subscription that will help you build a security team inside your company.

Speaker 0

访问trailerbits.com获取更多服务详情。

Visit trailerbits.com for more info about the service.

Speaker 0

再次感谢Trail of Bits。

So thanks again, Trail of Bits.

Speaker 0

现在请收听我们对Sean Bo的采访。

And now here's our interview with Sean Bo.

Speaker 1

你好,Annette。

Hi, Annette.

Speaker 1

Hey.

Speaker 2

今天我们有一位非常特别的嘉宾,肖恩·波

We have a very special guest with us today, Sean Bo.

Speaker 2

对此我超级兴奋

I'm super excited about this.

Speaker 2

我们收到过无数邀请你上节目的请求,而且我们知道你在零知识领域备受推崇

We've had numerous requests to have you on the show, and and we know that you're a very highly regarded person in this sort of zero knowledge space.

Speaker 2

所以对本期节目非常期待

So very excited about this episode.

Speaker 1

谢谢

Thanks.

Speaker 1

很高兴能来到这里

I'm really glad to be on here.

Speaker 1

我听过几期这个播客

I've listened to a couple episodes of this podcast.

Speaker 1

这真是太棒了。

This is really awesome.

Speaker 0

你之前有没有听过某一期节目。

Did you actually hear the there's one episode.

Speaker 0

大概是在两三期之前,我们还在节目里公开喊话,希望你能来参加我们的节目。

I think it's, like, two, three episodes ago where we we actually did a call out to you hoping that you'd come on our show.

Speaker 0

不知道你有没有听到那期。

I don't know if you actually caught that one.

Speaker 1

我有个朋友听了那期节目后,立刻联系我说,嘿。

One of my friends, one of my friends heard that episode and, pinged me and and said, hey.

Speaker 1

你应该看看这个。

You should you should check this out.

Speaker 1

所以我就来了。

So yeah.

Speaker 0

太酷了。

Cool.

Speaker 0

太好了,真高兴你能来参加。

Well, I'm so glad you came on.

Speaker 0

对于还不了解的听众,我来简单介绍一下你,肖恩。

For those who don't know, I'm just gonna give a little intro to who you are, Sean.

Speaker 0

肖恩是Zcash公司的工程师。

Sean is a Zcash company engineer.

Speaker 0

其实你们现在已经不叫Zcash公司了。

Actually, you're not called Zcash company anymore.

Speaker 0

现在改名叫Electric Coin公司了。

You're Electric Coin company now.

Speaker 1

是的。

Yeah.

Speaker 1

没错。

Right.

Speaker 1

所以我是一名为Electric Coin公司工作的密码学工程师。

So I'm a cryptographic engineer working for the Electric Coin company.

Speaker 0

明白了。

Got it.

Speaker 0

据我所知,你就是负责Zcash的Sprout和Sapling可信设置的人。

And you are you are the person who was behind the Sprout and Sapling Zcash trusted setups, as I understand it.

Speaker 1

而且

And

Speaker 0

实际上你还设计了一些椭圆曲线,以及Zcash底层使用的加密算法?

you also have actually designed some of the elliptic curves and, like, the actual cryptography underlying Zcash?

Speaker 1

是的。

Yeah.

Speaker 1

所以我主要是为公司工作的协议工程师。

So I'm mostly a protocol engineer working for the company.

Speaker 1

我做过从设计和实现zCache使用的椭圆曲线,到实现ZK SNARKs、算术电路、底层协议以及其他与ZK Snark相关的一切工作。

So I've done everything from designing and implementing the elliptic curves that we use at zCache and also implementing the ZK SNARKs and the arithmetic circuits and, the the underlying protocol and other things that, or anything that's related to ZK Snark.

Speaker 1

所以我在Electric Point公司算是负责ZK Snark的专家。

So I'm kind of the resident ZK Snark person at the at the Electric Point company.

Speaker 0

非常酷。

Very cool.

Speaker 0

据我所知,你也在用Rust做很多这方面的工作。

You're also doing a lot of this in Rust, as I understand.

Speaker 1

是的。

Yeah.

Speaker 1

所以非常棒的是,Zcash最新的Sapling升级中,大部分底层加密都是用Rust实现的。

So it's really awesome that the the latest Sapling upgrade of Zcash is most of the underlying cryptography is implemented in Rust.

Speaker 1

最初,Zcash的Sprout版本是用C++实现的,但Sapling已经完全改用Rust编写了。

Originally, it was in c plus plus for the the for the original Sprout release of Zcash, but Sapling is completely implemented in Rust.

Speaker 1

这是一段漫长的旅程,因为我早在2014年就开始用Rust实现ZK智能合约了,那时Rust甚至还不是一门稳定的语言。

And it was a long journey because I had start I had started actually implementing, Rust, ZK Smarts, in 2014, long before Rust had even become a stable language.

Speaker 1

所以虽然花了几年的时间,但最终我还是成功将ZK-SNARKs和Rust投入了实际生产。

So it took it took a few years, but eventually, I got I got z k snarks and Rust and put into production.

Speaker 0

酷。

Cool.

Speaker 2

你为什么选择用Rust?

Why did you get into Rust?

Speaker 2

是什么促使你决定用Rust来编写这些东西?

Like, what was what was driving your decision to write all this stuff in Rust?

Speaker 1

我觉得Rust某种程度上与我的个性很契合。

I think Rust melded with my personality a little bit.

Speaker 1

Rust对不同的人意味着不同的东西,但在我看来,它是关于编写高性能的健壮软件。

Rust is I I guess rust is a different thing to everyone, but it seems to me like it's about writing robust software that is high performance.

Speaker 1

这两点对我来说是工程领域非常重要的目标。

And those two things are really important goals to me when when engineering in general.

Speaker 1

所以我觉得Rust某种程度上激励我去从事这些项目。

So I think that Rust kinda inspired me to work on the projects that I do.

Speaker 1

有时候我会用Rust做不需要它的项目,纯粹因为很有趣。

Sometimes I work on projects that I don't need to in Rust just because it's a lot of fun.

Speaker 2

这正好引出了我们想了解的一个话题:为什么你会进入这个领域工作。

This brings us into our little bit of an intro as well of something that we are curious about with our guests is why you're working in this space.

Speaker 2

是什么在驱动着你?

What drives you?

Speaker 2

你的目标是什么?

What's your goal?

Speaker 2

比如说,你为什么会在这里?

Like, yeah, why are you here?

Speaker 2

你为什么要从事这个领域的工作?

Why are you working with this?

Speaker 1

是啊。

Yeah.

Speaker 1

我觉得我来到这里某种程度上是个意外。

So I think I'm here kind of as a little bit of an accident.

Speaker 1

我真的很热爱密码学,也非常喜欢Rust语言。

I really love cryptography, and, I really love Rust.

Speaker 1

我真的很喜欢加密货币。

I really love cryptocurrencies.

Speaker 1

我真的很注重隐私。

I really love privacy.

Speaker 1

实际上我完全没有学术背景。

I actually don't have any academic background at all.

Speaker 1

我没有上过大学。

I didn't go to university.

Speaker 1

事实上,我连高中都没毕业。

Actually, I didn't even graduate high school.

Speaker 1

我高中辍学去研究密码学了。

I I dropped out of high school to study cryptography.

Speaker 1

当时有位朋友给我辅导密码学。

I had a friend of mine that tutored me in cryptography.

Speaker 1

他上过大学。

He went to university.

Speaker 1

他利用业余时间给我辅导。

He tutored me in his free time.

Speaker 1

因此在2010年代初期,我有机会学习密码学,当时每个月都有突破性的论文发表,解决该领域的一些重大问题。

And so kind of in the early twenty tens, I was able to learn cryptography surrounded by a bunch of really groundbreaking papers that were coming out every other month, solving some serious problems in the space.

Speaker 1

那是一段非常有趣的时光,因为全同态加密、SNARKs等各种技术难题不断被攻克,几乎每天都有这些奇特密码学原语的实用实现方案诞生。

It was really fun time because, you know, fully homomorphic encryption and snarks and all these other things were being addressed and actually practical implementations were being created for these kind of really exotic cryptographic primitives almost every day.

Speaker 1

所以那确实是一个令人振奋的时代。

And so it was it was a really exciting time.

Speaker 1

特别是SNARKs技术问世时,我完全被它们迷住了。

And Snarks, in particular, when they came out, I was fascinated with them.

Speaker 1

我早已对比特币非常着迷,所以我知道它的意义。

I had already been very fascinated with Bitcoin, so I knew the implications.

Speaker 1

于是我开始学习SNARKs的工作原理并尝试实现它们。

And so I had started learning about how SNARKs work and trying to implement them.

Speaker 1

大约在同一时期,我对Rust语言产生了浓厚兴趣。

And around the same time, I was really interested in Rust.

Speaker 1

所以在2014年,我就开始尝试用Rust实现ZK Snarks。

So I actually, in 2014, I had started trying to implement ZK Snarks in Rust.

Speaker 1

这个项目我直到多年后才最终完成,但它引起了Zcash基金会主席Andrew Miller的注意,他把我介绍给了Zuko Wilcox。

And it's it is a project that I never finished until many years later, but, it caught the attention of Andrew Miller, who's the chairman of the Zcash Foundation, and he, introduced me to Zuko Wilcox.

Speaker 1

我当时没有任何工作经验之类的,所以Zuko算是冒了点险雇佣了我。

I didn't have any job experience or anything like that, so Zuko kind of gambled a little bit and hired me.

Speaker 1

于是我就这样进入了Electric Coin公司工作。

And so I ended up, working for the electric coin company.

Speaker 1

我是公司最早的一批员工之一。

I was one of the first, couple employees.

Speaker 1

就这样我莫名其妙地成了团队里的SNARK专家。

And then I sort of became the resident snark expert from there somehow.

Speaker 1

很酷。

Cool.

Speaker 2

看来这是一场赌对了的冒险。

So seems like a gamble that, paid off.

Speaker 0

是啊。

Yeah.

Speaker 0

我有点好奇想回到那个时候,就是2010年左右,你和朋友一起研究密码学的时期。

I'm I'm sort of curious to go back to that time, that, like, 2010 time you'd been studying cryptography with your friend.

Speaker 0

但你能具体指出,是否有某个时刻、灵感火花或论文之类的东西,真正成为你走上这条道路的转折点吗?

But can you pinpoint, like, if there was some moment or spark or paper or something that really was, like, that turning point for you where you got on this track?

Speaker 1

我想是《零现金》论文,因为我一直在业余时间尝试实现ZK-Snark,把密码学与区块链结合作为一个小爱好项目。

I think it was the Zero Cash paper because I had been trying to implement ZK Snark, cryptography plus blockchain in my free time just as a little hobby project.

Speaker 1

所以我当时觉得,哦,我发现了些门道。

So I thought, oh, I'm onto something.

Speaker 1

我可以利用ZK-Snarks实现真正的隐私保护。

I can use ZK Snarks and make really private.

Speaker 1

但当《零现金》论文发表时,我显得很蠢,因为这些极其聪明的密码学家正在研究完全相同的东西,而且他们领先我太多了。

But when Zero Cache came out, I looked like a fool because these incredibly smart cryptographers were working on this exact same thing, and they were miles ahead of me.

Speaker 1

他们不仅知道怎么做,还实际实现了,并且即将部署。

And they actually knew how to do it, and they actually implemented it, and they're going to deploy it.

Speaker 1

所以我决定静观其变,等待这个项目问世。

So I decided to just sit back and wait for the project to come out.

Speaker 1

所以我其实早就知道ZeroCache,在最终偶然参与这个项目之前,我长期都在试图寻找关于它何时发布、代码在哪等信息。

So I was I I had known about ZeroCache, and I'd been trying to find information about when it was gonna launch and where its code was and things like that for a long time before eventually I I stumbled into actually working on the project itself.

Speaker 0

就像,你提到了一点,我们在介绍里稍微聊过这个。

Like, so you mentioned a little bit we kinda talked about this in the intro.

Speaker 0

你参与了Zcash协议的哪些部分?

What parts of the Zcash protocol have you have you been involved in?

Speaker 1

当我加入Zcash时,我主要专注于协议工程,因为我们需要部署Zcash。

So when I when I joined Zcash, I was focused mostly on protocol engineering because we had to deploy Zcash.

Speaker 1

所以我基本上是把当时的实现推倒重来,要知道我们最初是比特币的一个分叉。

So I kind of ripped out the current implementation and, you know, we're basically a fork of Bitcoin.

Speaker 1

我修改了学术代码与比特币实现之间的集成,使其使用更新版本的比特币。

So I modified the integration between the academic code and the Bitcoin implementation to use a more recent version of Bitcoin.

Speaker 1

然后我重新实现了协议的学术实现部分,包括算术电路和所有涉及ZK SNARKs的内容,最后删除了所有学术代码。

Then I reimplemented the academic implementation of the protocol and the, arithmetic circuits and everything touching the ZK SNARKs and then deleted all the academic code.

Speaker 1

在这个过程中,还发现了几个严重bug。

And in the process, found a couple serious bugs.

Speaker 1

随后我被指派加入多方计算项目。

And then I was tasked to join the multi party computation project.

Speaker 1

因此我成为Zcash首次零知识证明参数仪式的实施者。

So I was the implementer of the first ceremony for Zcash, ZK SNARK parameter ceremony.

Speaker 0

所以如果有人听过Radiolab那期关于Zcash的节目,整个仪式流程就是你设计的对吧?

So I guess if anyone has heard that Radiolab episode on Zcash and you guys, that that whole setup, that was that was something you designed.

Speaker 1

是的。

Yeah.

Speaker 1

当时我和Ariel Gabazan合作。

So I worked alongside Ariel Gabazan.

Speaker 1

我负责具体实现。

I was the implementer.

Speaker 1

Ariel更偏向密码学证明方向,我们共同设计了协议并实现了节目中展示的多方计算系统,那段经历非常过瘾。

Ariel was more of a, you know, crypto proof person, and, we kinda designed the protocol and implemented the multiparty computation for that that is featured in that episode, and it was it was a blast.

Speaker 1

整个开发历时数月,我当时其实有点担心,因为公司资金链已经快到极限了。

It took several months to develop, and we were really I was a little bit worried because we were on the edge of our runway as a company.

Speaker 1

那是在2016年。

And this was back in 2016.

Speaker 1

我们是在2015年获得资金的。

And 2015 is when we got our funding.

Speaker 1

那时候可不像2017年那样,有人会往公司砸几十亿美元。

So there weren't, you know, people throwing billions of dollars at your companies at this time like they do like they did in 2017.

Speaker 1

所以还挺有意思的。

So it was it was a little fun.

Speaker 2

谈到你做的这些工作和你的背景,我知道Zcash很多成员都有博士学位或来自学术领域。

Speaking about what this work that you've done and your background, and I know the background of a lot of the people at Zcash are, know, PhDs or from the academic field.

Speaker 2

在Zcash工作是什么体验?工程与学术之间如何平衡?

What's it like working at Zcash, and how does that balance between engineering and academia play out?

Speaker 1

这真的很棒,因为我加入Zcash时没有任何学术背景或理论基础,完全是业余自学的。

It's really it's really amazing because when I joined Zcash, I didn't have, any academic background, any theory background, really, besides, just learning my free time.

Speaker 1

公司为我提供了资源,让我能接触到世界上一些最优秀的密码学家——他们要么是公司创始人,要么是创始人的朋友,我可以随时向他们请教问题或学习新知识。

And the company gave me resources and access to some of the best cryptographers in the world that founded our company or were friends of those people that I could talk to anytime I needed to learn about something or I had a question how something worked, they were there.

Speaker 1

所以这真的非常不可思议。

And so that's that's incredible.

Speaker 1

能随时接触到世界上最顶尖的密码学家真是太棒了。

Having the best cryptographers in the world at your fingertips is really great.

Speaker 1

正因为有这样的资源,我才能飞速成长。

So I learned a lot really fast because of that access.

Speaker 1

而且公司专注的技术方向正是我感兴趣的——SNARKs零知识证明。

And, also, the company was focused on the kind of technology I was interested in, which is SNARKs.

Speaker 1

所以我很快就补上了所有知识短板。

So I was able to kind of catch up on everything.

Speaker 1

当时虽然很多学者在研究SNARKs,但真正落地实践、探索应用场景的务实派却很少。

At the time, a lot of academics were working on SNARKs, but there weren't many, like, down to earth people that were actually implementing and trying to find applications for the software.

Speaker 1

尽管已有LibSnark这样的开源库,但几乎没人深入挖掘它的实际用途。

Even though it was out there, you know, there's LibSnark, but there wasn't there wasn't anyone, trying to actually dive deep and see if they could use it for something.

Speaker 1

能在2015年左右成为少数真正实践这项技术的人,特别是因此获得与学术界交流的机会——他们正等着有人主动说'嘿'——这确实是难得的机遇。

So being able to be one of the few people that were actually doing this at the time back in 2015 or so, It was really a a good opportunity, especially, for access to these academics because they were waiting for someone to say, hey.

Speaker 1

这个东西该怎么用?

How do I use this thing?

Speaker 1

我觉得他们对此非常兴奋。

They were really excited about that, I think.

Speaker 0

实际上我们这期节目做了些不一样的尝试。

We actually so we did something different with this episode.

Speaker 0

我们在推特上发起了一个征集,询问大家是否有问题想让我们代问。

We actually put out a call on Twitter, asking if anyone had any questions that they wanted us to ask you.

Speaker 0

事实上,有个叫Hadrian的听众提出了一个与此相关的问题。

And, actually, there was one question that came up that was related to this topic from, Hadrian.

Speaker 0

他想知道你是否认为攻读博士学位是必要的,还是说更具创业背景会对进入这个领域更有帮助。

He was curious if, you thought that getting a PhD was actually necessary or if maybe having more of an entrepreneurial background would be really useful, for kinda entering into this space.

Speaker 1

我认为具备编程背景确实很有用。

I think having a programming background is really useful.

Speaker 1

我从很小的时候就开始编程和捣鼓技术了

I've been programming and hacking since I was since as long as

Speaker 2

我可以

I can

Speaker 1

记得,但我没有接受过严格的理论背景训练。

remember, but I didn't have any rigorous background in the actual theory.

Speaker 1

我认为具备编程背景非常有用,因为这些学者会发布原型代码,你可以深入研究代码,然后理解其工作原理并学习理论。

And I think having a programming background is really useful because these academics, they they post the the prototypes, and so you can dive into the code and then figure out how the how it works and learn the theory.

Speaker 1

然后砰的一下。

And then bam.

Speaker 1

现在你就成了某个特定子领域的加密实现专家。

Now you're a crypto implementer expert of some particular subfield.

Speaker 1

所以我认为,实际上如果你没有太多学术背景或没有博士学位之类的,深入研究非常小众的领域确实是个好主意。

So I think I think, actually, if you don't have a much of an academic background or you don't have a PhD or whatever, I think diving into really niche subjects is really a a good idea.

Speaker 1

你可以通过钻研学者们产生的代码,轻松成为各种领域的专家——从全同态加密到SNARKs等等。

There's all sorts of things that you could become an expert in easily just by diving into the code that is produced by academics and and then learning things anything from fully homomorphic encryption to to snarks and other things like that.

Speaker 1

可能现在SNARKs领域已经有很多人在研究了,但密码学家们总有许多新颖的创意被搁置在角落,直到有人真正从编程背景出发去理解它们——因为这些学者产生的代码质量并不总是很高。

Maybe not snarks anymore because there's so many people tackling that, but, there's there's all these really, new bright ideas by, cryptographers seem to, sit in a corner until someone actually tries to come and figure it out from the programming background because these academics are not producing extremely high quality code.

Speaker 1

他们只是制作原型以便能把论文投进会议。

They're just producing prototypes so that they can get their papers into conferences.

Speaker 1

所以如果你懂代码,那就跳进去把这些东西做得又快又好,保持整洁并加上注释之类的。

And so if you if you know code, then jump in and and make this stuff really fast and make it nice and clean and comment it and things like that.

Speaker 2

我想这里的问题是——至少在我上大学时发现——要找到那些需要实现的东西,我必须去大学和研究人员交谈,或者通过某些渠道了解这些部门里有哪些值得深入的内容。

I guess the problem here is or at least when I went to university, what I found was that to be able to find those things that need implementation, I needed to go to university and go talk to the researchers or find out through some means that these departments, like, what these things that I could dig into are.

Speaker 2

如果你不上大学,怎么发现这些需要开发者介入的细分领域呢?

If you don't go to university, like, how do you find out about this niche that could use a developer's touch?

Speaker 1

这很有趣,因为我认为加密货币让情况稍微开放了一些,你能清晰地看到密码学可以发挥作用的地方,以及改进密码学将产生重大影响的领域。

That's interesting because I think with cryptocurrency, things have opened up a little a little bit because you can very plainly see the areas where cryptography can help and where improved can cryptography will have a substantial impact.

Speaker 1

比如如果你关注比特币,你会立即知道密码学领域新论文的动向。

For example, if you follow Bitcoin, you'll you'll know immediately when new papers are coming out in cryptography.

Speaker 1

而且密码学相当开放。

And and and cryptography is pretty open.

Speaker 1

所有内容都会发布在ePrint等平台上。

Everything's posted on ePrint and so on.

Speaker 1

当新论文发表时,会说,嘿。

When new papers come out that say, hey.

Speaker 1

我有办法实现非常简洁的零知识证明,那你立刻就知道这能真正用于改进像比特币这样的加密货币。

I have a way to do a zero knowledge proof that's really succinct, then you know immediately that that can really be used to help improve a cryptocurrency like Bitcoin.

Speaker 1

我认为正是这一点让这个领域变得更加开放了一些。

I think that's, what allowed the the space to be a little bit more open.

Speaker 0

我也在想,作为补充,你觉得有时候学术严谨性和理论流程会不会反而抑制了一些创造力?这听起来可能有点奇怪。

I wonder too, just as an add on to this, do you think that sometimes having the this is gonna sound weird, but you think that it's possible that having the academic rigor and going through that theoretical thing could actually prevent some creativity?

Speaker 1

我认为学术界缺失了一个视角。

There's a there's a missing perspective, I think, from academics.

Speaker 1

这取决于你谈论的是哪类学者。

It it depends on the academic you're talking about.

Speaker 1

如果你说的是某些学者——我是说,能被会议录用固然很好,但他们确实会严格要求自己产出的代码质量。

If you're talking about some some of them are I mean, getting into a conference is really great, but they're really rigorous about making sure that the code they produce is really high quality.

Speaker 1

但大多数学者只关注新成果,而原型系统对期刊或会议录用论文来说确实非常有吸引力。

But most of them are are just interested in new results, and prototypes are really, really awesome for really enticing to accept a paper into a journal or a conference.

Speaker 1

但大多数学者,我认为,并不真正关心这类事情,除非他们必须如此。

But most academics, I think, are not really concerned about that kind of thing, unless they need to be.

Speaker 1

工程师的视角则是实际运用这些代码的人,这意味着你要解决学者们未曾预见的极具挑战性的问题,努力编写健壮的实现,避免导致整个系统崩溃的陷阱。

So the perspective of an engineer is someone who's actually taking that code and trying to use it, and which means that you are trying to tackle problems that are really challenging that the academics were anticipating, trying to write a robust implementation, trying to avoid pitfalls that would cause the entire system to collapse that you're implementing.

Speaker 1

所以这类问题在学者们专注于研究时,通常不在他们的考虑范围内。

So these sort of things are are not really on the mind of an academic at at at the time that they're working on something.

Speaker 1

但我认为学者们确实极具创造力。

But I think academics are really creative.

Speaker 1

工程师们也极具创造力。

Engineers are really creative.

Speaker 1

他们应该更频繁地合作撰写论文。

They should they should work together on papers a little more often.

Speaker 2

是啊。

Yeah.

Speaker 2

我是说,学术界确实有个关于代码质量差的老梗。

I mean, there is this meme of, like, academic code and it being bad.

Speaker 2

但我想说的是,你是对的。

But I think I mean, you're right.

Speaker 2

某种程度上,它从探索新信息、拓展知识边界,转向了学者可能称之为实现细节的领域,或者说进入了工程层面,也就是你提到的所有这些方面。

It sort of it goes from being finding out new information, pushing the boundary of knowledge into what an academic might say is, like, implementation details or it goes into engineering, which is, you know, all the things that you're talking about.

Speaker 2

比如如何使其具备可扩展性、快速、安全,避免漏洞,以及我们在工程领域学到的所有这些技巧。

Like, how do you make it scalable and fast and secure and avoid bugs and all of these things that we're we've learned in engineering.

Speaker 2

而其中大部分内容在学校里其实根本没有系统教授,任何学科都是如此。

And most of that is actually not really taught in schools at all in any field.

Speaker 2

所以,是的,这完全是另一个维度的领域。

So, yeah, it it's a very different space.

Speaker 1

我得说有些人确实这么做了,比如有篇我合著的论文叫Zexy,我们还发布了Zexy的代码。

I should say that some some have for example, there's this paper I'm a coauthor on called Zexy, and we released code for for Zexy.

Speaker 1

它本质上是某种可编程版以太坊的概念,带有隐私保护的思路。

It's basically a programmable version of kind of Ethereum programmable, but with privacy kind of idea.

Speaker 1

而我...我其实没写大部分代码。

And I I didn't write most of the code.

Speaker 1

好吧。

Well, okay.

Speaker 1

代码是基于我之前为Zcash写的,但大部分代码是由伯克利的Pratush和Howard编写的,他们是Alessandro的学生。

It's the code's based on what I've written already for Zcash, but a lot of the code was written by Pratush and Howard from Berkeley, who are students of Alessandro.

Speaker 1

他们的质量标准之高让我感到震惊。

And they have such a high standard of quality that it blows my mind.

Speaker 1

他们不会发布论文。

They they don't release the paper.

Speaker 1

在代码质量达到极高水准之前,他们不会发布代码。

They don't release the code until everything's really, really high quality.

Speaker 1

这真的让我非常惊讶。

And so I'm really astounded by that.

Speaker 1

所以有些学者确实追求极高质量,这非常明显。

So some academics really go for the high quality and really shows.

Speaker 1

这让我印象非常深刻。

So I'm really impressed by that.

Speaker 1

所以我想,事情可能有两种走向。

So it it goes either way, I guess.

Speaker 1

是啊。

Yeah.

Speaker 0

其实我们...不知道你清不清楚这件事。

We've actually I don't know if you know this.

Speaker 0

我们之前邀请过霍华德和亚历山德罗上过播客。

We've had Howard and Alessandro on the podcast before.

Speaker 1

太棒了。

That's awesome.

Speaker 0

那我们来聊聊你实际做的一些工作吧。

So let's jump into some of the work that you've actually done.

Speaker 0

你刚才提到了Zexy论文。

I mean, you just mentioned the Zexy paper.

Speaker 0

拼写是z e d e x e。

This is zed e x e.

Speaker 0

嗯哼。

Mhmm.

Speaker 0

PS,我刚才用'zed'这个词暴露了我的加拿大身份。

PS, I just gave away my Canadian ness there with the zed.

Speaker 0

不过话说回来,是的。

Anyway but yeah.

Speaker 0

那么给我们简单介绍一下这个吧。

So tell us a little bit about that.

Speaker 0

这个是从哪里来的?

Where is that coming from?

Speaker 0

这个是从哪里产生的?

Where is that coming out of?

Speaker 1

很遗憾,关于Zexy我不能透露太多。

So I can't say much about Zexy, unfortunately.

Speaker 1

事情是这样的,基本上在Zcash推出后,我就开始尝试改进我们用于第一次仪式的Zcash仪式流程。

What happened was, basically, after Zcash launched, I had jumped into trying to improve the the ceremony of Zcash that that we used for the first ceremony.

Speaker 1

我想改进协议,因为我们最初的仪式只有六个人参与。

I wanted to improve the protocol because our our original ceremony only involved six people.

Speaker 1

只要至少有一人是诚实的,它就是安全的,但我希望参与人数能达到100人。

As long as at least one was honest and it was secure, I wanted it to be, like, a 100 people.

Speaker 1

因此我想设计一个新的仪式。

So I wanted to design a new ceremony.

Speaker 1

与此同时,我还在优化Zcash,使其效率足以在手机上创建交易等操作。

At the same time, I was working on optimizing Zcash so it was efficient enough that you could, you know, create transactions on a phone or something, for example.

Speaker 1

在这个过程中,我设计了一些椭圆曲线。

So in the process, I designed some elliptic curves.

Speaker 1

有一条配对友好曲线和一条嵌入式椭圆曲线,我当时正在研究如何在这条配对友好曲线的电路内部优化某些密码原语的实现方法等等。

There's this pairing friendly curve and this, this embedded elliptic curve, and I was coming up with optimizations for how to do certain cryptographic primitives on, inside of the circuits for the pairing friendly curve and and so on.

Speaker 1

就这样,我意外地开创了为Zcash设计新协议的过程,这个协议后来被称为Sapling。

And so I I I stumbled into this, process of creating a a new protocol for Zcash, which was called Sapling.

Speaker 1

于是在同事们的帮助下——特别是杰出的算术电路优化专家Dara Hopwood以及Strad——我算是把Sapling项目引导到了终点线。

So I sort of shepherded Sapling to the to the finish line along with the help with, you know, my coworkers, especially, Dara Hopwood, who's an amazing arithmetic circuit optimizer and also Strad.

Speaker 1

在这个过程中,我提出了几个技术方案,它们最终对Zexxi很有帮助。

So in this process, I I came up with a couple techniques, and they ended up being useful for Zexxi.

Speaker 1

Zexxi的核心构想是如何创建完全隐私、完全匿名的智能合约。

So Zexxi was an idea of how do we create totally private, totally anonymous smart contracts, basically.

Speaker 1

这个想法逐渐占据了我的代码库,开始做出一些很酷但失控的事情,当我没继续跟进时。

And that kinda took took over my code and and started doing some cool things that went out of control when I I did not follow it.

Speaker 1

所以我对Zexy了解不多,也不清楚它的具体运作方式。

So I I I don't know too much about Zexy or or how it works.

Speaker 1

但我可以告诉你很多其他事情,比如我最近开始研究的Sonic,或是我们用于Sapling的新仪式

But I could tell you a lot about other things, like things that I've started to work on more recently, like Sonic or, like, the the new the ceremony that we used for sapling, which

Speaker 2

我们稍微深入聊聊这些设置吧。

Let's let's get get into the setups a little bit.

Speaker 2

我认为这些本身就是非常有趣的话题。

I think they're very interesting topics in general.

Speaker 2

我还想回到Sonic这个话题,再谈谈曲线开发和其他几个有趣的领域。

I wanna get back to Sonic as well and touch a bit on that and curve development and a couple other interesting areas.

Speaker 2

但为什么这些可信设置如此引人关注?

But why why are these trusted setups so interesting?

Speaker 2

比如,为什么这会成为你如此重要的关注点?

Like, why has that been such a big focus of yours?

Speaker 1

唉,很不幸,它们是必要的。

Well, unfortunately, they're necessary.

Speaker 1

很多人以为我们只是在进行某种大型表演供公众娱乐,但实际上这确实是绝对必要的。

A lot of people think that we're just it's just some kind of big production just for for public entertainment, but it's really honestly absolutely necessary.

Speaker 1

正如我们现在所知,第一次仪式中存在一个ZK-snark的漏洞,ZK-snark本身的一个错误,导致虽然仪式生成了安全参数和本应删除(或确实被删除)的陷门——那些我们已知的陷门,但仍存在我们未知且未被删除的陷门。

The first ceremony, as we know now, there was a there was a a bug in the ZK snark, a mistake in the ZK snark itself, such that the ceremony, although it produced secure parameters and and and the trapdoors that were supposed to be deleted or or were deleted, the trapdoors that we knew about, there were trapdoors that we didn't know about that weren't deleted.

Speaker 1

因此,从这个意义上说第一次仪式失败了,但从另一个角度看它又是成功的——这是首次实现让人们聚在一起进行多方计算、构建参数、采用轮询机制完成这类工作的概念雏形。

And so, so the first ceremony failed in that sense, but it was successful in the sense that it was the first incarnation of this kind of concept of bringing people together and doing a multiparty computation and, constructing the parameters and, going in these round robin cycles and all doing all this, stuff like this.

Speaker 1

那段时光真的非常非常有趣。

So that was a really, really fun time.

Speaker 1

但显然,当涉及数百万甚至数十亿美元资金安全时,六个人无法构建出至少需要一个诚实参与者的安全多方计算参数。

But, obviously, six people cannot make a secure MPC, with at least one honest to construct parameters where millions of dollars or billions of dollars are at stake.

Speaker 1

所以

So

Speaker 0

尤其是,从外界视角来看,六个可能互不相识的人。

Especially not, like, to the like, if you're looking for the perception from the outside world, six people who may or may not know each other.

Speaker 0

我知道Zuko特意确保他们互不相识,但作为外界人士,我们需要信任这一点。

I know that Zuko went out of his way to make sure that they didn't, but, like, we as the outside parties need to trust that.

Speaker 1

是的。

Yeah.

Speaker 1

这是个真正的挑战。

This is a real challenge.

Speaker 1

这不仅是Zcash面临的挑战。

It wasn't just a challenge for Zcash.

Speaker 1

据我所知,除了Zcash之外,没有其他实际投入生产的项目在支撑着数百万或数十亿美元的同时,还部署了通用的零知识证明计算。

I think if you look I'm not aware of any other projects than Zcash that have actually deployed in production, which have, millions or billions of dollars underlying them, which deploy, I guess, generic computation zero knowledge proofs.

Speaker 1

因此Zcash可能是首个实现这一点的项目,而且现在已经完成了两次。

So zer z cache is probably the first project in to do this, and it's done it twice now.

Speaker 1

但我认为原因在于,特别是因为我们部署了zk-SNARKs,我想原因在于这些设置环节。

But I think the reason why, especially because we've deployed z k SNARs, I I I think the reason why is because these these setups.

Speaker 1

这些设置环节成本非常高。

These setups are very expensive.

Speaker 1

它们极具挑战性。

They're very challenging.

Speaker 1

很容易搞砸。

It's easy to screw up.

Speaker 1

对于单个参与者来说,很容易出现网络连接中断的情况,然后出现故障,他们不知道该怎么办,整个流程就会停滞,谁知道会怎样呢?

It's easy to for one participant to lose a network connection, and then there's a bug, and then they they don't know what to do, and then the whole thing stalls or who knows?

Speaker 2

我还发现,这个领域里很多讨论想要某种SNARK的项目,他们往往轻描淡写地说'等遇到这个问题时再处理'。

What I find is also that a lot of the projects that I see in this space who are talking about wanting a snark of some sort, they kind of brush that aside as, you know, we'll get we'll deal with that when we get to it.

Speaker 2

但当他们开始讨论'好吧,现在我们要实际部署这个东西了,具体该怎么做?'的时候

And then when they start talking about, okay, now we actually wanna deploy this thing, how do we do this?

Speaker 2

他们严重低估了让仪式真正运作起来的实际难度。

They they vastly underestimate how hard it'll actually be to get the ceremony working.

Speaker 1

是的。

Yeah.

Speaker 1

这个仪式确实是个极大的挑战。

The ceremony is really, an extreme challenge.

Speaker 1

所以不仅为Zcash,也为其他所有人改进它,是Zcash上线时我一直在思考的事情。

And so improving it not just for Zcash, but also for everyone else was something that was on my mind when Zcash launched.

Speaker 1

于是我开始专注于尝试改进这个仪式。

So I started focusing on trying to improve the ceremony.

Speaker 0

那是在Sprout已经部署后你实际着手的工作吗?

What was that what you actually worked on after Sprout had already been deployed?

Speaker 0

是在那上线后,你立即开始考虑这个可信设置,还是上线后你主要关注什么?

Was it, like, after that went live, you then immediately started to think about this trusted setup, or what were you focusing after that went live?

Speaker 1

在那上线后,我的重点是那个仪式,新仪式,但主要还是关于Zcash改进版(即Sapling)的协议。

After that went live, my focus was on the it was on that ceremony, on the new ceremony, but it was mostly on the protocol for an improved version of Zcash, which was Sapling.

Speaker 1

我设计了一些技术,并希望以特定方式将它们串联起来。

So I had designed some techniques and and wanted to chain them together in a certain way.

Speaker 1

于是,我开始着手实现了一个原型,并说服公司将其应用于Zcash中。最终在我的原型发布一年后,我们成功部署了它——这期间我需要设计一些椭圆曲线。

And, I started I implemented a prototype and got the company on board to to to use it in in Zcash, and we eventually deployed it a year after my prototype, was posted, but which involved you know, I had to design some elliptic curves.

Speaker 1

我还得构思一些优化技术。

I had to come up with some optimization techniques.

Speaker 1

我需要实现电路设计。

I had to implement circuits.

Speaker 1

我必须在Rust语言中实现ZK-SNARKs。

I had to implement ZK Snarks and Rust.

Speaker 1

我需要在Rust中实现曲线运算,还有一大堆其他工作。

I had to implement the the curve arithmetic and Rust, and I had to do all this other stuff.

Speaker 1

但我想你

But I think you

Speaker 2

还有个以你名字命名的哈希函数对吧?

have a hash function named after you too.

Speaker 2

是不是?

Right?

Speaker 2

是叫BoHopwood Peterson哈希之类的吗?

The BoHopwood Peterson hash or something?

Speaker 1

对。

Yeah.

Speaker 1

说实话,我觉得那个哈希函数应该算是...

I think, honestly, that that hash function should mean okay.

Speaker 1

某种程度上我参与了它的优化,但真正巧妙的技巧大部分是Dara Hopwood想出来的。

Well, I participated in its optimization in some sense, but, Dara Hopwood came up with most of the really clever, tricks for that.

Speaker 1

所以或许该叫Hopwood哈希。

So maybe it should be Hopwood bow.

Speaker 1

我也不确定。

I don't know.

Speaker 1

不过确实有个基于椭圆曲线离散对数问题的哈希函数,这是个抗碰撞哈希,正好满足我们在Zcash中使用的Merkle树需求。

But but, yeah, there's a there's a Peterson there's a there's a hash function, which is based on elliptic curve discrete logarithm problem, which is is just a collision resistant hash, which is what we needed for the Merkle trees that we use in Zcash.

Speaker 1

Ian Myers之前跟我说过,嘿。

Ian Myers had told me, hey.

Speaker 1

如果你能在电路中高效实现这个功能——虽然我不确定是否可行——但若能实现,就可以用它替换掉我们现在使用的SHA-256或其他算法。

If you could do this efficiently, you know, in circuits, I don't know if you can, but if you can do this, then you could do swap this out for SHA two fifty six or whatever we were currently using.

Speaker 1

于是我研究了这个方案,并找到了一些优化方法。

And so I I looked at I looked at it, and I was able to figure out some ways that we could optimize it.

Speaker 1

我把方案发布了出来。

I posted it.

Speaker 1

后来Adara Hopwood加入研究,在我优化的基础上又将成本降低了一半。

Adara Hopwood came along and and and was able to halve the cost that after I was optimizing it.

Speaker 1

因此Zcash协议能非常高效地证明:你确实在匿名花费真实的货币。

So, z made it really efficient for our protocol to, basically prove that you're spending real money and then anonymously.

Speaker 1

是的。

Yeah.

Speaker 1

这就是整个经过。

So there's that.

Speaker 1

另外还有我设计的椭圆曲线——BLS12-381和JubJub。

There's, I mean, the elliptic curves that I designed, the BLS twelve three eighty one and, Jub Jub.

Speaker 1

顺便说,Jub Jub这个名字也不是我起的。

I didn't come up with the name Jub Jub either, by the way.

Speaker 1

那也是Dara起的。

That's, also Dara.

Speaker 1

Dara想出的这个名字。

Dara came up with the name.

Speaker 0

这个名字有什么来历吗?

Where does it come from?

Speaker 1

它出自刘易斯·卡罗尔的一本书

It's from a Lewis Carroll book

Speaker 0

哦,酷。

Oh, cool.

Speaker 1

某种类型的书。

Of some kind.

Speaker 1

其中一本。

One of one of them.

Speaker 1

所以这是那种荒诞主义风格的东西。

So it's one of those absurdist kind of things.

Speaker 1

不过确实如此。

But yeah.

Speaker 2

那么如果你必须,比如,就像,这显然涉及大量工作,跨越各种仪式、基础密码学、发明新事物、工程实现以及优化等方面。

So if you if you had to, like, summer like, this is obviously a ton of work in across, you know, ceremonies, across fundamental cryptography, inventing new things, engineering, optimizing.

Speaker 2

如果你必须用一个主题或一个重点来概括你所做的工作和研究类型,你会怎么说?

If you had to put, like, one theme or one focus of the type of work and the research that you do, what would you say that it is?

Speaker 1

我想我的重点是zkSNARKs以及与之相关的所有内容。

So I guess my focus is on z k SNARKs and anything that it touches.

Speaker 1

我的重点是将学术理念转化为实践应用。

My focus is on taking academic ideas and implementing them and then improving on them performance wise.

Speaker 1

是的。

Yeah.

Speaker 1

大致就是这样。

It's mostly that.

Speaker 1

主要是将论文中的那些天才想法整合起来,最终形成一个真正高效的产品。

It's mostly it's mostly taking the the genius ideas of that are in papers and then trying to combine them in a way that actually ends up with a product that is really efficient.

Speaker 1

我想这基本上就是我所做的工作。

I think that that's mostly what I do.

Speaker 1

不错。

Nice.

Speaker 0

在我们的节目中,我们也做过一期关于Zuko的内容。

So we in our in our episode, we also did an episode of Zuko.

Speaker 0

那是我们的第五十期节目,当时我们确实详细讨论了sapling升级的细节,以及为实现速度大幅提升所实施的各种改进。

It was our fiftieth episode, and he in that episode, we actually did talk about, like, the details of the sapling upgrade and, like, the various things that had been implemented to make it a lot faster.

Speaker 0

你会用更简洁来形容吗?

And would you say more succinct?

Speaker 0

这个词在这里用得对吗?

Is that the right word in this?

Speaker 1

我不会说更简洁,但说更快是可以的。

I wouldn't say more succinct, but faster is okay.

Speaker 1

嗯。

Yeah.

Speaker 1

没问题。

That's fine.

Speaker 1

当人们提到'简洁'时,在零知识证明领域,你应该理解为既简短又验证迅速。

So when people say succinct, what you should think is, at least for zero knowledge proofs, succinct means short and fast to verify.

Speaker 1

它应该具备渐进性简短特征——比如大多数SNARKs的多对数级或恒定长度,同时验证过程也需具备渐进性快速。

So it should be asymptotically short, so something like polylogarithmic or or even constant for most SNARKs, and it should also be asymptotically fast to verify.

Speaker 1

也就是说,对于大多数SNARKs而言,验证时间相对于底层声明应是多对数级或恒定时间。

So polylogarithmic or constant for most SNARKs to verify constant time with respect to the underlying statement.

Speaker 1

这就是'简洁'的含义。

So that's what succinct means.

Speaker 0

我们注意到Sapling升级采用了参与人数更多的可信设置,想必过程也更复杂。

We've been aware that the Sapling update had a much broader trusted setup with a lot more people involved, and I imagine it's more complicated.

Speaker 0

深入探讨这点会很有意思。

I think it would be really cool to go into that.

Speaker 0

比如,从Sprout的可信设置到Sapling版本,最大的变化是什么?

Like, what what was the big change from the Sprout trusted setup to the Sapling one?

Speaker 1

有几个关键点。

So there were a couple things.

Speaker 1

Sprout仪式之所以只涉及六个人,是因为如果我们增加第七个人,其他六个人都必须等待这个人完成操作——这个过程需要数小时,确切地说大约要重复等待三次。

The the sprout ceremony, the reason why it only involved six people was because if we, for example, we added a seventh person, all the other six people would have to wait for that seventh person to do something, which took hours and, or about an hour, actually, like, three times.

Speaker 1

因此在这段时间里,他们必须守在电脑旁全程看护,无论是正在进行计算还是处于等待间隙,以防有黑客趁机窃取数据或破坏仪式。

So so in that space of time, they would have to sit with their computer and hug it while their computations are being performed or while computations aren't being performed and they're just waiting because some ninja might come and steal it or or whatever and try to infiltrate the ceremony.

Speaker 1

因此他们必须在这段长时间内保持对机器的保管。

So they have to retain custody of their machine for this this long period of time.

Speaker 1

在最初的Sprout仪式中,我记得需要连续二十四小时才能完成整个仪式。

In the case of the original Sprout ceremony, I think twenty four hours continuous is how long it took to actually execute that ceremony.

Speaker 1

这根本不切实际。

That's just not practical.

Speaker 1

真正实际的做法是,为了扩展性和让更多人参与,应该让人们可以随时加入、贡献然后离开。

What's really practical is, you know, for scaling purposes, for involving lots of people, is if people can just join, contribute, and then leave.

展开剩余字幕(还有 480 条)
Speaker 1

从密码学角度来说,原始仪式无法支持这种模式的原因是,为了安全证明,你必须事先承诺你的秘密——也就是所谓的这些'有毒废料'副产品,不管我们怎么称呼它。

And the reason why cryptographically, the original ceremony couldn't support this was because you had to for the security proof, you had to commit to your secrets, to to your to to this toxic waste, so to speak, or this toxic waste byproduct, whatever we call it.

Speaker 1

你必须在仪式开始前就承诺这些内容,这样你就无法在之后改变你要采取的行动。

You had to commit to that before the ceremony began so that you couldn't change your move that that you're gonna make later on.

Speaker 1

这样做纯粹是为了让密码学机制能够运作。

And this was just to make the cryptography work.

Speaker 1

这显然不是必要的。

It was clearly not necessary.

Speaker 1

所以在Sprout之后,我就说过,去他的这个预承诺阶段。

And so after after Sprout, I had I said, screw this commitment this pre commitment stage.

Speaker 1

我们干脆把它去掉,另寻他法。

Let's just get rid of it and find something else.

Speaker 1

对于powers of tau和sapling多方计算,我们发现只需使用随机性信标就足够了。

For powers of tau and for the sapling MPC, we figured it out that we could just do a randomness beacon, and that was good enough.

Speaker 1

但即便那失败了,我认为它也能保障代数群模型的安全。

But even if that failed, I think it was securing the algebraic group model.

Speaker 1

后来,Mary Mallers和其他人发现,只需使用Fishlin变换,就能让安全证明通过,因为这样可以得到一条直线提取器。

And then later on, Mary Mallers and and other people have figured out that, oh, you just use Fishlin transforms, and you get the security proof goes through that way because you get a straight line of extractor.

Speaker 1

所以关键点在于摆脱那个承诺环节,同时整个仪式还包含多个阶段。

So the the important bit was getting rid of that commitment round, but also the ceremony involved, multiple phases.

Speaker 1

最初的仪式,也就是Sprout仪式,共有三个阶段。

So the original ceremony, the sprout ceremony, had three phases.

Speaker 1

第一阶段是创建tau的幂次。

The first phase, you create the powers of tau.

Speaker 1

所以你实际上是将不同单项式的求值和一个未知的τ编码到椭圆曲线群中。

So you're just in you're encoding some evaluation of different monomials and some unknown tau, into the elliptic curve group.

Speaker 1

接着你进行快速傅里叶变换,突然间就具备了在群内创建这些插值多项式的能力。

Then you do a fast Fourier transform, and then all of a sudden now you have the ability to create these interpolation polynomials in the group.

Speaker 1

然后你创建正确的插值多项式,再进行另一个阶段——引入几个额外未知数使协议完全按照SNARK需求运作,最后针对最初Zcash使用的SNARK还需完成另一个阶段。

Then you create the correct interpolation polynomials, and then you do another phase which sort of adds another several other unknowns in order to get the protocol to work exactly like the SNARK needs it, and then you had to do another phase in the case of, the the SNARK that we used for Zcash originally.

Speaker 1

但后来出现了一种名为GROS 16的新型ZK SNARK,它效率更高,而且能非常简单地压缩成两轮协议。

But there was a new ZK SNARK called GROS 16, which or GROS 16, which, was more efficient, but also you could compact it into two rounds very trivially.

Speaker 1

因此你将拥有一个可无限扩展的单轮设置,仅处理单项式,即原始的底层结构。

And so you would have a single round setup that could scale forever, which only dealt with the monomials, the original, the the kind of the bottom layer.

Speaker 1

这有点像搭建蛋糕的底层部分。

It's kinda like building a cake or something, the bottom layer.

Speaker 1

任何人都可以将其作为基础,来构建他们自己仪式所需的参数。

And anyone could use that as a basis to construct their parameters for their for their own ceremony.

Speaker 1

实际上现在有个Rust库叫phase two,任何人都可以用它基于tau幂次进行多方计算,来创建自己的zk-SNARK公开参数。

So right now, actually, there's a a Rust library called phase two, which anyone can use to create their own z k snark public parameters with a multiparty computation using powers of tau as a basis.

Speaker 2

我很好奇实际实现时,工作量在SNARK需求与其密码学部分,以及MPC部分之间是如何分配的。

I'm curious on, like, when it comes to actually implementing this, how much of the work is split between the requirements of the snark and, like, the the cryptography of that versus the MPC part of it.

Speaker 2

比如参数生成占了多少工作量?

Like, yeah, like, how much of the work is generating parameters?

Speaker 2

因为我们总看到,比如在Socrates里,你直接下载就行。

Because we always see, like, in Socrates, for instance, you can just download this.

Speaker 2

你在本地电脑生成参数,对公开使用来说完全不够安全。

You generate the parameters locally on your computer, and it's totally insecure for public use.

Speaker 2

但生成参数其实相当简单。

But generating the parameters are actually pretty easy.

Speaker 2

然而当你想要通过多方计算安全地生成它们时,事情就变得极其复杂。

Whereas it seems like once you want to generate them securely in a multiparty computation, it becomes super complicated.

Speaker 2

这是因为多方计算的特性,还是因为以这种方式扩展参数生成本身就非常复杂?

Is it that because of the multiparty computation or because scaling the like, the parameter generation in this way is so complicated.

Speaker 2

比如

Like

Speaker 1

这很复杂,因为多方计算本身在组织上就是一场噩梦,因为你需要协调各方。

It's complicated because the the multiparty computation itself is a logistical nightmare because you have to coordinate it.

Speaker 1

你需要让人们参与进来。

You have to get people involved.

Speaker 1

你需要实施它。

You have to implement it.

Speaker 1

你必须确保它的安全性。

You have to make sure it's secure.

Speaker 1

你可能需要编写多个实现版本。

You have to write multiple implementations maybe.

Speaker 1

你必须完成所有这些事情。

You have to do all these things.

Speaker 1

而且协议本身也相当耗费资源。

But also and then the protocol itself is is quite expensive.

Speaker 1

此外,在多方计算中构建参数与在你自己的机器上进行单独设置构建参数存在很大差异。

But also, there's a big difference between constructing the parameters in a multiparty computation and and constructing them in a, kind of a solo setup that you do on your own machine.

Speaker 1

区别在于,当你进行单独设置时,你知晓所有未知数,因此可以非常简单地评估所有多项式在这些未知点上的值,然后进行一系列——虽然计算量很大——但可以在群组中执行多点指数运算。

And the difference is when you're doing a solo setup, you know all of the unknowns, and so you can evaluate all the polynomials at at those unknown at those unknown points very trivially and then just do a bunch of I mean, they're expensive, but you can do a bunch of multipoint exponentiations in the group.

Speaker 1

而在多方计算中则不然。

And in the MPC, you don't.

Speaker 1

每个参与者都不知道其他人的秘密,因此每个人都必须重复相同的过程,但要处理大量不同的群元素,这使得整个过程变得非常耗费资源。

Every every person doesn't know every other person's secrets, and so they have to each person needs to do that same process, but with lots of different group elements, and it becomes really expensive in that respect.

Speaker 1

这就是为什么在多方计算中进行这项操作成本如此高昂的原因。

So that's that's why that's why doing it in an MVC is really expensive.

Speaker 1

是啊。

So yeah.

Speaker 1

嗯。

Mhmm.

Speaker 2

说到可信设置,你之前提到过,让这个过程变得更简单、更易用、整体上更好是你的目标之一。

So speaking of trusted setups, you you said earlier that, like, it was part of your goal to make this easier and more approachable and sort of better in general.

Speaker 2

在你发明的其他技术中,还有Sonic,据我理解它的目标是进一步消除所谓的'可信设置'。

And down the line of other things that you've invented, there's Sonic, which is as far as I understand it, aims to get rid of, quote, unquote, the trusted setup even more.

Speaker 2

虽然还是需要做设置,但现在可以适用于多个SNARK了。

You still have to do it, but now it applies to multiple snarks.

Speaker 2

所以不需要为每个SNARK单独做设置了。

So you don't have to do an individual one for each snark.

Speaker 2

我这样理解对吗?

Is that a correct description?

Speaker 1

对。

Yeah.

Speaker 1

所以我们最初的一个失误——用'失误'这个词合适吗?

So one of the follies of our original is folly the right word?

Speaker 1

我不知道。

I don't know.

Speaker 1

而我们最初仪式(Zcash那次及后续仪式)的一个缺点就是它专属于Zcash。

And one of the one of the downside of of, one of the downsides of the original ceremony that we did is Zcash and then the following ceremony was that it was specific to Zcash.

Speaker 1

所以你无法直接复用那些参数来为自己的应用创建SNARK。

So you couldn't just take those parameters and create your own SNARC for your own application.

Speaker 1

如果电路不同,你就必须创建新的参数,在自己的设置中创建新参数。

If your circuit was different, you had to create new parameter you had to create new parameters in your own setup.

Speaker 1

所以人们真正需要的是通用参数。

So what what people really want are universal parameters.

Speaker 1

这样由其他人完成可信设置后,大家都能在自己的项目中使用这些参数,无需自行举行仪式。

So someone else does the trusted setup, and then everyone can use those parameters in their project, and they don't have to perform their own ceremony.

Speaker 1

我认为这将极大推动ZK Snark在社区中的使用。

I think that that would explode the usage of ZK Snarks in the community.

Speaker 1

是的。

Yeah.

Speaker 1

但实现这一目标确实充满挑战。

But getting there is really challenging.

Speaker 1

所以在2018年,Jens Groth等人,包括Mary Mallor和Marco Polweiss等研究者,提出了一种通用参数的ZK-SNARK方案。

So in last year, in 2018, Jens Groth and others, Mary Mallor and Marco Polweiss and other people, came up with a universal parameter ZK snark.

Speaker 1

这确实非常令人着迷。

And this was really fascinating.

Speaker 1

遗憾的是,它的效率非常低下。

Unfortunately, it was really inefficient.

Speaker 1

参数规模会随着支持语句的大小(以算术电路中乘法门的数量计)呈二次方增长。

The the parameters the size of the parameters, scaled quadratically with the size of the supported statements in in terms of the number of multiplication gates in the arithmetic circuit.

Speaker 1

因此这完全不具备实用性。

So it's just totally inefficient.

Speaker 1

而Sonic项目正是试图解决这个问题。

So with Sonic, we're just trying to tackle that.

Speaker 1

我们正试图开发一种具有线性规模参数的方案,就像普通的可更新的ZKSnark一样,最终你会得到一个简洁的非交互式证明。

We're we're trying to come up with something that has a linear size parameter just like a normal ZKSnark that's updatable, and and you get a, you get a snark in the end.

Speaker 1

这就是Sonic的全部意义所在。

And so that's that's all that Sonic's about.

Speaker 1

这还有另一个非常棒的方面。

And there's another facet to this, which is great.

Speaker 1

我们拥有通用参数,任何人都可以使用它。

We have a universal parameters, and anyone can use it.

Speaker 1

如果能实现可更新性就更好了——新人可以加入贡献,提升安全参数,成为少数贡献者之一后立即退出,这个过程可以无限持续下去。

It'd be nice if it could be updatable in the sense that someone can join, contribute, and improve the parameters of security and be one of the few people who had contributed to its security, then leave immediately, and then people can do this forever.

Speaker 1

因此这个仪式基本上永远不会结束。

So the ceremony basically never ends.

Speaker 1

在这种情况下,它可以扩展到非常大规模的人群。你可以想象各种场景:人们可能作为合同义务参与贡献,或者出于某些要求,仪式还可以分叉,让人们以不同方式参与等等,这真的很有趣。

And in this case, it can scale to a very large number of people, And there's all sorts of settings where you could imagine people contributing as part of a contract or you could or or some requirement or or whatever or people the ceremony can fork off and people can contribute in different ways or whatever, which is really interesting.

Speaker 1

我认为这最终会形成一种从根本上能达到的最高安全级别。

And it it leads to something I think is really fundamentally as secure as you can get.

Speaker 1

一旦你拥有通用参数,这几乎是自然而然的结果,因为至少对于ZK SNARKs来说,如果参数是通用的,它们很可能是单项式,而这些单项式在设置过程中很容易更新。

And it kinda comes naturally once you have universal parameters because, at least for ZK SNARKs, if your parameters are universal, they're probably monomials, and monomials are easily updatable inside of, these setups.

Speaker 1

因此,Sonic是一个通用且可更新的设置,其参数大小呈线性,最终你会得到一个ZK SNARK。

So, Sonic is a universal and updatable setup where the parameters are linear in size, and, you get a ZK SNARK in the end.

Speaker 0

你刚才把Sonic称为一个设置。

You you refer to Sonic there as a setup.

Speaker 0

那么Sonic是唯一可信设置的部分吗?还是你需要不同的SNARK?

So is is Sonic the only the trusted setup part of this, or do you need, like, a different SNARK?

Speaker 0

我有点好奇这部分具体指什么。

Like, I I'm kinda curious where that lives.

Speaker 0

它是SNARK和可信设置之间的重叠部分,还是仅仅是一个可信设置?

Is it is it sort of an overlap between a snark and the trusted setup, or is it only a trusted setup?

Speaker 1

界限很模糊。

It's blurry.

Speaker 1

Sonic是一个ZK SNARK,带有

So Sonic is is a ZK snark with

Speaker 0

好的。

Okay.

Speaker 1

一种恰好具有线性规模、可更新且通用的特定设置。

A certain setup that happens to be linear in size and updatable and universal.

Speaker 0

明白了。

Got it.

Speaker 1

但SNARC要求中的可更新和通用特性是Sonic的固有特性,这正是我们开发Sonic的原因。

So but that that updatable and universal part of the requirements of the SNARC is inherent to this is why we built Sonic.

Speaker 1

我们当时正试图实现一个仅需线性规模、可更新且通用参数的SNARC。

We were trying to get a SNARC which only required universal and updatable parameters that were linear in size.

Speaker 0

对于那些已经实现了某种形式SNARK(可能来自库)的团队,他们需要做哪些改动?

For those for those groups that have already been that have already implemented some form of SNARK that is maybe from a library, what do they have to do to change that?

Speaker 0

他们需要重新部署整个系统吗?

Do they have to re redeploy the whole thing?

Speaker 0

他们能否复用部分现有组件?

Do they can they use pieces of it?

Speaker 1

一般来说,如果你已经使用了一个ZK SNARK,想迁移到另一个ZK SNARK,那你就完蛋了。

So in general, if you have a ZK SNARK, that you've already used and you want to move to another ZK SNARK, you're you're screwed.

Speaker 1

你得... 对。

You have to Yeah.

Speaker 1

要么重新做设置,要么彻底修改协议。

Do a new setup or you have to change your protocol completely.

Speaker 1

根据你之前的选择,可能连椭圆曲线都得换。

You might even need to change elliptic curves depending on what you did.

Speaker 1

所以确实有很多...

So there's a lot of yeah.

Speaker 1

会变得一团糟。

It gets messy.

Speaker 0

但Sonic你提到了这种可升级性。

With Sonic, though, you sort of mentioned this upgradable upgradability.

Speaker 0

你指的是这个意思吗?

Is that is that what you mean?

Speaker 0

是不是说,如果你有Sonic,就能像升级一样更换你的snark?

Is that like, if you then had Sonics, would you be able to up like, change your snark?

Speaker 1

很多人听你描述Sonic时,会误以为这是可更新的设置。

A lot of people, when you describe Sonic to them, they think, oh, it's updatable setup.

Speaker 1

他们以为更新参数后,安全性会突然提升,之前构建的所有证明都会因为我的参与而变得更安全。

That means when I update the parameters, I can all of a sudden, they're more secure, and then all the all the proofs that were constructed before, I know that they were secured because I contributed.

Speaker 1

但事实并非如此。

It's not like that.

Speaker 1

证明是使用特定时间点的参数构建的。

Proofs are constructed using the parameters as they were at some point in time.

Speaker 1

如果你更新参数,确实提高了安全性,但之前构建的所有证明完全不会受益于你的贡献。

And, if you update the parameters, you're making them more secure, but all the proofs that were constructed before do not leverage your contribution at all.

Speaker 1

所以可更新性的本质其实是扩展参数构建流程,使其能支持数百人参与和高质量贡献。

So updatability is really fundamentally about scaling the the the process of constructing the parameters so that it can support hundreds of people and very high quality contributions.

Speaker 2

但我觉得问题还在于:更新时能否同时切换到不同的电路?

But I think the question is also, when I update, can I change to a different circuit at the same time?

Speaker 1

是的。

Yeah.

Speaker 1

至少在Sonic中这是通用的,因为它是通用参数,你可以随时切换电路。

So with with the it's universal for at least for Sonic, because it's universal parameters, then you can you can switch circuits anytime you want.

Speaker 1

对。

Yes.

Speaker 2

我也喜欢可升级性这一点,从避免阴谋论者的角度来看。

I like the upgradability aspect as well from the point of view just avoiding tinfoil hat people.

Speaker 2

因为如果有人过来说,不。

Because if someone comes along and says, no.

Speaker 2

我不信任这400个人。

I don't trust these 400 people.

Speaker 2

他们都串通好了。

They all colluded.

Speaker 2

那个人可以自己参与仪式,亲自完成工作,并相信自己没有欺骗自己,因此现在更安全了,他们可以信任这个东西。

That person can themselves enter into the ceremony at that point and do the job themselves and trust that they didn't lie to themselves, and therefore, it's now more secure and they can trust this thing.

Speaker 1

当然。

Sure.

Speaker 1

是的。

Yeah.

Speaker 1

没错。

Exactly.

Speaker 0

我刚意识到我们一直在交替使用'可更新'和'可升级'这两个词。

We keep I I just realized we keep switching the word updatable and upgradeable.

Speaker 0

正确的术语是什么?

What is the right terminology?

Speaker 0

可更新的。

Updateable.

Speaker 0

可更新的。

Updateable.

Speaker 0

好的。

Okay.

Speaker 0

我们别把外面的人搞糊涂了。

Let's just not confuse people out there.

Speaker 0

我一开始就说错了。

I I said it wrong the first time around.

Speaker 0

据我所知,Sonic(音速)某种程度上是从你们为sapling升级所做的工作中发展出来的。

So so from what I understand, Sonic kind of Sonic grew out of what you had the work you had put in for the sapling upgrade.

Speaker 0

你们某种程度上已经扩展并加入了更多参与者进入第二阶段的信任设置。

You had sort of already extended and and added a lot more participants into that sort of second trusted setup.

Speaker 0

然后我猜你们由此意识到,哦,我们还能做得更多

And then I'm guessing out of that, you realized, oh, we could do even more

Speaker 1

是的。

Yes.

Speaker 1

所以

So

Speaker 0

这个新设置。

this new setup.

Speaker 1

在Sapling阶段,我们进行多方计算来构建参数时,分为两个阶段。

With with the Sapling, multiparty computation that we performed for constructing the parameters for Sapling, We had two phases.

Speaker 1

第一阶段是将这些单项式嵌入参数中,第二阶段是实际构建多项式,再添加一个未知数,最终得到参数。

One where you can where you embed these monomials into the parameters, and then one where you actually construct the polynomials, and then you add another unknown, and then you get your parameters.

Speaker 1

我想消除的就是第二阶段,因为无论哪个阶段都可能无限期运行,从而获得可更新的效果。

What I what I wanted to get rid of was that second phase because either of the phases can run indefinitely, and and so you get that updatable effect.

Speaker 1

如果去掉包含特定电路多项式的第二阶段,还能获得通用效果。

You also get the universal effect if you get rid of the second phase that's has the polynomials that are specific to your circuit.

Speaker 1

实际上,Sonic的目标是——这也是Sonic之前论文的初衷——就是要去掉第二阶段,只留下一个ZK snark,它只需要嵌入在群中的单项式。

So, really, the goal of Sonic was to and and and this was the goal of of paper preceding Sonic was to get rid of that second phase and just have a ZK snark that only required monomials, for example, that were embedded in the group.

Speaker 1

很多非常聪明的人提出了各种技术方案,我们基本上就是把它们拼凑在一起,想办法让它运作起来。

So a lot of really clever people came up with, techniques, and we sort of just, jammed them together to figure out how to get it to, to to work.

Speaker 0

其实我们还有听众提出的几个相关问题。

So we actually had a few other questions from, our listeners on this.

Speaker 0

我们收到了Georgios Constantopoulos的提问,他想知道你们目前是否正在研究进一步改进sonic协议的方法。

So we had one question from Georgios Constantopoulos who is asking if there are, like, further steps to improving the sonic protocol that you're working on right now.

Speaker 1

我并没有在正式推进什么项目,只能说在尝试。

I'm not working on any well, I'm trying.

Speaker 1

你懂我的意思吗?

You know?

Speaker 0

你是在尝试不去推进它,还是在尝试推进?

You're trying not to work on it, or you're trying to work

Speaker 1

是在尝试推进它。

on I'm trying to work on it.

Speaker 1

我正在尝试提出新想法但屡屡失败,不过有很多其他人提出了非常棒的方案——虽然方向不同,但这些方案确实能优化Sonic协议。

I'm trying to come up with ideas and failing, but there's a lot of other people that are coming up with really good ideas that are kind of orthogonal, but they'll they'll be able to improve Sonic.

Speaker 1

其中有件事让我特别兴奋——

One of the things I'm really excited about is okay.

Speaker 1

有些团队在努力提升Sonic的效率,同时还有sharks zk协议,这些像子弹证明一样有趣的轻量级snarks,不需要强假设条件就能完成设置,某种意义上还附带snark特性。

So there are there are people trying to make Sonic more efficient, but then there's also sharks, z k sharks, which are these fun fun little snarks, which are kinda like a bulletproof, so it doesn't require strong assumptions in a setup and a snark attached to it in a sense.

Speaker 1

我这是过度简化了。

It's I'm oversimplifying.

Speaker 1

这些snark鲨鱼?

The snark sharks?

Speaker 1

它们就叫鲨鱼。

They're called sharks.

Speaker 1

是的。

Yes.

Speaker 0

太神奇了。

That's amazing.

Speaker 1

而且非常刻意。

Very deliberate too.

Speaker 0

Bulletproofs和snarks变成了鲨鱼。

Bulletproofs and snarks become sharks.

Speaker 1

没错。

Right.

Speaker 1

所以附着在bulletproof上的snark就是用来证明这个bulletproof已被验证过。

So so the snark that's attached to the bulletproof just proves that the bulletproof has been verified.

Speaker 1

因此,与其验证可能成本高昂的防弹证明,不如验证简洁非交互式知识论证(snark),这样效率极高。

So instead of verifying the bulletproof, which could be expensive, you verify the snark, and it's really efficient.

Speaker 1

如果有人验证防弹证明时失败,而snark验证却成功了,那就说明可信设置是失败的。

And if someone verifies the bulletproof or and if and verification fails and the snark verification succeeds, then you know the trusted setup was a a failure.

Speaker 1

你可以把这个结果交给别人并说,嘿,

And so you can give that to someone and say, hey.

Speaker 1

看看这个,

Check it out.

Speaker 1

可信设置失败了。

The trusted setup failed.

Speaker 1

所以我认为这实际上几乎可以消除大多数我能想到的应用场景中对可信设置的需求。

So I think that this is really a and almost obviates trusted setups for most applications that I can think of.

Speaker 1

确实存在一些仍需使用snark的应用场景,你可能从防弹证明中得不到任何好处,或者防弹证明部分效率太低等等。

There's there's some applicate applications where you still need snarks, and you probably don't get anything from bulletproofs, and also maybe the bulletproof part of it is too inefficient or whatever.

Speaker 1

不过,我认为鲨鱼(sharks)这个概念真的非常非常酷。

But, I think that sharks are really, really cool.

Speaker 1

我认为人们会希望看到鲨鱼使用像Sonic这样的可更新通用参数。

And I think people will want to see sharks using updatable and universal parameters like sonic.

Speaker 1

所以有鲨鱼加Sonic的组合。

So there's sharks plus sonic.

Speaker 1

超音速鲨鱼,我不知道,最终会出现

So supersonic sharks, I don't know, will eventually show up

Speaker 0

在某个时候。

at some point.

Speaker 1

实际上是的。

And Actually Yeah.

Speaker 0

你刚才提到的一点,正是我这期节目想探讨的话题。

So something you just touched on, and a topic I definitely wanna get to in this episode.

Speaker 0

你刚才简单提到过,通过这些鲨鱼,你可以检查。

You just sort of mentioned this, like, with these sharks, you can check.

Speaker 0

你可以检查可信设置是否失败或已被攻破。

You can check if the trusted setup has failed or been compromised.

Speaker 0

从某种意义上说,这引出了你之前在本集中提到的一个话题,但我觉得讨论起来会非常有趣,那就是那个漏洞。

And this, in a way, kinda leads into a topic that you mentioned earlier in the episode, but I think it would be really interesting to talk about, and that is the bug.

Speaker 0

这么说对吗?

Is that the right way of saying it?

Speaker 0

你称它为漏洞吗?

Do you call it a bug?

Speaker 1

这是Zcash之前一篇论文中存在的根本性密码学错误。

It was it was a fundamental cryptographic mistake inside of an a paper that precedes Zcash.

Speaker 1

所以我称之为BCTV14漏洞或BCTV14错误之类的。

So I would call it the BCTV 14 bug or BCTV 14 mistake or whatever.

Speaker 1

某种类型的错误。

Error of some kind.

Speaker 0

这个漏洞其实与可信设置无关吧?

This bug, did it like, it didn't really have anything to do with the trusted setup, though, did it?

Speaker 0

你们做的可信设置某种程度上算是成功的吗?

Like, was the trusted setup that you did was successful in a way?

Speaker 0

比如,那些‘有毒废料’并没有被发现。

Like, that that toxic waste was not discovered.

Speaker 1

没错。

Right.

Speaker 1

可信设置的目标是为zk-SNARK构建参数,确保某些变量对所有人都是未知的,并且这些变量会被永久销毁。

So the goal of the trusted setup is to construct parameters for the z k snark such that certain variables are unknown to anyone, and they're destroyed forever.

Speaker 1

当然,这个‘永久’是指直到量子计算机出现之类的。

Well, forever until a quantum computer shows up or something.

Speaker 1

所以,我认为我们成功实现了这一点。

So, we I think we successfully achieved this.

Speaker 1

遗憾的是,描述zk-SNARK的论文要求作为参数的一部分生成其他一些东西,但实际上这些对证明者来说并非必要。

Unfortunately, the paper that described the z k SNARC said you had to produce some other things as part of the parameters, which actually weren't necessary, for the prover.

Speaker 1

证明者在实际构造证明时并不需要它们。

The prover didn't didn't need them to actually construct proofs.

Speaker 1

而我们却构造了它们,结果发现这些参数不仅不必要,甚至情况比不必要更糟糕。

And so we constructed them, and then it it ended up being that they are actually not even it's worse than not necessary.

Speaker 1

它们实际上破坏了证明系统的可靠性。

They they actually break the the soundness of the proving system.

Speaker 1

所以我们当时没有意识到这一点。

So we weren't aware of this.

Speaker 1

我认为如果没有那个错误,仪式在某种意义上会是成功的,因为它能生成安全的参数。

I think if that mistake wasn't there, then the ceremony would would be a success in the sense that it would produce secure parameters.

Speaker 1

但我认为第一次仪式确实成功地为一个有缺陷的ZK SNARK生成了参数。

But I I think the ceremony the first ceremony, I'm sure, was successful in producing parameters for a broken ZK SNARK.

Speaker 1

不过确实如此。

But yeah.

Speaker 1

没错。

Right.

Speaker 0

哇。

Wow.

Speaker 0

原来是这样。

So that's what it was.

Speaker 0

更像是额外产生了一些东西,而你们认为这些东西完全无关紧要。

It was more just like there was extra something extra produced, which you didn't think would be in any way relevant.

Speaker 0

那么这个错误是不是指,那些额外的东西可能以某种方式被利用?

And then was was the mistake that, like, that other extra stuff could be used in some way?

Speaker 1

是的。

Yeah.

Speaker 1

我想我们把这些东西称为‘绕过元素’,因为我们想不出更好的名称了。

So I think we call the we call these things we call them bypass elements because we couldn't come up with anything better than that.

Speaker 1

但这些被生成并存在于参数中的元素,能让你绕过所有验证,任意伪造证明。

But there are these elements that are produced, and and exist in the parameters that allow you to bypass everything and just create a false proof, arbitrarily.

Speaker 1

你可以把这些绕过元素想象成另一个本应销毁的后门,除了那些已知需要销毁的后门之外。

And you could really think of the bypass elements as a as another trapdoor that you should have destroyed in addition to the existing trapdoors that you knew you should have.

Speaker 1

你也可以称它们为‘有害废物’,不过我个人更倾向于叫它们‘绕过元素’。

So you could call them toxic waste as well, but I just call them bypass elements, I guess.

Speaker 0

你们是否需要像处理有害废物那样,全部销毁这些绕过元素?

Would you knee would you have needed all of them, like, in the same way with the toxic way?

Speaker 0

比如,是所有这些组合在一起才会变得危险,还是这些旁路元素实际上是最后才出现的?

Like, was it only in the combination of all of it that it would be dangerous, or was this, like, actually a was were these bypass elements something that actually came out at the end of it?

Speaker 1

对。

Right.

Speaker 1

它们出现在最后阶段,是设置过程的一部分。

They're they're at the very end, they appear in as part of the setup.

Speaker 1

实际上libsnark的实现删除了这些元素,因为验证者不需要它们,但它们被定义为设置过程中构建的内容。

Now it happened to be that the implementation of libsnark deleted these elements because they weren't needed by the prover, but it was defined as something that was constructed during the setup.

Speaker 1

因此MPC生成后又删除了这些元素,因为Libsnarc的证明器需要移除这些元素才能正常工作。

And so the MPC produced it and then deleted it because Libsnarc's prover needed, these elements to be, removed so the prover would work correctly.

Speaker 1

所以我们最初做的MPC,其记录中包含了这些元素——我说的这些旁路元素,它们位于记录的开头、中间或某个位置,这些元素可被用来伪造证明。

So the MPC that we did originally, there was a transcript that contained these elements, these bypass elements I'm speaking of at the very, or in the middle of the transcript somewhere, and these elements could be used to create false proofs.

Speaker 2

那你们是怎么发现这个问题的?发现后又发生了什么?

So how did you guys discover this, and what what happened after they you discovered it?

Speaker 2

内部是怎么...你知道,当发现这个问题后,你们...

What was the internal you know, this is found and then, you know, what do

Speaker 1

你们做了什么?

you do?

Speaker 1

事情是这样的,我当时在参加金融密码学会议。

So what happened was I was at, Financial Cryptography.

Speaker 1

这个会议还有Ariel Gavazan和Zuko参加,这非常有用,因为当我们发现如此严重的漏洞时,能有这两个人在同一会议现场,对正确修复漏洞可能起到了至关重要的作用。

This is a conference along with Ariel Gavazan and Zuko, which is really useful because having those two people at the same conference at the same physical location when we discover such a critical bug was probably incredibly important to actually mitigating the bug correctly.

Speaker 1

当时我正在这个会议上,Ariel有时会发消息问我,嘿。

So I was at this conference, and Ariel will sometimes message me and say, hey.

Speaker 1

我发现Zcash有个地方看起来不太对劲。

I found a a thing that seems weird about Zcash.

Speaker 1

这是不是出问题了?

Is this broken?

Speaker 1

我会回答,不是。

I'll say, no.

Speaker 1

因为这样或那样的原因,这不是问题。

It's not because of this or that.

Speaker 1

然后他告诉我他在论文中发现的那个漏洞,我当时有点怀疑。

And then he told me about this bug that he had spotted in the in the paper, and I was a little suspicious.

Speaker 1

我不得不回忆这个机制是如何运作的,所以我就说,不。

I wasn't I had to remember how this thing worked, and and so I was like, no.

Speaker 1

我是说,这是一篇老论文了。

It's I mean, this is an old paper.

Speaker 1

它发表于2014年。

It's from 2014.

Speaker 1

这可能没问题,但我想我还是会查一下。

This is probably okay, but I'll check it out, I guess.

Speaker 1

我当面见到他并确认了这个漏洞确实存在。

And I met him in person and confirmed that the bug was real.

Speaker 1

于是我打电话给Zuko,我说,嘿。

So I I called Zuko up, I said, hey.

Speaker 1

你需要尽快赶回酒店。

You need to get back to the hotel as fast as you can.

Speaker 1

情况紧急。

It's an emergency.

Speaker 1

而且显然,他以为我指的是有人被绑架之类的事。

And, apparently, he thought that I meant that someone had been kidnapped or something.

Speaker 1

所以他让酒店叫了保镖之类的人来查看我们的情况。

So he asked the hotel to ask bodyguards or something to come and check us out.

Speaker 1

但其实不是,只是Zcash的证明系统出了问题,如果有人能获取原始协议中产生的这份记录,他们就能无限伪造代币。

But but, no, it was it was just that the Zcash proving system was broken, and and people could counterfeit coins infinitely if they had access to this this transcript that was produced in the original protocol.

Speaker 1

所以当祖科来和我们见面时,我们决定删除这份记录。

So when Zucco came and met with us, we decided to delete this transcript.

Speaker 1

它原本是公开可查的。

It was publicly available.

Speaker 1

直接删除就好,这样就没法——其实下载过的人也不多,大概就十几个吧。

Just delete it, and then no one can there weren't very many people that downloaded it, maybe, like, a dozen.

Speaker 1

所以你就把它删了。

And so you delete it.

Speaker 1

没人能利用这个漏洞。

No one can exploit it.

Speaker 1

我笔记本上存了一份副本,后来也删除了。

I had a copy on my laptop, which we eventually deleted.

Speaker 1

在这个过程中,我们想出了暗中修复Zcash漏洞的方法——因为如果公开宣布,我们无法确定有多少人下载了文件或是否被存档。

But and in the process, we come up with some way to actually fix the bug in Zcash covertly because if you tell everyone, then who know we didn't know that there was very few people that downloaded it or where it was or if it was archived.

Speaker 1

所以我们担心一旦公开,可能有人会在我们修复前利用这个漏洞。

So we were worried if we went public with anything that someone would exploit it in Zcash before we could patch it.

Speaker 1

于是我想出了暗中修复方案:借助Sapling升级的新参数设置来替换旧系统的破损参数。

So I came up with a way to patch it covertly in Zcash by using our new setup to the new setup for the Sapling upgrade to actually replace the parameters for the old system that were broken.

Speaker 1

这个方案有合理说辞,所以除了我们三人和Nathan Wilcox(Electric Coin公司的CTO)外无需告知其他人。

And so we did this, and we were able this this had a convincing explanation, so we won't didn't need to tell anyone besides us three and the and Nathan, who's a CTO of of Nathan Wilcox, who's CTO of Electric Coin Company.

Speaker 1

我们甚至不用告诉其他四位成员,包括工程师和密码学家,因为这个方案表面上有合理解释。

We didn't have to tell Beyond Us four about this issue, none of the engineers or cryptographers or anyone, because it had an an explanation, so to speak.

Speaker 1

最终我们成功修复了漏洞。

So we were able to patch it.

Speaker 1

一旦完成修补,接下来就是要为所有受此影响的其他加密货币也进行修复。

And once it was patched, it was a matter of fixing it for all of the other cryptocurrencies that were affected by it as well.

Speaker 1

是的。

And yeah.

Speaker 2

从发现漏洞到实际修补完成,整个过程耗时相当长。

The first, like, from discovery to actually patch, I mean, was quite a long time.

Speaker 2

那段时间是不是一直处于恐慌状态?

Was that a time of just constant panic?

Speaker 2

当时知道这件事的只有你们四个人吗?

Or what what was the four of you that knew?

Speaker 2

你们当时的情绪是怎样的?

You what was the emotion there?

Speaker 1

所以我觉得那一年里我可能老了十岁。

So I think maybe I aged ten years during that one year.

Speaker 1

好吧。

Well, okay.

Speaker 1

所以从发现漏洞到打补丁之间大约有八个月时间。

So it was about eight months between discovery and patch, I think.

Speaker 1

原本没打算拖这么久,但中间出现了延误。

It wasn't intending to be that long, but there was a delay.

Speaker 1

但必须对这样一个可能导致整个项目毁灭的漏洞保密,这真的非常非常困难——毕竟这个项目倾注了我们所有心血。

But having to keep such a bug secret, which, you know, could lead to the destruction of the project that you worked so hard on was really, really difficult.

Speaker 1

所以每个人...每个人都从那段经历中获得了深刻的情感体验。

So everyone everyone had serious emotional takeaways from that experience, I think.

Speaker 1

就我个人而言,2018年几乎没完成什么工作——虽然我确实在忙Sapling的设计开发之类的事。

I personally, I didn't get much done during 2018 because of I mean, I I was working on sapling and designing it and things like that.

Speaker 1

其实我贡献的大部分Sapling功能都是在2017年完成的,包括具体实现。

I had done most of the sapling stuff that I contributed to in 2017, the implementation.

Speaker 1

2018年主要就是落实各项设计,完成仪式流程,反复检查代码和加密算法,确保不会再有漏洞。

And so in 2018, it was just about implementing things, finishing the design work, and doing the ceremonies and going through everything and making sure that there's not another bug or trying to make sure that there's not another bug in the in the code or something, or in the crypto.

Speaker 1

那段时间确实...嗯。

So that was a really yeah.

Speaker 1

那真是一段非常艰难的时期。

It was a really difficult time.

Speaker 0

我记得这件事。

I remember it.

Speaker 0

按我的理解,这个问题的修复是随着Sapling升级一起完成的——当Sapling升级发生时,这个问题就顺带解决了。

So as I understand it, the up the update or, like, the fix for this was part of the sapling I mean, when when the sapling upgrade happened, this issue was sort of, like, taken care of.

Speaker 0

但我记得在ZCon Zero大会上,你们当时正在进行Overwinter更新之类的操作。

But I remember at ZCon Zero, you guys were doing this overwinter update or something.

Speaker 0

那像是Sapling升级前的过渡阶段。

It was like a part of the sapling like, on the way towards the sapling update.

Speaker 0

你们是当时修复的,还是后来才解决的?

Did you fix it then, or did you fix it later?

Speaker 1

这个漏洞是在Overwinter升级前夕被发现的。

So the the bug was discovered just prior to the Overwinter upgrade.

Speaker 1

准确地说,距离部署只剩一周左右的时间。

Literally, like, a week before it was deployed.

Speaker 1

大概是这样

So or something like that.

Speaker 1

所以我们没机会在Overwinter升级中实际部署缓解措施

So we didn't have a chance to actually deploy mitigation in Overwinter.

Speaker 1

我们最终部署的实际缓解措施依赖于sapling升级

The actual mitigation that we did deploy depended on the sapling upgrade.

Speaker 1

我们算是借机搭了便车,这样既能隐蔽处理,又能防止他人独立发现并利用这个漏洞

It was we we kind of piggybacked on it in order to make it covert so that people wouldn't independently discover and exploit the the bug.

Speaker 1

所以,是的。

So so yeah.

Speaker 1

作为Sapling升级的一部分,Overwinter升级主要是一个后勤性质的升级,旨在改进执行后续升级的流程——那时候我们还称之为硬分叉。

So as part of the sapling upgrade, overwinter upgrade was mostly a logistical upgrade that was intended to improve the process of performing another upgrade back when we used to call them hard forks.

Speaker 1

我们曾称之为硬分叉零,但在Zcash社区中我们已不再使用硬分叉这个说法了。

We called it hard fork zero, but we don't call them hard forks anymore in in the Zcash community.

Speaker 2

现在称之为网络升级。

Call them network upgrades.

Speaker 2

明智的选择。

Wise choice.

Speaker 1

I

Speaker 0

明白了。

see.

Speaker 0

我只是想,我猜大部分收听这期节目的听众,尤其是如果他们听过之前我们解释了很多关于可信设置的那些节目,以及我们讨论过Zcash整体模型的内容。

I just wanna like, I I imagine that people listening to this episode for the most part, especially if they've listened back to some previous episodes where we explained a lot of, you know, about trusted setups, and we, you know, where we talked about sort of the Zcash model in general.

Speaker 0

就像,我们已经讲过这个漏洞利用意味着什么,但我觉得我还是想在这里再提一下。

Like, we we have covered what the bug exploit would mean, but I think it would I I sorta wanna just say it here.

Speaker 0

比如,如果有人真的获取了那段信息,会发生什么?

Like, what what would have happened if someone had actually gotten that that piece of information?

Speaker 0

他们需要做些什么才能实现你刚才描述的那种情况,比如在屏蔽账户中挖矿?

Like, what would they have needed to do to actually, what you just described, like mine in the shielded accounts?

Speaker 1

所以利用这些绕过元素,你可以破坏证明系统的可靠性,从而构造虚假证明。

So so what you can do with these bypass elements, it breaks soundness of the proving system, and so you can construct false proofs.

Speaker 1

那么你能用它做什么呢?

So what can you do with that?

Speaker 1

嗯,你可以凭空创造大量货币,然后从受保护的池中取出,或者如果你想的话也可以留在池中,用来购买其他货币之类的东西,从而窃取所有人的资金。

Well, you can create a bunch of money that doesn't exist and then take it out of this shielded pool and, or or keep it in the shielded pool if you want and, use it to buy things like other currencies or whatever and, rob everyone of of their money.

Speaker 1

所以如果有人能接触到这个,后果会非常非常危险。

So it's very very dangerous if someone had access to this.

Speaker 1

我觉得

I think

Speaker 0

他们其实不会真正实施盗窃。

They they wouldn't really rob.

Speaker 0

对吧?

Right?

Speaker 0

他们不会从其他受保护账户中取钱。

It's not that they would take out money from other shielded accounts.

Speaker 0

他们只是会增发货币。

They would just print more.

Speaker 1

对吧?

Right?

Speaker 1

所以无法区分伪造的货币和真实的货币。

So there's no way to distinguish money that's been counterfeited from money that isn't.

Speaker 1

因此,从某种意义上说,首先通过通货膨胀,你实际上是在窃取他人的价值。

And so as a result, in some sense well, first off, by inflation, you're you are in some sense robbing value from other people.

Speaker 1

但从另一个角度看,因为你可以动用所有这些钱,而伪造者又无法被识别,系统中诚实的参与者看起来都像潜在的伪造者,你无法分辨谁的钱是真的。

But in another sense, because you can take all this money and then the counterfeiter isn't distinguishable, the the honest participants of the system look like potential counterfeiters and who whose money is real, you don't know.

Speaker 1

所以这真是个大麻烦。

So it's a it's a it's a big mess.

Speaker 2

实际上,旋转门机制已经解决了大部分问题,因为你可以看到有多少代币从Sprout转移到了Sapling,并且记录了有多少代币被创建。

The, the turnstile actually addresses most of this in that you can see how much how many tokens have moved from Sprout to Sapling and you have an account of how many tokens have been created.

Speaker 2

因此,如果Sapling中的代币数量没有超过历史创建总量,情况看起来就是正常的。

And so you know that if there aren't more tokens in Sapling than have ever been created, then things seem good.

Speaker 2

问题在于,你不知道是否有人在Sprout中囤积了大量代币,只是在那里等待时机。

The problem is that you don't know if someone is sitting on a huge stack of coins in Sprouts just kinda waiting around.

Speaker 2

比如说,我不知道他们在那里拿着那些币能干什么。

Like, I don't know what they would do with those there.

Speaker 2

但是

But

Speaker 1

所以造假者会兑换他们的钱。

So so counterfeiters exchange their money.

Speaker 1

他们就是这么干的。

That's what they do.

Speaker 1

如果有人在造假,最终会被发现,因为总会有人将钱从废料区转移到树苗区,而转移的金额会超出应有数量,这样就会被察觉。

They and so so if there's more, if there's if someone's counterfeiting, it will be discovered because someone will have moved their money from scrap to sapling at some point, and there was more money being moved than there should have been, and so you'll discover it.

Speaker 1

也可能存在一种旋转门检测不到的造假者——比如只伪造特定数量假币,并且只将其中的一小部分兑换成其他货币之类的造假者。

You could also have a counterfeiter potentially who this this turnstile that it doesn't detect, like a counterfeiter that only creates a certain amount of counterfeit funds and only takes a certain a small amount of it out and exchanges it for another currency or whatever.

Speaker 1

而且,这个伪造金额恰好小于整个网络参与者因私钥丢失等原因造成的损失金额时

And, it's that that amount happens to be less than the amount that is lost, for example, by all the participants in the network because people lose their private keys or they

Speaker 0

确实。

just Yeah.

Speaker 1

随便吧。

Whatever.

Speaker 1

所以你完全可以做到不被发现。

So you could you could totally do it undetected.

Speaker 1

其实今天我也不确定萌芽屏蔽池里有多少代币,但我认为从未有人利用过这个漏洞,因为任何理性的造假者——理性但邪恶的造假者——可能会一次性尽可能多地套现而不被发现。

I think today actually, I'm not really sure how many coins are in the sprout shielded pool, but I I don't think it was ever exploited because I think any rational counterfeiter, rational but evil counterfeiter would, probably just take as much money as they could possibly sell at a time without being detected or something like that.

Speaker 2

感觉他们会试图把代币转移到新芽池,成为第一个转移并抛售的人。

It feels like they would try to move the tokens over to, Sapling as like, be the first to ever move it over and then sell it.

Speaker 2

因为这样一来,他们被发现的间隔时间就更长。

Because, like, then they they have a longer time before they get detected.

Speaker 2

而当那些动作慢、不一定紧跟协议发展的老实人开始转移代币时,最终会有正经用户转移代币导致账目失衡。

Whereas this once the legit people, you know, who are slow and don't necessarily follow all protocol developments start moving their coins over, eventually, some legit person moves their coins over and the the balance tips over.

Speaker 2

对吧。

Right.

Speaker 2

但那个邪恶的首发者早就转移并抛售了全部代币

But the the the first guy, the evil guy, has already moved all their tokens and maybe sold them on

Speaker 1

在交易所上。

an exchange.

Speaker 1

因为坏人可以想造多少就造多少。

Because the evil guy can make as many as they want.

Speaker 1

我认为坏人最理性的做法就是一旦发现漏洞并能够利用,就立即开始伪造。

I think the the rational thing to do for the evil guy is to literally counterfeit as soon as you discover the the vulnerability and are able to exploit it.

Speaker 1

尽可能多地伪造货币,并在不被交易所发现的情况下以最快速度卖出。

Literally counterfeit as much money as you can possibly counterfeit and sell it as fast as the exchanges, will allow you to do so without being detected.

Speaker 1

而这种情况根本没有发生过。

And I that didn't happen at all.

Speaker 1

因此,结合其他一些原因,我相当确信从未有人独立发现过这个漏洞,也从未有人利用过它。

So I'm pretty convinced on top of some other reasons, that that no one ever independently discovered it and that no one ever exploited the vulnerability.

Speaker 0

现在为了明确起见,听起来世界上仍然存在一个sprout设置。

If this is so now just to to be clear, it sounds like there's still a sprout setup that exists in the world.

Speaker 0

正如你提到的,这就像是一个分叉。

Because as you mentioned, it's like a fork.

Speaker 0

对吧?

Right?

Speaker 0

所以Sprout版本还在某个地方存在。

So there still is sprout somewhere.

Speaker 0

然后还有Sapling的分叉或更新升级。

And then there's the Sapling fork or update or upgrade.

Speaker 0

但有没有人能在事后利用这一点,并设法将其转移?

But could somebody actually exploit this after the fact and somehow move it over?

Speaker 0

比如,如果有人还在使用Sprout版本,而现在这一切都已公开,他们能否利用这一点以任何方式影响新链?

Like, if somebody's still working in the Sprout version and they like, this has all been published and it's out there now, could they use this and in any way affect the the new chain?

Speaker 1

在Zcash中不行。

So not in Zcash.

Speaker 1

这就是Sapling升级中包含的缓解措施的全部目的——彻底阻止人们这样做。

That was the whole purpose of the the mitigation that was included in in Sapling was to prevent people from doing this entirely.

Speaker 1

在其他仍基于Sprout的加密货币中(虽然不多,但确实有几个),确实存在利用这一点伪造资金的方法。

In other cryptocurrencies that still are based on Sprout, which there aren't very many, but there's a couple, then, yes, there is there is a way to exploit that to create counterfeit funds.

Speaker 1

我们尝试向——我是说,你不可能向所有这些项目都一一披露,嘿。

We tried to disclose to I mean, you can't disclose to every one of these projects, hey.

Speaker 1

这里有个漏洞。

Here's this bug.

Speaker 1

你得有所选择,判断哪些团队足够可信,可以告诉他们,嘿。

You have to kinda pick and choose, who you think is is trustworthy enough to tell them, hey.

Speaker 1

这里存在漏洞。

There's a bug.

Speaker 1

你们需要修复它。

You have to fix it.

Speaker 1

因此我们在公开披露前(大概是二月份公开的),选择了Zcash以外的几个项目让他们修复,作为我们披露流程的一部分。

And so we chose a couple projects outside of Zcash and had them fix it, as part of our disclosure process before we went public, in in February, but or whenever we went public.

Speaker 1

不过确实如此。

But yeah.

Speaker 0

我记得是二月份。

I think it was February.

Speaker 0

但不是。

But no.

Speaker 0

但我的意思是,你提到了这个迁移。

But what I mean is you sort of mentioned this movement.

Speaker 0

就是说,你需要将资金从Sprout转移到Sapling。

Like, you have to move your funds from Sprout to Sapling.

Speaker 0

Frederick,你提到过这个,就是那个转门机制。

Frederick, you said this, the turnstile.

Speaker 2

但是,Sprout交易现在已经无效了。

But, Sprout transactions are not valid anymore.

Speaker 2

所以你现在可以生成一个Sprout交易,但

So you can, like, generate a Sprout transaction today that

Speaker 0

好的。

Okay.

Speaker 0

是的。

Yeah.

Speaker 0

明白了。

Got it.

Speaker 0

顺便说一句,肖恩,这真的很有趣,非常感谢你分享这些经历,我能想象那一定相当痛苦。

It's so by the way, Sean, this is really interesting, and thank you so much for sharing this stuff with you because I can imagine it was quite traumatic.

Speaker 0

所以,真的非常感谢你能来分享这些。

So, yeah, really thank you for for kind of coming on and sharing that.

Speaker 1

挺好的。

It's nice.

Speaker 1

实际上,谈论这些某种程度上具有疗愈效果。

It's kind of, therapeutic, actually, to talk about.

Speaker 0

哦,很高兴听你这么说。

Oh, I'm glad to hear that.

Speaker 0

好的。

Cool.

Speaker 0

实际上,这让我想到了下一个问题。

Actually, that sort of leads me to the next question.

Speaker 0

现在时间已经过去了一些,回头来看,你对此的主要收获是什么?

Now that some time has passed though, like, what's your what's your takeaway looking back on this?

Speaker 1

嗯,这个嘛

Well It's

Speaker 0

某种程度上,你总是可以说,比如,你必须更努力地工作。

sort of like, you can always say, like, you have to work harder.

Speaker 0

你必须更仔细地观察,但是,确实存在人为失误。

You have to look closer, but, like, there is human error.

Speaker 0

是的,确实存在这种情况。

There is it is yeah.

Speaker 0

我只是好奇,你对这个怎么看?你是怎么想的?

I'm just curious, like, how do you like, what what do you think of that?

Speaker 1

我的意思是,我不会用'你必须更仔细看'或者'你必须怎样'来回答。

So I mean, I I I won't I won't answer with, oh, you have to look harder, you have to whatever.

Speaker 1

但我会回答,这恰好发生在我们没有重新实施的那个环节上。

But I will answer with it this happened to be in the one spot where we didn't reimplement it.

Speaker 1

我们重新实现了之前学术原型中几乎所有的内容,包括Zcash的所有代码。

We reimplemented almost everything of the academic prototype that was before us, all the all the all the code for Zcash.

Speaker 1

但我们唯一没有处理的就是ZK SNARK的这个具体部分。

But the one thing that we didn't tackle was the this actual this spot of the ZK SNARK.

Speaker 1

所以如果我们当时处理了这部分,我想我们本可以发现这个问题,或者改用其他ZK SNARK方案之类的。

And so if we would have done that, I think that we would have discovered it or switched to a different ZK SNARK or something like that.

Speaker 1

但我们当时资源有限,所以就决定直接使用它。

But we were resource constrained, and so it was just a matter of, you know, use it.

Speaker 1

这个协议已经推出几年了,所以某种程度上是可信的。

This this protocol was out for a a couple years, so it was somewhat trustworthy.

Speaker 1

已经有人研究过它。

People had looked at it.

Speaker 1

还有人基于它开发了其他同样存在缺陷的协议。

People had based other protocols on it that were also broken.

Speaker 1

这些我们当时并不知道,这确实是个不幸的失误。

So which we didn't know, but it was just it was just a an unfortunate mistake.

Speaker 1

我不知道除了投入更多资源和人力预防之外,还能怎么解决这个问题。

I don't I don't know that you can't really address it much except adding more resources and more people to prevent it.

Speaker 2

嗯。

Yeah.

Speaker 2

说到重新实现这类事情,我们Parity正在与Zcash基金会合作开发Rust版本的Zcash实现。

Speaking of reimplementing things and sort of on this line, I mean, we at Parity are working with together with the Zcash Foundation to write Rust implementation of Zcash.

Speaker 2

虽然并非完全重写所有部分(我们仍在使用Bellman),但我们之前已经重写过比特币实现。

And while it it's not reimplementing everything, we're still using Bellman, but we've reimplemented Bitcoin since before.

Speaker 2

对于这种基金会和公司各自维护不同实现的情况,你怎么看?

What's your take on this sort of having multiple implementations and the foundation having one implementation and the company having one?

Speaker 2

这是好事还是坏事?

Is this good or bad or,

Speaker 1

嗯。

Yeah.

Speaker 1

我想问的是,你具体从事哪个领域?

I think for What's your field?

Speaker 1

在货币领域,拥有多种实现方案是非常好的。

Currencies, having multiple implementations is great.

Speaker 1

这很可能会增加人们在其中某个实现中发现致命漏洞的概率,我认为。

It will very likely increase the chance that someone will discover a fatal bug in one of the implementations, I think.

Speaker 1

多重实现对于几乎所有我能想到的事物来说通常都是件好事。

Multiple implement implementations is generally a good thing for almost every everything that I can think of.

Speaker 1

是的。

Yeah.

Speaker 0

这也很耐人寻味,就像某种轮回。

It's interesting too, like, that it comes back.

Speaker 0

挺有意思的。

It's funny.

Speaker 0

其实在这次访谈前半段,我们就讨论过学术型实现与工程型实现的话题。

And so in this interview earlier on, we were just talking about this academic academic implementations and sort of the engineer implementations.

Speaker 0

正如你所说,除了那部分你们尚未重构的内容外,其他每个环节都...

And as you described, it was like every piece except for that that you hadn't redone or whatever.

Speaker 0

这是在未重做的版本中发现的。

This was found in the in the one that wasn't redone.

Speaker 0

你觉得这可能就是解决方案吗?弗雷德里克,就像你提到的,让人们多次重写所有内容似乎是确保安全的最佳方式。

And do you think that that maybe is the solution to have this is kinda going to your point, Frederic, that like just reimplementing, just having people rewrite everything multiple times is sort of the the best way to assure it's safe.

Speaker 1

这是一种方式。

It's it's one way.

Speaker 1

显然,拥有可验证的正确代码是另一种方式。

Obviously, having verifiable verifiably correct code is is another way.

Speaker 1

但我想说的是,学术代码的编写是为了推出原型,以便向期刊或会议提交论文时声称你有一个实现。

But I think the the point I'm making is that the academic code was written to get a prototype out so that you could tell the journal or the conference that you're submitting your paper to that I have an implementation.

Speaker 1

它不是为了承载数十亿美元的价值而设计的。

It wasn't, I want to put a billion dollars on top of this implementation incorrect.

Speaker 1

我们发现学术原型中还存在其他致命错误,不仅在代码中,也在加密算法中,但我们已经替换了这些部分。

So going we found other fatal bugs in the the academic prototype of even in just the code, also in the crypto, but even in just the code, which that that we replaced.

Speaker 1

所以我认为,如果要使用学术原型,你不仅需要精通加密算法,还需要彻底废弃所有旧代码,因为学术原型中充满了错误。

And so I think it's if you're gonna use academic prototypes, you really need to just you need to master the crypto, and you also need to completely destroy all the old code because academic prototypes are laced with with mistakes.

Speaker 1

这并不是因为学术界的人——我不是在责怪任何人。

It's it's it's not because the academics are there's an I'm not trying to blame anyone.

Speaker 1

只是学术界的人都在创建原型。

It's just that's the the academics are creating prototypes.

Speaker 1

他们甚至会在README文件的最顶部写明。

They're they're literally putting at the top of their readmes.

Speaker 1

“看在上帝的份上千万别用这段代码”。

Do not use this code for the love of God.

Speaker 1

“你会把一切都搞砸的”。

You're going to you're going to screw everything up.

Speaker 1

“求你别用”。

Please don't don't.

Speaker 1

“求你了”。

Please.

Speaker 1

所以我们真的需要在学术代码进入生产环境前彻底重写它们

So it's really we we need to destroy all academic code before it ends up in production.

Speaker 1

我认为仅此一项就能让事情变得更高效一些。

I think that that alone will help make things a little more efficient.

Speaker 1

有更多人参与代码工作也是件好事。

It's also nice to have more people tackling the code.

Speaker 1

每次你重新实现某个功能时,有人就能深入了解代码的每个方面,从而能识别出错误和问题之类的。

So every time you reimplement something, someone learns every facet of the code, and so they can identify bugs and mistakes and stuff.

Speaker 1

所以我想,这两方面都有一点吧。

So there there's a bit of both, I guess.

Speaker 2

还有另一个我非常感兴趣的工作领域是你研究过的BLS12-381曲线和Job曲线。

There's another area of work that I'm very interested in that you've worked on, and it's BLS twelve three eighty one, the curve and the job job curve.

Speaker 2

而且它也处于工程与学术的交界地带。

And it's it's on this boundary of engineering and and academia as well.

Speaker 2

我一直以为这是某个密码学研究者坐在扶手椅上设计的椭圆曲线,但实际是你在创造它们。

Like, I always thought it was a crypto researcher somewhere sitting in their armchair designing this elliptic curve, But here you are making them.

Speaker 2

那么,设计和制作一条椭圆曲线需要考虑哪些因素呢?

Like, what goes into designing and making an elliptic curve?

Speaker 1

说实话,BLS12-381这条源于椭圆曲线的曲线能发展成如今进行椭圆曲线配对相关操作的首选曲线,这让我有点意外。

So I'm actually a little bit surprised that BLS twelve three eighty one's, which is appearing from the elliptic curve, is actually has grown into this really popular elliptic curve for doing anything regarding elliptic curve pairings.

Speaker 1

最初我们只是想设计一条比现有曲线更安全的曲线,因为我们当时Sprout系统中使用的曲线面临某种潜在攻击(虽然目前还无法实现),理论上未来如果有人找到方法,其安全性可能只有100比特甚至更低。

Originally, we were just trying to come up with a curve that was more secure than the curve that we currently had because the curve that we current the the the one that we had in Sprout under some attack, which isn't possible yet, but theoretically, in in the future, if someone figures out a way to do it, it would have a 100 bits of security or less than a 100 bits, something like that.

Speaker 1

我们想设计一条在保持效率的同时,安全性略高于原有曲线的方案。

We wanted to make a curve that was a little bit more efficient than that or, sorry, a little bit more secure than that without losing the efficiency.

Speaker 1

于是在Sprout升级完成后,我研究了现有曲线的分类体系和各种设计约束条件,最终设计出符合我们所有需求的方案。

And so we and so I I just after the sat Sprout upgrade, I just looked at the, taxonomy of available curves and, the different design constraints and came up with one that kind of fit all the pieces that we needed.

Speaker 1

同时,在其中嵌入一条椭圆曲线其实并没有太大难度。

And then at the same time, building an elliptic curve that's embedded within it, was not really much of a challenge.

Speaker 1

本质上就是把学术理论付诸实践,在满足所有约束条件的同时尽可能提高效率。

It's just taking these academic ideas and applying everything and trying to make it really efficient and, follow all the constraints.

Speaker 1

这其实并不算特别困难。

It's not that it's not that hard.

Speaker 1

但不知为何,就是没什么人去做这件事。

For some reason, people just don't do it.

Speaker 1

我不明白... 别害怕。

I don't I don't understand the just don't be don't be afraid.

Speaker 1

创建你自己的椭圆曲线。

Make your own elliptic curve.

Speaker 1

继续吧。

Go ahead.

Speaker 1

我真的没看出来。

I really don't see that.

Speaker 0

你能描述下刚才说的‘曲线套曲线’是什么意思吗?

Would you describe what you just said there where it's like a curve in a curve?

Speaker 0

这是递归的,还是另一种...

Is that recursive, or is that a different

Speaker 1

是嵌套的。

it's nested.

Speaker 1

本质上,你有一条像BLS12-381这样的椭圆曲线,它有一个标量域——你的算术电路就是构建在这个标量域上的,而且你可以在任何域上构造任意曲线。

So, essentially, you have an elliptic curve like BLS twelve three eighty one, which has a scalar field, which is where you do all the your arithmetic circuit is built over the scalar field, and you couldn't you can construct arbitrary curves on any field.

Speaker 1

所以你只需在那个域上构建另一条曲线,我称之为嵌入曲线,但不知道还能怎么称呼它。

So you just construct another curve under on that field, and I call it an embedded curve, but I don't know what else to call it.

Speaker 1

于是那条曲线就会是跳跃跳跃的。

And and so that that that curve would be jump jump.

Speaker 2

我这边也有听众的两个问题,实际上是来自杰夫·伯吉斯的。

I have two two questions from a listener on this one as well, actually, from Jeff Burgess.

Speaker 2

我想提问主要是因为这些问题暗示了如何思考这类曲线以及相关的工程实现工作。

And I really only wanna ask them because I think they hinted sort of how to think about this and how to work with curves, like what the engineering effort that goes into it.

Speaker 2

两个问题是:我们何时能实现对此曲线的哈希运算?何时能在此曲线上实现恒定时间运算?

So the two questions are, when do we get hashing to this curve and when do we get constant time arithmetic in this curve?

Speaker 1

我一直在开发一个具有恒定时间特性的BLS12-381实现。

So I've been working on an implementation of BLS twelve three eighty one that has constant time.

Speaker 1

所有运算。

Everything.

Speaker 1

所有运算都是恒定时间的,甚至包括通常不需要的配对运算。

Everything is constant time, even the pairing, which is not necessary usually.

Speaker 1

这就是我正在研究的内容。

So so that that's something I'm working on.

Speaker 1

这完全可行。

It's totally feasible.

Speaker 1

关于曲线哈希,Dan Benet等人最近发表了一篇新论文,提出了一种快速实现曲线哈希的技术。

Hashing to the curve, there was a new paper by Dan Benet and someone else where they had come up with a technique for doing fast hashing to the curve.

Speaker 1

这非常令人兴奋,我计划学习其原理并实现它。

And so that's really exciting, and I plan to learn how that works and implement it.

Speaker 1

所以它即将到来。

So it's it's on a it it it's coming up.

Speaker 1

虽然LS12-381最初是为Zcash设计的,但它可以被任何项目使用。

And and the LS twelve three eighty one, although it was designed for Zcash originally, it can be used by anything.

Speaker 1

它也可以被那些只需要BLS签名(这些可快速聚合的签名等特性)的项目使用。

It could be used by projects that just want to have, BLS signatures, which are these really fast aggregatable signatures and and things like that.

Speaker 1

可以说,它已经自成一体了。

So, you know, it's it's taken a life on its own.

Speaker 2

我认为现在很多处理这类随机信标链的项目,它们都旨在某种程度上使用VLS签名,通常涉及12-3-8-1曲线。

I think a lot of projects that are now dealing with these sort of random beacon chains, they're aiming to have VLS signatures in some regard than usually dealing with twelve three eight one.

Speaker 2

嗯。

Mhmm.

Speaker 2

是的。

And yeah.

Speaker 2

所以听起来这些问题有点像混合体,就像Dan Bonnet和他的研究团队在努力寻找一种哈希方法的同时,也在解决实现恒定时间的工程难题。

And so it's sort of it sounds like it's a bit of these questions, it's a bit of mix, again, of, like, Dan Bonnet and his research team are working on trying to figure out a way to do hashing while you're plugging away at the engineering things of getting constant time.

Speaker 1

我们已经实现了对BLX12-3-8-1曲线的哈希映射。

We'd already implemented hashing to to BLX twelve three eighty one.

Speaker 1

这在理论上是恒定时间的。

That is theoretically constant time.

Speaker 1

只是效率不如Dan Bonnet论文中的方法。

It's just not as efficient as Dan Bonnet's paper.

Speaker 1

我们还没

We hadn't

Speaker 2

哦,有意思。

Oh, interesting.

Speaker 1

所以它实际上已经被实现了。

And and so it's been actually implemented.

Speaker 1

虽然它没有被集成到我对BLS12-381的实现中,但在其他几个衍生版本中已经实现了。

It wasn't integrated into my implementation of BLS twelve three eighty one, but it was implemented in a couple others that have spawned off.

Speaker 1

人们已经创建了自己的实现版本。

People have made their own implementations.

Speaker 1

因此,向该群组的哈希映射已经存在。

And so there was there was already hashing to the group.

Speaker 1

只是现在这篇新论文出来了,效率更高,在大家开始以特定方式使用哈希前,可能都应该转向这个新方案——毕竟理想情况下我们希望它能标准化等等。

It's just now that this new paper came out and it's much more efficient, everyone should probably move to that new thing before everyone starts using hashing in a specific way because, ideally, we'd like it to be pretty standardized and and so on.

Speaker 1

是的。

Yeah.

Speaker 0

你真的参与那些标准讨论了吗?

Are you are you really involved in that standards talk?

Speaker 0

比如,我知道有很多人正在推动零知识证明标准的制定。

Like, I know that there's a lot of people who are trying to get some ZK standards going.

Speaker 1

是的。

Yeah.

Speaker 1

我曾担任第一届和第二届ZK证明研讨会的协调人兼委员会成员。

I was one of the, moderators slash, committee members of the ZK proofs workshop, the first one and the second one.

Speaker 1

第二届研讨会就在这个月(四月)初刚举办。

And the second one was just earlier this month in April.

Speaker 1

所以我认为现在标准化某些内容还为时过早,比如椭圆曲线——不同项目需要不同的椭圆曲线。

So I guess part of the the those stand I think it's a little too early to standardize on certain things like elliptic curves, everyone needs a different elliptic curve.

Speaker 1

以太坊不幸地采用了Zcash最初使用的旧曲线,因为他们当时急需一个现成方案以便...

Ethereum's, regrettably is using this old curve that Zcash originally used because they just needed something so that they could they

Speaker 2

他们采用它是为了实现与Zcash的互操作性,结果Zcash自己却换了算法。

could They put it in because they wanted interoperability with Zcash, and then Zcash changed.

Speaker 1

其实我当时反复警告过他们:喂...

Well, I I I did try to warn them, hey.

Speaker 1

出于安全性等因素考虑,你们或许应该改用BLS曲线,而且我们Zcash也准备切换使用它们。

You should probably use BLS curves instead because of of the security thing and everything else, and we're gonna switch them in Zcash.

Speaker 2

实际上,目前有几项关于以太坊下次升级的提案正在讨论中。

There's actually a couple of proposals on the table for the next upgrade to Ethereum to add there's there's a couple of different ones.

Speaker 2

他们想要一种适用于任何椭圆曲线的通用配对函数,另一种则是针对BLS12-381曲线。

They want one generic sort of pairing over any elliptic curve type of function and another one for, I think, BLS twelve three eighty one.

Speaker 1

是啊。

Yeah.

Speaker 1

所以现在的情况是,似乎每个人都在选择不同的曲线。

So so so it's it's really everyone seems to be picking different curves.

Speaker 1

举例来说,BLS12-381并非万能方案——如果你需要进行配对嵌套递归之类的操作呢?

For example, a BLS twelve three eighty one isn't the end all be all because what if you wanna do in a nested recursion of pairings or something like that?

Speaker 1

那就必须使用ZEXY论文里提到的那些曲线。

Well, then you have to use the curves that were in ZEXY.

Speaker 1

又或者如果你想要实现无限递归呢?

Or what if you wanna do indefinite recursion?

Speaker 1

那么你就需要使用MNT四或MNT六循环,比如在CODA中使用的这种。

Then you have to use this MNT four or MNT six cycle that's used in, for example, CODA.

Speaker 1

所以每个人可能都会选择不同的曲线,在性能、安全性和特定功能之间做出不同的权衡,因此目前很难在曲线上实现标准化。

So everyone's gonna have a different curve probably with different trade offs of performance and security and features of certain kinds, and so it's really difficult right now to standardize on a curve.

Speaker 1

但我们可以暂时在语言和技术等方面达成标准化共识。

But what the what we can standardize, I guess, on right now is language and techniques and things like that.

Speaker 1

这样我们就能达成一致:如何严格构建曲线以避免后门或其他可能被利用的漏洞。

So we can we can come to an agreement of this is how you construct a curve rigidly to avoid backdoors or whatever other kind of possible things that you could screw around with.

Speaker 1

解释清楚所有细节。

Explain everything.

Speaker 1

这是针对某些特定话题应该使用的术语等等。

This is the term you should use for for some particular topic and so on.

Speaker 1

所以目前标准化工作的重点一直放在这方面。

So that's currently what the standardization effort has been focused on.

Speaker 1

除此之外没有太多

There isn't much else to

关于 Bayt 播客

Bayt 提供中文+原文双语音频和字幕,帮助你打破语言障碍,轻松听懂全球优质播客。

继续浏览更多播客