Skip to content

Key Translation Duplicate Check Safety Hole #238

Description

@JeremyRubin

When translating keys in a given policy/miniscript, translating:

and(pk(A), pk(B))

with F: { A -> X, B -> X }

creates

and(pk(X), pk(X))

bypassing the check that no duplicate/repeated keys are used.

Fixing this requires changing from a function to a bijective map of some kind, either by tracing the function as it's used or switching the type externally to some kind of map.

cc @apoelstra @sanket1729, creating an issue for this to track fixing it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions