Skip to content

HexSignatureSerializer:Serialize broken when r or s is too small #2

@Sebastian-Habiger

Description

@Sebastian-Habiger

gmp_strval($r, 16) may return less then 64 characters in length. if this is the case then parsing the signature may break.

I fixed that issue by appending zeros at the left.

return str_pad(gmp_strval($r, 16), 64, "0", STR_PAD_LEFT) . str_pad(gmp_strval($s, 16), 64, "0", STR_PAD_LEFT);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions