An extension of CheckSig, CheckMultiSig allows for multi-signature transactions; as the name suggests, this sigop is the foundation for multi-signature wallets. The opcode operates in a m-of-n fashion, where 'm' is the minimum number of correct signatures required for validation, and 'n' is the number of public keys provided. If m signatures among the n public keys are correct, it returns true (1). Otherwise, it returns false (0). A maximum amount of 20 (n) public keys are allowed in this op.
OP_Code Walkthrough
Verifies multiple signatures against multiple public keys.
Pop top item (number of keys: n)
Pop next (n) top items
Pop top item (number of signatures: m)
Pop next (m) top items
Verify n-of-m signatures
Push Verified result (0 or 1)