In https://bitcoin.org/en/developer-reference#term-op-checkmultisig

Because public keys are not checked again if they fail any signature comparison, signatures must be placed in the signature script using the same order as their corresponding public keys were placed in the pubkey script or redeem script. See the OP_CHECKMULTISIG warning below for more details.

I wan't to Know, why public keys are not checked again? security or other?

1 Answer 1



If you have an m of n multisig scheme, ordering the keys and the signatures ensures that a minimum of m and a maximum of n signatures will be verified.

If we didn't use this approach the number of signatures to be verified could be as high as n! / (n-m)! ( this is the worst case scenario).

Keep in mind that, in terms of resources, it is trivial for a transacting node to order the signatures, but it is not trivial for a verifying node to validate 500k transactions per day. We need to use the resources of a verifying node as efficiently as possible.

Your Answer

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

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