TRASCRIZIONE 🔗
1
00:00:00,000 --> 00:00:04,600
All the cryptography that Bitcoin relies on today is hinging on a single cryptographic problem.
2
00:00:05,020 --> 00:00:08,980
And if that problem breaks in any way, not just if a quantum computer breaks it,
3
00:00:09,060 --> 00:00:12,680
it would be really nice to have something a little more conservative to fall back on.
4
00:00:12,680 --> 00:00:17,960
Something that will help us preserve the integrity of the UTXO set over very large spans of time.
5
00:00:18,620 --> 00:00:22,280
Conduition, thank you so much for being here today.
6
00:00:22,480 --> 00:00:28,480
I think, if I'm not mistaken, this is likely your first kind of big video interview.
7
00:00:28,920 --> 00:00:29,660
I believe so, yeah.
8
00:00:29,660 --> 00:00:35,780
I think the only time I've ever appeared live was also at Bitcoin Vegas, but that was a relatively niche talk.
9
00:00:36,440 --> 00:00:37,000
Fair enough.
10
00:00:37,080 --> 00:00:40,300
And I assume you were talking about quantum, which is what we'll be talking about today.
11
00:00:40,440 --> 00:00:40,600
Certainly.
12
00:00:40,920 --> 00:00:44,420
We have a very special episode planned today.
13
00:00:44,500 --> 00:00:48,820
You know it's special because we have the whiteboard assistance to help us out.
14
00:00:48,820 --> 00:01:13,260
But, yeah, we're going to be hopefully, I mean, we will be deep diving into shrinks, which, in my opinion, is kind of the leading post-quantum signature scheme most likely at this moment, the kind of front-running contender to make it into Bitcoin, you know, as sort of the post-quantum signature scheme that we'll likely use.
15
00:01:13,540 --> 00:01:14,280
Very excited to hear that.
16
00:01:14,540 --> 00:01:16,060
Yeah, that is my point of view.
17
00:01:16,060 --> 00:01:18,260
I'm excited to hear excitement about the scheme that we're working on.
18
00:01:18,260 --> 00:01:39,780
A hundred percent. And I'm, you know, obviously, I think that this was, you know, original. Well, let's actually back up. I'd love to get a little bit of your story of how you got so deep into this work. You're now, I think by the time this comes out, it will be announced that you're a co-author on the BIP proposing op shrinks. Is that what we're calling this?
19
00:01:39,780 --> 00:01:44,700
The initial thing that we're going to be putting out is going to be the signature specification of Shrinks.
20
00:01:45,440 --> 00:01:51,320
And that's going to be a self-contained, purely cryptographic BIP, kind of like how BIP340 was for Schnorr.
21
00:01:51,820 --> 00:01:58,520
So we're not directly, immediately going to be proposing a consensus change rule to include this.
22
00:01:58,620 --> 00:02:03,300
That's going to be part of a follow-up series of BIPs, because there's actually a series that we need to do.
23
00:02:03,580 --> 00:02:06,920
Shrinks itself is agnostic to how it is deployed in consensus.
24
00:02:07,680 --> 00:02:12,900
How many BIPs in total will you guys need to write to have sort of like a comprehensive
25
00:02:12,900 --> 00:02:13,560
That's a great question.
26
00:02:13,560 --> 00:02:15,200
TQ signature shrink scheme.
27
00:02:15,320 --> 00:02:18,860
And I know it's kind of a trick question because I know enough about this process from BIP 360
28
00:02:18,860 --> 00:02:20,800
to know it's a trick question, but curious.
29
00:02:21,040 --> 00:02:24,640
It's a complicated matter because you also have interplay with competitive proposals
30
00:02:24,640 --> 00:02:29,880
like P2MR and P2TRV2 and P2TRH.
31
00:02:30,340 --> 00:02:34,320
And then you have the question of how does this interleave with unrelated proposals,
32
00:02:34,780 --> 00:02:41,960
things that aren't related to quantum at all, like Fabian's CISA proposal, CISA, and Great Script Restoration.
33
00:02:42,120 --> 00:02:47,460
Like basically how this interacts with other parts of the protocol that might need their own separate BIPs.
34
00:02:47,500 --> 00:02:50,780
Exactly. So that's still a question that we're sorting out across different working groups.
35
00:02:50,780 --> 00:02:54,100
Do you have an idea? So this will be the signature specification.
36
00:02:54,240 --> 00:02:59,280
Do you have any idea what the next BIP after that will be? Like what's the next step thereafter?
37
00:02:59,280 --> 00:03:13,760
Our current draft plan is to propose a new Tapscript leaf version, which overloads OpCheckSig in such a way that you can execute either BIP340 signatures or shrink signature verification.
38
00:03:13,760 --> 00:03:32,520
Okay. And so just again, to back up on your sort of personal history around this, I think I came across your name probably like a year, year and a half ago. And you were sort of kind of casually blogging about this topic, but you were already blogging about post-quantum pretty significantly.
39
00:03:32,520 --> 00:03:38,540
would you mind sharing a little bit how you got into sort of the you know tell us about your blog
40
00:03:38,540 --> 00:03:42,660
I mean this was kind of how you sort of made your name for yourself in this space was blogging about
41
00:03:42,660 --> 00:03:49,140
this topic and now here you are co-authoring a bit with the Jonas Nick blog stream team so yeah
42
00:03:49,140 --> 00:03:53,160
I'd love to hear a little bit about how the blog came to be and what the intention of your blog was
43
00:03:53,160 --> 00:04:00,400
well I've worked in the in the orbit of Bitcoin for a long time and it was in I think it was 2022
44
00:04:00,400 --> 00:04:06,420
or 2023, I decided to start pursuing Bitcoin development a little more actively and learn
45
00:04:06,420 --> 00:04:14,300
more about the cryptography specifically. And well, I did some various works on my blog,
46
00:04:14,580 --> 00:04:19,080
mostly aimed at building a portfolio that I can point to, to say, hey, look, I know what I'm doing
47
00:04:19,080 --> 00:04:23,860
so that I could get hired by companies. I did that for a little while. I
Load full transcript
did some odd jobs.
48
00:04:24,620 --> 00:04:32,960
And I think it was in the end of 2024 or thereabouts, I started hearing about quantum computing and quantum cryptography.
49
00:04:33,080 --> 00:04:34,020
And I was like, what's that?
50
00:04:34,100 --> 00:04:39,600
So I started looking into it and I fell down a little bit of a rabbit hole learning about hash-based signatures.
51
00:04:39,600 --> 00:04:47,520
You might recall my first ever blog post regarding anything post-quantum at all was a survey of different hash-based signature schemes.
52
00:04:47,520 --> 00:04:50,380
going through the history of like Lamport,
53
00:04:51,880 --> 00:04:53,020
Winternet signatures,
54
00:04:53,480 --> 00:04:55,200
and all the way through to modern Sphinx.
55
00:04:55,720 --> 00:04:57,660
And that was pretty progressive at the time.
56
00:04:57,760 --> 00:05:00,320
I mean, this was before Blockstream or Jonas
57
00:05:00,320 --> 00:05:02,820
had written any of their kind of papers
58
00:05:02,820 --> 00:05:03,980
on hash-based signatures.
59
00:05:04,160 --> 00:05:06,220
I mean, you were really kind of the first to be,
60
00:05:06,640 --> 00:05:17,663
at least in writing diving into this topic I late when it comes to the post cryptography game in the grand scheme of things Outside of Bitcoin Yeah In the Bitcoin world I not sure I
61
00:05:17,663 --> 00:05:21,923
sure there were people working on it well before me. It only became popular quite recently because
62
00:05:21,923 --> 00:05:26,123
of developments in the field of quantum computing. And then people started to worry a little more,
63
00:05:26,183 --> 00:05:30,923
you know. How did you start working with Jonas? How did you start collaborating with the Blockstream
64
00:05:30,923 --> 00:05:39,083
team it was in i believe the end of 2025 i had been in a coding dungeon for the last nine months
65
00:05:39,083 --> 00:05:48,383
building um a prototype called slhvk uh it's the i believe i believe and i'm happy to be corrected
66
00:05:48,383 --> 00:05:54,063
on this but i believe this is the world's fastest implementation of sphinx um at least the cpu bound
67
00:05:54,063 --> 00:05:59,383
implementation and this was the result of a lot of uh a lot of pain and a lot of sweat and tears
68
00:05:59,383 --> 00:06:07,543
It came out, my blog post on SLHVK came out right around the same time that Jonas and Mikhail published their survey of hash-based signatures for Bitcoin.
69
00:06:08,283 --> 00:06:08,303
Okay.
70
00:06:08,683 --> 00:06:15,583
And not to go down too much of a sidebar here, but I have to ask, what makes this particular implementation of Sphinx so fast?
71
00:06:15,683 --> 00:06:20,323
Like, what is the distinction that, like, supports the speed of verification of Sphinx signatures?
72
00:06:20,843 --> 00:06:21,783
Actually, it's not verification.
73
00:06:22,063 --> 00:06:26,083
My implementation is the fastest signing and key generation.
74
00:06:26,183 --> 00:06:26,463
Oh, it's for signing.
75
00:06:26,663 --> 00:06:26,863
Okay.
76
00:06:26,863 --> 00:06:43,343
Yeah. And part of the work that I did there was surveying which performance improvements affect which algorithms the best. It actually turns out that specific optimizations are better for signing in keygen and others are better for verification, which is really useful if we want to do hash-based signatures on Bitcoin.
77
00:06:43,703 --> 00:06:50,743
So around the same time was when Jonas published hash-based signatures for Bitcoin, the sort of paper that he put out with Blockstream.
78
00:06:50,823 --> 00:06:51,323
Yes, yes.
79
00:06:51,323 --> 00:06:59,183
And did you, I mean, I think you had told me that he posted it on Delving or you engaged with comments or something along those lines.
80
00:06:59,183 --> 00:07:03,003
And it probably became pretty clear that you were pretty deep in this research as well.
81
00:07:03,303 --> 00:07:08,943
Well, we riffed on the different ideas for how you'd manage state in a scheme like Shrinks, which we'll talk about that in a bit.
82
00:07:09,023 --> 00:07:10,983
But we riffed on that for a little bit.
83
00:07:11,163 --> 00:07:14,783
I linked him to a couple of my works on hash-based signatures before.
84
00:07:14,783 --> 00:07:20,703
And I think it was through contact with people that Jonas knew.
85
00:07:21,543 --> 00:07:30,503
He talked to me and invited me into a working group with him and some other Blockstream folks to work on shrinks and see how viable we can make it for Bitcoin.
86
00:07:31,163 --> 00:07:31,463
Amazing.
87
00:07:31,823 --> 00:07:36,283
I mean, this is pretty impressive given the fact that, you know, these are all folks who really studied cryptography.
88
00:07:36,463 --> 00:07:36,863
You're a layman.
89
00:07:36,863 --> 00:07:38,003
They're people who inspired me.
90
00:07:38,123 --> 00:07:38,483
Really?
91
00:07:38,583 --> 00:07:39,143
Oh, yeah, absolutely.
92
00:07:39,143 --> 00:07:48,303
It's otherworldly to get to meet all of the famous Bitcoiners and cryptographers and developers that I've read about and read works of for many years.
93
00:07:48,303 --> 00:07:52,483
And to get to actually talk to them and jam on stuff now is incredibly, incredibly flattering.
94
00:07:52,903 --> 00:08:00,323
I imagine if Jonas was here, he would say that he was very impressed with the fact that you did not have a, you know, academic cryptography background.
95
00:08:00,323 --> 00:08:04,563
And you were sort of a layman coming up and really holding your own in these conversations.
96
00:08:04,563 --> 00:08:08,043
So in my opinion, that's sort of equally impressive.
97
00:08:08,043 --> 00:08:24,023
So and I imagine he would agree with me, but we'll see. So, yeah, so I'm I'm curious, you know, was most of your research focused? You've also done some work on isogenies signatures. We're not going to go too far down that rabbit hole today.
98
00:08:24,163 --> 00:08:25,383
It is a hell of a rabbit hole to go down.
99
00:08:25,383
--> 00:08:26,263
It's a hell of a...
100
00:08:26,263 --> 00:08:29,423
We'll have to do a separate isogenies episode at some point.
101
00:08:29,483 --> 00:08:29,723
Anytime.
102
00:08:29,963 --> 00:08:33,483
But the reason why I bring this up is because I'm just curious, you know,
103
00:08:33,703 --> 00:08:37,743
was most of your early research around this time really focused on hash-based signatures?
104
00:08:38,063 --> 00:08:39,023
And if so, why?
105
00:08:39,143 --> 00:08:41,983
Like, why hash-based signatures, in your opinion?
106
00:08:42,903 --> 00:08:47,343
Well, the thing is that even if quantum computers never appear,
107
00:08:47,403 --> 00:08:48,883
hash-based signatures are still a good idea.
108
00:08:49,463 --> 00:08:50,843
That's why I was so interested in them.
109
00:08:51,023 --> 00:08:51,623
Oh, explain.
110
00:08:51,763 --> 00:08:52,363
Please, why?
111
00:08:52,363 --> 00:08:59,563
Well, all the cryptography that Bitcoin relies on today is hinging on a single cryptographic problem.
112
00:09:00,063 --> 00:09:08,743
And if that problem breaks in any way, not just if a quantum computer breaks it, it would be really nice to have something a little more conservative to fall back on.
113
00:09:08,983 --> 00:09:14,443
Something that will help us preserve the integrity of the UTXO set over very large spans of time.
114
00:09:14,903 --> 00:09:20,883
Let's just be specific about the specific problem that you're referring to, which is elliptic curve cryptography potentially being cracked, right?
115
00:09:20,883 --> 00:09:21,303
Precisely.
116
00:09:21,303 --> 00:09:26,943
And I mean, there's in theory, not just quantum that could break this, but, you know, advancements in AI and other things.
117
00:09:27,023 --> 00:09:29,263
I know Ethan Heilman, who I believe is also a co-author.
118
00:09:29,343 --> 00:09:29,543
He is.
119
00:09:29,683 --> 00:09:31,183
Beth talks about this often.
120
00:09:31,443 --> 00:09:31,723
Oh, yeah.
121
00:09:31,963 --> 00:09:38,523
So that was a kind of major incentive for specifically hash-based, though, not isogenies or lattice.
122
00:09:38,923 --> 00:09:41,683
I believe isogenies and lattice-based fulfill a different role.
123
00:09:41,683 --> 00:09:47,103
I see them and other more cutting-edge post-quantum cryptosystems.
124
00:09:47,103 --> 00:09:54,303
And I see those as a more long-term solution rather than hash-based signatures, which fill a very different role.
125
00:09:54,803 --> 00:10:00,923
They are, in a way, a regression because they lose many features that we have with elliptic curve cryptography.
126
00:10:01,123 --> 00:10:08,863
But they give us a feature that no other family of signature schemes give us, which is a more conservative set of assumptions than even Bitcoin itself.
127
00:10:09,563 --> 00:10:11,963
Because it's more conservative than elliptic curve cryptography.
128
00:10:12,163 --> 00:10:12,903
Is that the argument?
129
00:10:12,903 --> 00:10:31,806
It more conservative
than most of Bitcoin existing address formats in a way We can get into that later but basically it has to do We hold it for now Yeah yeah we can get into that Interesting Okay So hash signatures you see is something that I mean what I hearing is
130
00:10:31,806 --> 00:10:39,586
we need hash-based signatures kind of as a backup, you know, in case ECC breaks by some method,
131
00:10:39,586 --> 00:10:43,786
doesn't even matter what, and lattice-based denisogenies are maybe something, you know,
132
00:10:43,866 --> 00:10:49,586
pending research we can add later. What do you think about the argument, you know, adding these
133
00:10:49,586 --> 00:10:54,266
signatures after the fact will be too politically difficult, right? Like, can we do multiple
134
00:10:54,266 --> 00:10:59,066
upgrades to Bitcoin, adding new signature schemes multiple times, or do we only have one shot at
135
00:10:59,066 --> 00:11:07,706
this? It really depends on how the community of Bitcoin is shaped over time. And that's not really
136
00:11:07,706 --> 00:11:12,866
a question I think is answerable today. And I think a lot of it depends upon what we do today.
137
00:11:13,146 --> 00:11:18,866
If we have a conservative hash-based signature scheme in our pocket today or, you know, in the
138
00:11:18,866 --> 00:11:26,886
next few years, then it becomes much easier to argue for more edge, more cutting edge
139
00:11:26,886 --> 00:11:28,986
crypto systems like isogenies, for instance.
140
00:11:29,266 --> 00:11:35,886
Because if the core assumptions of isogeny crypto break, well, it's not such a bad deal
141
00:11:35,886 --> 00:11:37,926
because we have hash-based signatures to fall back on.
142
00:11:37,926 --> 00:11:43,486
We could, for example, construct an address that has two different spending conditions,
143
00:11:43,706 --> 00:11:45,846
one for isogenies and one for hash-based signatures.
144
00:11:46,306 --> 00:11:48,666
And if isogenies break, well, we can fall back to hash-based.
145
00:11:48,866 --> 00:11:52,966
Do you think that hash-based is something that also we can just practically get done faster?
146
00:11:53,126 --> 00:12:01,046
I mean, do you see lattice and isogenies as something that just needs significantly more research time in order to be kind of hardened enough for Bitcoin?
147
00:12:01,506 --> 00:12:03,186
I can't speak to lattices too much.
148
00:12:03,626 --> 00:12:05,226
My understanding of them is somewhat limited.
149
00:12:05,326 --> 00:12:12,146
I can say for sure that more research needs to be done into isogeny cryptography before we could confidently deploy it on Bitcoin.
150
00:12:13,286 --> 00:12:16,386
Although I am such a fan of isogenies that it's hard for me to say that.
151
00:12:16,386 --> 00:12:25,566
Lattices are relatively mature by comparison. They have other problems, which I don't think we should probably get into today. It's a little bit of a tangent.
152
00:12:26,446 --> 00:12:32,566
But isogenes absolutely need more time to bake. And I'm excited to bake those cookies.
153
00:12:32,566 --> 00:12:48,686
When and before we again kind of dive into how the signature scheme actually works, how quickly do you think that from a technical perspective, politics aside, we could get this PQ signature, specifically shrinks, sphinx, some sort of sphinx or hash-based signature?
154
00:12:48,966 --> 00:12:50,886
Yeah. How quickly do you think we could get that done in Bitcoin?
155
00:12:51,886 --> 00:12:53,266
Oh, that's a hard question.
156
00:12:53,926 --> 00:12:58,266
My optimistic side says two years.
157
00:12:58,966 --> 00:12:59,286
Okay.
158
00:12:59,286 --> 00:13:02,286
My pessimistic side says...
159
00:13:02,566 --> 00:13:04,926
they'll be deployed right before quantum computers appear.
160
00:13:05,426 --> 00:13:05,726
Really?
161
00:13:06,106 --> 00:13:07,426
That's my pessimistic estimate.
162
00:13:07,946 --> 00:13:09,126
Oh, man.
163
00:13:09,266 --> 00:13:10,966
OK, so whenever that may be, we'll see.
164
00:13:11,106 --> 00:13:16,226
Basically, you're saying that there's a possibility that politically we'll just like wait until the very last second.
165
00:13:16,646 --> 00:13:17,386
Could very well happen.
166
00:13:17,566 --> 00:13:18,706
Could very well happen.
167
00:13:18,806 --> 00:13:19,146
We'll see.
168
00:13:19,246 --> 00:13:19,366
Yeah.
169
00:13:19,826 --> 00:13:20,126
All right.
170
00:13:20,226 --> 00:13:31,566
So basically, it sounds like your argument is that Sphinx makes sense because or some sort of Sphinx-based signature scheme makes sense because they're hash-based and we kind of already trust hashes in Bitcoin.
171
00:13:31,566 --> 00:13:33,766
Is that a fair argument?
172
00:13:34,986 --> 00:13:35,606
Yes, yes.
173
00:13:35,726 --> 00:13:39,486
The community of Bitcoin is very cryptographically conservative.
174
00:13:39,766 --> 00:13:42,226
I think Benedict also said this on your podcast with him.
175
00:13:42,386 --> 00:13:45,466
I watched that and I think it was a very astute observation.
176
00:13:46,646 --> 00:13:47,886
And I would agree with it.
177
00:13:48,266 --> 00:13:52,466
Yeah, the Bitcoin community is very conservative in their trusting of cryptographic assumptions.
178
00:13:53,486 --> 00:13:57,226
And you can very easily see that from the skepticism of lattice-based cryptography,
179
00:13:57,326 --> 00:13:59,806
which the rest of the world has happily adopted already.
180
00:13:59,806 --> 00:14:18,646
Okay, so now we'll kind of get into how this all works. Again, when this comes out, I think the bit will probably just be out. That's at least the plan. I'm wondering if you could just sort of first contextualize, how would you describe the relationship between hashes and Sphinx, right? Like, what is Sphinx and like, what does that really mean?
181
00:14:18,646 --> 00:14:34,666
Well, Sphinx is a signature scheme. It's called stateless because it is kind of like how Schnorr can be used in that you can generate a key pair, sign many
different messages, and you don't need to keep track of anything.
182
00:14:34,766 --> 00:14:47,166
All you need is the private key and you can sign any message, produce a signature, and a verifier can take that signature and your public key and verify that the signature was definitely 100% authored by the person who holds the secret key.
183
00:14:47,166 --> 00:14:51,606
And it does so using only one cryptographic primitive, which is a hash function.
184
00:14:52,166 --> 00:14:59,786
So basically, it is like some method of signing that only uses hashes as it's sort of, is this the right word?
185
00:14:59,866 --> 00:15:01,206
Like cipher, is that the right word?
186
00:15:01,286 --> 00:15:01,986
I don't know what you would call it.
187
00:15:01,986 --> 00:15:03,346
Cipher is a way of encrypting data.
188
00:15:03,586 --> 00:15:09,406
This is a way of hashing data by essentially passing it through a one-way door that it can't come back from.
189
00:15:09,706 --> 00:15:12,906
Okay, but the hashing is really where like the magic math happens.
190
00:15:12,906 --> 00:15:15,906
And the signature is sort of more like the combination of magical,
191
00:15:16,066 --> 00:15:20,926
mathematic things that we use specifically to execute this action called signing things.
192
00:15:21,146 --> 00:15:26,666
The fundamental idea of hash-based signatures is always to reveal a very specific set of pre-images.
193
00:15:27,486 --> 00:15:30,606
A pre-image, by the way, is just the input to a hash function.
194
00:15:31,066 --> 00:15:42,489
So you have a hash which is the output of running a hash function on a pre So you take a certain set of pre and maybe also a certain set of other hashes
195
00:15:42,649 --> 00:15:46,289
and you just kind of concatenate them all together, and that forms a signature.
196
00:15:46,829 --> 00:15:50,489
And just for clarity, so Sphinx Plus is used all over the internet, right?
197
00:15:50,529 --> 00:15:52,369
This is not a Bitcoin-specific thing.
198
00:15:52,489 --> 00:15:56,449
This is not a, you know, this is not something that was created for digital assets.
199
00:15:56,449 --> 00:16:02,149
I think, was it Daniel J. Bernstein who created Sphinx Plus, the signing scheme?
200
00:16:02,509 --> 00:16:04,089
And a number of others, yeah.
201
00:16:04,409 --> 00:16:04,529
Yeah.
202
00:16:04,649 --> 00:16:12,829
And I think, tell me if I'm getting this right, that the reason he created Sphinx Plus was he wanted to create a hash-based signature, essentially, that was stateless.
203
00:16:12,949 --> 00:16:16,409
Like, that was the intention behind it, is sort of roughly my understanding.
204
00:16:16,509 --> 00:16:22,048
Is that why Bitcoiners immediately went to Sphinx Plus as a potential PQ option?
205
00:16:22,249 --> 00:16:23,829
Is this sort of statelessness factor?
206
00:16:23,829 --> 00:16:26,168
Well, Sphinx has been around since 2014, I believe.
207
00:16:26,168 --> 00:16:32,309
And it came about mostly as an evolution of prior hash-based signature schemes like XMSS.
208
00:16:32,989 --> 00:16:47,969
And by combining them together in a specific way, Bernstein and Holsing and a number of other co-authors figured out that you could create a hash-based key pair that has such great signing capacity to be effectively stateless.
209
00:16:48,769 --> 00:16:53,048
There's actually no such thing on a technical, if you want to get into the specifics,
210
00:16:53,309 --> 00:16:56,409
there's technically no such thing as a stateless hash-based signature scheme.
211
00:16:56,889 --> 00:17:02,109
There's just hash-based signature schemes that allow you to make so many signatures as to be effectively stateless.
212
00:17:02,809 --> 00:17:04,708
So, and that's just like a probabilistic thing, right?
213
00:17:04,708 --> 00:17:07,988
You have so many signature, the signature budget.
214
00:17:08,129 --> 00:17:10,609
Jonas came on the show and described this term, the signature budget,
215
00:17:10,689 --> 00:17:14,389
which is you can use like this sort of not infinite by definition,
216
00:17:14,389 --> 00:17:18,049
but so many signatures that you don't run out of them, essentially.
217
00:17:18,269 --> 00:17:21,389
Exactly. It's kind of like, and I've used this analogy with Kleenexes before,
218
00:17:21,389 --> 00:17:27,289
where you could think of a stateful hash-based signature scheme as a set of Kleenexes.
219
00:17:27,529 --> 00:17:31,149
And each time you want to use a signature, you're just taking a Kleenex, blowing your nose,
220
00:17:31,289 --> 00:17:33,029
and you're supposed to throw the Kleenex away.
221
00:17:33,208 --> 00:17:36,189
If you accidentally reuse the same Kleenex, you explode.
222
00:17:36,849 --> 00:17:41,309
And each signature inside, each of these one-time signatures,
223
00:17:41,869 --> 00:17:45,448
What kind of signature, what are the mini signatures inside, right?
224
00:17:45,468 --> 00:17:49,629
So if you have Sphinx and it's made up of this like huge ton of number of signatures,
225
00:17:49,809 --> 00:17:51,549
what are the little signatures inside called?
226
00:17:51,728 --> 00:17:54,349
Well, there's a number of different subschemes in Sphinx.
227
00:17:54,609 --> 00:17:57,849
It depends how deep you want to go into the scheme here.
228
00:17:58,008 --> 00:17:58,309
Okay.
229
00:17:58,829 --> 00:18:01,649
Well, let's do a mini review and then maybe we'll get deeper in a moment.
230
00:18:01,889 --> 00:18:02,869
But I think it's what?
231
00:18:02,988 --> 00:18:04,248
It's Watts?
232
00:18:04,849 --> 00:18:07,909
There's Watts, which stands for Winternet's One-Time Signature.
233
00:18:08,208 --> 00:18:08,448
Okay.
234
00:18:08,448 --> 00:18:12,389
There's FORES, which stands for Forest of Random Subsets.
235
00:18:13,549 --> 00:18:25,429
And the Winternitz key pairs, those one-time signature key pairs, they are composed into a many-time signature scheme called XMSS, which stands for Extended Merkle Signature Scheme.
236
00:18:25,809 -->
00:18:34,988
So it's sort of a combination of these three schemes, which we might dive into in a little bit more depth, that sort of makes up this Sphinx Plus signature scheme created by DJB.
237
00:18:34,988 --> 00:18:37,629
The nice thing about these signature schemes is exactly that.
238
00:18:37,629 --> 00:18:39,429
They're made of a bunch of small building blocks.
239
00:18:39,589 --> 00:18:45,169
And if you can understand each individual building block, then it becomes much easier to understand the whole as they're put together.
240
00:18:45,629 --> 00:18:52,948
Can you quickly TLDR why this statelessness feature is so important, right, for Bitcoin specifically?
241
00:18:52,948 --> 00:19:02,789
Why do we care about signatures being stateless, meaning you have an effectively limitless number of signatures that you can use versus not?
242
00:19:03,549 --> 00:19:05,529
Well, it's beyond Bitcoin even.
243
00:19:05,529 --> 00:19:07,569
tracking state
244
00:19:07,569 --> 00:19:09,488
even just a single number
245
00:19:09,488 --> 00:19:10,309
per key pair
246
00:19:10,309 --> 00:19:11,069
just a single
247
00:19:11,069 --> 00:19:11,708
counter
248
00:19:11,708 --> 00:19:12,589
that increments
249
00:19:12,589 --> 00:19:13,809
that's basically
250
00:19:13,809 --> 00:19:14,748
all you need to do
251
00:19:14,748 --> 00:19:15,649
and even doing that
252
00:19:15,649 --> 00:19:16,488
is very hard
253
00:19:16,488 --> 00:19:18,529
for classical systems
254
00:19:18,529 --> 00:19:19,428
Web 2 systems
255
00:19:19,428 --> 00:19:20,228
Bitcoin systems
256
00:19:20,228 --> 00:19:21,228
it's just a hard problem
257
00:19:21,228 --> 00:19:21,609
in general
258
00:19:21,609 --> 00:19:21,849
because
259
00:19:21,849 --> 00:19:22,649
because too many things
260
00:19:22,649 --> 00:19:23,269
can go wrong
261
00:19:23,269 --> 00:19:23,769
basically
262
00:19:23,769 --> 00:19:24,928
if you like miscount
263
00:19:24,928 --> 00:19:25,448
you're screwed
264
00:19:25,448 --> 00:19:25,948
kind of thing
265
00:19:25,948 --> 00:19:26,708
like imagine
266
00:19:26,708 --> 00:19:27,448
if Cosmic Ray
267
00:19:27,448 --> 00:19:28,149
just comes and flips
268
00:19:28,149 --> 00:19:28,789
the big screwed
269
00:19:28,789 --> 00:19:30,488
imagine if you were to
270
00:19:30,488 --> 00:19:32,529
if you were to have
271
00:19:32,529 --> 00:19:33,529
a backup of your computer
272
00:19:33,529 --> 00:19:35,169
and that
273
00:19:35,529 --> 00:19:37,549
Backup contains that state counter.
274
00:19:38,208 --> 00:19:40,669
But on your real computer, it's incremented past that by now.
275
00:19:40,829 --> 00:19:43,649
If you restore that backup, the counter resets to where it was before.
276
00:19:43,869 --> 00:19:45,809
You end up reusing a Kleenex and you explode.
277
00:19:46,309 --> 00:19:55,809
Well, and that's actually, I think, a really important key point to explain here, too, is why, you know, losing count of the signatures that you've used is so problematic.
278
00:19:56,889 --> 00:20:02,248
Can you maybe explain a little bit why, like, you explode if you accidentally reuse a signature?
279
00:20:02,529 --> 00:20:02,829
Exactly.
280
00:20:02,829 --> 00:20:13,589
Well, the way that Winternet signatures work on a simple level is basically you reveal a certain set of pre-images that are along a set of hash chains.
281
00:20:13,929 --> 00:20:18,688
If you reveal one set of pre-images in this hash chain, that's fine.
282
00:20:19,069 --> 00:20:22,669
The adversary just sees those particular points in each chain.
283
00:20:22,669 --> 00:20:32,869
But if you reveal a different set of pre-images, then the adversary can see enough pre-images to be able to create a signature.
284
00:20:33,029 --> 00:20:35,649
Because remember, every hash-based signature is just a set of pre-images.
285
00:20:35,829 --> 00:20:38,448
And if you know the right pre-images, you can forge a signature.
286
00:20:39,188 --> 00:20:42,269
So basically, I mean, you kind of de facto leak your private key.
287
00:20:42,369 --> 00:20:48,988
You can do signature forging if you lose count or if something goes wrong accidentally with stateful signatures.
288
00:20:49,149 --> 00:20:49,389
Exactly.
289
00:20:49,389 --> 00:20:49,968
Exactly.
290
00:20:50,011 --> 00:20:56,571
OK, so OK, so what are the downsides of stateless signatures?
291
00:20:56,731 --> 00:21:01,211
We've kind of covered why stateful signatures kind of make everyone in Bitcoin have the heebie-jeebies.
292
00:21:01,391 --> 00:21:03,451
Everyone's kind of scared of stateful signatures, right?
293
00:21:03,471 --> 00:21:05,291
You say we're going to use stateful signatures.
294
00:21:05,411 --> 00:21:07,971
Everyone kind of freaks out because of this forging risk.
295
00:21:08,431 --> 00:21:12,171
But what are the downsides of stateless signatures or Sphinx Plus specifically?
296
00:21:12,171 --> 00:21:18,071
Major one is the major one that Bitcoiners are specifically sensitive to is, of course, the size of the signatures.
297
00:21:18,071 --> 00:21:33,511
I believe the smallest parameter set that was standardized by NIST for Sphinx was, I think, 7,656 bytes, if I remember correctly.
298
00:21:33,691 --> 00:21:36,531
No, 7,856 bytes per signature.
299
00:21:37,071 --> 00:21:42,591
Okay, which is like about how much bigger than current electric curve signatures?
300
00:21:43,151 --> 00:21:44,611
About a factor of 100.
301
00:21:44,911 --> 00:21:45,491
Oh, wow.
302
00:21:45,731 --> 00:21:46,011
Yeah.
303
00:21:46,291 --> 00:21:46,811
Okay.
304
00:21:46,811 --> 00:21:48,351
The Schnorr is like 64 bytes.
305
00:21:48,451 --> 00:21:50,271
Maybe the fee maxis will like this.
306
00:21:50,431 --> 00:21:55,391
You know, the people who just want to drive up fees and, you know, save the security budget.
307
00:21:55,511 --> 00:21:56,611
They'll love Sphinx Plus.
308
00:21:56,631 --> 00:21:58,771
They probably love Sphinx Plus signatures.
309
00:21:59,411 --> 00:22:00,071
Oh, 100%.
310
00:22:00,071 --> 00:22:04,671
But everybody else, I guess, who wants to keep Bitcoin nice and cheap to use, this is a big problem.
311
00:22:04,671 --> 00:22:05,011
Exactly.
312
00:22:05,011 --> 00:22:18,331
Absent some massive witness discount, which I think would be very unpalatable right now, I don't think those particular size of signatures will ever become common use on Bitcoin.
313
00:22:18,831 --> 00:22:26,951
Do you think that that was considered a deal breaker, basically, for Sphinx Plus or just like a concern that somebody was like, OK, some Jonas, you, we need to figure this out.
314
00:22:27,011 --> 00:22:32,571
We need to find a way to optimize this thing and bring the size down because ultimately Hashbase is what we want.
315
00:22:32,931 --> 00:22:34,291
How are we going to fix this size problem?
316
00:22:34,291 --> 00:22:43,231
There have been many ways. There's generally two classes of improvements that you can do to Sphinx in order to make its signature smaller.
317
00:22:44,011 --> 00:22:50,171
Number one is you can change the algorithms. So you can change the signing algorithms, which modifies the format of the signature.
318
00:22:51,531 --> 00:22:56,131
You can use, for example, Watts plus C, which is a variant.
319
00:22:56,131 --> 00:22:56,171
That's smaller?
320
00:22:56,591 --> 00:22:59,091
Yes. And actually, that is a scheme that we use in Shrinks.
321
00:22:59,991 --> 00:23:05,571
You could use FOURS plus C, which stands for FOURS with compression.
322
00:23:06,231 --> 00:23:09,151
You could use POURS or POURS plus FP.
323
00:23:10,231 --> 00:23:11,371
I can't remember the acronym.
324
00:23:11,511 --> 00:23:14,151
I think it's pseudorandom hash to obtain random subsets.
325
00:23:14,591 --> 00:23:16,291
This is a replacement for FOURS.
326
00:23:17,071 --> 00:23:22,631
Anyway, you can swap out the different signature algorithms, and this gives you smaller signatures sometimes.
327
00:23:22,631 --> 00:23:31,751
So one of the ways to optimize Sphinx Plus would be just finding kind of more compressed versions of these mini signatures kind of embedded within the Sphinx Plus signature team.
328
00:23:31,751 --> 00:23:33,531
Exactly. You're swapping out building blocks.
329
00:23:33,951 --> 00:23:35,771
And some of those building blocks have different tradeoffs.
330
00:23:36,111 --> 00:23:39,991
Like they might have different security assumptions or they might make signing slower.
331
00:23:40,131 --> 00:23:43,271
They might make verification slower or faster in some cases.
332
00:23:43,671 --> 00:23:49,191
The other way of reducing the size of a Sphinx signature is to change the parameter set.
333
00:23:49,751 --> 00:23:52,571
And this is something that we do in Shrinks.
334
00:23:52,631 --> 00:23:57,811
and it's a hot topic in the classical cryptography world
335
00:23:57,811 --> 00:24:01,411
because in order to do this, you have to make trade-offs.
336
00:24:01,811 --> 00:24:03,911
There's no easy free lunch here.
337
00:24:05,271 --> 00:24:08,091
The parameters of Sphinx are extremely tunable
338
00:24:08,091 --> 00:24:10,551
and you can optimize them for all kinds of use cases.
339
00:24:11,351 --> 00:24:13,471
You can make signing really expensive,
340
00:24:13,751 --> 00:24:15,171
but verification really cheap.
341
00:24:15,531 --> 00:24:17,771
You can make key generation really fast,
342
00:24:17,971 --> 00:24:19,191
but a signature is very large
343
00:24:19,191 --> 00:24:21,051
and you can have all these different trade-off dimensions.
344
00:24:21,051 --> 00:24:43,531
We optimized the parameter set that we're choosing for shrinks such that we trade off a little bit of security budget where the default Sphinx parameter sets allow you to make up to 2 to the 64 signatures, 2 to the power of 64 signatures, before you drop below this specific security threshold of 128 bits.
345
00:24:44,231 --> 00:24:54,571
So instead of a probabilistically limitless number of signatures to use, which is the case with Sphinx Plus, there is some maybe slightly lower limit.
346
00:24:54,711 --> 00:24:55,011
Exactly.
347
00:24:55,171 --> 00:24:55,491
Is that fair?
348
00:24:55,591 --> 00:24:57,911
But still pretty, you know, still pretty abundant.
349
00:24:57,911 --> 00:25:03,871
You would need to sign repeatedly for more than 100 years in order to exhaust the budget that we allow for shrinks.
350
00:25:04,031 --> 00:25:04,151
Okay.
351
00:25:04,271 --> 00:25:06,911
That's pretty, like, that seems very reasonable.
352
00:25:07,071 --> 00:25:07,671
Yeah, exactly.
353
00:25:07,831 --> 00:25:08,611
And it depends on the implementation.
354
00:25:08,611 --> 00:25:10,291
You shouldn't be reusing your keys anyway, guys.
355
00:25:10,591 --> 00:25:11,011
Exactly.
356
00:25:11,011 --> 00:25:24,911
And this is a more than sufficient security budget, we think, for Bitcoiners, even if your signing key is exposed to an attacker that can just repeatedly query it over and over again.
357
00:25:25,371 --> 00:25:36,151
Now, the last time I looked at this, when I spoke to Jonas, when I had Jonas on the pod, he talked about having a backup, like full, probabilistically limitless Sphinx option involved in this situation.
358
00:25:36,151 --> 00:25:37,091
Is that still the case?
359
00:25:37,091 --> 00:25:43,231
Yes. And maybe now this is a good time to start transitioning towards how shrinks work specifically, because we've talked a little bit about sphinx.
360
00:25:43,471 --> 00:25:43,611
Yeah.
361
00:25:43,971 --> 00:25:46,271
And now we can put this in the context of shrinks.
362
00:25:46,451 --> 00:25:48,351
Right. Which is the proposed signature.
363
00:25:48,351 --> 00:25:48,671
Exactly.
364
00:25:48,911 --> 00:25:50,711
A little confusing, but we're keeping track.
365
00:25:51,051 --> 00:25:53,151
Shrinks stands for shrunken sphinx.
366
00:25:53,851 --> 00:26:08,028
And the original idea of this is of course Jonas Nix and Mikhail Kudinov This is not my invention I just describing
something that they created here So the idea with Shrinks is okay we have these stateful signatures and they really compact and they really efficient
367
00:26:08,728 --> 00:26:10,588
But damn it, state is so annoying.
368
00:26:10,588 --> 00:26:16,308
So what if we also attach a Sphinx key to a stateful key,
369
00:26:16,368 --> 00:26:19,908
and you just kind of combine them together into one unified scheme?
370
00:26:21,148 --> 00:26:22,968
We call this a composite scheme.
371
00:26:23,368 --> 00:26:26,788
Is this something that would be, like, automated, essentially, this backup,
372
00:26:26,788 --> 00:26:30,848
so that if you run out of your signature budget on the stateful side,
373
00:26:31,048 --> 00:26:33,648
then Sphinx is there to catch you, basically?
374
00:26:33,948 --> 00:26:37,548
Or do you have to know when to pull the Sphinx parachute?
375
00:26:37,948 --> 00:26:39,148
From the user's perspective?
376
00:26:39,228 --> 00:26:43,388
From the user's or the wallet's, somebody's perspective, from someone's perspective, anyone's.
377
00:26:43,408 --> 00:26:46,368
From the user's perspective, it would be handled entirely automatically.
378
00:26:46,608 --> 00:26:47,128
By the wallet.
379
00:26:47,308 --> 00:26:47,888
By the wallet.
380
00:26:47,888 --> 00:26:57,548
This would be a responsibility of wallet developers to be able to use the correct state for a specific key pair.
381
00:26:57,968 --> 00:27:00,288
And I think this is the biggest tradeoff with Shrinks.
382
00:27:00,968 --> 00:27:07,168
Managing that state is very sensitive because if you reuse the state, like I said with the Kleenexes, you kind of expose your secret key.
383
00:27:07,688 --> 00:27:11,008
So you're trusting wallet developers not to screw this up.
384
00:27:11,068 --> 00:27:14,268
You have to be really careful now about the wallets that you're using.
385
00:27:14,268 --> 00:27:19,448
That's the major tradeoff is that if your wallet developer screws this up, you could lose your money.
386
00:27:19,928 --> 00:27:24,328
Yes. And I foresee a little bit of a Wild West in the early stages of shrinks adoption.
387
00:27:24,808 --> 00:27:28,988
However, my hope in the longer term is that we don't need to use shrinks at all.
388
00:27:29,048 --> 00:27:32,988
And instead, we can use a more fancy signature scheme like based on isogenies or something.
389
00:27:33,128 --> 00:27:35,208
And shrinks can remain in our pocket as a fallback.
390
00:27:35,208 --> 00:27:47,248
Do you think the risk of wallet developers screwing up is effectively mitigated by the fact that you're going to have a pretty substantive budget, like signature budget for the stateful side as well?
391
00:27:47,748 --> 00:27:57,148
Well, actually, there's a little bit of nuance to that because the stateful side has a variable number of signatures in its ammunition belt.
392
00:27:58,168 --> 00:28:03,168
The stateful side always has like a fixed capacity, a signing budget, right?
393
00:28:03,168 --> 00:28:09,528
maybe we should break it down here so the stateful side uh requires you to maintain a specific
394
00:28:09,528 --> 00:28:13,528
counter number which is basically just a tracker for the number of signatures that you've created
395
00:28:13,528 --> 00:28:20,348
the state less side does not require that at all it can be used at any time by any software
396
00:28:20,348 --> 00:28:27,888
without having to track state and the stateful side depending on how uh the key is generated
397
00:28:27,888 --> 00:28:32,408
initially it may have a different number of signatures in its ammo belt so it could go from
398
00:28:32,408 --> 00:28:35,808
anywhere from $255 upwards to a million.
399
00:28:36,368 --> 00:28:39,468
Oh, so the signature budget is not fixed, basically, with Shrinks.
400
00:28:39,648 --> 00:28:43,488
It depends on what factors, just how developers choose to configure it?
401
00:28:43,808 --> 00:28:44,168
Exactly.
402
00:28:44,368 --> 00:28:47,148
And there are different use cases for different signature budgets.
403
00:28:47,628 --> 00:28:53,688
For example, the average end-user wallet only really makes maybe one or two signatures per
404
00:28:53,688 --> 00:28:54,548
key pair at most.
405
00:28:55,608 --> 00:29:01,208
And this is where we can make an optimization that Jonas pointed out in his first Shrinks
406
00:29:01,208 --> 00:29:08,588
proposal, which is you can reduce the signing budget of a key in exchange for making signatures
407
00:29:08,588 --> 00:29:14,148
much smaller. Well, I was going to say, is there going to be incentive for wallets to use the
408
00:29:14,148 --> 00:29:19,288
smallest possible signature budget because it'll make the product cheaper for users? Absolutely.
409
00:29:19,788 --> 00:29:24,628
And will users understand that trade off? That's something that it's going to be a matter of
410
00:29:24,628 --> 00:29:29,388
education. And I think that'll be a complicated but approachable topic, which shrinks. Fingers
411
00:29:29,388 --> 00:29:30,028
I hope so.
412
00:29:30,208 --> 00:29:30,368
Yeah.
413
00:29:30,748 --> 00:29:37,448
But the other nice thing about this optimization that Jonas suggested, it's called unbalanced XMSS, by the way.
414
00:29:37,968 --> 00:29:44,748
Using an unbalanced XMSS scheme on the stateful side makes signatures grow every time you reuse a key.
415
00:29:45,088 --> 00:29:48,088
So it actually disincentivizes address reuse.
416
00:29:48,448 --> 00:29:48,888
Whoa.
417
00:29:49,168 --> 00:29:49,768
I know, right?
418
00:29:49,908 --> 00:29:51,428
Jonas, good one.
419
00:29:53,008 --> 00:29:54,148
Okay, I like that.
420
00:29:54,148 --> 00:30:02,548
OK, so that was that was an intentional fix to solve this incentive problem, basically, of like lowering the signature budget as a way to make things cheaper.
421
00:30:02,868 --> 00:30:04,308
I would say it's a happy byproduct.
422
00:30:04,448 --> 00:30:06,248
I'm not sure if it was Jonas's intent or not.
423
00:30:06,288 -->
00:30:07,128
He would have to answer that.
424
00:30:07,348 --> 00:30:07,548
OK.
425
00:30:07,648 --> 00:30:08,988
But it is certainly a happy accident.
426
00:30:08,988 --> 00:30:11,368
What was the other reason to what would be another reason to do that?
427
00:30:11,548 --> 00:30:12,188
Smaller signatures.
428
00:30:12,388 --> 00:30:14,528
Just just creating smaller signatures in general.
429
00:30:14,688 --> 00:30:14,948
Exactly.
430
00:30:15,408 --> 00:30:15,848
Interesting.
431
00:30:16,088 --> 00:30:20,688
Well, that's actually a really good opportunity for us to move into the whiteboarding section of this.
432
00:30:20,688 --> 00:30:24,808
right? But now we're talking about Merkle trees and like weird Merkle tree configurations.
433
00:30:25,028 --> 00:30:27,228
Yes. This is where visualization will start to help quite a bit.
434
00:30:27,228 --> 00:30:32,288
This is where visualization is helpful. Okay. So maybe it's best to start with the
435
00:30:32,288 --> 00:30:33,568
Shrink's public key format.
436
00:30:33,968 --> 00:30:35,528
The Shrink's public key format?
437
00:30:35,708 --> 00:30:35,968
Yes.
438
00:30:35,988 --> 00:30:41,128
Okay. I was going to say, is there anything that we want to whiteboard around Sphinx Plus
439
00:30:41,128 --> 00:30:44,348
before we do that? Or do we feel...
440
00:30:44,348 --> 00:30:49,048
Well, we can dive into the stateless Sphinx part of it from the Shrink's public key.
441
00:30:49,228 --> 00:30:50,008
Okay. Great.
442
00:30:50,008 --> 00:30:52,788
Because it starts us off at the highest level, and then we can descend from there.
443
00:30:52,948 --> 00:30:54,908
Okay, so I'm just going to hold this.
444
00:30:55,788 --> 00:30:58,708
So the Shrink's public key is basically three different elements.
445
00:30:59,828 --> 00:31:01,988
And I'm going to just block them out here.
446
00:31:07,888 --> 00:31:20,044
So this is the Shrink public key I just going to write PK up here It is 48 bytes total in size The first element is called pk
447
00:31:20,044 --> 00:31:20,484
seed.
448
00:31:23,224 --> 00:31:24,264
Oh gosh.
449
00:31:25,264 --> 00:31:25,764
That works.
450
00:31:25,764 --> 00:31:28,004
The second element is called
451
00:31:28,004 --> 00:31:29,684
the stateless root.
452
00:31:32,424 --> 00:31:33,944
And the third element
453
00:31:33,944 --> 00:31:36,084
is called the state
454
00:31:36,084 --> 00:31:37,624
full root.
455
00:31:38,484 --> 00:31:38,784
Okay.
456
00:31:40,004 --> 00:31:45,744
This is basically just 16 random bytes.
457
00:31:46,124 --> 00:31:46,464
Okay.
458
00:31:46,644 --> 00:31:48,084
Generated from a secure RNG.
459
00:31:48,504 --> 00:31:52,044
And just for clarity, so these are like components of the public?
460
00:31:52,124 --> 00:31:54,124
How would you describe each of these three things?
461
00:31:54,244 --> 00:31:55,684
What are each of these three things?
462
00:31:56,064 --> 00:31:58,084
Each of them is just a 16-byte hash.
463
00:31:58,724 --> 00:31:59,884
Or not a hash, I should say.
464
00:31:59,944 --> 00:32:01,244
It's a 16-byte value.
465
00:32:09,244 --> 00:32:09,684
Okay.
466
00:32:10,004 --> 00:32:24,844
So PK seed is a public but randomly generated byte string, which is used to randomize all of the hash function evaluations in the entire scheme.
467
00:32:25,344 --> 00:32:33,424
And this is to distinguish hash function evaluations for one public key from hash valuations in a different public key.
468
00:32:33,704 --> 00:32:34,064
Okay.
469
00:32:34,224 --> 00:32:39,844
So that means if I'm verifying a signature with my public key and I run the exact same
470
00:32:39,844 --> 00:32:45,864
verification scheme on a signature for my public key, it's going to run completely differently
471
00:32:45,864 --> 00:32:49,164
than if I did it for your public key because you're going to have a completely different PK seed.
472
00:32:49,464 --> 00:32:49,804
Okay.
473
00:32:49,984 --> 00:32:50,364
All right.
474
00:32:50,444 --> 00:32:50,764
Okay.
475
00:32:50,824 --> 00:32:51,384
I'm with you.
476
00:32:51,524 --> 00:32:51,684
Yeah.
477
00:32:52,024 --> 00:32:52,604
SL root.
478
00:32:52,764 --> 00:32:52,964
Yes.
479
00:32:52,964 --> 00:32:53,824
Stateless root.
480
00:32:54,084 --> 00:32:59,664
This is basically a Sphinx hub key.
481
00:33:00,884 --> 00:33:01,484
Okay.
482
00:33:02,384 --> 00:33:08,884
So we use specifically the NIST standardized version of Sphinx called SLHDSA.
483
00:33:09,584 --> 00:33:12,164
We don't use the same parameter set, though.
484
00:33:13,004 --> 00:33:14,524
Meaning signature budget, right?
485
00:33:14,664 --> 00:33:16,284
I mean, is that what we mean by parameter set?
486
00:33:16,404 --> 00:33:16,524
Okay.
487
00:33:16,724 --> 00:33:21,344
Yes, we have a different parameter set, which has different verification costs and signing costs.
488
00:33:21,344 --> 00:33:23,184
We try to match it to the standards.
489
00:33:23,704 --> 00:33:27,604
But ultimately, the main trade-off that we make is that the signature budget is much lower.
490
00:33:27,944 --> 00:33:31,344
It goes from 2 to the 64 down to 2 to the 40.
491
00:33:31,484 --> 00:33:33,344
Okay. All right. I'm with you.
492
00:33:34,264 --> 00:33:42,144
Stateful root is a FXMSS pub key.
493
00:33:43,144 --> 00:33:44,044
All right.
494
00:33:46,284 --> 00:33:48,284
What does that mean? FXMS?
495
00:33:48,284 --> 00:33:58,864
Yes. So when Jonas and Mikhail first proposed shrinks, they proposed using a slightly different format for this key.
496
00:33:58,864 --> 00:34:04,604
And instead of using FXMSS at the time, they proposed using something called unbalanced XMSS.
497
00:34:05,544 --> 00:34:11,444
This one here, FXMSS, stands for Flexible Extended Merkle Signature Scheme.
498
00:34:12,064 --> 00:34:15,364
The flexible part we'll get to in a little bit.
499
00:34:15,764 --> 00:34:18,044
We should talk about the stateless part first.
500
00:34:19,284 --> 00:34:23,224
The stateless part is just, as I said, stock sphinx,
501
00:34:24,504 --> 00:34:28,004
MIST standardized with the same algorithms but a different parameter set.
502
00:34:28,864 --> 00:34:32,624
And it is essentially the root of a Merkle tree.
503
00:34:39,024 --> 00:34:46,544
Each of these little leaves here, in here, in here, in here, those are the hashes of Winternet's public keys.
504
00:34:46,944 --> 00:34:47,344
Okay.
505
00:34:48,804 --> 00:34:49,404
Winternet's.
506
00:34:49,864 --> 00:34:51,644
W-O-T-S plus.
507
00:34:51,984 --> 00:34:53,724
That's the first time I ever saw it.
508
00:34:54,504 --> 00:34:57,544
Winternet's one-time signatures, which we do use in Bitcoin.
509
00:34:57,544 --> 00:35:00,544
We use Winternet's one-time signatures in other parts of Bitcoin or no?
510
00:35:01,104 --> 00:35:01,944
Am I inventing that?
511
00:35:02,004 --> 00:35:03,804
I think maybe Bitvm uses it or something.
512
00:35:03,884 --> 00:35:04,524
Does that sound right?
513
00:35:04,764 --> 00:35:10,744
I believe I was talking to someone the other day who mentioned that Bitvm uses Lamport signatures.
514
00:35:11,044 --> 00:35:11,664
Lamport, excuse me.
515
00:35:11,684 --> 00:35:12,644
I'm not 100% sure.
516
00:35:12,864 --> 00:35:13,184
My bad.
517
00:35:13,244 --> 00:35:13,864
No, I think you're right.
518
00:35:13,944 --> 00:35:14,864
I think I'm confusing that.
519
00:35:14,964 --> 00:35:15,124
Okay.
520
00:35:15,644 --> 00:35:16,004
All right.
521
00:35:16,384 --> 00:35:16,804
But yes.
522
00:35:17,364 --> 00:35:24,864
And the thing about these Winternet's keys is they actually sign other Merkle trees.
523
00:35:24,864 --> 00:35:25,304
Okay.
524
00:35:27,544 --> 00:35:35,444
they sign other merkle trees yes which in that context means what right i mean you're not sending
525
00:35:35,444 --> 00:35:40,464
money right so what does it mean to sign a merkle tree these are essentially like um do you know how
526
00:35:40,464 --> 00:35:47,764
tls certificates work at all no winternet's keys here at this level are used to certify the
527
00:35:47,764 --> 00:35:54,544
authenticity of this lower level tree okay and the same thing is true for for this one and for
528
00:35:54,544 --> 00:36:01,404
this one, these each sign their own Merkle trees. But the important part here is that these signatures
529
00:36:01,404 --> 00:36:07,144
here, here, and here don't need to be created until they're needed. Okay, so this is another
530
00:36:07,144 --> 00:36:12,624
sort of way, like it's like another efficiency factor or feature. Is that fair? Yeah, yeah. The
531
00:36:12,624 --> 00:36:19,144
key observation is that if you were to just generate a very, very large Merkle tree, it would
532
00:36:19,144 --> 00:36:20,324
be very expensive to do.
533
00:36:21,124 --> 00:36:33,020
And using this construction you only need to generate the merkle trees that you need So this one yeah this one does the same thing and signs you know another set of Merkle trees down below it
534
00:36:33,220 --> 00:36:39,520
And just for clarity, so this extended tree sort of represents all of the multiple signatures that
535
00:36:39,520 --> 00:36:44,020
you can use. So kind of going back to the statelessness, right, the signature budget
536
00:36:44,020 --> 00:36:48,980
issue, these are sort of representations of all of the different signatures that would need to be
537
00:36:48,980 --> 00:36:52,740
used over time in order for you to run out of signatures, essentially. Is that right?
538
00:36:53,320 --> 00:36:57,700
Close. There is one final stage that I haven't talked about yet, which is at the very bottom,
539
00:36:58,160 --> 00:37:04,540
after a number of layers in this so-called hyper tree, you get to the bottom.
540
00:37:04,540 --> 00:37:06,460
Hyper tree being a tree of Merkle trees.
541
00:37:06,620 --> 00:37:13,000
Exactly. It's a tree of XMSS trees, to be more specific. This scheme where you have a bunch of
542
00:37:13,000 --> 00:37:16,660
Winternitz keys at the leaves of a Merkle tree, that is XMSS.
543
00:37:17,060 --> 00:37:17,360
Okay.
544
00:37:17,740 --> 00:37:20,140
Each of these is a XMSS tree.
545
00:37:21,060 --> 00:37:26,200
And they sign lower level XMSS trees.
546
00:37:26,560 --> 00:37:27,480
They certify them.
547
00:37:28,020 --> 00:37:30,440
XMSS trees then are signatures, basically.
548
00:37:30,940 --> 00:37:32,520
They are a set of key pairs.
549
00:37:32,640 --> 00:37:33,420
They're a set of key pairs.
550
00:37:33,640 --> 00:37:33,760
Okay.
551
00:37:34,320 --> 00:37:38,700
XMSS is just a bunch of Winternitz keys arranged into a Merkle tree.
552
00:37:39,100 --> 00:37:39,420
Okay.
553
00:37:39,420 --> 00:37:42,480
So sort of using Merkle trees for the function of signing.
554
00:37:43,000 --> 00:37:48,100
Yeah, yeah, exactly. It's kind of like, well, it's like the Kleenex analogy I used before.
555
00:37:48,200 --> 00:37:52,520
Each of these XMSS trees is a set of those one-time-use Kleenexes.
556
00:37:52,880 --> 00:37:54,620
Okay, makes sense. All right.
557
00:37:55,120 --> 00:37:57,860
At the bottom, I'm just going to draw another one here.
558
00:37:57,860 --> 00:38:00,360
At the bottom of this hyper tree,
559
00:38:02,020 --> 00:38:09,880
these are also Winternet's keys,
560
00:38:09,880 --> 00:38:13,900
but they sign something else.
561
00:38:14,700 --> 00:38:16,280
I'm going to draw that as a little square here.
562
00:38:17,480 --> 00:38:21,040
This is a fours key pair.
563
00:38:24,320 --> 00:38:26,420
Oh gosh, this marker is hard to draw with.
564
00:38:27,080 --> 00:38:27,520
Here we go.
565
00:38:28,860 --> 00:38:29,420
Fours.
566
00:38:29,800 --> 00:38:30,020
Yes.
567
00:38:30,180 --> 00:38:30,620
All right.
568
00:38:30,680 --> 00:38:33,440
So down at the bottom, this is a fours key,
569
00:38:33,760 --> 00:38:35,880
which we can get into on another slide,
570
00:38:35,880 --> 00:38:43,060
another slide, but essentially FOURS is a few-time signature scheme. That's distinct from WOTS.
571
00:38:43,460 --> 00:38:48,460
WOTS is a
one-time signature scheme. It lets you sign at most one message. If you sign two different
572
00:38:48,460 --> 00:38:53,680
messages, you leak your secret key and you're screwed. FOURS allows you to sign multiple messages,
573
00:38:54,280 --> 00:38:58,620
just not that many. We're talking about like the single digits before you start to lose too much
574
00:38:58,620 --> 00:39:04,100
security. Okay. Yeah. All right. Okay. So that sort of enhances the budget a little bit in this
575
00:39:04,100 --> 00:39:09,880
situation? Massively, yeah. Okay. It's a prerequisite for a stateless scheme, I think.
576
00:39:10,440 --> 00:39:14,520
Maybe there's a way to do it without fours or any few-time signature scheme, but I haven't heard of
577
00:39:14,520 --> 00:39:18,600
anyone making any concrete proposals for that. Okay, I'm going to, can I borrow your marker for
578
00:39:18,600 --> 00:39:27,340
a second? Okay, so we have XSMS, is that correct? XMSS. XMSS, which is the kind of one sub scheme
579
00:39:27,340 --> 00:39:29,660
that Spanx slash Shrinks uses.
580
00:39:30,360 --> 00:39:34,060
Then we have Winternets, one-time signatures, Watts,
581
00:39:34,280 --> 00:39:36,420
which is another subscheme that's used,
582
00:39:36,500 --> 00:39:37,260
and then Fours.
583
00:39:37,460 --> 00:39:41,000
These are the three cryptographic subschemes
584
00:39:41,000 --> 00:39:43,540
used in this entire construction.
585
00:39:44,020 --> 00:39:44,360
Exactly.
586
00:39:44,800 --> 00:39:45,040
Okay.
587
00:39:45,300 --> 00:39:47,440
And XMSS and Winternets are closely related here
588
00:39:47,440 --> 00:39:49,440
because you can't have XMSS
589
00:39:49,440 --> 00:39:50,740
without a one-time signature scheme,
590
00:39:50,960 --> 00:39:52,560
and Watts fulfills that role.
591
00:39:52,560 --> 00:39:54,040
And they're, I mean, it sounds like,
592
00:39:54,080 --> 00:39:55,060
but tell me if I'm getting this right,
593
00:39:55,120 --> 00:39:56,600
and I'm oversimplifying, of course,
594
00:39:56,600 --> 00:39:59,040
but they're kind of embedded within one another, right?
595
00:39:59,080 --> 00:40:02,740
You have sort of XMSS sort of at the top, and it's filled with Winternet signatures.
596
00:40:02,740 --> 00:40:10,740
And then you have fours as sort of this like bottom foundational construction that adds this extra layer of statelessness.
597
00:40:12,160 --> 00:40:15,200
I mean, not exactly stateless, but broader, bigger budget.
598
00:40:15,340 --> 00:40:15,860
Is that fair?
599
00:40:16,140 --> 00:40:17,140
Here's another way to think of it.
600
00:40:17,340 --> 00:40:24,900
In principle, you could have a stateless key pair by just concatenating like trillions of fours key pairs.
601
00:40:24,900 --> 00:40:31,880
but that would be really expensive because you'd have to shove all of them into a really big key
602
00:40:31,880 --> 00:40:37,420
pair or you'd have to commit to all of them in a giant expensive merkle tree so instead you use
603
00:40:37,420 -->
00:40:42,480
this hyper tree construction to certify them through a chain of signatures kind of like how
604
00:40:42,480 --> 00:40:48,360
in a tls certificate you start with the certificate uh authority the root authority at the top and it
605
00:40:48,360 --> 00:40:52,480
certifies other certificates that certify other certificates until you eventually get to the
606
00:40:52,480 --> 00:40:55,220
certificate of the website you're trying to connect to.
607
00:40:55,680 --> 00:40:55,860
Okay.
608
00:40:56,820 --> 00:40:57,420
All right.
609
00:40:57,500 --> 00:40:58,120
Well, interesting.
610
00:40:58,340 --> 00:40:58,460
Okay.
611
00:40:58,580 --> 00:41:01,160
And this is for Shrinks specifically, right?
612
00:41:01,520 --> 00:41:02,540
This is Sphinx.
613
00:41:02,580 --> 00:41:03,320
Oh, this is Sphinx.
614
00:41:03,420 --> 00:41:04,260
We just did Sphinx.
615
00:41:04,360 --> 00:41:04,620
Exactly.
616
00:41:04,760 --> 00:41:09,420
This has been standardized by NIST, and this is used for firmware signing and a number of
617
00:41:09,420 --> 00:41:11,320
other high security standards.
618
00:41:11,760 --> 00:41:14,760
So how does Shrinks change this?
619
00:41:14,860 --> 00:41:17,180
Like what about this is different in Shrinks?
620
00:41:17,180 --> 00:41:20,920
What are we optimizing here to get Shrinks more efficient?
621
00:41:20,920 --> 00:41:33,400
If you kind of just take a pillow and cover this half of the board and ignore the stateful part, the stateful root over here, this is just pure FIPS 205 SLH DSA.
622
00:41:33,560 --> 00:41:37,580
This is exactly as specified in the NIST reference document.
623
00:41:38,600 --> 00:41:39,960
There is nothing different from it.
624
00:41:39,997 --> 00:41:43,397
Here, the addition that Shrinks makes is all over here with the stateful part.
625
00:41:43,657 --> 00:41:44,457
Oh, I see.
626
00:41:44,557 --> 00:41:46,257
Okay, so this is all Sphinx.
627
00:41:46,377 --> 00:41:51,517
And then this is basically the addition that serves as sort of the backup stateless option.
628
00:41:51,757 --> 00:41:52,097
Exactly.
629
00:41:52,277 --> 00:41:54,177
That we have just so, you know, God forbid.
630
00:41:54,937 --> 00:41:56,917
Although in theory, am I getting this right?
631
00:41:56,977 --> 00:41:58,777
That like we hope to never use this.
632
00:41:59,557 --> 00:42:00,477
The stateful part?
633
00:42:00,577 --> 00:42:02,177
Or you mean the entire key part?
634
00:42:02,717 --> 00:42:03,117
Yes.
635
00:42:03,317 --> 00:42:04,857
We hope to never use the stateless part.
636
00:42:04,857 --> 00:42:07,177
That is just like a backup of backups of backups.
637
00:42:07,337 --> 00:42:08,957
Like we're really not trying to go there.
638
00:42:08,957 --> 00:42:20,777
It will probably be used for restoring wallets or for corrupted state or for a number of other situations where we can't reliably be sure that we have the right state available.
639
00:42:21,217 --> 00:42:26,637
OK, so basically, OK, so let's talk
about restoring wallets as an example, because I think this is really important. Right.
640
00:42:26,637 --> 00:42:38,897
So if using the stateful portion of this requires having basically like a really clear understanding of the number of signatures that's being used, otherwise you could have a serious security breach, basically.
641
00:42:38,957 --> 00:42:42,197
is the issue. You could leak your key, right? You could have forged signature situation.
642
00:42:43,597 --> 00:42:49,917
Then if you lose your key and that counter is locked, basically any situation where you lose
643
00:42:49,917 --> 00:42:55,157
your state counter, you want to make sure that you're using Sphinx Plus as a backup.
644
00:42:55,357 --> 00:43:01,437
Exactly. This is for every case where you can't use this. Because if you can,
645
00:43:01,917 --> 00:43:03,397
you should be using the stateful part.
646
00:43:03,537 --> 00:43:04,317
Because it's small.
647
00:43:04,317 --> 00:43:18,337
It's smaller. It's more efficient. It's easier to verify. It's easier to sign with. And it's, I would say, possibly easier to implement in pure cryptography. But the managing of the state is really the complicated and hard part.
648
00:43:18,337 --> 00:43:26,817
You said that the Sphinx Plus option as a signing scheme is about, I mean, up to 100x larger than what we're doing with ECC right now.
649
00:43:27,237 --> 00:43:29,337
How about the stateless option?
650
00:43:29,617 --> 00:43:38,097
What is the size comparison for the stateless option, which hopefully we will be using 99.9% of the time compared with current signatures in Bitcoin?
651
00:43:38,457 --> 00:43:42,797
Now, the parameter sets that we've chosen for shrinks are still open for debate.
652
00:43:43,197 --> 00:43:45,217
I plan to do a little bike shedding about that myself.
653
00:43:45,217 --> 00:43:51,997
But the ones that we've selected now, I think, are very reasonable for the expectations for a proposal into consensus.
654
00:43:52,537 --> 00:44:01,737
And they aim for a 5,776-byte stateless signature size and a, oh, I'm going to get this wrong.
655
00:44:01,837 --> 00:44:05,877
I think it was something like 538-byte stateful signature.
656
00:44:06,817 --> 00:44:10,457
So it's about a factor of 10 difference between the stateful and stateless size.
657
00:44:10,717 --> 00:44:13,717
Stateful being smaller, stateless being 10 times larger.
658
00:44:13,717 --> 00:44:20,817
But so that means even the stateful sign is about 10x what we currently have with ECC with elliptic curve signatures?
659
00:44:20,997 --> 00:44:27,057
Exactly. There is a caveat there, though, which is that they're actually much faster to verify than elliptic curve signatures.
660
00:44:27,457 --> 00:44:27,697
OK.
661
00:44:28,097 --> 00:44:34,177
Yeah. This is why we picked these parameter sets, because it leaves it open in the future for a potential witness discount.
662
00:44:34,457 --> 00:44:35,557
Oh, interesting.
663
00:44:35,577 --> 00:44:37,217
Yes, because there's so much cheaper to verify.
664
00:44:37,217 --> 00:44:45,937
But in my mind, I was thinking, well, you know, cheaper verification is great for nodes, but it doesn't change the cost of, you know, the cost of a transaction, essentially.
665
00:44:46,077 --> 00:44:50,617
But you're making the argument that it actually might because maybe we can change the discounts.
666
00:44:50,777 --> 00:45:00,417
It depends upon whether the network values the cost of verifying signatures versus the cost of storing witness data in the long term in archival nodes.
667
00:45:00,417 --> 00:45:10,597
If we care more about the compactness of our signatures and keeping the blockchain small, then we would want to modify the parameters.
668
00:45:11,137 --> 00:45:19,157
And you can. There's actually a way to have the size of the stateful signature and arguably also some decrease on the stateless side.
669
00:45:19,277 --> 00:45:27,457
But you could turn this 530 something byte signature down to a 260, 270 byte signature if you wanted to.
670
00:45:27,457 --> 00:45:31,617
But doing that would increase verification time massively.
671
00:45:32,077 --> 00:45:37,177
So we opted for the faster verification versus smaller signatures.
672
00:45:37,697 --> 00:45:43,057
Why does having faster verification kind of rationalize, you know, a potential deeper discount?
673
00:45:44,017 --> 00:45:55,477
Because the witness discounts that can be applied to a signature scheme are commensurate with the amount of work needed to verify those signatures.
674
00:45:56,317 --> 00:45:58,357
Okay, on the verification side.
675
00:45:58,557 --> 00:46:01,577
And is that basically why Segwit has the discount?
676
00:46:01,737 --> 00:46:03,037
I mean, is it the same?
677
00:46:03,437 --> 00:46:04,157
I believe so.
678
00:46:04,417 --> 00:46:05,897
I would have to read up on that.
679
00:46:05,917 --> 00:46:06,197
Okay.
680
00:46:06,797 --> 00:46:08,297
I don't want to spew some nonsense.
681
00:46:08,597 --> 00:46:09,757
Fair enough, fair enough.
682
00:46:10,817 --> 00:46:16,197
Okay, have you guys batted around any specific ideas for what a discount could look like?
683
00:46:16,237 --> 00:46:18,477
I mean, obviously, I assume this will be a very different BIP.
684
00:46:18,477 --> 00:46:23,237
But just out of curiosity, are you guys thinking about what kind of discount might be applied to these signature schemes?
685
00:46:23,237 --> 00:46:23,917
I have no idea.
686
00:46:23,917 --> 00:46:30,917
This is only a rough first draft, and we expect the parameter sets will probably be changed.
687
00:46:31,617 --> 00:46:37,617
We just wanted to pick some relatively non-controversial parameter sets to start with.
688
00:46:37,837 --> 00:46:44,097
And then once we publish our ideas to the community, then we can have discussions about what the right way to approach this long term is.
689
00:46:44,157 --> 00:47:00,300
Once you get into discounts you know things get way more
controversial really fast right Then people start worrying about spam and other issues Yeah I mean a lot of people think that there really no way to do post signatures without a witness discount because they all huge with the exception of isogenies But then isogenies
690
00:47:00,300 --> 00:47:04,980
are so slow to verify. And this is especially true with hash-based signatures. They're really
691
00:47:04,980 --> 00:47:10,700
huge, but they're actually so fast to verify compared even to Schnorr. The cost per byte
692
00:47:10,700 --> 00:47:14,1000
to verify a hash-based signature is tiny, especially for the stateless side because
693
00:47:14,1000 --> 00:47:19,660
the signatures are huge, right? So even if you have a decently large verification cost,
694
00:47:20,060 --> 00:47:24,480
dividing by that huge bite size gives you a very small cost per bite.
695
00:47:24,980 --> 00:47:29,700
So a discount, a signature, a discount, a signature discount is one way of potentially
696
00:47:29,700 --> 00:47:36,040
handling this size increase size issue, which it sounds like is, you know, is made improved
697
00:47:36,040 --> 00:47:40,280
by shrinks, but not fully solved by shrinks. Is that accurate?
698
00:47:40,560 --> 00:47:43,780
Yeah, we've done our best to do, we've done our best to provide the optimal trade-off
699
00:47:43,780 --> 00:47:49,180
space for wallets. And wallets that can manage state can use the stateful side and can get very
700
00:47:49,180 --> 00:47:54,060
small and efficient signatures. Those that can't or wallets that are recovering for an emergency
701
00:47:54,060 --> 00:47:58,420
scenario who've like lost their state, then they can fall back to the stateless side and still be
702
00:47:58,420 --> 00:48:04,120
able to rescue their money. Would another way that we could potentially deal with the sizing issue be
703
00:48:04,120 --> 00:48:08,620
something like Benedict's signature batching, right? I mean, is that sort of the other way that
704
00:48:08,620 --> 00:48:15,060
we could potentially solve this? I don't see any way that you could do that kind of batching on
705
00:48:15,060 --> 00:48:22,260
Bitcoin without a very significant consensus change. Like a serious software, like a zero
706
00:48:22,260 --> 00:48:28,660
knowledge proof. Yeah, yeah. Because you can aggregate signatures using a ZK-STARK or a SNARK
707
00:48:28,660 --> 00:48:33,240
or a PQ-SNARK or something like that in a way that makes it very easy to verify for light nodes.
708
00:48:33,240 --> 00:48:42,420
But ultimately, the ideas that Benedict were proposing, I believe, would still require archival nodes to maintain a record of all those signatures.
709
00:48:43,140 --> 00:48:47,440
Because otherwise, how do new nodes bootstrap unless they're verifying the ZK proofs?
710
00:48:47,760 --> 00:48:50,220
Yeah, you'd need to have special archival nodes.
711
00:48:50,340 --> 00:48:55,260
You'd be like, you know, introducing a new player into the whole game theoretical system.
712
00:48:55,260 --> 00:48:56,600
Yeah, we're not trying to go for that.
713
00:48:56,600 --> 00:49:08,720
We're just trying to go for the minimal, viable cryptographic proof of concept that would work on Bitcoin without any major consensus changes like, you know, witness desk counts or ZK Starks or anything like that.
714
00:49:08,1000 --> 00:49:22,940
I think that in a situation where we have like a sudden quantum computer appearing and we need to start using post-quantum cryptography ASAP, the ability to use 530 something byte signatures will still make Bitcoin survivable.
715
00:49:22,940 --> 00:49:27,280
All right, guys, taking a quick moment to thank my new sponsors of the show.
716
00:49:27,720 --> 00:49:32,820
First off, the one and only Layer 2 Labs, pushing forward research and development of drive chains.
717
00:49:33,480 --> 00:49:38,860
Drive chains were first introduced as a software proposal to Bitcoin, a.k.a. BIP300, BIP301.
718
00:49:39,580 --> 00:49:45,700
These BIPs essentially propose a bridging mechanism between Bitcoin and Layer 2s that are incentive-aligned with miners,
719
00:49:45,1000 --> 00:49:49,340
and they've gotten a ton of attention over the last couple of years.
720
00:49:49,340 --> 00:49:57,800
If you're curious about how drive chains could work in practice, though, check out Layer2Labs.com and download their alternative front end to Bitcoin Core.
721
00:49:58,280 --> 00:50:01,980
It lets you play with drive chains and see how they actually work in real life.
722
00:50:02,680 --> 00:50:14,320
I'd also like to introduce Hashi, an alternative primitive to traditional L2s that allows users to execute a wide range of Bitcoin DeFi activities without having to trust a federated bridge.
723
00:50:14,800 --> 00:50:26,920
With Hashi, Bitcoin is controlled by an MPC wallet that requires a quorum of proof-of-stake validators on the SUI network to execute Bitcoin transactions based on the validity of smart contracts.
724
00:50:27,080 --> 00:50:41,240
At least a third of the staking power of the SUI validators network is required to execute these MPC mint and redeem transactions, which is a substantive improvement in trust assumptions relative to other L2s or sidechain bridges.
725
00:50:42,080 --> 00:50:47,1000
Hashi's commercial team is also stacked, including a crew of former builders from the crypto division of Meta.
726
00:50:48,580 --> 00:50:53,340
I think we're going to see a suite of super competitive Bitcoin DeFi products built with this protocol.
727
00:50:53,540 --> 00:50:57,500
So definitely check out the Hashi page on sui.io if you're curious.
728
00:50:58,700 --> 00:51:01,420
Last but not least, shout out to Bitbox.
729
00:51:01,980 --> 00:51:06,980
Bitbox is one of the easiest and most simple to use Bitcoin hardware wallets on the market right now.
730
00:51:06,980 --> 00:51:18,520
If you have friends or family members that you want to make sure stay safe and use cold storage, but maybe
they're not the most Bitcoin native people in the world, I highly recommend checking out Bitbox.
731
00:51:18,680 --> 00:51:26,580
They're completely open source, no compromises on security, but they're also super easy to use, really intuitive UX.
732
00:51:27,160 --> 00:51:32,720
Plus, you can use them with concierge multi-sig services like Unchained, which I'm personally a big fan of.
733
00:51:32,720 --> 00:51:39,660
If you want to check out their hardware wallets, go to bitbox.swiss and use code BITCOINRAILS to get a discount.
734
00:51:40,200 --> 00:51:41,440
All right, back to the show.
735
00:51:42,140 --> 00:51:48,600
So we've kind of covered sort of the deep, deep, deep underbelly construction of SL Root.
736
00:51:49,280 --> 00:51:58,640
Should we go into a little bit more deeply and we can kind of pull up a new cue card, but should we go into a little bit more deeply about how the stateful piece of this works?
737
00:51:58,640 --> 00:52:10,322
Definitely I think the stateful part is the far more interesting part because it the novel part that we propose in Shrinks So all of this basically is Sphinx Plus which was created by DJB not for Bitcoin It used
738
00:52:10,322 --> 00:52:14,783
in other contexts. It's NIST standardized. You know, it's pretty uncontroversial. It's
739
00:52:14,783 --> 00:52:19,622
uncontroversial, but it's quite large. And it was the I mean, it was the inspiration. Essentially,
740
00:52:19,622 --> 00:52:26,622
Shrinks is sort of an adaptation of this whole situation. OK, Shrinks uses that piece of it as a
741
00:52:26,622 --> 00:52:33,542
backup, but really we want people to be using this state full side most of the time. Let's kind of
742
00:52:33,542 --> 00:52:41,882
dive into the underbelly of the state full side. Absolutely. So this is FXMSS, the flexible
743
00:52:41,882 --> 00:52:50,762
extended Merkle signature scheme. It's actually a lot like taproot Merkle trees, in a sense,
744
00:52:50,762 --> 00:52:54,742
because the tree structure is chosen by the signer.
745
00:52:54,822 --> 00:52:58,402
So it starts with a set of Winternet's keys.
746
00:52:59,122 --> 00:53:02,942
So maybe before we describe FXMSS, should we describe Winternet's?
747
00:53:03,182 --> 00:53:04,202
Yeah, let's go for it.
748
00:53:04,662 --> 00:53:07,502
Okay, I'm going to actually change the card around then so we don't get too confused.
749
00:53:07,722 --> 00:53:09,442
Let's do one for Winternet's first.
750
00:53:09,442 --> 00:53:13,502
So XMSS is made up of a bunch of mini Winternet signatures,
751
00:53:13,922 --> 00:53:16,562
a bunch of mini signatures called Winternet's one-time signatures,
752
00:53:16,842 --> 00:53:20,122
and we are going to just quickly explain how these signatures work.
753
00:53:20,202 --> 00:53:20,322
Right.
754
00:53:20,362 --> 00:53:20,602
Okay.
755
00:53:20,762 --> 00:53:25,822
We start with a bunch of secret pre-images, which I'm going to draw as little circles here.
756
00:53:28,502 --> 00:53:30,722
I'm going to do, say, five of them.
757
00:53:31,142 --> 00:53:31,362
Okay.
758
00:53:32,082 --> 00:53:35,302
Now, each of these, you hash them once.
759
00:53:40,942 --> 00:53:43,922
Is five a real number or is it a theoretical number?
760
00:53:43,922 --> 00:53:44,862
This is a toy example.
761
00:53:44,862 --> 00:53:52,682
With a real Winternet's key, you would be looking at either 16 or 32 or 64 different pre-images.
762
00:53:52,902 --> 00:53:53,042
Okay.
763
00:53:53,302 --> 00:53:53,482
Right?
764
00:53:53,762 --> 00:53:54,202
Got it.
765
00:53:55,142 --> 00:53:55,322
Okay.
766
00:53:55,382 --> 00:53:58,642
So you've hashed each of these, and I'm just going to draw a little hash function.
767
00:53:58,642 --> 00:54:03,802
These pre-images, theoretically, are essentially the inputs that make your key your key, effectively.
768
00:54:04,002 --> 00:54:04,102
Yes.
769
00:54:04,262 --> 00:54:04,542
Yes.
770
00:54:04,602 --> 00:54:07,502
They are the secretest part of the secret key.
771
00:54:07,562 --> 00:54:07,762
Right.
772
00:54:07,842 --> 00:54:08,562
That is the way I would put it.
773
00:54:08,702 --> 00:54:13,202
That is the randomly generated, that is what the wallet is generating to create your key.
774
00:54:13,302 --> 00:54:14,122
Those are the numbers.
775
00:54:14,122 --> 00:54:21,582
Well, if you actually want to be more specifically accurate about it, in shrinks, we generate each of these from a common seed.
776
00:54:22,122 --> 00:54:22,402
Oh.
777
00:54:22,822 --> 00:54:25,222
Well, otherwise you would need to store them all, which would be prohibitive, right?
778
00:54:25,222 --> 00:54:25,902
Which would be annoying.
779
00:54:26,222 --> 00:54:26,442
Yeah.
780
00:54:26,802 --> 00:54:30,602
This is actually where we could talk about the shrink secret key a little.
781
00:54:30,762 --> 00:54:34,122
But for now, just think about this as like a secret seed.
782
00:54:35,082 --> 00:54:36,842
Maybe it comes from your seed phrase.
783
00:54:36,942 --> 00:54:39,602
It's derived from some deterministic function.
784
00:54:40,082 --> 00:54:43,522
Anyway, this is a secret part that no verifier ever sees.
785
00:54:43,522 --> 00:54:46,122
and it generates all of these different pre-images.
786
00:54:47,202 --> 00:54:49,082
And, okay, so this is one hash iteration.
787
00:54:49,622 --> 00:54:51,402
Each of these we call a chain,
788
00:54:51,562 --> 00:54:53,962
because as we're about to see, we hash them again.
789
00:54:54,822 --> 00:54:56,902
Ooh, hashes on hashes.
790
00:54:56,922 --> 00:54:57,722
Hashes on hashes.
791
00:54:58,742 --> 00:54:59,662
And then again.
792
00:55:01,302 --> 00:55:01,782
Okay.
793
00:55:02,002 --> 00:55:04,522
And we keep doing this for a number of steps.
794
00:55:05,062 --> 00:55:06,682
How many times do you hash on hash?
795
00:55:07,222 --> 00:55:08,102
In the parameter...
796
00:55:08,102 --> 00:55:08,762
Is it standardized?
797
00:55:09,322 --> 00:55:09,582
Yes.
798
00:55:09,702 -->
00:55:11,582
In the parameter scheme that we use, 16.
799
00:55:11,582 --> 00:55:12,022
Okay.
800
00:55:12,022 --> 00:55:20,762
We call the length of this chain a parameter called W, also known as the Winternet's chain length.
801
00:55:21,242 --> 00:55:24,402
Each of these is a chain.
802
00:55:24,762 --> 00:55:25,162
Okay.
803
00:55:25,642 --> 00:55:28,342
So a chain is a chain of hashes of hashes.
804
00:55:28,602 --> 00:55:29,062
Exactly.
805
00:55:30,802 --> 00:55:36,582
If you actually want to be more technically correct about it, I think it's something like an iterated hash function.
806
00:55:37,262 --> 00:55:40,842
But anyway, you can think of them more intuitively as chains of hashes,
807
00:55:40,902 --> 00:55:43,502
where each step in the chain is a hash function evaluation.
808
00:55:43,822 --> 00:55:44,062
Okay.
809
00:55:44,122 --> 00:55:45,842
You're hashing the hash of a hash of a hash.
810
00:55:46,142 --> 00:55:46,442
Okay.
811
00:55:47,582 --> 00:55:51,283
Eventually, at the end, you get to the tips of each hash chain.
812
00:55:51,682 --> 00:55:53,022
These are each tips.
813
00:55:53,102 --> 00:55:54,082
I'm just going to call that here.
814
00:55:54,462 --> 00:55:55,722
I don't know if that's a technical term.
815
00:55:55,783 --> 00:55:56,942
That's just what I call them, by the way.
816
00:55:57,022 --> 00:55:57,302
Great.
817
00:55:57,742 --> 00:55:58,502
I love it.
818
00:55:58,682 --> 00:55:59,663
Let's make it a thing.
819
00:55:59,663 --> 00:56:19,202
Now, in order to create the Winternet's public key, you then hash each of these together into a single 16-byte value called the public key.
820
00:56:19,783 --> 00:56:20,122
Okay.
821
00:56:20,942 --> 00:56:28,322
Now, in order to create a signature with this scheme, remember, we are only signing a single message here.
822
00:56:28,322 --> 00:56:31,002
you can only sign a single message with this game safely.
823
00:56:32,102 --> 00:56:34,163
First, we take a message.
824
00:56:37,102 --> 00:56:41,543
And you map it through a function into a set of indexes.
825
00:56:41,902 --> 00:56:44,242
Note that our chain length W here is four.
826
00:56:44,682 --> 00:56:44,942
Okay.
827
00:56:44,962 --> 00:56:50,502
We would map this to a number between zero and four.
828
00:56:50,722 --> 00:56:51,163
Okay.
829
00:56:52,043 --> 00:56:54,382
So it would be zero, one, two, or three.
830
00:56:54,762 --> 00:56:55,043
Okay.
831
00:56:55,043 --> 00:56:57,842
So let's just say we choose a set of indexes.
832
00:56:58,322 --> 00:57:02,163
that's what those message numbers are.
833
00:57:02,362 --> 00:57:04,822
Those numbers between 0 and 4 are called indexes.
834
00:57:05,783 --> 00:57:10,362
Let's just take an example message that maps to, say,
835
00:57:11,582 --> 00:57:25,885
1 3 0 and 2 just gonna one three zero and uh two and we get to why there only four numbers in a second here
836
00:57:25,885 --> 00:57:34,085
like we have five chains why aren't there five numbers you'll see you'll see so it's an off by
837
00:57:34,085 --> 00:57:39,925
one error yeah yeah yeah you'll get you'll get to it so um the first number the first index is one
838
00:57:40,185 --> 00:57:42,425
So you hash your pre-image once.
839
00:57:43,065 --> 00:57:46,785
And you reveal this node as part of your signature.
840
00:57:47,385 --> 00:57:47,865
Okay.
841
00:57:48,145 --> 00:57:49,025
Next one is three.
842
00:57:49,245 --> 00:57:50,645
You hash your pre-image three times.
843
00:57:50,765 --> 00:57:51,465
One, two, three.
844
00:57:52,065 --> 00:57:53,985
You reveal this node as part of your signature.
845
00:57:54,465 --> 00:57:56,145
And then zero times.
846
00:57:56,625 --> 00:57:58,165
You don't hash your pre-image at all.
847
00:57:58,205 --> 00:57:58,865
You just reveal it.
848
00:57:59,205 --> 00:58:00,465
That's part of your signature.
849
00:58:00,785 --> 00:58:01,425
The next one.
850
00:58:01,525 --> 00:58:01,785
Whoa.
851
00:58:01,785 --> 00:58:02,025
Two.
852
00:58:02,165 --> 00:58:03,365
You hash your pre-image twice.
853
00:58:03,585 --> 00:58:04,645
That's part of your signature.
854
00:58:04,925 --> 00:58:05,405
Right?
855
00:58:05,945 --> 00:58:06,345
Okay.
856
00:58:06,345 --> 00:58:10,585
These hashes form the Winternet's signature.
857
00:58:11,185 --> 00:58:11,765
I see.
858
00:58:11,945 --> 00:58:20,145
And this is why it's one time only, because if you have too many constructions of this, you can kind of like do some magic and figure it out.
859
00:58:20,245 --> 00:58:28,685
You can think of the attacker as being able to see this, this, this, this, this, this, this, this, and this and this.
860
00:58:28,965 --> 00:58:33,005
But they can't see anything beneath those hashes in the chain.
861
00:58:33,325 --> 00:58:33,485
Right.
862
00:58:33,765 --> 00:58:33,965
Yeah.
863
00:58:33,965 --> 00:58:35,465
Just like here, they can't see your seed.
864
00:58:35,945 --> 00:58:39,745
Here they can't see any of these intermediate hashes or the preimage.
865
00:58:40,405 --> 00:58:42,465
And here they can't see this preimage.
866
00:58:43,945 --> 00:58:48,285
The attacker would be able to forge a signature if you revealed a different one.
867
00:58:48,285 --> 00:58:56,225
So, for example, if this index and this index were changed slightly, then the attacker would be able to see this preimage.
868
00:58:56,645 --> 00:58:59,645
And this would give them enough information to forge a new signature.
869
00:59:00,145 --> 00:59:00,585
Makes sense.
870
00:59:00,805 --> 00:59:01,025
Okay.
871
00:59:01,105 --> 00:59:03,885
So this is why these signatures are one time only.
872
00:59:03,885 --> 00:59:14,985
And then again, so you take each of these one-time-only signatures, and then we'll get back to how we smush them all together to make the larger, bigger Sphinx-slash-Shrinks signatures.
873
00:59:15,365 --> 00:59:18,065
The missing piece that I haven't discussed yet is this chain, which I haven't used yet.
874
00:59:18,285 --> 00:59:19,965
This is called the checksum chain.
875
00:59:20,445 --> 00:59:24,465
There's actually multiple checksum chains in the real Winternet scheme, but I'm just using one here for simplicity.
876
00:59:25,605 --> 00:59:30,885
If you were to use this as your signature scheme as described, it would be very easy to forge, right?
877
00:59:31,785 --> 00:59:32,305
Here's why.
878
00:59:32,745 --> 00:59:37,005
Just change two to three and then reveal this one.
879
00:59:37,625 --> 00:59:39,065
The attacker already knows this, right?
880
00:59:39,125 --> 00:59:43,545
They could very easily just iterate the hash again and reveal that as a signature on a different message.
881
00:59:43,945 --> 00:59:45,565
So this is a safety precaution.
882
00:59:45,685 --> 00:59:47,525
Yes, this is essential to security.
883
00:59:47,765 --> 00:59:55,585
In order to make this secure, we add something called a checksum where you sum all of the indexes.
884
00:59:55,665 --> 01:00:00,205
So one plus three is four plus two is six.
885
01:00:00,205 --> 01:00:08,525
you would then subtract that from the maximum possible checksum by subtracting it in this way.
886
01:00:08,865 --> 01:00:14,645
You make it so that an attacker cannot just iterate another hash function,
887
01:00:15,185 --> 01:00:17,905
iterate one of the hashes to get a new forged signature.
888
01:00:18,285 --> 01:00:22,685
Because in order to do that, they would have to decrement the index on the checksum chain.
889
01:00:22,785 --> 01:00:23,185
Got it.
890
01:00:23,225 --> 01:00:27,485
And that's not possible because you can't, in theory, you can't just invert a hash function very easily.
891
01:00:27,485 --> 01:00:31,665
So this is the key answer to why there's only four numbers here, critical to security.
892
01:00:32,305 --> 01:00:36,325
Don't leak more information that could potentially create signature forging situations.
893
01:00:36,465 --> 01:00:36,745
Exactly.
894
01:00:36,885 --> 01:00:43,145
And in this particular instance, I think the maximum checksum would be 3 times 4 is 12 minus 6.
895
01:00:43,145 --> 01:00:46,665
So actually, I didn't do my math correctly with the way that I had the lengths of the chain.
896
01:00:46,745 --> 01:00:51,045
There should actually be, I think, like six nodes in each of these chains.
897
01:00:51,245 --> 01:00:52,645
But I'm just going to ignore that for now.
898
01:00:52,865 --> 01:00:53,125
All right.
899
01:00:53,125 --> 01:00:58,205
Okay, so we've now covered Winternet's one-time signatures, you guys.
900
01:00:58,385 --> 01:01:00,285
Nice little close-up shot of that.
901
01:01:00,765 --> 01:01:05,325
Okay, and now this is the perfect opportunity for us to go back to...
902
01:01:05,325 --> 01:01:07,105
Did we have the X?
903
01:01:07,405 --> 01:01:10,385
Before we leave this, actually, I'm just going to mention one more thing.
904
01:01:10,585 --> 01:01:10,805
Okay.
905
01:01:10,985 --> 01:01:13,805
This is called Winternet's with tweaks.
906
01:01:14,365 --> 01:01:17,525
Winternet's TW, or also known as Winternet's Plus.
907
01:01:18,445 --> 01:01:19,865
Oh, that's right.
908
01:01:19,865 --> 01:01:25,305
It's known as Winternet's plus in the NIST standard, but Winternet's TW in the paper.
909
01:01:25,725 --> 01:01:25,965
Okay.
910
01:01:26,125 --> 01:01:29,945
I'm not quite sure of the difference, but essentially this is what's used in the stateless part.
911
01:01:30,385 --> 01:01:31,925
The stateful part uses...
912
01:01:31,925 --> 01:01:32,525
The stateless part of shrinks.
913
01:01:32,765 --> 01:01:33,145
Yes.
914
01:01:33,405 --> 01:01:35,725
Or the stateful, excuse me, stateful part of shrinks.
915
01:01:35,825 --> 01:01:36,525
The stateless part.
916
01:01:36,525 --> 01:01:37,225
Oh, the stateless part.
917
01:01:37,225 --> 01:01:38,605
This is what's used in the stateless part.
918
01:01:38,705 --> 01:01:40,505
This is the part that's been standardized by NIST.
919
01:01:40,705 --> 01:01:40,965
Okay.
920
01:01:41,065 --> 01:01:44,985
In the stateful part, we use basically the exact same scheme, except we use a different
921
01:01:44,985 --> 01:01:46,985
technique for the checksum.
922
01:01:47,145 --> 01:01:48,905
So this is where you guys got creative.
923
01:01:48,905 --> 01:01:50,705
This is where, like, Jonas got creative.
924
01:01:50,925 --> 01:01:54,365
Well, actually, this was Mikhail's original invention, I believe.
925
01:01:54,525 --> 01:02:04,325
He worked with Andreas Holsing to create a variant of Sphinx called Sphinx Plus C that uses a slightly different version of Winternets that has smaller signatures and better performance.
926
01:02:04,505 --> 01:02:08,245
And the reason to do these optimizations is just reducing size further and further.
927
01:02:08,385 --> 01:02:08,465
Exactly.
928
01:02:08,465 --> 01:02:14,725
This is just like another way, another tweak that they made to this scheme in order to decrease the size of the signature.
929
01:02:14,725 --> 01:02:20,425
We could have reused this in Shrinks, but we were thinking, oh, we're creating something from scratch for Bitcoin.
930
01:02:20,605 --> 01:02:22,185
Why don't we make it as efficient as possible?
931
01:02:22,345 --> 01:02:24,505
We'll use the best schemes available to us.
932
01:02:25,085 --> 01:02:26,185
Word. All right. Amazing.
933
01:02:26,685 --> 01:02:27,145
All right. Okay.
934
01:02:27,285 --> 01:02:28,965
So let's go.
935
01:02:29,245 --> 01:02:29,965
Now we have...
936
01:02:30,008 --> 01:02:39,268
Okay, so the Winternet's one-time signatures are kind of like the base-based building blocks, other than fours, which is sort of a separate issue, that sort of foundational piece that we talked about.
937
01:02:39,788 --> 01:02:43,088
Okay, so now you have these Winternet's one-time signatures.
938
01:02:43,328 --> 01:02:48,648
I think we kind of understand sort of the kind of very deeply now, the math behind those.
939
01:02:50,168 --> 01:02:58,568
FXMSS, this is also used for the state full portion
of shrinks, which is really the innovation that you guys are proposing.
940
01:02:58,568 --> 01:02:58,968
Okay.
941
01:02:59,428 --> 01:02:59,648
Yes.
942
01:03:00,008 --> 01:03:03,528
Okay, so there is two different ways of looking at this,
943
01:03:03,588 --> 01:03:06,308
and I'm going to bisect this into two different ways
944
01:03:06,308 --> 01:03:08,508
that the signer could generate their key pair.
945
01:03:09,068 --> 01:03:14,908
The first, I'm just going to block this off and call this UXMSS.
946
01:03:15,128 --> 01:03:18,208
This is the idea that Jonas proposed with Shrinks initially.
947
01:03:18,588 --> 01:03:21,348
It's called unbalanced XMSS.
948
01:03:22,168 --> 01:03:26,288
In this situation, you create a bunch of Winternitz keys
949
01:03:26,288 --> 01:03:29,028
and you arrange them into a Merkle tree laid out like so.
950
01:03:30,008 --> 01:03:40,668
where you have an unbalanced tree with a bunch of Winternitz keys hanging off of a single long spine.
951
01:03:41,768 --> 01:03:48,528
Oh, so this unbalanced key basically is this specific shape, and we'll just show it,
952
01:03:49,428 --> 01:03:53,988
of how these Winternitz signatures are essentially connected in a Merkle tree.
953
01:03:55,008 --> 01:03:55,528
Precisely.
954
01:03:55,968 --> 01:03:59,088
This shape is called an unbalanced Merkle tree.
955
01:03:59,088 --> 01:04:04,428
Each of these leaves is a Winternitz plus C key.
956
01:04:05,388 --> 01:04:06,968
That stands for Winternitz with compression.
957
01:04:07,148 --> 01:04:14,048
That's the variant of Winternitz that I teased you about a second ago that Mikhail and Holsing created.
958
01:04:14,248 --> 01:04:16,528
So Mikhail invented this particular scheme.
959
01:04:16,648 --> 01:04:18,348
I don't want to say that for sure.
960
01:04:18,608 --> 01:04:21,988
I would love to talk to him and confirm that, but I think so.
961
01:04:22,128 --> 01:04:22,388
Okay.
962
01:04:22,668 --> 01:04:22,988
Okay.
963
01:04:23,528 --> 01:04:24,008
Got it.
964
01:04:24,108 --> 01:04:24,368
Okay.
965
01:04:24,368 --> 01:04:34,408
Okay, so this is the structure of how these Winternets compressed Winternets, which is sort of another, just again, we're just adding optimizations on optimization.
966
01:04:34,728 --> 01:04:37,528
We're trying to get this thing as small as we possibly can.
967
01:04:37,648 --> 01:04:39,468
That is the idea.
968
01:04:39,468 --> 01:04:51,128
This is coming close to the floor of how small hash-based signatures can be, because Winternets, I believe, is like the smallest hash-based one-time signature that we know of, as far as I know.
969
01:04:52,048 --> 01:04:55,508
And, you know, the variant Watts plus C specifically pushes that limit quite close.
970
01:04:55,748 --> 01:05:02,408
And just for clarity, this specific construction of a Merkle tree is also designed for sizing purposes.
971
01:05:02,608 --> 01:05:05,988
It's just another optimization of making it smaller and smaller.
972
01:05:06,148 --> 01:05:11,688
I mean, literally every single piece of this is basically how tiny can we make each little piece of the signature, essentially.
973
01:05:11,688 --> 01:05:29,988
Now, the reason why we lay it out this way specifically, and to get that sizing like you're talking about, that compactness, is because in order to create an XMSS signature, what you do is you select one of your Winternet's leaves, and you use it to sign a message.
974
01:05:29,988 --> 01:05:34,888
and your signature in XMSS is just a Winternet's signature
975
01:05:34,888 --> 01:05:45,108
appended to a bunch of Merkle authentication nodes.
976
01:05:46,268 --> 01:05:47,948
So are you familiar with Merkle trees?
977
01:05:48,408 --> 01:05:48,668
Mm-hmm.
978
01:05:51,128 --> 01:05:53,088
By the way, this is not to proportion.
979
01:05:53,628 --> 01:05:57,588
This signature is actually much larger than this part in most cases.
980
01:05:57,588 --> 01:06:00,668
Okay. This is just to fit the letters in.
981
01:06:00,808 --> 01:06:05,828
Yeah. It actually changes because notice that when you're issuing a Winternet signature,
982
01:06:05,828 --> 01:06:10,528
you just use this node. And in order to provide the Merkle authentication path,
983
01:06:10,608 --> 01:06:15,868
that's this component here, all you need to do is provide this hash node of the Merkle tree,
984
01:06:16,088 --> 01:06:22,268
just this one. That's 16 bytes. That's all the overhead that you need on top of the Winternet
985
01:06:22,268 --> 01:06:28,428
signature. Okay, so this is a perfect opportunity. So this particular signature scheme, we only need
986
01:06:28,428 --> 01:06:35,628
16 byte hashes to execute this, which is unusual, right? I mean, usually in Bitcoin, we want longer
987
01:06:35,628 --> 01:06:42,968
bit length hashes, but just 16 bits. Well, 16 bytes. Bytes, excuse me. Yeah. Excuse me. And this
988
01:06:42,968 --> 01:06:47,008
will be a very interesting discussion. I want to save this actually for after we've gone through
989
01:06:47,008 --> 01:06:51,488
BXMSS, which is a little different. Okay. Yeah. But absolutely put a pin in that because it's
990
01:06:51,488 --> 01:06:53,408
Put a pin in it, 16-byte hashes.
991
01:06:53,548 --> 01:06:54,068
Unusual.
992
01:06:54,188 --> 01:06:55,128
We're coming back to this.
993
01:06:55,388 --> 01:06:59,588
Now, just again, you need a Merkle path and a Winternet signature.
994
01:06:59,828 --> 01:07:02,068
That is all the XMSS signatures are.
995
01:07:02,528 --> 01:07:05,108
I mean, there is one or two other small things sometimes.
996
01:07:05,388 --> 01:07:10,888
Like for Winternet C, you actually need this tiny little two-byte counter on top.
997
01:07:11,668 --> 01:07:14,368
That's to fix the checksum problem that we were talking about before.
998
01:07:14,508 --> 01:07:14,788
Okay.
999
01:07:14,968 --> 01:07:18,528
But two bytes is a very, very good tradeoff to make for that.
1000
01:07:18,928 --> 01:07:21,788
It makes it a lot smaller than a
stock Winternet signature.
1001
01:07:22,388 --> 01:07:22,628
Okay.
1002
01:07:22,768 --> 01:07:22,928
Okay.
1003
01:07:23,128 --> 01:07:26,048
So this is all that a UXMSS tree is.
1004
01:07:26,108 --> 01:07:27,168
It's just an unbalanced tree.
1005
01:07:27,168 --> 01:07:31,628
And this was the original proposal that Jonas put out a very long time ago.
1006
01:07:31,628 --> 01:07:32,668
But it's since changed.
1007
01:07:32,748 --> 01:07:33,488
Is that the implication?
1008
01:07:34,648 --> 01:07:50,505
It took some convincing but I think I talked them into changing the structure to be flexible which is why it called flexible XMSS now Ah so you don have to use this shape You don have to And the other shape that we prescribe is called balanced XMSS or BXMSS
1009
01:07:50,605 --> 01:07:50,885
Okay.
1010
01:07:51,065 --> 01:07:52,925
So I'm just going to partition this off now.
1011
01:07:52,925 --> 01:07:59,485
So it has to be either UXMSS or BXMSS. In this situation, flexible means one or the other. It
1012
01:07:59,485 --> 01:08:00,985
doesn't just mean any shape that you want.
1013
01:08:01,184 --> 01:08:02,545
It can mean any shape you want.
1014
01:08:02,744 --> 01:08:02,985
Oh.
1015
01:08:02,985 --> 01:08:05,045
Yeah, that's the interesting part.
1016
01:08:05,524 --> 01:08:11,325
The verifier, remember, all they see is the counter, the Winternet signature, and a bunch of Merkle nodes.
1017
01:08:11,565 --> 01:08:11,885
Okay.
1018
01:08:12,084 --> 01:08:19,225
To recompute, ultimately, the stateful root hash from back here.
1019
01:08:19,725 --> 01:08:22,885
That hash, that hash there, make sure you can see that on the camera.
1020
01:08:23,084 --> 01:08:23,304
Yep.
1021
01:08:24,285 --> 01:08:25,945
That hash is this node.
1022
01:08:26,665 --> 01:08:27,184
Okay.
1023
01:08:27,244 --> 01:08:28,565
Maybe I should write that explicitly.
1024
01:08:32,985 --> 01:08:36,265
That is the stateful root hash of the public key in Shrinks.
1025
01:08:36,605 --> 01:08:42,624
All you do to verify a Shrink signature is just recompute that from the Winternet signature and those Merkle nodes.
1026
01:08:42,864 --> 01:08:43,924
Okay. All right.
1027
01:08:44,424 --> 01:08:46,665
Verification. Easy peasy. No big deal.
1028
01:08:46,864 --> 01:08:49,624
It's the same as it works in SLH, DSA, and Sphinx.
1029
01:08:50,024 --> 01:08:51,085
Okay. All right.
1030
01:08:51,225 --> 01:08:56,924
Okay. So BXMSS, you said, was like an ordained shape also?
1031
01:08:56,924 --> 01:08:57,924
Yeah. We prescribe...
1032
01:08:57,924 --> 01:09:01,505
You can use anything, but you suggest either UX or BX? Is that fair?
1033
01:09:01,505 --> 01:09:04,804
Yes, we strongly recommend people stick to these two shapes for two reasons.
1034
01:09:04,924 --> 01:09:05,765
First of all, security.
1035
01:09:06,065 --> 01:09:08,765
We're only formally proving security for these two schemes.
1036
01:09:08,945 --> 01:09:11,005
Oh, so the other ones are just Wild West, like you do you.
1037
01:09:11,005 --> 01:09:12,645
If you want to use your own, you can.
1038
01:09:12,825 --> 01:09:19,265
And we wanted to design the scheme so that it would be flexible enough to permit novel use cases we haven't thought of.
1039
01:09:19,485 --> 01:09:25,385
And besides that, the verifier doesn't really need to care what shape of tree you generate, as long as you commit to a tree.
1040
01:09:25,785 --> 01:09:26,085
Okay.
1041
01:09:26,205 --> 01:09:30,605
As long as it can verify that your signature matches that root hash commitment.
1042
01:09:30,605 --> 01:09:37,385
So we'll be able to verify any shape, but you guys are only signing off.
1043
01:09:37,484 --> 01:09:40,165
You're only like priesthooding UX and BX shapes.
1044
01:09:40,304 --> 01:09:41,404
Okay, so what's the BX shape?
1045
01:09:41,565 --> 01:09:44,585
The balanced XMSS tree is kind of what you'd expect from the name.
1046
01:09:44,904 --> 01:09:46,265
It's a balanced Merkle tree.
1047
01:09:46,445 --> 01:09:47,304
It's pretty much just...
1048
01:09:47,304 --> 01:09:47,864
Which is normal.
1049
01:09:47,984 --> 01:09:50,044
This is like what we learn in school about Merkle trees.
1050
01:09:50,184 --> 01:09:50,604
Precisely.
1051
01:09:50,645 --> 01:09:53,165
This is what we think they look like when we think about them.
1052
01:09:53,304 --> 01:09:53,665
Exactly.
1053
01:09:53,924 --> 01:09:56,044
And it has a specific depth.
1054
01:09:56,044 --> 01:10:04,505
okay what's the specific depth out of curiosity but we actually don't specify it but any given
1055
01:10:04,505 --> 01:10:10,005
bxmss tree can have a different depth okay so for example you could have a bxmss tree of height two
1056
01:10:10,005 --> 01:10:14,244
which has four nodes for winternitz keys you should probably write that
1057
01:10:14,244 --> 01:10:25,464
each of those leaves being a watts key but you could extend this to a deeper tree you could have
1058
01:10:25,464 --> 01:10:35,984
8, 16, or any power of 2. We recommend for balanced XMSS signers, 2 to the 20 leaves. So that's about
1059
01:10:35,984 --> 01:10:44,584
1 million. Okay. Yeah. All right. Okay. Anything, yeah, anything else that we should know about FXMSS
1060
01:10:44,584 --> 01:10:50,844
specific portion of the signing scheme? The main thing is the trade-off what you get between the
1061
01:10:50,844 --> 01:10:59,364
too. Okay. So for UXMSS, what you get is a key pair with 256 possible signatures. So you can
1062
01:10:59,364 --> 01:11:06,005
sign up to 256 different messages. And each of those signatures will use a Winternet leaf,
1063
01:11:06,505 --> 01:11:11,724
one layer down from the previous one. Now think about what this means for your signature size.
1064
01:11:12,145 --> 01:11:17,304
Because remember, the nice thing about this one up here was that we only needed to provide a single
1065
01:11:17,304 --> 01:11:23,684
Merkle node in order to authenticate this Watts key against this Merkle root. But what if you do
1066
01:11:23,684 --> 01:11:30,724
this one? Well, then you also need to provide this sibling hash and this one. So this actually ends
1067
01:11:30,724 --> 01:11:36,224
up being creating a bigger signature. Yes. Every time you create a new signature with UXMSS,
1068
01:11:36,464 --> 01:11:42,244
the next signature will be 16 bytes larger. So why did Jonas initially propose it that way?
1069
01:11:42,565 --> 01:11:45,984
That's because this gives you the best possible size.
1070
01:11:46,224 --> 01:11:48,284
And most Bitcoin keys are only used once.
1071
01:11:48,784 --> 01:11:49,584
Oh, I see.
1072
01:11:49,624 --> 01:11:51,424
Which gives us the best possible tradeoff for Bitcoin.
1073
01:11:51,765 --> 01:11:52,124
Okay.
1074
01:11:52,525 --> 01:11:54,785
And if you want to reuse a key, you can.
1075
01:11:55,224 --> 01:11:56,945
You just end up using the next leaf down.
1076
01:11:57,204 --> 01:11:58,285
But that makes your signature bigger.
1077
01:11:58,405 --> 01:12:00,405
So you'd ideally not want to do that.
1078
01:12:02,285 --> 01:12:05,005
What's the sort of benefit then of using BXMS?
1079
01:12:05,005 --> 01:12:08,505
What do you get from a Bitcoiners perspective of using BXMS?
1080
01:12:08,885 --> 01:12:11,104
Well, first of all, you get many, many more signatures.
1081
01:12:11,645 --> 01:12:15,405
Like with 2 to the 20 leaves, for example, you get a million signatures.
1082
01:12:15,604 --> 01:12:17,604
That's more than enough for most use cases.
1083
01:12:17,864 --> 01:12:22,285
If you're posting a million signatures on chain, you have other problems than size.
1084
01:12:22,604 --> 01:12:23,945
That'll take you some number of years.
1085
01:12:23,945 --> 01:12:28,925
It'll take you a good few seconds to generate that many XMSS keys, I think.
1086
01:12:29,005 --> 01:12:30,165
Or sorry, that many Winternet keys.
1087
01:12:30,325 --> 01:12:32,045
Well, I mean, to use them, it'll take you.
1088
01:12:32,684 --> 01:12:34,244
You'd have to really fill some blocks.
1089
01:12:34,545 --> 01:12:34,864
Oh, yeah.
1090
01:12:35,025 --> 01:12:37,464
And we've thought about how this could be used for Lightning.
1091
01:12:38,005 --> 01:12:40,984
And this is one particular potential use case for it.
1092
01:12:40,984 --> 01:12:43,984
Because lightning signers often repeatedly sign many, many messages.
1093
01:12:44,244 --> 01:12:48,544
Was that the argument that you made to Jonas to include BXMSS, is that it might be useful for lightning?
1094
01:12:48,724 --> 01:13:00,841
It useful for many different things I mean some people do need to reuse addresses for practical purposes like custodians Proof of reserves Yes exactly You need sometimes to have a whitelisted address that you can send to again
1095
01:13:00,841 --> 01:13:06,641
and again. And that use case, we want to still allow that in a post-quantum world. And BXMSS
1096
01:13:06,641 --> 01:13:08,141
is one thing that lets us do exactly that.
1097
01:13:08,141 --> 01:13:11,941
Okay. So
that's really important because I think a lot of people are assuming that we're going to
1098
01:13:11,941 --> 01:13:19,221
give up the ability to safely reuse addresses. And specifically, I think the most common example
1099
01:13:19,221 --> 01:13:21,781
of why that's a problem has been proof of reserves.
1100
01:13:21,941 --> 01:13:23,661
You're basically telling me that, you know,
1101
01:13:24,221 --> 01:13:26,821
Alex Leishman can sleep easy with BXMSS
1102
01:13:26,821 --> 01:13:28,801
because, you know, River will be able to continue
1103
01:13:28,801 --> 01:13:29,941
doing their proof of reserve.
1104
01:13:30,341 --> 01:13:32,581
I don't know too much about proof of reserves myself.
1105
01:13:33,181 --> 01:13:33,821
And in fact, I spent-
1106
01:13:33,821 --> 01:13:34,901
Well, this requires spending, right?
1107
01:13:34,921 --> 01:13:37,001
You have to spend from something
1108
01:13:37,001 --> 01:13:38,761
that you then will have to spend again from.
1109
01:13:40,281 --> 01:13:41,161
I guess so.
1110
01:13:41,361 --> 01:13:42,541
I'm sorry, I'm not too familiar with that.
1111
01:13:42,541 --> 01:13:44,501
Can you spend from a wallet twice safely?
1112
01:13:44,761 --> 01:13:45,121
Yeah, yeah.
1113
01:13:45,121 --> 01:13:45,401
That's my question.
1114
01:13:45,481 --> 01:13:45,961
Oh, 100%.
1115
01:13:45,961 --> 01:13:47,001
Yeah, that's the key thing.
1116
01:13:47,001 --> 01:13:47,261
100%.
1117
01:13:47,261 --> 01:13:48,501
Okay, so if you can do that,
1118
01:13:48,501 --> 01:13:50,241
then you're probably good with proof of reserves.
1119
01:13:51,301 --> 01:13:54,861
BXMSS is mainly aimed at signers who reuse addresses
1120
01:13:54,861 --> 01:13:57,681
or for off-chain protocols,
1121
01:13:58,101 --> 01:14:01,221
where sometimes having a constant size signature is important.
1122
01:14:01,601 --> 01:14:03,721
That's the other thing about BXMSS that's really nice.
1123
01:14:04,061 --> 01:14:05,541
Your signatures are always the same size,
1124
01:14:05,581 --> 01:14:06,281
because look at this one.
1125
01:14:06,681 --> 01:14:09,281
If you have a Winternet's key at this position,
1126
01:14:09,841 --> 01:14:14,541
you need to provide this leaf and this node in the signature.
1127
01:14:15,181 --> 01:14:17,721
Two nodes, 16 times 2, 32 bytes.
1128
01:14:17,721 --> 01:14:20,081
plus the Winternet's signature size.
1129
01:14:20,381 --> 01:14:21,701
But if you picked this leaf,
1130
01:14:22,301 --> 01:14:25,721
then you would need to reveal this leaf and this node.
1131
01:14:26,201 --> 01:14:28,421
Again, 16 times 2, 32 bytes.
1132
01:14:28,521 --> 01:14:30,761
It's the same signature size no matter which leaf you use.
1133
01:14:30,761 --> 01:14:34,361
So this, we're really kind of getting to what I wanted
1134
01:14:34,361 --> 01:14:37,121
to sort of actually wrap up this conversation with,
1135
01:14:37,181 --> 01:14:39,821
which was kind of talk about the functionality trade-offs
1136
01:14:39,821 --> 01:14:41,101
with using hash-based signatures.
1137
01:14:41,101 --> 01:14:43,961
And it sounds like maybe some of that functionality
1138
01:14:43,961 --> 01:14:48,521
is preserved by using BXMSS instead of UXMSS.
1139
01:14:48,621 --> 01:14:51,101
That being said, before we go down that rabbit hole,
1140
01:14:51,381 --> 01:14:53,721
is there anything else that we want to cover
1141
01:14:53,721 --> 01:14:57,561
to kind of explain how this signature scheme works?
1142
01:14:57,561 --> 01:15:00,321
Maybe we can kind of do a little concluding,
1143
01:15:00,461 --> 01:15:02,241
a concluding board.
1144
01:15:02,381 --> 01:15:04,801
Yeah, maybe it'd be worth connecting it back to the public.
1145
01:15:04,901 --> 01:15:05,861
Let's connect the dots.
1146
01:15:06,081 --> 01:15:06,881
Should we connect the dots?
1147
01:15:07,881 --> 01:15:08,161
Okay.
1148
01:15:09,361 --> 01:15:12,361
Okay, so in conclusion on how this scheme works,
1149
01:15:12,401 --> 01:15:13,701
is there anything major that we've,
1150
01:15:13,701 --> 01:15:19,101
but any major component that we've missed of the signature scheme to like wrap it all together?
1151
01:15:20,541 --> 01:15:25,481
Well, we have the two different, I think if we go back to the public key format, we can maybe.
1152
01:15:26,541 --> 01:15:28,681
Yeah, let's look at this and see where we're at.
1153
01:15:28,981 --> 01:15:32,421
So if I actually just hold the card right here,
1154
01:15:32,821 --> 01:15:37,281
you can see that the stateful part exists over here in parallel to the stateful part.
1155
01:15:37,641 --> 01:15:40,241
And the stateful part can be either of these two shapes.
1156
01:15:40,581 --> 01:15:40,861
Okay.
1157
01:15:40,861 --> 01:15:44,961
And the shape of the two trees is chosen by the signer, the person who creates the key.
1158
01:15:45,141 --> 01:15:47,021
And it's chosen at key generation time.
1159
01:15:47,401 --> 01:15:49,901
And it is fixed forever once you've generated the key.
1160
01:15:50,521 --> 01:15:50,801
Okay.
1161
01:15:51,081 --> 01:15:51,821
That makes sense.
1162
01:15:51,981 --> 01:15:52,221
Okay.
1163
01:15:52,421 --> 01:15:54,761
You say that like that's a really important note.
1164
01:15:54,921 --> 01:15:56,341
It's very important for wallets.
1165
01:15:56,801 --> 01:16:03,761
If you were to, say, generate a UXMSS key, and that would be your stateful root hash,
1166
01:16:04,421 --> 01:16:09,601
and then you were to, say, import that key into a different wallet,
1167
01:16:10,001 --> 01:16:16,181
This would be a misuse of the scheme, first of all, because you'd be needing to move your state over, which is a big faux pas and very dangerous.
1168
01:16:16,181 --> 01:16:25,661
But if you tried to, and then you tried to, say, generate a BXMSS tree on the stateful side instead, this could permit loss of funds.
1169
01:16:26,081 --> 01:16:28,101
Oh, there's so many ways this can go wrong.
1170
01:16:28,401 --> 01:16:31,601
There's so many different ways that you can misuse
signature schemes.
1171
01:16:31,681 --> 01:16:36,821
So it's very important to be very explicit about what the invariants are and how you're allowed to use them.
1172
01:16:36,821 --> 01:16:42,701
So we have to be really, really careful about how, and this is a wallet developer problem.
1173
01:16:42,901 --> 01:16:48,981
Users will not have to worry about these issues outside of just making sure that they're choosing wallets that know what they're doing.
1174
01:16:49,161 --> 01:16:56,221
Yes. This is a matter of helping developers come to grips with a new family of cryptography.
1175
01:16:56,541 --> 01:17:05,101
How difficult do you think it's going to be to get wallet developers, you know, really boned up on this and make sure that they don't screw things up for users?
1176
01:17:05,101 --> 01:17:11,501
I think the first stage of integrating Shrinks into any wallet is to integrate just the stateless part, which is actually very easy.
1177
01:17:11,581 --> 01:17:17,141
And we've made it very easy with our design because you don't need to do any bespoke cryptography to do it.
1178
01:17:17,381 --> 01:17:23,681
You can just use stock SLH DSA libraries with tweaked parameter sets.
1179
01:17:23,801 --> 01:17:28,281
All you need to do is change a few constants and you get the exact scheme we use in Shrinks.
1180
01:17:29,241 --> 01:17:39,201
Then, once the developer feels confident enough and understands the stateful risks and trade-offs and how to use it properly, then they can go about implementing the stateful part.
1181
01:17:39,201 --> 01:17:45,921
So you actually recommend that the implementation of this cryptography at the wallet level be done in stages, right?
1182
01:17:45,981 --> 01:17:50,261
To make sure that the developers are sort of like getting comfortable with what they're doing.
1183
01:17:50,401 --> 01:17:52,041
It's sort of like one step at a time in it.
1184
01:17:52,541 --> 01:17:58,181
Yeah, I'm not sure how I would go about recommending integrating Shrinks just yet.
1185
01:17:58,181 --> 01:18:00,941
we're not at the stage of defining like wallet level BIPs.
1186
01:18:00,981 --> 01:18:15,977
Like we have nothing for how to derive shrinks keys Those will be some important BIPs Yeah How I mean these are to be pretty critical BIPs actually like stipulating all of these potential dangers and really being careful about you know educating wallet developers on how to do this
1187
01:18:15,977 --> 01:18:20,637
And then there's the matter of hyper-tree pruning for hardware wallets, which is a whole other beast.
1188
01:18:20,757 --> 01:18:30,397
It involves modifying the stateless algorithms, which until then have all been purely standard NIST approved.
1189
01:18:30,397 --> 01:18:34,377
and how all of these different modifications and customizations,
1190
01:18:34,557 --> 01:18:35,957
like the shape of the stateful tree,
1191
01:18:36,377 --> 01:18:38,837
whether you use pruning on the stateless tree,
1192
01:18:39,217 --> 01:18:41,377
these are all things that will have a lot of interplay
1193
01:18:41,377 --> 01:18:43,377
and will need to be very well and thoroughly standardized.
1194
01:18:44,197 --> 01:18:47,577
Okay, so before we get into what I, again, want to wrap up on,
1195
01:18:47,637 --> 01:18:49,457
which is the functionality conversation,
1196
01:18:49,457 --> 01:18:51,717
which I think is important to discuss.
1197
01:18:51,857 --> 01:18:52,577
Dan's brought it up.
1198
01:18:52,657 --> 01:18:53,557
Benedict's brought it up.
1199
01:18:54,517 --> 01:18:57,517
Is there anything left that we haven't covered
1200
01:18:57,517 --> 01:18:58,657
that's sort of like major?
1201
01:18:58,977 --> 01:18:59,817
Oh, four.
1202
01:19:01,397 --> 01:19:02,797
Let's give fours a try.
1203
01:19:03,477 --> 01:19:04,097
All right.
1204
01:19:04,157 --> 01:19:09,477
So fours, and again, just to remind people, what is the function of the four signatures in all of this?
1205
01:19:09,977 --> 01:19:15,097
Fours, their job, the fours key pairs, there's actually a lot of them here I haven't drawn.
1206
01:19:15,537 --> 01:19:22,517
But you can imagine if you descend through this hyper tree all the way to the bottom, it's got a very large number of fours key pairs.
1207
01:19:22,517 --> 01:19:29,157
and when you're making a signature the scheme pseudo-randomly selects a single fours key to sign
1208
01:19:29,157 --> 01:19:33,497
the actual message that you're trying to sign like a bitcoin transaction or a certificate or a document
1209
01:19:33,497 --> 01:19:40,077
or firmware or something and the fours key pair is what signs that message now let's go over to a new
1210
01:19:40,077 --> 01:19:44,157
card because i think we're gonna need more space for this card for fours you guys yeah all right
1211
01:19:44,497 --> 01:19:45,397
Let's do this.
1212
01:19:45,957 --> 01:19:46,657
Oh, here we go.
1213
01:19:46,777 --> 01:19:47,537
Is this a...
1214
01:19:47,537 --> 01:19:47,997
There we go.
1215
01:19:50,437 --> 01:19:50,977
We'll do.
1216
01:19:51,117 --> 01:19:51,357
Okay.
1217
01:19:51,457 --> 01:19:53,877
Let's put this one behind so that we can...
1218
01:19:53,877 --> 01:19:54,157
Okay.
1219
01:19:54,297 --> 01:19:54,757
There we go.
1220
01:19:55,237 --> 01:19:55,497
Okay.
1221
01:19:55,717 --> 01:19:56,657
So, force.
1222
01:19:56,737 --> 01:19:57,017
Yes.
1223
01:19:57,017 --> 01:19:58,117
So, it's force.
1224
01:19:58,217 --> 01:20:01,957
The last sub-signature scheme used in Sphinx slash Frick.
1225
01:20:01,957 --> 01:20:02,157
Yes.
1226
01:20:02,297 --> 01:20:05,237
This is from SLH, DSA, and Sphinx.
1227
01:20:05,317 --> 01:20:08,257
This is standard NIST stuff here that we're about to talk about.
1228
01:20:08,257 --> 01:20:08,457
Okay.
1229
01:20:08,457 --> 01:20:09,637
So, this is old ground.
1230
01:20:09,777 --> 01:20:10,237
Right there.
1231
01:20:10,437 --> 01:20:10,617
Yeah.
1232
01:20:10,717 --> 01:20:10,837
Good.
1233
01:20:10,937 --> 01:20:11,217
Thank
you.
1234
01:20:11,217 --> 01:20:21,857
all right fours uh fours stands for forest of random subsets and the name forest i think is
1235
01:20:21,857 --> 01:20:28,537
very apropos because you begin by generating a forest of merkle trees i'm going to do three
1236
01:20:28,537 --> 01:20:36,177
here in this example a forest of merkle trees yes i know we're doing three as a toy example how
1237
01:20:36,177 --> 01:20:39,337
usually how many Merkle trees are we talking about in a four signature?
1238
01:20:39,717 --> 01:20:47,417
Oh, I believe we use 10 trees of height 13 in shrinks. It might be the other way around. It
1239
01:20:47,417 --> 01:20:53,477
might be 13 trees of height 10, but I'm not sure. Okay. And basically, I mean, let me know if I'm
1240
01:20:53,477 --> 01:20:58,857
getting this right, just a general simplification. Essentially, this is just like, this is truly
1241
01:20:58,857 --> 01:21:02,817
different cryptography in the sense of like, it's different math tricks to protect information.
1242
01:21:02,817 --> 01:21:12,637
Yes, it's very, FORS uses a very different kind of combinatorial problem that the other signature schemes that we've talked about before don't use.
1243
01:21:12,877 --> 01:21:17,437
It's called, the assumption is technically called interleaved target subset resilience.
1244
01:21:17,637 --> 01:21:17,937
Okay.
1245
01:21:18,397 --> 01:21:20,577
Yeah, ITSR.
1246
01:21:21,137 --> 01:21:25,777
And I have a great analogy to describe why it works, but we'll get to that in a second.
1247
01:21:25,897 --> 01:21:29,297
Let's first describe how FORS works at a simplified level.
1248
01:21:29,297 --> 01:21:34,817
So each of these, I should probably draw the actual pre-images here.
1249
01:21:36,417 --> 01:21:42,297
Each of these little circles at the bottom are pre-images generated by the signer secretly.
1250
01:21:43,077 --> 01:21:44,877
Always from a seed, by the way.
1251
01:21:45,357 --> 01:21:45,397
Okay.
1252
01:21:46,337 --> 01:21:47,977
Same as like with Winternets?
1253
01:21:47,997 --> 01:21:48,177
Yeah.
1254
01:21:48,177 --> 01:21:48,897
Like there's a seed?
1255
01:21:49,097 --> 01:21:49,337
Okay.
1256
01:21:49,597 --> 01:21:49,997
Exactly.
1257
01:21:50,257 --> 01:21:51,317
So I can draw it here, actually.
1258
01:21:51,377 --> 01:21:56,237
And there's a secret seed that just generates all of these and generates all of these.
1259
01:21:56,937 --> 01:21:57,977
There we go.
1260
01:21:57,977 --> 01:21:58,137
These.
1261
01:21:58,137 --> 01:21:58,617
Right.
1262
01:21:58,617 --> 01:22:00,897
You don't have to keep track of all these little roots.
1263
01:22:01,177 --> 01:22:01,257
Okay.
1264
01:22:01,517 --> 01:22:01,857
Precisely.
1265
01:22:01,977 --> 01:22:02,457
Precisely.
1266
01:22:02,717 --> 01:22:06,017
So these are all secret pre-images.
1267
01:22:16,697 --> 01:22:17,557
Like that.
1268
01:22:18,297 --> 01:22:18,557
Okay.
1269
01:22:20,037 --> 01:22:27,777
Each of these pre-images is hashed to get this set of leaves for each of the Merkle trees.
1270
01:22:28,617 --> 01:22:34,477
And of course, then you hash and combine them together into a set of root hashes, the roots of the trees.
1271
01:22:35,137 --> 01:22:41,177
And then those are again hashed to form the four's public key.
1272
01:22:41,777 --> 01:22:41,817
Okay.
1273
01:22:41,877 --> 01:22:49,797
This is the thing that the hyper tree back over here, this is the thing that the hyper tree signs.
1274
01:22:50,117 --> 01:22:53,877
That square right there is the exact same thing as this.
1275
01:22:54,637 --> 01:22:56,257
This is the four's public key.
1276
01:22:56,817 --> 01:23:01,717
At some point, I think I'll make a collage of how all of these whiteboards fit together.
1277
01:23:01,957 --> 01:23:04,377
Maybe we'll add that as like a special image on the pod.
1278
01:23:04,517 --> 01:23:04,637
Okay.
1279
01:23:04,797 --> 01:23:07,757
If you do it with like vector graphics, you can make it like zoomable even.
1280
01:23:07,897 --> 01:23:08,237
Yeah.
1281
01:23:08,237 --> 01:23:10,697
So you can zoom all the way in down to the lowest levels.
1282
01:23:10,777 --> 01:23:19,837
But anyway, what you do in fours is you take a message and kind of like in Winternets, you map it to a set of indexes.
1283
01:23:19,993 --> 01:23:25,673
In this case, each index is going to be a number between 0 and 4, exclusive.
1284
01:23:26,373 --> 01:23:31,753
So you map it to a set of indexes between 0 and 4.
1285
01:23:33,773 --> 01:23:36,773
So for example, we could choose another random message.
1286
01:23:36,773 --> 01:23:48,533
Let's say we map to indexes, I don't know, 2 and 3 and 0.
1287
01:23:49,993 --> 01:23:52,913
Notice there's one index for each tree.
1288
01:23:54,293 --> 01:23:54,533
Right?
1289
01:23:56,373 --> 01:24:02,393
Each index that you map the message to selects a particular pre-image from each tree.
1290
01:24:02,853 --> 01:24:05,933
So the first one, 2, 0, 1, 2.
1291
01:24:06,053 --> 01:24:09,693
We select this one and we reveal it as part of our signature.
1292
01:24:10,273 --> 01:24:11,073
Well, we're not done there.
1293
01:24:11,333 --> 01:24:12,773
Unlike Winternets, that's not...
1294
01:24:12,773 --> 01:24:16,973
I was going to say, it sounds similar to Winternets, but different, different shapes.
1295
01:24:17,173 --> 01:24:17,493
Exactly.
1296
01:24:17,493 --> 01:24:22,393
We need more in order to authenticate it because just that pre-image alone tells a verifier nothing.
1297
01:24:22,593 --> 01:24:26,013
You also need to reveal this node and this node.
1298
01:24:26,353 --> 01:24:30,813
Those are the Merkle authentication nodes needed to eventually recompute this value here.
1299
01:24:31,593 --> 01:24:33,193
And then you do the same for every other tree.
1300
01:24:33,553 --> 01:24:37,673
So 0, 1, 2, 3, we reveal this pre-image.
1301
01:24:38,433 --> 01:24:42,573
And, of course, to authenticate it, we also must reveal a Merkle authentication path.
1302
01:24:42,673 -->
01:24:44,173
So we need these two nodes.
1303
01:24:44,173 --> 01:24:51,873
Taking a wild guess here, another difference between kind of four's cryptographic constructions and Winternets is that you don't need a checksum.
1304
01:24:51,973 --> 01:24:52,853
No checksum is needed.
1305
01:24:53,073 --> 01:24:53,493
There we go.
1306
01:24:53,633 --> 01:24:58,613
The Merkle authentication pads provide all of the authenticity that a verifier needs.
1307
01:24:59,393 --> 01:25:03,373
And then zero, of course, we do the same thing here, revealing these nodes there.
1308
01:25:04,393 --> 01:25:10,613
So together, if you just highlight all of these circled nodes and give those to the verifier,
1309
01:25:11,093 --> 01:25:20,133
The verifier can check that this is, in fact, a preimage of this Merkle tree by hashing it with these two nodes and recomputing for each of the trees their roots.
1310
01:25:20,673 --> 01:25:24,313
Then they hash them all together to recompute the forest public key.
1311
01:25:25,533 --> 01:25:25,973
Question.
1312
01:25:26,233 --> 01:25:26,393
Yeah.
1313
01:25:26,753 --> 01:25:32,733
Why with Winternets you can only use once, but this you can use potentially up to, I think you said maybe 10?
1314
01:25:32,733 --> 01:25:40,773
Is it just because there's just more of these numbers and it's just harder math to, you just need more information basically in order to figure out the key?
1315
01:25:41,153 --> 01:25:48,733
The fundamental problem that you're trying to do, if you're trying to forge a FORS signature, let's say you're given just one signature, right?
1316
01:25:49,113 --> 01:25:50,873
This one that we've just drawn here.
1317
01:25:51,793 --> 01:25:59,753
In order to do that, you have to find a message where each of the indexes selected by that message,
1318
01:26:00,033 --> 01:26:02,253
remember, because you're mapping the message to a set of indexes,
1319
01:26:02,633 --> 01:26:06,793
that message must map to the same indexes that the signer has already revealed.
1320
01:26:06,993 --> 01:26:12,053
Because you just know, as an attacker, this preimage, this preimage, and this preimage.
1321
01:26:12,893 --> 01:26:18,293
And in order to forge a signature, you have to reveal the correct preimages for your signature message.
1322
01:26:19,013 --> 01:26:22,413
So if this is a transaction, this would be a lot longer, by the way.
1323
01:26:22,493 --> 01:26:25,473
This would be many more numbers, and the numbers would be much larger.
1324
01:26:25,473 --> 01:26:29,053
but the key point is that you need to find a message
1325
01:26:29,053 --> 01:26:32,233
that overlaps with the pre-images
1326
01:26:32,233 --> 01:26:34,773
that have already been revealed in previous signatures.
1327
01:26:35,053 --> 01:26:37,153
If I were to reveal another signature,
1328
01:26:37,493 --> 01:26:39,813
so let's say we sign a second message.
1329
01:26:40,253 --> 01:26:47,233
Let's say we sign 3, 1, 0 again.
1330
01:26:49,273 --> 01:26:52,313
Now I reveal 0, 1, 2, 3.
1331
01:26:52,313 --> 01:26:54,853
I reveal this one, this pre-image.
1332
01:26:55,473 --> 01:26:57,513
And that means I also need to reveal this node.
1333
01:26:58,953 --> 01:27:01,573
And this one has already been revealed, but I'll reveal it again
1334
01:27:01,573 --> 01:27:03,493
because it is part of a complete signature.
1335
01:27:04,633 --> 01:27:07,893
And one that selects this pre-image.
1336
01:27:07,993 --> 01:27:11,953
So I reveal this pre-image and this node, and I must also reveal this node.
1337
01:27:12,653 --> 01:27:16,213
And for the last one, it's the exact same, so I don't need to change that.
1338
01:27:16,773 --> 01:27:20,293
So now the adversary has a couple more pre-images, right?
1339
01:27:20,453 --> 01:27:24,173
They have this one that's new, and they have this one that's new.
1340
01:27:24,173 --> 01:27:36,053
So now, if the adversary were to find a message that is any combination of these sets of indexes, like say if you were to just swap these two around, then you could sign the message 330.
1341
01:27:37,473 --> 01:27:38,253
I see.
1342
01:27:38,453 --> 01:27:47,953
Yeah, you could also sign the message 330, or sorry, 210, or any mixing and matching and combining of the different indexes that you've selected.
1343
01:27:47,953 --> 01:27:52,153
What do you think are the trade-offs between FOURs and Winternets?
1344
01:27:52,153 --> 01:27:55,413
Like, why do we use Winternet sometimes and fours other times?
1345
01:27:55,453 --> 01:27:56,833
Because four signatures are huge, man.
1346
01:27:57,033 --> 01:27:57,793
Oh, really?
1347
01:27:58,213 --> 01:27:58,693
They're huge.
1348
01:27:58,813 --> 01:27:59,833
They're just big.
1349
01:28:00,013 --> 01:28:02,053
They're, I believe, like several kilobytes.
1350
01:28:02,433 --> 01:28:03,013
Oh, man.
1351
01:28:03,053 --> 01:28:03,433
Yeah, man.
1352
01:28:03,453 --> 01:28:09,653
A big section of every SLH-DSA Sphinx signature is the few-time signature.
1353
01:28:09,793 --> 01:28:14,433
Because you really need that extra size in order to get the few-time property.
1354
01:28:14,773 --> 01:28:17,193
And I think Jonas even confirmed.
1355
01:28:17,313 --> 01:28:19,113
I asked this question on the podcast with Jonas.
1356
01:28:19,113 --> 01:28:21,933
And I think he said sort of by definition, like,
1357
01:28:22,153 --> 01:28:26,153
signatures that you only use once are always going to be the smallest by definition. Yeah.
1358
01:28:26,153 --> 01:28:38,230
That makes logical sense They give the most trade in terms of like signature budget because obviously they throw away your entire signature budget save one and then that as low as you can go So you can make any more of a trade
1359
01:28:38,250 --> 01:28:39,230
It's like a law of physics.
1360
01:28:39,590 --> 01:28:39,770
Yeah.
1361
01:28:40,330 --> 01:28:41,050
All right.
1362
01:28:41,270 --> 01:28:41,630
Okay.
1363
01:28:41,630 --> 01:28:53,730
So this all is dependent on the mathematical
probability theory behind this question of, you know, how frequently will a message overlap with a set of pre-images that have already been revealed?
1364
01:28:53,730 --> 01:28:58,410
That is the target or that is the interleaved target subset resilience problem.
1365
01:28:58,870 --> 01:29:04,890
The interleaved part comes from thinking about this problem in the context of many forest keys.
1366
01:29:05,250 --> 01:29:09,810
Because remember, there are trillions of these keys in a single SLHTSA key.
1367
01:29:10,710 --> 01:29:10,810
Whoa.
1368
01:29:10,950 --> 01:29:11,190
Yes.
1369
01:29:11,310 --> 01:29:11,930
Oh, wow.
1370
01:29:12,010 --> 01:29:14,370
So there's actually trillions of forests.
1371
01:29:15,290 --> 01:29:17,070
Is that where most of the size comes from?
1372
01:29:17,750 --> 01:29:17,950
No.
1373
01:29:18,310 --> 01:29:20,910
No, it's the millions of winter in its signatures.
1374
01:29:20,910 --> 01:29:27,350
Yes, there's only, there's one, if we go back to this, there's only one Winternet signature per layer.
1375
01:29:27,670 --> 01:29:30,990
So there's one here, there's one here, and there's another one here.
1376
01:29:31,190 --> 01:29:35,550
This is an example with three layers of XMSS trees.
1377
01:29:36,150 --> 01:29:38,910
You could even draw the layers like right here.
1378
01:29:41,770 --> 01:29:43,270
Okay, all right.
1379
01:29:43,490 --> 01:29:46,730
Three layers means three Winternet signatures plus a fours signature.
1380
01:29:46,850 --> 01:29:49,590
And that's basically all that a Sphinx signature is.
1381
01:29:49,590 --> 01:29:55,030
It's just a concatenation of a FORS signature and a Winternet signature and then another one and then another one.
1382
01:29:55,210 --> 01:30:02,990
And basically, we're using Winternets for their size and FORS we use as a sort of like foundational base extra state, extra budget option.
1383
01:30:03,170 --> 01:30:04,150
I'll correct myself there.
1384
01:30:04,410 --> 01:30:09,410
Actually, what I said a second ago, it's concatenation of FORS plus a bunch of XMSS signatures.
1385
01:30:09,410 --> 01:30:11,490
Because remember, we also need the Merkle pads.
1386
01:30:11,790 --> 01:30:12,750
I'm sorry, could you repeat your question?
1387
01:30:12,950 --> 01:30:13,450
No, no, no.
1388
01:30:13,450 --> 01:30:18,530
So, yeah, I was just going to say, like, essentially, like in a nutshell, we're using winternets as much as we can.
1389
01:30:18,590 --> 01:30:23,570
But then we use force for this just little extra budget at the bottom and we trade off the size for it.
1390
01:30:23,610 --> 01:30:24,290
Is that essentially?
1391
01:30:24,830 --> 01:30:25,190
Exactly.
1392
01:30:25,350 --> 01:30:30,010
It gives us this stateless property where security degrades slowly rather than suddenly.
1393
01:30:30,150 --> 01:30:37,830
And that's very important because if you were to use winternets at the bottom and then you were to reuse a winternets key, you're screwed immediately.
1394
01:30:38,290 --> 01:30:40,750
And an adversary could very easily forge signatures.
1395
01:30:40,750 --> 01:30:43,770
So you want a foundation of something that isn't used only once.
1396
01:30:43,930 --> 01:30:45,190
Exactly. And that is fours.
1397
01:30:45,510 --> 01:30:46,110
There we go.
1398
01:30:46,150 --> 01:30:46,290
Yeah.
1399
01:30:46,550 --> 01:30:46,910
Fours.
1400
01:30:47,050 --> 01:30:47,650
Now, maybe I should...
1401
01:30:47,650 --> 01:30:49,930
Should we go back? Anything you want to say about fours?
1402
01:30:49,930 --> 01:30:50,410
There's one more thing.
1403
01:30:50,410 --> 01:30:51,410
Final thoughts on fours.
1404
01:30:51,430 --> 01:30:54,570
It's a little intuition game here, a little example or analogy.
1405
01:30:56,290 --> 01:31:03,710
You can think of the different trees as, say, products in a grocery store.
1406
01:31:04,670 --> 01:31:09,030
Each of these trees has a collection of different products that all look the same.
1407
01:31:09,030 --> 01:31:16,990
say milk. Each of these is a different brand of milk, right? And say this one, this is cheese.
1408
01:31:17,090 --> 01:31:20,970
Each of this is a different brand of cheese. And imagine in this grocery store, imagine that every
1409
01:31:20,970 --> 01:31:25,630
one of these products looks identical to the consumer. And the consumer just chooses effectively
1410
01:31:25,630 --> 01:31:30,810
randomly when they're going through and shopping on their grocery list, right? Each time they find
1411
01:31:30,810 --> 01:31:36,770
a product on their list and they buy a random product from any arbitrary brand. The next shopper
1412
01:31:36,770 --> 01:31:42,930
comes through and does the same thing. And this is analogous to signing a second message, for instance,
1413
01:31:43,090 --> 01:31:49,670
right? These products are chosen randomly. Sometimes they overlap and collide, like in this
1414
01:31:49,670 --> 01:31:55,230
case, where we signed the same index. And this is a case where two customers buy the same product
1415
01:31:55,230 --> 01:32:02,030
just by random luck. Now, the probability question that you want to answer here
1416
01:32:02,030 --> 01:32:08,450
is what's the probability that the next customer is going to buy one of these circled products
1417
01:32:08,450 --> 01:32:10,990
that the other customers before them already purchased.
1418
01:32:11,930 --> 01:32:12,010
Okay.
1419
01:32:12,190 --> 01:32:13,490
And you can compute this probability.
1420
01:32:14,310 --> 01:32:19,870
And based on it, you can construct an estimation of the security of this system against forgery,
1421
01:32:19,870 --> 01:32:24,310
against an adversary who's just repeatedly trying to find messages
1422
01:32:24,310 --> 01:32:27,310
that overlap with the ones that have already been signed.
1423
01:32:27,610 --> 01:32:31,150
Basically, like what's how like many tries does an attacker have
1424
01:32:31,150 --> 01:32:32,950
before they could effectively brute force this.
1425
01:32:33,070 --> 01:32:33,230
Yes.
1426
01:32:33,370 --> 01:32:35,350
And shrinks and sphinx are designed
1427
01:32:35,350 --> 01:32:40,890
so that that probability is less than 2 to the power of 128 or more.
1428
01:32:41,570 --> 01:32:43,050
Or actually, I should say or less.
1429
01:32:43,070 --> 01:32:44,610
Which is a security assumption we like in Bitcoin.
1430
01:32:44,790 --> 01:32:47,030
That's like the number that we like in Bitcoin.
1431
01:32:47,190 --> 01:32:47,610
Yeah, yeah.
1432
01:32:48,170 --> 01:32:51,730
128 bits is the security level of SECP256K1
1433
01:32:51,730 --> 01:32:53,930
against Pollard row attacks.
1434
01:32:54,090 --> 01:32:56,910
So we're aiming for that same security level with shrinks.
1435
01:32:57,230 --> 01:32:58,210
Okay, there you go.
1436
01:32:58,210 --> 01:33:02,050
So we basically want to meet the security level of our existing signature scheme.
1437
01:33:02,330 --> 01:33:03,630
That's the classical security.
1438
01:33:03,850 --> 01:33:06,050
Quantum security is a more complicated beast.
1439
01:33:06,330 --> 01:33:09,150
But just for hackers, you know, quantum aside.
1440
01:33:09,510 --> 01:33:10,330
Exactly. Exactly.
1441
01:33:10,810 --> 01:33:12,250
All right. OK.
1442
01:33:12,650 --> 01:33:14,090
Well, this was a good.
1443
01:33:14,350 --> 01:33:15,410
We really did it.
1444
01:33:15,490 --> 01:33:16,590
We really went for it.
1445
01:33:16,590 --> 01:33:24,150
Yes. And if you can understand all of those little subschemes that we've just gone through, then you understand almost all of Sphinx and Shrinks.
1446
01:33:24,310 --> 01:33:25,510
This was quite comprehensive.
1447
01:33:25,510 --> 01:33:29,370
I thought that this was an ambitious project for us and I think that we pulled it off
1448
01:33:29,370 --> 01:33:34,350
um I think I think Jonas will approve of this the nice thing about hash base signatures is that if
1449
01:33:34,350 --> 01:33:37,950
you break them down into their components it's really just merkle trees the whole way down like
1450
01:33:37,950 --> 01:33:52,886
have you noticed that almost every one of these diagrams has a merkle tree on it I mean we love merkle trees merkle trees are great exactly exactly it just Merkle trees It forests of Merkle trees It Merkle trees signing other Merkle trees all the way down to the bottom Well I think that we done a great job breaking
1451
01:33:52,886 --> 01:33:57,566
this signature scheme down to its absolute guts. Anyone who's still here hanging on to this,
1452
01:33:57,566 --> 01:34:03,986
you are now an expert in Sphinx slash Shrinks, the potentially new post-quantum signature scheme
1453
01:34:03,986 --> 01:34:08,506
we're going to have in Bitcoin, which is a big deal. Any final thoughts? And again,
1454
01:34:08,506 --> 01:34:16,006
We don't have too much time, but any final thoughts you want to add to this design or anything that you want to note on this design that you guys are proposing?
1455
01:34:16,786 --> 01:34:20,486
And then I may really quickly ask you some functionality questions.
1456
01:34:21,426 --> 01:34:23,066
Why don't we go into the functionality questions?
1457
01:34:23,246 --> 01:34:33,486
So, I mean, the main thing that I just want to kind of make sure that we're, you know, in fairness, making sure people understand is what are the functionality tradeoffs with this type of signature?
1458
01:34:33,486 --> 01:34:42,026
Like, what are we giving up that we currently have in Bitcoin with elliptic curve signatures that we will not be able to do with these hash-based signatures or specifically with shrinks?
1459
01:34:42,606 --> 01:34:52,486
Well, the first and biggest one is the algebraic structure that we have with elliptic curves is completely gone here because hash functions don't have any linearity.
1460
01:34:52,646 --> 01:34:57,906
They don't have any kind of way to, like, add two hashes together in a way that's homomorphic.
1461
01:34:58,026 --> 01:35:02,466
So you can't do fun stuff like bit 32 public key derivation.
1462
01:35:02,466 --> 01:35:04,386
So if you're given a shrinks public key.
1463
01:35:04,846 --> 01:35:06,906
So HD wallets, you can't do.
1464
01:35:06,906 --> 01:35:08,086
You can do HD wallets.
1465
01:35:08,466 --> 01:35:13,106
You just can't do public key derivation from a different public key.
1466
01:35:13,486 --> 01:35:13,786
Okay.
1467
01:35:13,926 --> 01:35:15,826
The technical term for this is re-randomization.
1468
01:35:16,386 --> 01:35:23,326
You can't take an existing shrinks key and transform it into a different valid one that the original signer can still use.
1469
01:35:24,066 --> 01:35:26,286
And that's the fundamental thing that BIP32 does.
1470
01:35:26,286 --> 01:35:31,966
I was going to say BIP32 essentially allows you to create an infinite number of keys with one XPUB, essentially.
1471
01:35:32,166 --> 01:35:33,026
That's what we're talking about.
1472
01:35:33,086 --> 01:35:37,426
That's a pretty important core functionality of Bitcoin.
1473
01:35:37,646 --> 01:35:41,046
I mean, how do you preserve privacy in a practical way without that?
1474
01:35:41,726 --> 01:35:44,706
Well, you can have the signer generate a whole bunch of keys.
1475
01:35:45,146 --> 01:35:48,466
Like, for example, in a software wallet, this would be very easy.
1476
01:35:48,866 --> 01:35:52,786
The signer would be, you know, the computer itself has the key inside its memory.
1477
01:35:52,786 --> 01:35:57,706
And so it could generate an arbitrary number of Shrink's keys from a deterministic seed.
1478
01:35:58,206 --> 01:36:01,326
And this would give you effectively the same use that we have today.
1479
01:36:01,326 --> 01:36:05,446
So there's workarounds, basically, is what you're saying. There's ways to handle this situation.
1480
01:36:05,606 --> 01:36:15,306
The hard part comes when you're talking about untrusted parties having access to a single key that they can then derive from, like you can with Xpubs today.
1481
01:36:15,486 --> 01:36:19,686
You can't have a watch-only wallet with Shrinks unless it's a single address.
1482
01:36:20,186 --> 01:36:22,526
I see. OK, so that's the issue.
1483
01:36:22,526 --> 01:36:33,786
There's a caveat there, which is that if you consider shrinks in the greater context of Bitcoin being used in combination with different signature schemes, like Schnorr or isogenies, then you can actually do that.
1484
01:36:33,866 --> 01:36:39,146
It's just that the shrinks key can't be randomized where the other one can be.
1485
01:36:39,146 --> 01:36:48,886
So you can still have different addresses and you can even hide the shrinks public key so they can't be linked unless the shrinks key is used, in which case you do need to reveal it.
1486
01:36:49,286 --> 01:36:52,866
And that links any other addresses that have already used the same key.
1487
01:36:53,406 --> 01:37:02,766
What other kind of like core functionality or like kind of commonly used functionality in Bitcoin are we potentially giving up with this signature scheme as of now until we find creative solution?
1488
01:37:03,246 --> 01:37:05,826
There's multi-signature and threshold signature, of course.
1489
01:37:05,986 --> 01:37:06,966
I'm very sad about this.
1490
01:37:06,966 --> 01:37:07,226
Yeah.
1491
01:37:07,226 --> 01:37:08,226
This is a bummer.
1492
01:37:08,226 --> 01:37:34,086
Yeah. Now, there's been some very interesting work being done in the Shrink's working group on this. There's a couple of people working on using multi-party computation to evaluate Shrink's signature algorithms using these untrusted systems where the two parties can compute using shared secrets without revealing those secrets and produce a valid signature, even though they never see each other's secret keys.
1493
01:37:34,086 --> 01:37:40,886
Okay, so we may be able to solve this with MPC, which some people would consider slightly less secure than traditional multisign.
1494
01:37:40,886 --> 01:37:41,326
Vastly.
1495
01:37:42,646 --> 01:37:44,486
Very, very less secure than multisign.
1496
01:37:44,486 --> 01:37:45,486
I shouldn't say vastly.
1497
01:37:45,626 --> 01:37:46,706
Maybe it's an overstatement.
1498
01:37:46,906 --> 01:37:51,706
But essentially, it has a lot more moving parts and a lot more opportunity for vulnerability.
1499
01:37:52,006 --> 01:37:54,526
So we would really like if there was a way to do it.
1500
01:37:54,626 --> 01:37:57,186
But so far, we don't think that there is.
1501
01:37:57,366 --> 01:38:03,586
So we're going towards MPC to see where the ceiling is and how far we can push this idea.
1502
01:38:03,586 --> 01:38:14,646
And how secure we can possibly make this thing. I mean, maybe instead of, you know, figuring out how to make hash-based multisig, we figure out just a way to make MPCs more secure? Is that like a hope we can dream for?
1503
01:38:14,766 --> 01:38:32,526
I personally don't know that much about MPC. It's actually Boris Nagayev and Oleksandr who are
working on this, and they're doing some very cool stuff. They've got some prototypes working with two-party computation. However, there's caveats, like it's not out-of-the-box quantum secure, and there's got to be more work done in order to get it there.
1504
01:38:32,526 --> 01:38:48,546
Would you say that, you know, multi-sig and XPUBs for that matter, probably the two biggest, most commonly used things that we use in Bitcoin today that will be at least like meaningfully changed, meaningfully different using these schemes?
1505
01:38:48,746 --> 01:39:04,082
Yeah 100 percent 100 percent It a tradeoff space And unfortunately the tradeoff that you get for the very tight security of hash signature schemes is the lack of flexibility And you can do fun stuff a lot of the times Well you know the price of post
1506
01:39:04,082 --> 01:39:10,342
security, I guess. Is that potentially an argument for, I mean, I guess in this first iteration,
1507
01:39:10,342 --> 01:39:17,282
if we add hash-based signatures, we will still keep elliptic curve signature options until it's
1508
01:39:17,282 --> 01:39:21,982
sort of more clear that, you know, a quantum computer or some sort of potential break in
1509
01:39:21,982 --> 01:39:27,422
ECC is plausible. Is that the idea? Yeah, most of the proposals revolve around this idea of
1510
01:39:27,422 --> 01:39:31,482
commingling the two different signature schemes, classical and post-quantum.
1511
01:39:31,682 --> 01:39:35,662
Is this cryptographic agility? Is that the term that we love for this?
1512
01:39:35,662 --> 01:39:38,982
I don't know what the technical meaning of cryptographic agility is, but that's how I
1513
01:39:38,982 --> 01:39:42,822
tend to use it in colloquial conversation, where you have, you know, two different keys committed
1514
01:39:42,822 --> 01:39:48,922
to in the same address, and you can use either of them. And they're both hidden until used. So if
1515
01:39:48,922 --> 01:39:54,882
one breaks, in theory, as long as the hash function can't be reversed, then you shouldn't
1516
01:39:54,882 --> 01:39:59,462
be able to forge signatures for that vulnerable one. So if addresses are not reused, and that's a
1517
01:39:59,462 --> 01:40:04,502
big if, then both schemes should be hidden until used, and you can use whichever one is secure at
1518
01:40:04,502 --> 01:40:09,862
the time. So I think it's important for the people to know, you know, we don't necessarily need to
1519
01:40:09,862 --> 01:40:15,062
switch to this less functional signature scheme, you know, unless or until the quantum computer is
1520
01:40:15,062 --> 01:40:19,842
like really close to coming, we can migrate to addresses that have both. So we don't have to
1521
01:40:19,842 --> 01:40:24,562
give up this functionality anytime soon, unless we need to, at which point it will almost certainly
1522
01:40:24,562 --> 01:40:29,682
be a worthwhile trade. 100%. Yeah. And the real question that we'll get into then if we keep
1523
01:40:29,682 --> 01:40:35,642
talking about that is what output type do we use? What address format do we use to host shrinks?
1524
01:40:35,642 --> 01:40:43,722
because this cannot be deployed as is on the existing script leaf versions in Taproot.
1525
01:40:43,882 --> 01:40:46,102
It can't be deployed in pay-to-witness script hash,
1526
01:40:46,522 --> 01:40:48,182
and that is because of the size of the signatures.
1527
01:40:48,742 --> 01:40:50,922
The signatures are actually too big to fit on the stack.
1528
01:40:51,142 --> 01:40:55,542
Well, you know that this is something near and dear to my heart as a co-author of BIP360.
1529
01:40:55,762 --> 01:40:58,002
This is now I can't not ask you the question.
1530
01:40:58,462 --> 01:41:03,562
Do you have a take on P2MR versus P2 Taproot 2?
1531
01:41:03,562 --> 01:41:10,482
which is not really a fair comparison because P2Taproot 2 hasn't really been truly specked out, is my understanding.
1532
01:41:10,742 --> 01:41:18,442
But, I mean, do you have sort of a point of view about the output type that we should be adopting in order to use these signatures effectively?
1533
01:41:18,782 --> 01:41:21,562
I think any post-quantum output type should be post-quantum.
1534
01:41:22,142 --> 01:41:24,162
And P2Taproot V2 is not.
1535
01:41:24,722 --> 01:41:25,582
It is not.
1536
01:41:27,882 --> 01:41:30,322
No, but I respect the...
1537
01:41:30,322 --> 01:41:30,722
No, I'm kidding.
1538
01:41:30,722 --> 01:41:33,222
If it's P2TR, whatever's best for Bitcoin, I'm not attached.
1539
01:41:33,222 --> 01:41:38,462
Respect the opinions of people who are pushing for pay to tap root V2 because their arguments are completely valid.
1540
01:41:38,762 --> 01:41:42,582
But they hinge upon a very key question, which is, can we solve the timing problem?
1541
01:41:43,362 --> 01:41:45,922
The timing problem is, when is Q day?
1542
01:41:46,282 --> 01:41:46,522
Right.
1543
01:41:46,822 --> 01:41:50,882
Answering that question would allow pay to tap root V2 to be valid.
1544
01:41:50,882 --> 01:42:01,962
But until that question can be conclusively answered and then proven on chain in a way that we can trigger promptly, there is really no valid argument for pay to tap root V2.
1545
01:42:01,962 --> 01:42:22,762
This is the key point that I know Ethan has also made several times, which is basically that the core problem, you know, all other technicals aside with pay to taproot too, which basically is just, you know, keeping taproot as is and then disabling at the time the quantum computer comes, is that we don't know when the quantum computer is going to come.
1546
01:42:23,302 --> 01:42:25,362
It's a little tricky, a little risky.
1547
01:42:25,362 --> 01:42:34,502
And then there's Peta Taproot Hash, which is a really cool new construction that came out of some work from Boris Nagayev on elliptic curve key recovery from a Schnorr signature.
1548
01:42:35,402 --> 01:42:39,042
This allows you to do essentially Peta
Taproot, but behind a hash.
1549
01:42:39,442 --> 01:42:51,642
So it's kind of a mix between Peta Merkle root and Peta Taproot V2, where unlike Peta Taproot V2, it's still secure if you sit perfectly still and never spend your coins and never reuse your address.
1550
01:42:51,642 --> 01:42:58,602
but it still requires the elliptic curve spending path to be disabled unlike pay to merkle route
1551
01:42:58,602 --> 01:43:04,222
where even if nobody acts and nobody does anything after it's deployed pay to merkle route can still
1552
01:43:04,222 --> 01:43:10,042
be used safely in theory in theory and there are caveats there like you can't reuse addresses you
1553
01:43:10,042 --> 01:43:14,782
can't share your x pubs with your elliptic curve keys with prop with basically with perfect use
1554
01:43:14,782 --> 01:43:18,682
It is quantum resilient or resistant.
1555
01:43:19,042 --> 01:43:23,202
In all of these cases, it's still desirable to have an EC disabling fork.
1556
01:43:23,722 --> 01:43:34,042
But in the case of Peta Merkle Root and Peta Taproot Hash, there's still a safe place for people to send their funds to in the event of a quantum emergency scenario.
1557
01:43:34,262 --> 01:43:42,382
Whereas with Peta Taproot V2, you have to find some way to very, very quickly activate a fork to lock everyone's coins into post-quantum pads.
1558
01:43:42,382 --> 01:43:44,602
Otherwise, anybody is fair game.
1559
01:43:44,782 --> 01:43:59,622
This is going to be a perfect conversation for me to take up with my next guest, Taj, because I know he's doing a lot of work right now on sort of, you know, like ways that we can essentially delay certain kinds of mitigations, quote unquote, until the quantum computer arises.
1560
01:43:59,702 --> 01:44:02,102
So I'm going to be very curious to ask him what he thinks about the PGMR.
1561
01:44:02,102 --> 01:44:03,322
Tripwire and stuff like that?
1562
01:44:03,462 --> 01:44:03,782
What?
1563
01:44:04,082 --> 01:44:07,022
Tripwire and stuff like that, like activating based on the numbs point?
1564
01:44:07,022 --> 01:44:10,022
Well, yeah, various opportunities.
1565
01:44:09,979 --> 01:44:15,539
I've heard a few. I actually am not familiar with that particular example. Let me know if that's something I should bring up with him.
1566
01:44:15,839 --> 01:44:24,679
Oh, absolutely. I mean, there's been many different ideas for how we would recognize when a quantum computer is about to appear. But personally, my philosophy is that it's unpredictable.
1567
01:44:25,019 --> 01:44:28,899
I mean, I agree. You really don't know who's going to have what when.
1568
01:44:29,099 --> 01:44:30,519
Nobody knows when a technological revolution is about to occur, right?
1569
01:44:30,619 --> 01:44:34,859
If China gets there first, we don't think that's going to happen. But if they do, they're not going to tell us.
1570
01:44:34,859 --> 01:44:35,519
Yeah, yeah.
1571
01:44:35,519 --> 01:44:44,219
Thank you so much, Conduition. This was amazing. I am so happy about our very thorough explainers.
1572
01:44:44,279 --> 01:44:48,139
And again, for everyone home watching, if you got through this, you are now an expert in the
1573
01:44:48,139 --> 01:44:51,559
signature scheme. So pat yourself on the back. Thank you so much, Conduition. This was awesome.
1574
01:44:51,739 --> 01:44:55,079
Thank you. It's been a pleasure. I'm very glad I got to come on your show. And I've been a long
1575
01:44:55,079 --> 01:44:58,939
time viewer and I'm really liking all that you're doing. And thank you so much for giving an
1576
01:44:58,939 --> 01:45:01,739
opportunity for me to share Shrinks with the world. Thank you.
1577
01:45:05,519 --> 01:45:05,939
Thank you.