<blockquote>
  <p>Can Alice just sign a transaction without revealing H, and just hand over the partially signed transaction off chain to Bob so he can reveal H + add his signature, make the transaction final and spend it?</p>
</blockquote>

<p>Certainly. Of course the software will need to know how to handle that data, but it is not that hard to do.</p>

<p>The pre-image is not used in signing in any way; it is just additional data required by the script in order for the script to validate correctly.</p>

CC BY-SA 3.0
2018-01-29T22:58:08.637Z
Thank you very much for your answer. Can you please describe in few words how the software should handle the data? So support for this can be added?
skydanc3r
CC BY-SA 3.0
2018-01-29T23:06:46.650Z
The software would just need to understand what the script is and know where the data in question (provided signatures and preimage) must go.
Ava Chow
CC BY-SA 3.0
2018-02-01T12:52:25.700Z
so this is a 2-of-2 multisig, and the (redeemscript-) hash is shared between both. Bob can keep the cleartext redeem script. And Alice gets only the hash of it. Otherwise Alice wouldn't sign the complete transaction (where the redeem script hash is in the "sigscript section")?
pebwindkraft
CC BY-SA 3.0
2018-02-01T15:46:53.917Z
@pebwindkraft No. That scenario would not be possible at all as Alice needs the redeemScript to produce a valid signature. What OP is talking about is an HTLC.
Ava Chow
CC BY-SA 3.0
2018-01-29T22:28:45.580Z
2018-01-29T22:28:45.580Z
Ava Chow
<p>Consider Alice and Bob created the following native segwit script:</p>

<p>hash SHA256 defined as H | Alice PubKey | Bob Pubkey</p>

<p>Only Bob has the pre-image (plain text that hashes [sha256] to H). Can Alice just sign a transaction without revealing H, and just hand over the partially signed transaction off chain to Bob so he can reveal H + add his signature, make the transaction final and spend it?</p>

<p>The catch here is that neither Alice and Bob to be in total and exclusive control of the funds, but for Bob to have to reveal an additional secret as spending condition.</p>

<hash><script><multi-signature>
hash locked multisig, can one cosigner sign without the pre-image?
skydanc3r
# hash locked multisig, can one cosigner sign without the pre-image?

(Asked by: username_0 on 2018-01-29)

Consider Alice and Bob created the following native segwit script:

hash SHA256 defined as H | Alice PubKey | Bob Pubkey

Only Bob has the pre-image (plain text that hashes [sha256] to H). Can Alice just sign a transaction without revealing H, and just hand over the partially signed transaction off chain to Bob so he can reveal H + add his signature, make the transaction final and spend it?

The catch here is that neither Alice and Bob to be in total and exclusive control of the funds, but for Bob to have to reveal an additional secret as spending condition.

**Tags:** hash, script, multi-signature


---

## 1 answers

### Answer by username_1 on 2018-01-29. Score: 1 | Accepted answer

> Can Alice just sign a transaction without revealing H, and just hand over the partially signed transaction off chain to Bob so he can reveal H + add his signature, make the transaction final and spend it?

Certainly. Of course the software will need to know how to handle that data, but it is not that hard to do.

The pre-image is not used in signing in any way; it is just additional data required by the script in order for the script to validate correctly.

> **Comments:**
> **username_0**: Thank you very much for your answer. Can you please describe in few words how the software should handle the data? So support for this can be added?  
> **username_1**: The software would just need to understand what the script is and know where the data in question (provided signatures and preimage) must go.  
> **username_2**: so this is a 2-of-2 multisig, and the (redeemscript-) hash is shared between both. Bob can keep the cleartext redeem script. And Alice gets only the hash of it. Otherwise Alice wouldn't sign the complete transaction (where the redeem script hash is in the "sigscript section")?  
> **username_1**: @username_2 No. That scenario would not be possible at all as Alice needs the redeemScript to produce a valid signature. What OP is talking about is an HTLC.  

---

