<p>No, this is not possible. There are no opcodes that allow you to check a signature on an arbitrary message.</p>

CC BY-SA 4.0
2019-07-22T16:02:08.147Z
Is there any BIP for this? Do you know of any fork that has done this?
I don't need it to be in production, I'm doing a research project that I'm fine with having it locally. Thanks
Mohsen
CC BY-SA 4.0
2019-07-19T05:08:21.190Z
2019-07-19T05:08:21.190Z
Ava Chow
<p>I'm looking to have a p2sh transaction that inside the redeem script there is OP_CHECKSIG (or any other op-code) that verifies a signature on an arbitrary message (not a transaction). 
I have been looking, but all I could find is that OP_CHECKSIG only verifies signatures on transaction. I need a signature verification that I'm able to give the message (hash of message) to the verification procedure. 
Something similar to ecrecover that takes in a signature, verificationKey and the message. Is this even possible using the existing op-codes?  </p>

<signature>
How to check a signature on an arbitrary message?
Mohsen
# How to check a signature on an arbitrary message?

(Asked by: username_0 on 2019-07-19)

I'm looking to have a p2sh transaction that inside the redeem script there is OP\_CHECKSIG (or any other op-code) that verifies a signature on an arbitrary message (not a transaction).
I have been looking, but all I could find is that OP\_CHECKSIG only verifies signatures on transaction. I need a signature verification that I'm able to give the message (hash of message) to the verification procedure.
Something similar to ecrecover that takes in a signature, verificationKey and the message. Is this even possible using the existing op-codes?

**Tags:** signature


---

## 1 answers

### Answer by username_1 on 2019-07-19. Score: 1

No, this is not possible. There are no opcodes that allow you to check a signature on an arbitrary message.

> **Comments:**
> **username_0**: Is there any BIP for this? Do you know of any fork that has done this? I don't need it to be in production, I'm doing a research project that I'm fine with having it locally. Thanks  

---

