libcrux icon indicating copy to clipboard operation
libcrux copied to clipboard

Update C extraction

Open franziskuskiefer opened this issue 7 months ago • 8 comments

We need to update the C extraction scripts for ML-KEM and ML-DSA to catch up with recent tooling changes to be able to drop manual intervention

  • [x] ~~Test and adapt to new changes in https://github.com/AeneasVerif/eurydice/pull/192 This doesn't appear to be ready. See https://github.com/AeneasVerif/eurydice/issues/280#issuecomment-3309168401~~
  • [x] Full extraction for testing (#1072)
  • [x] Update extraction to work with current eurydice glue file https://github.com/AeneasVerif/eurydice/pull/166
  • [x] Reduce CI for mlkem/c to build and test in debug mode (this code is unused and we shouldn't spend too much time maintaining and running it)
  • [x] https://github.com/FStarLang/karamel/issues/637
  • [x] https://github.com/AeneasVerif/eurydice/pull/258

franziskuskiefer avatar May 19 '25 09:05 franziskuskiefer

When you say "C extraction" do you mean plain C or the C++ extration in cg/?

I just was just about to update OpenSSH's import of libcrux-ml-kem/cg and noticed that it no longer supports plain C, only C++.

djmdjm avatar May 24 '25 09:05 djmdjm

When you say "C extraction" do you mean plain C or the C++ extration in cg/?

BoringSSL, the main target for this folder, moved to C++. Hence this folder moved to C++ as well. You use mlkem768 header only in OpenSSH? We can add a C version for that.

franziskuskiefer avatar May 27 '25 07:05 franziskuskiefer

Yes, we've used the C header only version for a while, getting this back would be great - thanks

djmdjm avatar May 31 '25 03:05 djmdjm

@franziskuskiefer I think this is done, right?

keks avatar Jul 16 '25 14:07 keks

I saw that the PR was merged but I haven't had a chance to test it for OpenSSH yet. Don't let that stop you from closing this issue if you prefer though.

djmdjm avatar Jul 17 '25 00:07 djmdjm

Thanks @djmdjm let us know if the new version works for you or if there's anything else you need here.

For the general issue, the main part that's still open here is to make synchronising with upstream eurydice easier. We still use a custom version of the eurydice_glue.h file. That's not great and breaks CI on the tooling side. I started doing the split here but didn't get around to doing this upstream. When we have individual files, we can pick the ones we need here in libcrux. Once that's done, we can close this issue.

franziskuskiefer avatar Jul 17 '25 06:07 franziskuskiefer

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[bot] avatar Nov 19 '25 01:11 github-actions[bot]

Last week I finally got around to updating OpenSSH to use libcrux v0.0.4. it worked fine, thanks for doing this.

djmdjm avatar Nov 19 '25 06:11 djmdjm