Skip to content

Commit 4aa9884

Browse files
committed
final v3 edit
1 parent ae9a4ca commit 4aa9884

5 files changed

Lines changed: 57 additions & 55 deletions

‎docs/18_0_Using_Schnorr.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ has been under consideration for use with Bitcoin ever since because
77
of the advantages it offers.
88

99
All new P2TR addresses are signed with Schnorr signatures. This can
10-
include standard signatures internal to Bitcoin but also signatures
11-
from more advanced Schnorr signature systems such as MuSig2 multisigs
12-
and FROST threshold sigs.
10+
include standard single signatures and also signatures from more
11+
advanced Schnorr signature systems such as MuSig2 multisigs and FROST
12+
threshold sigs.
1313

1414
## Objectives for This Chapter
1515

‎docs/18_1_Understanding_Schorr.md‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@ Mathematically, Schnorr signatures take advantage of finite fields
1010
empower the discrete logarithm problem. It's easy to get from a
1111
private key to a public key, but all but impossible to go the opposite
1212
direction, with is obviously the trapdoor characteristic required so
13-
that public-key cryptography (and therefore signature systems) can
14-
work.
13+
that public-key cryptography (and therefore signature systems) works.
1514

1615
But the math doesn't really matter to your understanding of why
1716
Schnorr signatures are a big upgrade for Bitcoin. That largely comes
18-
done to another singular characteristic of Schnorr signatures: because
19-
of their linearity, they're simply aggregatable.
17+
down to a singular characteristic of Schnorr signatures: because of
18+
their linearity, they're simply aggregatable.
2019

2120
### Understand Aggregatable Multisig
2221

