additions to sighash

This commit is contained in:
fbock
2024-05-09 12:47:25 +02:00
parent bb20c92c7f
commit 873bc0afe4
3 changed files with 16 additions and 14 deletions

View File

@ -13,11 +13,11 @@
"state": {
"type": "canvas",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"file": "Research/Bitcoin fundamentals/Taproot output structure.canvas",
"viewState": {
"x": 1337.3998874565568,
"y": -91.84205258234509,
"zoom": -0.28644350006291147
"x": 590,
"y": -30.17362449201255,
"zoom": -0.6919547202544427
}
}
}
@ -88,7 +88,7 @@
"state": {
"type": "backlink",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"file": "Research/Bitcoin fundamentals/Taproot output structure.canvas",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
@ -105,7 +105,7 @@
"state": {
"type": "outgoing-link",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas",
"file": "Research/Bitcoin fundamentals/Taproot output structure.canvas",
"linksCollapsed": false,
"unlinkedCollapsed": true
}
@ -128,7 +128,7 @@
"state": {
"type": "outline",
"state": {
"file": "Research/Bitcoin fundamentals/Signature and Flags.canvas"
"file": "Research/Bitcoin fundamentals/Taproot output structure.canvas"
}
}
}
@ -153,10 +153,11 @@
"lastOpenFiles": [
"Research/Bitcoin fundamentals/Knowledge sources.md",
"Research/Bitcoin fundamentals/Signature and Flags.canvas",
"assets/anyonecanpay.webp",
"Research/Bitcoin fundamentals/Spending Taproot UTXOs.md",
"Research/Trade Pipelines/Existing research.md",
"Research/Trade Pipelines/current trade flow.canvas",
"Research/Bitcoin fundamentals/Taproot output structure.canvas",
"assets/anyonecanpay.webp",
"Research/Bitcoin fundamentals/Spending Taproot UTXOs.md",
"Research/Implementation/UI ideas.canvas",
"Research/Implementation/Libraries.md",
"assets/sighash_flags.webp",
@ -166,7 +167,6 @@
"assets/advanced_trade_mode_switch.png",
"Research/Implementation/Untitled.md",
"Project Timeline.md",
"Research/Trade Pipelines/Existing research.md",
"2024-05-08.md",
"Obsidian How-To.md",
"Research/Bitcoin fundamentals/Miniscript.md",

View File

@ -46,13 +46,15 @@ To combine multiple parties pubkeys to a single combined Taproot pubkey and to c
* [MuSig2 in Taproot - Nicolas Dorier - higher level explanation](https://www.youtube.com/watch?v=hrUyGW91JBc)
* [MuSig2: Simple Two-Round Schnorr Multi-Signatures - very detailed, more crypto focused explanation](https://www.youtube.com/watch?v=Dzqj236cVHk)
### <u>Sighashes</u>
### <u>Sighash Types</u>
Maybe sighashes could be a useful tool?
Need to do research on Sighashes in Schnorr signatures (taproot).
Maybe sighash flags could be a useful tool?
It's possible to construct a transaction with multiple inputs/outputs from different parties using signatures committing only to specific inputs or outputs.
#### Canvas
![[Signature and Flags.canvas]]
#### Blog articles
[Blog article on Sighashes - good examples - Raghav Sood](https://raghavsood.com/blog/2018/06/10/bitcoin-signature-types-sighash)
[Signature Hash Flags Medium Article - enigbe ochekliye](https://enigbe.medium.com/signature-hash-flags-f059d035ddd0)

View File

@ -8,7 +8,7 @@
{"id":"8526cdb3e9883674","type":"text","text":"For **SIGHASH** **ALL**, given a transaction Tx, the signature applies to all of Txs inputs and all its outputs\n\nThe transaction is rendered invalid if any of its details are changed because the signature will change too and be invalid.","x":1100,"y":-356,"width":391,"height":200,"color":"5"},
{"id":"39bb6307899c5d87","type":"text","text":"1. Create a copy of the transaction\n2. Empty each script_sig for all inputs and replace with the script_pubkey they reference\n3. Empty out all output fields\n4. Serialize the transaction\n5. Append 0x02 to **Tx_ser**, hash, and then sign","x":1620,"y":-169,"width":660,"height":207,"color":"1"},
{"id":"0e6dda772fa0f997","type":"text","text":"For **SIGHASH** **NONE**, the signature applies to all of Txs inputs but to none of the outputs.","x":1100,"y":-104,"width":400,"height":78,"color":"1"},
{"id":"4783ea786041b3c4","type":"text","text":"For **SIGHASH** **SINGLE**, all the inputs of the given transaction Tx are signed and one output that has the same index of one of the inputs being signed. This is essentially “authorizing all other inputs to go with a specific output” (Song, 2019, p. 133).","x":1100,"y":38,"width":400,"height":200,"color":"4"},
{"id":"4783ea786041b3c4","type":"text","text":"For **SIGHASH** **SINGLE**, all the inputs of the given transaction Tx are signed and one output that has the same index of one of the inputs being signed. This is essentially “authorizing all other inputs to go with a specific output”","x":1100,"y":38,"width":400,"height":200,"color":"4"},
{"id":"17953abf6e32fa3d","type":"text","text":"1. Create a copy of the transaction\n2. Empty script_sigs for each input and replace with the script_pubkey they reference\n3. Empty out all output fields bar the specific output\n4. Serialize the transaction\n5. Append 0x03 to **Tx_ser**, hash, and then sign","x":1620,"y":121,"width":660,"height":199,"color":"4"},
{"id":"ee8fd83cff1ef0ba","type":"text","text":"An **ANYONECANPAY** modifier flag exists that can be added to the aforementioned flags that apply to a **single** input in a transaction. Rosenbaum (2019) considers the ANYONECANPAY modifier flag as a way to commit to inputs only, by setting or not setting it, and the existing SIGHASH types (ALL, NONE, SINGLE) as a way to commit to outputs only.","x":1018,"y":-662,"width":473,"height":222,"color":"2"},
{"id":"b93d1dd0b0feb448","type":"file","file":"assets/anyonecanpay.webp","x":1055,"y":-1000,"width":400,"height":297}