OP_CHECKSIGVERIFY incorrectly checks for a hash type suffix of signatures · Issue #103 · ElementsProject/elements · GitHub
Skip to content

OP_CHECKSIGVERIFY incorrectly checks for a hash type suffix of signatures #103

Description

@roconnor-blockstream

CHECKSIGFROMSTACKVERIFY calls CheckSignatureEncoding:

CheckSignatureEncoding in turns calls IsDefinedHashtypeSignature

which is incorrect because signatures for CHECKSIGFROMSTACKVERIFY do not have hashtypes.

One way of fixing this could be to mask out SCRIPT_VERIFY_STRICTENC when calling CheckSignatureEncoding.

A better way would be to give signatures from CHECKSIG and CHECKSIGFROMSTACK different types.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions