Skip to content

Make HpkeError::Secp256k1 variant an opaque HpkeError::InvalidPublicKey error #498

@DanGould

Description

@DanGould

arguably the HpkeError::Secp256k1 variant also leaks implementation details

@nothingmuch

I have no problem exposing this as an opaque error variant without an encapsulated secp256k1::Error if you also find that more appropriate. From what I can tell these are always thrown from secp256k1::PublicKey::from_slice as Err(InvalidPublicKey), and our own HpkeError::InvalidPublicKey variant would handle much the same way as encapsulating secp256k1::Error currently does

Originally posted by @DanGould in #496 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions