Skip to content

Inconsistent handling of malformed DER signatures #114

@tomato42

Description

@tomato42

When the DER signature is malformed, the VerifyingKey.verify(sigdecode=sigdecode_der) raises unexpected exceptions and in some cases does not raise any exception.

UnexpectedDER, IndexError and AssertionError are raised in addition to BadSignatureError, at the same time flipping the 4th or 6th least significant bit of 2nd byte of a NIST521p signature does not cause it to be rejected (the DER encoding is strict, and every value has one defined encoding, any other encoding is invalid and needs to be rejected)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugunintended behaviour in ecdsa code

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions