Skip to content

DSA2 signing can output invalid signature s=0 (should retry per DSA) #1342

@Kr0emer

Description

@Kr0emer

I found a case where CryptoPP::DSA2<...>::Signer::SignMessage() returns a signature with s = 0.
Per DSA rules, both r and s must be in [1, q-1]; if r == 0 or s == 0, signing should retry with a new nonce k (or fail), not output an invalid signature.

This seems extremely unlikely in normal usage with a proper RNG, but it is still an invalid signature and (per spec) should not be returned.

Do you consider this security-relevant / CVE-eligible, or mainly a correctness/robustness bug?

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