Skip to content

Wrong documentation for secp256k1_ec_seckey_tweak_add #1322

@MatthewLM

Description

@MatthewLM

The documentation for secp256k1_ec_seckey_tweak_add states that If the tweak is invalid according to secp256k1_ec_seckey_verify, this function returns 0. However if tweak32 is zero, it will not produce an error unlike the tests in secp256k1_ec_seckey_verify so this is incorrect. It only produces an error on an overflow.

Either it should test for zero, or the documentation should be changed. A zero scalar results in the same private key. I'm not sure if allowing a zero scalar is sensible or not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions