I am looking for a function with a type like this:

verifySignature :: Datum -> Signature -> PubKey -> Bool

which is also INLINABLE to use it inside validator.

I know that we can check if the whole transaction is signed by some pub key with this function, but this should be an arbitrary message signature, not transaction signature.

  • N.B. I want to store signed proof off-chain, so putting this Datum inside some output and singing it is not an option Dec 7, 2021 at 13:36

2 Answers 2


I think PlutusTx.Builtins has what you need:

{-# INLINABLE verifySignature #-}
-- | Verify that the signature is a signature of the message by the public key.
verifySignature :: BuiltinByteString -> BuiltinByteString -> BuiltinByteString -> Bool

You can use verifySignature on-chain. If you do it on chain, then your signature and the PubKeyHash should be either some wrappers around BuiltinByteString or directly BuiltinByteString. Either way, there should be no problem getting the types needed for verifySignature.


There is also an oracle for signature verification here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.