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)