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

Kyber C extraction #153

Merged
merged 36 commits into from
Jan 2, 2024
Merged

Kyber C extraction #153

merged 36 commits into from
Jan 2, 2024

Conversation

franziskuskiefer
Copy link
Member

@franziskuskiefer franziskuskiefer commented Dec 13, 2023

This PR modifies kyber such that it can be extracted to C.
The kyber-crate.sh can be used to extract and copy the C files to hacl-packages (see cryspen/hacl-packages#442).

Main changes

  • use the cloop macro to rewrite all iterators into range loops (this macro does not change the code for F* extraction)
  • rewrite an unwrap() into a match with a panic to work around a Eurydice issue
  • rewrite an iter into an into_iter to work around a Eurydice issue

Copy link
Contributor

@karthikbhargavan karthikbhargavan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some suggestions/questions in comments

src/kem/kyber/helper.rs Show resolved Hide resolved
src/kem/kyber/ind_cpa.rs Show resolved Hide resolved
src/kem/kyber/ind_cpa.rs Show resolved Hide resolved
src/kem/kyber/helper.rs Outdated Show resolved Hide resolved
src/kem/kyber/helper.rs Outdated Show resolved Hide resolved
@xvzcf xvzcf merged commit 2a3cd5d into dev Jan 2, 2024
15 checks passed
@xvzcf xvzcf deleted the franziskus/c-extraction2 branch January 2, 2024 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

5 participants