Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add high-level HPKE API #13

Closed
franziskuskiefer opened this issue Jul 5, 2023 · 8 comments
Closed

Add high-level HPKE API #13

franziskuskiefer opened this issue Jul 5, 2023 · 8 comments
Labels

Comments

@franziskuskiefer
Copy link
Member

The HPKE API is the (hac)spec API right now, which isn't great to use.
Add a high-level, usable API on top.

@franziskuskiefer franziskuskiefer moved this to 🆕 New in libcrux Aug 17, 2023
@franziskuskiefer franziskuskiefer moved this from 🆕 New to 📋 Backlog in libcrux Aug 17, 2023
@keks
Copy link
Member

keks commented Aug 6, 2024

I am working with that API right now, and I agree it is not great to use. I think my main trouble is that it uses type aliases over newtypes, and that these type aliases are not public. This means that the functions just return giant tuples of values that have no semantics attached to them.

Should there be a usable API on top, or should we change the Rust code and re-validate it in hax?

@keks
Copy link
Member

keks commented Aug 7, 2024

Another problem: The ContextS_Seal function takes a context and then returns it again. That makes it really awkward to call from a &mut self-style method of a struct that has the context as a field, because we can't move the context out of there. My current workaround is creating a new context on the stack and then using mem::swap before and after the call to ConetxtS_Seal.

@keks
Copy link
Member

keks commented Aug 7, 2024

It would also be nice if the error implemented core::error::Error

@franziskuskiefer
Copy link
Member Author

The HPKE implementation here really is a spec. That's fine. But it hasn't really been used.
We should drop the HPKE implementation in here (it still lives in the https://github.com/cryspen/hpke-spec repo, that version just doesn't build anymore because the hacl dependencies changed) and instead use https://github.com/franziskuskiefer/hpke-rs. We just need to figure out the best way to integrate the two.

Copy link

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 14, 2024
@franziskuskiefer
Copy link
Member Author

We should get #523 in.

@github-actions github-actions bot removed the stale label Oct 15, 2024
Copy link

This issue has been marked as stale due to a lack of activity for 60 days. If you believe this issue is still relevant, please provide an update or comment to keep it open. Otherwise, it will be closed in 7 days.

@github-actions github-actions bot added the stale label Dec 31, 2024
Copy link

github-actions bot commented Jan 7, 2025

This issue has been closed due to a lack of activity since being marked as stale. If you believe this issue is still relevant, please reopen it with an update or comment.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 📋 Backlog
Development

No branches or pull requests

2 participants