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

Making ML-KEM Extract Again #308

Merged
merged 14 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 2 additions & 60 deletions .github/workflows/hax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,70 +52,12 @@ jobs:
run: |
nix profile install ./hax

- name: 🏃 Extract the Kyber reference code
run: |
eval $(opam env)
(cd proofs/fstar/extraction/ && ./clean.sh)
rm -f sys/platform/proofs/fstar/extraction/*.fst*
./hax-driver.py --kyber-reference

- name: 🏃 Regenerate `extraction-*` folders
run: ./proofs/fstar/patches.sh apply

- name: 🏃 Make sure snapshots are up-to-date
run: git diff --exit-code

- name: 🏃 Verify the Kyber reference code
run: |
env FSTAR_HOME=${{ github.workspace }}/fstar \
HACL_HOME=${{ github.workspace }}/hacl-star \
HAX_HOME=${{ github.workspace }}/hax \
PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
./hax-driver.py --verify-extraction

- name: 🏃 Verify Kyber `extraction-edited` F* code
run: |
env FSTAR_HOME=${{ github.workspace }}/fstar \
HACL_HOME=${{ github.workspace }}/hacl-star \
HAX_HOME=${{ github.workspace }}/hax \
PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
make -C proofs/fstar/extraction-edited

- name: 🏃 Verify Kyber `extraction-secret-independent` F* code
run: |
env FSTAR_HOME=${{ github.workspace }}/fstar \
HACL_HOME=${{ github.workspace }}/hacl-star \
HAX_HOME=${{ github.workspace }}/hax \
PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
make -C proofs/fstar/extraction-secret-independent

- name: 🏃 Extract & Verify ML-KEM crate (lax)
- name: 🏃 Extract ML-KEM crate
run: |
cd libcrux-ml-kem
# ./hax.py extract
./hax.py extract
# env FSTAR_HOME=${{ github.workspace }}/fstar \
# HACL_HOME=${{ github.workspace }}/hacl-star \
# HAX_HOME=${{ github.workspace }}/hax \
# PATH="${PATH}:${{ github.workspace }}/fstar/bin" \
# ./hax.py prove --admit

- name: 🏃 Extract the Kyber specification
run: |
eval $(opam env)
# Extract the functions in the compress module individually to test
# the function-extraction code.
# Extract functions from the remaining modules to test the
# module-extraction code.
./hax-driver.py --crate-path specs/kyber \
--functions hacspec_kyber::compress::compress \
hacspec_kyber::compress::decompress \
hacspec_kyber::compress::compress_d \
hacspec::kyber::compress::decompress_d \
--modules ind_cpa \
hacspec_kyber \
matrix \
ntt \
parameters \
sampling \
serialize \
--exclude-modules libcrux::hacl::sha3 libcrux::digest
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ members = [
"benchmarks",
"fuzz",
"libcrux-ml-kem",
"libcrux-simd",
"libcrux-sha3",
"libcrux-ml-dsa",
"libcrux-intrinsics",
Expand Down
50 changes: 0 additions & 50 deletions kyber-c.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions kyber-crate-tests/kyber.rs

This file was deleted.

1 change: 0 additions & 1 deletion kyber-crate-tests/kyber_kats/README.md

This file was deleted.

91 changes: 0 additions & 91 deletions kyber-crate-tests/kyber_kats/generate_kats.py

This file was deleted.

Loading
Loading