Can PublicKey/PrivateKey be exposed?
It's pretty cumbersome to use <X25519HkdfSha256 as Kem>::PublicKey, and the rust-analyzer Isn't able to autocomplete methods on a type declared type X25519PublicKey = <X25519HkdfSha256 as Kem>::PublicKey;
It will be much easier to work with the library if the underlying types themselves were exported and not so opaque
You're not the first person to mention this issue. This seems possibly doable, but frankly I don't have a ton of time to work on usability fixes for this crate. I'd be happy to review a PR though if you already have an idea of how this would be implemented!
@rozbb I understand :) There's a few ways to do that, the simple ones:
- Keep the abstraction that hides the backend, but expose the abstracting types (ideally also extend their API)
- Use the backend types directly, no abstraction in the middle, users can use the same type then in other libraries.