BIP-118 / SigHash "what's covered" Cheatsheet



Summary:

A chart was created by Jeremy Rubin as part of his review of BIP-118. While not completely free of errors, it may be useful for those evaluating BIP-118. Rubin suggests that the BIPs could benefit from such a chart rather than following conditional logic. The chart includes a few highlighted nuances, such as the input index never being signed, and key reuse under APOAS|Default and APOAS|All being extra unsafe due to susceptibility to the "half-spend" problem. Rubin notes that APO signs the Amounts, APOAS never does, and that APO binds itself to the entire script rather than just its fragment. He also points out that there are 16 possible modes total, and all combinations of flags mean something. Additionally, | Default and | All overlap, leaving an opportunity to reserve or assign four additional sighash modes if desired. Finally, Rubin suggests doing away with the notion that sighash flags are "flags" and converting to an enum, giving each signature type a sensible name.


Updated on: 2023-06-01T18:45:26.798005+00:00