@@ -41,15 +40,15 @@ particular, simplistic ("naive") aggregation of signatures leads to
4140
the key cancellation attack, where a key can be removed from an
4241
aggregate if an attacker knows certain information. This has resulted
4342
in more complex signing systems such as MuSig2 (discussed in
44-
[§18.3](18_3_Using_Bitcoin_With_MuSig2.md)), FROST (discussed in
45-
[§18.4](18_4_Using_Bitcoin_With_FROST.md)), and the use of a Merkle
46-
tree (discussed in [§19.3](19_3_Creating_a_Schnorr_Multisig.md)) being
47-
required to access Schnorr's multisig aggregation advantages.
43+
[§18.3](18_3_Using_Bitcoin_With_MuSig2.md)) and FROST (discussed in
44+
[§18.4](18_4_Using_Bitcoin_With_FROST.md)) of the use of a Merkle tree
45+
(discussed in [§19.3](19_3_Creating_a_Taproot_Multisig.md) being
46+
required to use Taproot multisigs.
4847

4948
### Understand Tweaked Signatures
5049

51-
Because a Schnorr signature's equation is linear it can be modified in
52-
other ways than just adding Schnorr signatures together. In
50+
Because a Schnorr signature's equation is linear, it can be modified
51+
in other ways than just adding Schnorr signatures together. In
5352
particular, you can add a "tweak" to it, which is a static value. You
5453
adjust ("tweak") the public key (and so the address) with a specific
5554
value. You then adjust ("tweak") the private key with the same value
@@ -85,9 +84,10 @@ ECDSA. These include:
8584
## Summary: Understanding Schnorr Signatures
8685

8786
Schnorr signatures are a big improvement over ECDSA in large part
88-
because of their linearity, which makes them trivially
89-
aggregatable. This allows for the creation of static-sized, private
90-
multisigs and also supports the creation of Taproot addresses.
87+
because of their linearity, which makes them trivially (but hopefully
88+
not naively) aggregatable. This allows for the creation of
89+
static-sized, private multisigs and also supports the creation of
90+
Taproot addresses.
9191

9292
> 🔥 ***What is the power of Schnorr?*** In large part, it's
9393
aggregatability. Any two signatures look the same, whether they're

‎docs/18_2_Creating_Taproot_Addresses.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ prone to human mistakes. Bech32m is a modified version of bech32
2626
defined in
2727
[BIP-350](https://github.com/bitcoin/bips/blob/master/bip-0350.mediawiki). It's
2828
used for Segwit v1 (Taproot). It resolves a small issue where deleting
29-
"q"s before a final "p" did not invalidate the checksum.
29+
"q"s before a final "p" did not invalidate the checksum in the older bech32.
3030

3131
A bech32m address starts with bc1p (for mainnet) or tb1p (for testnet
3232
and signet) where a bech32 address starts with bc1q (for mainnet) or
@@ -35,7 +35,8 @@ tb1q (for testnet and signet).
3535
## Examine a P2TR Address
3636

3737
If you look at a `decoderawtransaction` for a transaction sent to a
38-
P2TR address, the main thing you note is that the `type` is now `witness_v1_taproot`:
38+
P2TR address, the main thing you note is that the `type` is now
39+
`witness_v1_taproot`:
3940

4041
```sh
4142
| {
@@ -168,12 +169,12 @@ Bitcoin program will sign with Schnorr when you go to spend it.
168169
169170
## Summary: Creating Taproot Addresses
170171
171-
Creating Taproot address in Bitcoin Core simply requires that you
172+
Creating a Taproot address in Bitcoin Core simply requires that you
172173
create a `bech32m` address with `createnewaddress`. Funds sent to the
173174
address will then be locked with Schnorr, and you'll sign with Schnorr
174175
when you're ready to spend them.
175176
176177
## What's Next?
177178
178-
Continue "Using Schnorr" with [§18.3: Using Bitcoin With MuSig2](18_3_Using_Bitcoin_With_MuSig.md).
179+
Continue "Using Schnorr" with [§18.3: Using Bitcoin With MuSig2](18_3_Using_Bitcoin_With_MuSig2.md).
179180

‎docs/18_3_Using_Bitcoin_With_MuSig2.md‎

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ MuSig2, while the next chapter includes discusison of MAST multisigs.
1212

1313
Bitcoin multisigs can't be naively created using Schnorr. If you just
1414
aggregate two keys, it's possible to cancel out one of the keys
15-
(provided you *know* the public key you're cancelling) and then sign
15+
provided you *know* the public key you're cancelling and then sign
1616
with the other key. To resolve this requires a more complex
1717
protocols. One of these is MuSig2.
1818

@@ -21,7 +21,7 @@ n). That means that, by default, all of the participants in a MuSig2
2121
signature must sign. The only current methodology for using MuSig2 to
2222
create a threshold signature is to create a MAST that lays out each of
2323
the possibilities, as briefly mentioned in
24-
[§19.2]( 19_2_Designing_Tapscripts.md).
24+
[§19.2](19_2_Designing_Tapscripts.md).
2525

2626
## Create a MuSig2 Address
2727

@@ -61,7 +61,7 @@ musigpubkey2=$(bitcoin-cli -rpcwallet=musig2 -named getaddressinfo address=$musi
6161
```
6262
6363
You can then use the "tr(musig(...))" descriptor, to denote this
64-
address as a MuSig2 Taproot address, when combining these public keys.
64+
address as a MuSig2 Taproot address.
6565
6666
```sh
6767
musigdesc="tr(musig($musigpubkey1,$musigpubkey2))"
@@ -88,7 +88,7 @@ bitcoin-cli -rpcwallet=musigwatchonly importdescriptors '''[{ "desc": "'$musigde
8888
| ]
8989
```
9090
91-
Now you just need your address:
91+
Now you can retrieve your MuSig2 address:
9292
9393
```sh
9494
bitcoin-cli -rpcwallet=musigwatchonly getaddressesbylabel ""
@@ -107,8 +107,8 @@ The question will be how to retrieve them!
107107
108108
## Spend from a MuSig2 Address
109109
110-
As we saw in [§8.1](8_1_Spending_a_Multisig_with_a_PSBT), the best way
111-
to spend a multisig is through a PSBT. That's the case for MuSig2
110+
As we saw in [§8.1](08_1_Spending_a_Multisig_with_a_PSBT.md), the best
111+
way to spend a multisig is through a PSBT. That's the case for MuSig2
112112
multisigs as well.
113113
114114
The process of spending the funds therefore start with the creation of
@@ -168,7 +168,7 @@ bitcoin-cli analyzepsbt $psbt
168168
```
169169
170170
It does, but it doesn't tell you that the "signer" is the next step,
171-
as we'd expect. It turns out that `analyzepsbt` doesn't properly
171+
as yu'd expect. It turns out that `analyzepsbt` doesn't properly
172172
support MuSig2 signatures as of Bitcoin Core 31.1, and so it's not
173173
going to show you the next steps properly until you're ready to
174174
finalize.
@@ -210,8 +210,8 @@ bitcoin-cli analyzepsbt $psbt_round1
210210
```
211211
212212
A look with `decodepsbt` reveals that quite a lot has gone on,
213-
including the addition of pubkeys and pubnonces (whatever those are!)
214-
from each participant, but there are no signatures!
213+
including the addition of pubkeys and pubnonces (more on this
214+
momentarily!) from each participant, but there are no signatures!
215215
216216
```sh
217217
bitcoin-cli decodepsbt $psbt_round1
@@ -361,8 +361,8 @@ can they create a final signature.
361361
For MuSig2, in the first round, each participant offers a "pubnonce":
362362
essentially a bit of randomness that sort of fills the role of a
363363
public key. In the second round, they then sign using their private
364-
nonce and their private key. Those signature shares are then combined to
365-
produce the final signature.
364+
nonce and their private key. Those signature shares are then combined
365+
to produce the final signature.
366366
367367
You've conducted the first round of the MuSig2 protocol, and acquired
368368
the nonces, but another round is required to acquire the signatures.
@@ -576,5 +576,5 @@ combine the PSBTs again; and send.
576576
## What's Next?
577577
578578
Continue "Using Schnorr" with [§18.4: Using Bitcoin With
579-
MuSig2](18_4_Using_Bitcoin_With_MuSig2.md).
579+
FROST](18_4_Using_Bitcoin_With_FROST.md).
580580

‎docs/18_4_Using_Bitcoin_With_FROST.md‎

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,24 @@ FROST being able to natively offer threshold signatures is a big
1717
advantage over MuSig2's multisig-only signatures. However, MuSig2 also
1818
has an advantage of its own: accountability. In FROST, you need
1919
insider information to know who signed a multisig. In MuSig2, you can
20-
always guarantee every signator. As with most tools, you should
21-
choose the proper one for your needs.
20+
always guarantee every signator. As with most tools, you should choose
21+
the proper one for your needs.
2222

2323
## Use FROST
2424

25-
Any Bitcoin wallet can create a Taproot address that is built on a
26-
FROST-generated key rather than a singular Schnorr key. That's the
27-
beauty of Schnorr: a multisig FROST key looks exactly the same as a
28-
singular Schnorr key. They're indistinguishable, and so they look just
29-
the same to a wallet.
25+
Any Bitcoin wallet can create a Taproot address from a FROST-generated
26+
key rather than using a singular Schnorr key. That's the beauty of
27+
Schnorr: a multisig FROST key looks exactly the same as a singular
28+
Schnorr key. They're indistinguishable, and so they look just the same
29+
to a wallet.
3030

31-
The trick comes in signing, in order to unlock the puzzle box of the
32-
FROST lock. A wallet _could_ support this functionality, but (unlike
33-
with MuSig2) Bitcoin Core does not. In order to unlock funds locked
34-
into an address defined by a FROST public key, you therefore have to
35-
generate the appropriate signature _outside_ of Bitcoin Core and then
36-
sneak it into a Bitcoin transaction. This _is_ possible, but only with
37-
quite a few additional tools.
31+
The trick comes in signing, to unlock the puzzle box of the FROST
32+
lock. A wallet _could_ support this functionality, but (unlike with
33+
MuSig2) Bitcoin Core does not. In order to unlock funds locked into an
34+
address defined by a FROST public key, you therefore have to generate
35+
the appropriate signature _outside_ of Bitcoin Core and then sneak it
36+
into a Bitcoin transaction. This _is_ possible, but only with quite a
37+
few additional tools.
3838

3939
Our [Learning FROST from the Command
4040
Line](https://learningfrost.blockchaincommons.com/) course is a
@@ -45,24 +45,25 @@ best tools to date to do this work from the command line, and how to
4545
create signature shares among the members of a "FROST
4646
group". [Learning FROST
4747
§4.2](https://learningfrost.blockchaincommons.com/04_2_Signing_PSBTs_with_FROST/)
48-
then shows the precise methodology for signing with FROST, once you
49-
have everything installed and built.
48+
then shows the precise methodology for signing with FROST once you
49+
have everything installed and built and then importing that signature
50+
into Bitcoin Core.
5051

5152
What follows are just the outlines to explain the methodology; you
5253
should consult [Learning FROST from the Command
5354
Line](https://learningfrost.blockchaincommons.com/) for the specifics.
5455

5556
### Create a FROST Address
5657

57-
Creating a FROST address is a simple creation of a FROST group (which
58+
Creating a FROST address requires the creation of a FROST group (which
5859
also isn't supported by Bitcoin Core) followed by implementation of
5960
the techniques that you've previously used to work with
6061
descriptor-based content.
6162

6263
1. Choose the "n" members of a FROST group.
6364
2. Choose what the "m" threshold will be.
6465
3. Apply the FROST protocol to generate individual signing shares and an aggregate public key using ZF Tools or another FROST toolkit.
65-
4. Generate a descriptor by pairing "tr(aggregate public key)" with a generated checksum, per the technique in [§4.2](04_2_Integrating_Addresses_Descriptors/).
66+
4. Generate a descriptor by pairing "tr(aggregate public key)" with a generated checksum, per the technique in [§4.2](04_2_Integrating_Addresses_Descriptors.md).
6667
5. Use `deriveaddresses` to generate one or more addresses for the descriptor.
6768

6869
### Spend a FROST Address
@@ -92,11 +93,11 @@ applied to each signature.
9293

9394
Bitcoin Core doesn't directly support FROST signatures. But, the
9495
aggregatable nature of FROST signatures, which results in all of them
95-
looking the same, means that it will correctly process a FROST
96-
signature if you give it one. You can create a FROST address with
97-
"tr(public-key)", where the public key is a FROST aggregated key; you
98-
can generate an address from that descriptor as usual; and then you
99-
can spend funds by signing with the appropriate signing shares and
96+
looking the same, means that Bitcoin Core will correctly process a
97+
FROST signature if you give it one. You can create a FROST address
98+
with "tr(public-key)", where the public key is a FROST aggregated key;
99+
you can generate an address from that descriptor as usual; and then
100+
you can spend funds by signing with the appropriate signing shares and
100101
inserting that signature into a transaction.
101102

102103
## What's Next?

0 commit comments

Comments
 (0)