Commit 772df36
committed
Merge #151: MuSig: Add Minimal Compatibility with BIP32 Tweaking
8088edd musig: add test vector for ordinary (non xonly) tweaking (Elliott Jin)
57a1792 musig: add ordinary and xonly tweaking to the example (Jonas Nick)
3710736 musig: allow ordinary, non-xonly tweaking (Jonas Nick)
c519b46 musig: add pubkey_get to obtain a full pubkey from a keyagg_cache (Jonas Nick)
Pull request description:
In short, `musig_pubkey_tweak_add` now allows for xonly _and_ "ordinary" tweaking. Also, in order to allow using `ec_pubkey_tweak_add` on the non-xonly aggregate public key, there's a new function `musig_pubkey_get` that allows obtaining it from the `keyagg_cache`.
One alternative would be that instead of adding `musig_pubkey_get`, we could change `pubkey_agg` to output an ordinary (non-xonly) pubkey. Then users of the API who do not need ordinary (BIP32) tweaking would be forced to call `xonly_pubkey_from_pubkey`. And we'd probably want to change the spec. And it would be a bit weird to output a pubkey that can't be directly schnorrsig_verify'd.
Based on #131
ACKs for top commit:
robot-dreams:
ACK 8088edd based on #151 (comment) and the following `range-diff`:
Tree-SHA512: a4a0100f0470c870f88a8da27dbcc4684fcc2caabb368d4340e962e08d5ee04634e6289bafa3448dbfd0b5793a3e70de5bd6ddca7a619cc3220ff762d518a8feFile tree
5 files changed
+298
-110
lines changed- examples
- include
- src/modules/musig
5 files changed
+298
-110
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
55 | 94 | | |
56 | | - | |
| 95 | + | |
57 | 96 | | |
58 | | - | |
59 | 97 | | |
60 | 98 | | |
61 | 99 | | |
62 | | - | |
63 | 100 | | |
64 | 101 | | |
65 | 102 | | |
| |||
86 | 123 | | |
87 | 124 | | |
88 | 125 | | |
89 | | - | |
90 | 126 | | |
91 | 127 | | |
92 | 128 | | |
93 | 129 | | |
94 | 130 | | |
95 | 131 | | |
96 | 132 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 133 | + | |
101 | 134 | | |
102 | 135 | | |
103 | 136 | | |
104 | | - | |
| 137 | + | |
105 | 138 | | |
106 | 139 | | |
107 | 140 | | |
108 | 141 | | |
109 | 142 | | |
110 | 143 | | |
111 | | - | |
| 144 | + | |
112 | 145 | | |
113 | 146 | | |
114 | 147 | | |
| |||
127 | 160 | | |
128 | 161 | | |
129 | 162 | | |
130 | | - | |
| 163 | + | |
131 | 164 | | |
132 | 165 | | |
133 | 166 | | |
| |||
141 | 174 | | |
142 | 175 | | |
143 | 176 | | |
| 177 | + | |
144 | 178 | | |
145 | 179 | | |
146 | 180 | | |
| |||
156 | 190 | | |
157 | 191 | | |
158 | 192 | | |
159 | | - | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
160 | 202 | | |
161 | 203 | | |
162 | 204 | | |
163 | 205 | | |
164 | 206 | | |
165 | | - | |
| 207 | + | |
166 | 208 | | |
167 | 209 | | |
168 | 210 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
223 | 223 | | |
224 | 224 | | |
225 | 225 | | |
226 | | - | |
227 | | - | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
228 | 289 | | |
229 | 290 | | |
230 | 291 | | |
231 | 292 | | |
232 | 293 | | |
233 | 294 | | |
234 | | - | |
235 | | - | |
| 295 | + | |
| 296 | + | |
236 | 297 | | |
237 | 298 | | |
238 | 299 | | |
| |||
255 | 316 | | |
256 | 317 | | |
257 | 318 | | |
258 | | - | |
| 319 | + | |
259 | 320 | | |
260 | 321 | | |
261 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
248 | 262 | | |
249 | 263 | | |
250 | 264 | | |
| |||
263 | 277 | | |
264 | 278 | | |
265 | 279 | | |
266 | | - | |
| 280 | + | |
267 | 281 | | |
268 | 282 | | |
269 | 283 | | |
| |||
280 | 294 | | |
281 | 295 | | |
282 | 296 | | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
283 | 305 | | |
0 commit comments