Skip to content

Commit f09a06c

Browse files
committed
Describe scenario where halfagg impacts coop case of adaptor sig
1 parent 0042364 commit f09a06c

File tree

2 files changed

+55
-0
lines changed

2 files changed

+55
-0
lines changed

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -124,3 +124,4 @@ This should not be any less efficient in g'root if the output can be spend direc
124124
However, since this is not a normal keypath spend and explicitly unaggregatable, such a spend will stick out from other transactions.
125125
It is an open question if this actually affects protocols built on adaptor signatures.
126126
In other words, can such protocols can be instantiated with a Tapscript spending path for the adaptor signature but without having to use actually use that path - at least in the cooperative case?
127+
See [half-agg-and-adaptor-sigs.md](half-agg-and-adaptor-sigs.md) for more discussion on this subject.

half-agg-and-adaptor-sigs.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Does cross-input half-aggregation affect adaptor signature protocols?
2+
3+
We assume that half-aggregation is only allowed to be applied to key spends, not to script spends.
4+
5+
# In the cooperative case, half-aggregation can add a half-roundtrip to the communication cost
6+
7+
To demonstrate this claim, let's look at an adaptor signature protocol, first without half-aggregation and then with half aggregation.
8+
9+
## Without half-aggregation
10+
11+
**Scenario**: Alice creates a coin that can be spent by either
12+
1. Alice and Bob (key spend)
13+
2. Alice after time T (script spend)
14+
15+
Alice wants to learn a secret if Bob spends the coin.
16+
17+
- Bob sends Alice an adaptor signature for path 1 over a transaction that sends all coins to Bob.
18+
- Alice replies with a signature for path 1.
19+
- Bob spends via path 1. Alice extracts the secret from the adaptor sig and Bob's real sig and is happy.
20+
21+
## With half-aggregation
22+
23+
**Scenario**: Alice creates a coin that can be spent by either
24+
1. Alice and Bob (key spend)
25+
2. Alice after time T (script spend)
26+
3. Alice and Bob (script spend)
27+
28+
Alice wants to learn a secret if Bob spends the coin.
29+
30+
- Bob sends Alice an adaptor signature for path 3 over a transaction that sends all coins to Bob.
31+
Due to half-aggregation, path 1 can not be used for this: the signature could get randomized which would prevent extracting the secret.
32+
- Alice replies with a signature for path 3.
33+
- Bob could spend via path 3, but that would be more expensive than spending via path 1.
34+
- Therefore, Bob sends Alice the secret directly
35+
- ... and if Alice cooperates, she replies with a signature for path 1.
36+
37+
Thus, with half aggregation, the cooperative case requires more communication.
38+
39+
Note that there are adaptor signature protocols that are not affected by half aggregation.
40+
In some sense, there are two types of adaptor signature interactions, one where Alice learns a secret from a transaction and one where Bob can create a transaction after learning a secret (for example, by making a lightning payment).
41+
We have seen the former above and provide an example for the latter below to show that it is unaffected by half aggregation.
42+
The standard scriptless script coinswap requires both types of adaptor signatures.
43+
44+
### Unaffected adaptor sig protocol
45+
46+
**Scenario**: Alice creates a coin that can be spent by either
47+
1. Alice and Bob (key spend)
48+
2. Alice after time T (script spend)
49+
50+
Bob wants to be able to spend the coin if he learns a secret.
51+
52+
Alice sends Bob an adaptor signature for path 1 over a transaction that sends all coins to Bob.
53+
Using the secret adaptor that Bob later learns, Bob can extract the signature.
54+
Once Bob learns the adaptor secret, for example, by making a Lightning payment, he can immediately spend the funding output via path 1.

0 commit comments

Comments
 (0)