Skip to content

musig::SecretNonce::dangerous_from_bytes() even more dangerous than documented #804

Closed
@Ademan

Description

@Ademan

Per the docs in libsecp https://github.com/bitcoin-core/secp256k1/blob/master/include/secp256k1_musig.h#L28

Opaque data structures

The exact representation of data inside the opaque data structures is implementation defined and not guaranteed to be portable between different platforms or versions.

It would be simple enough to just document this, but I'm not sure if it makes sense to keep the API. It's absolutely a workflow that library consumers want (I want it myself) so maybe that need is strong enough, it just strikes me as a pretty high caliber footgun in addition to the already documented danger.

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