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

merging main to dev #661

Closed
wants to merge 88 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
5333f39
wip
franziskuskiefer Aug 30, 2024
d4049e3
fuzzers for ml-kem
franziskuskiefer Aug 30, 2024
4db4adc
fstar extraction for ml-dsa
karthikbhargavan Sep 22, 2024
c963c44
wip lax
karthikbhargavan Sep 23, 2024
af269d4
Merge branch 'dev' into ml-dsa-arithmetic
karthikbhargavan Oct 11, 2024
15405df
extracting again
karthikbhargavan Oct 11, 2024
acf0d0a
got rid of some cycles, the rest need some hax help
karthikbhargavan Oct 11, 2024
08ce4ac
refreshed fstar
karthikbhargavan Oct 11, 2024
c4e0ab6
fixes to benches
karthikbhargavan Oct 17, 2024
7a3dff1
after cycle bundling fix
karthikbhargavan Oct 22, 2024
5151722
progress up to Libcrux_sha3.Traits.fsti
karthikbhargavan Oct 22, 2024
c4bb39e
almost laxing
karthikbhargavan Oct 23, 2024
05d0e11
Merge branch 'main' into ml-dsa-arithmetic
karthikbhargavan Oct 25, 2024
924d808
ml-dsa refresh
karthikbhargavan Oct 25, 2024
a578e90
ml-dsa refresh
karthikbhargavan Oct 25, 2024
0b37cc1
ml-dsa lax-checks except for 3 modules
karthikbhargavan Oct 28, 2024
fbefc8d
lax check succeeds
karthikbhargavan Oct 29, 2024
443ec96
fmt
karthikbhargavan Oct 29, 2024
a17120e
Repair `hash_functions`
jschneider-bensch Oct 29, 2024
44af027
ML-DSA extraction on CI
jschneider-bensch Oct 29, 2024
c4fb85c
Fix warnings
jschneider-bensch Oct 29, 2024
9c3247c
lax
karthikbhargavan Oct 29, 2024
5cf6072
cleanup
karthikbhargavan Oct 29, 2024
7377285
cleanup
karthikbhargavan Oct 29, 2024
516b6f3
cleanup
karthikbhargavan Oct 29, 2024
3400e59
cleanup
karthikbhargavan Oct 29, 2024
025679d
cleanup
karthikbhargavan Oct 29, 2024
95b46df
cleanup
karthikbhargavan Oct 29, 2024
b9a51e8
make
karthikbhargavan Oct 29, 2024
1644063
make
karthikbhargavan Oct 29, 2024
72f0472
removed fstar libs needed for ml-kem from this PR
karthikbhargavan Oct 30, 2024
91cefaf
resolved some comments
karthikbhargavan Oct 31, 2024
bc2b3ad
restored error prop
karthikbhargavan Oct 31, 2024
7db214d
lax checks
karthikbhargavan Nov 1, 2024
60ffea0
fstar refresh
karthikbhargavan Nov 2, 2024
0a837fb
qemu based s390x ci for ml-kem C
franziskuskiefer Nov 3, 2024
587a379
fix ml-kem C in cg for big endian machines
franziskuskiefer Nov 3, 2024
5f3f123
don't build ml-kem C benchmarks by default
franziskuskiefer Nov 3, 2024
300abc0
Update .github/workflows/s390x.yml
franziskuskiefer Nov 4, 2024
b216164
fix cg eurydice glue for Windows
franziskuskiefer Nov 4, 2024
249e0b3
don't run mlkem C tests on Windows ci
franziskuskiefer Nov 4, 2024
1ec5a9f
Enable AVX2 target feature
jschneider-bensch Oct 21, 2024
0031d3c
Inlining to help AVX2 optimization
jschneider-bensch Oct 21, 2024
4bc6554
Missing module
jschneider-bensch Oct 22, 2024
f946f53
Attempt to reduce stack size
jschneider-bensch Oct 24, 2024
a86ce00
Format
jschneider-bensch Oct 24, 2024
23120b2
ACVP uninlined inner functions
jschneider-bensch Oct 31, 2024
30c7de7
Remove Zeta arrays
jschneider-bensch Nov 4, 2024
0703c5b
SHA-3 AVX2 target feature
jschneider-bensch Nov 4, 2024
5d85370
Inlining + target feature changes around inverse NTT
jschneider-bensch Nov 4, 2024
6c8fdc3
Header-only extraction update
jschneider-bensch Nov 4, 2024
51e2d6d
Update C extraction
jschneider-bensch Nov 4, 2024
61f72fd
Fix paths
jschneider-bensch Nov 4, 2024
3cf3915
really don't run on windows
franziskuskiefer Nov 4, 2024
84a01ad
format cg/eurydice_glue
franziskuskiefer Nov 4, 2024
17cf50b
Merge pull request #649 from cryspen/franziskus/big-endian-ci
jschneider-bensch Nov 5, 2024
5c005e0
Merge branch 'ml-dsa-lax' into jonas/ml-dsa-target-feature
jschneider-bensch Nov 5, 2024
7297c0b
added issue-comment for samplex4 edits
karthikbhargavan Nov 5, 2024
dac387a
renamed inputs
karthikbhargavan Nov 5, 2024
e542ac3
fmt
karthikbhargavan Nov 5, 2024
db15695
Merge branch 'main' into ml-dsa-lax
karthikbhargavan Nov 5, 2024
5ddbf9e
Merge pull request #646 from cryspen/ml-dsa-lax
franziskuskiefer Nov 5, 2024
5f88703
Merge branch 'main' into jonas/ml-dsa-target-feature
jschneider-bensch Nov 5, 2024
654d836
Missing `opaque_type`s in `hash_functions`
jschneider-bensch Nov 5, 2024
a19752d
Make trait impl functions into wrappers
jschneider-bensch Nov 5, 2024
837d70f
Don't use trait methods
jschneider-bensch Nov 5, 2024
873ccf8
Update F*
jschneider-bensch Nov 5, 2024
76b51d1
Merge branch 'main' into franziskus/ml-kem-fuzzing
franziskuskiefer Nov 6, 2024
b1ad8bb
Guard `target_feature` to `cfg(not(hax))`
jschneider-bensch Nov 6, 2024
0dccff5
Update F*
jschneider-bensch Nov 6, 2024
4a3c207
add fuzzer to ci
franziskuskiefer Nov 6, 2024
c9f8670
Update .github/workflows/mlkem.yml
franziskuskiefer Nov 6, 2024
3df061e
fixup fuzz ci
franziskuskiefer Nov 6, 2024
150b616
Merge branch 'franziskus/ml-kem-fuzzing' of github.com:cryspen/libcru…
franziskuskiefer Nov 6, 2024
d5632a5
cargo fmt
franziskuskiefer Nov 6, 2024
11b5102
Use local functions in favor of macros to help F*
jschneider-bensch Nov 6, 2024
f7dccd0
Merge pull request #660 from cryspen/franziskus/ml-kem-fuzzing
jschneider-bensch Nov 6, 2024
66059e5
Merge branch 'main' into jonas/ml-dsa-target-feature
karthikbhargavan Nov 8, 2024
8f41090
Revert "SHA-3 AVX2 target feature"
franziskuskiefer Nov 8, 2024
ef381ba
merged
karthikbhargavan Nov 8, 2024
bdd8a68
merge fixes for hax-lib attributes
karthikbhargavan Nov 8, 2024
a31e411
inline ntt
franziskuskiefer Nov 8, 2024
13e47cb
added bitvec
karthikbhargavan Nov 8, 2024
1cefb79
update mlkem C code
franziskuskiefer Nov 8, 2024
d4b585d
Merge pull request #642 from cryspen/jonas/ml-dsa-target-feature
franziskuskiefer Nov 8, 2024
ff302d3
fixed lax
karthikbhargavan Nov 8, 2024
4996d48
refreshed fstar
karthikbhargavan Nov 8, 2024
78a4b19
c code refresh
karthikbhargavan Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 2 additions & 9 deletions .github/workflows/c.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:

- name: 🔨 Build
run: |
cmake -B build
LIBCRUX_BENCHMARKS=1 cmake -B build
cmake --build build

- name: 🏃🏻‍♀️ Test
Expand All @@ -132,7 +132,7 @@ jobs:
- name: 🔨 Build Release
run: |
rm -rf build
cmake -B build -DCMAKE_BUILD_TYPE=Release
LIBCRUX_BENCHMARKS=1 cmake -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release
if: ${{ matrix.os != 'windows-latest' }}

Expand All @@ -159,13 +159,6 @@ jobs:
cmake -B build
cmake --build build
# FIXME: Benchmark build for cg on Windows CI is not working right now.
if: ${{ matrix.os != 'windows-latest' }}

# FIXME: Benchmark build for cg on Windows CI are not working right now.
# - name: 🏃🏻‍♀️ Test (cg)
# working-directory: libcrux-ml-kem/cg
# run: ./build/Debug/ml_kem_test
# if: ${{ matrix.os == 'windows-latest' }}

- name: 🏃🏻‍♀️ Test
run: ./build/ml_kem_test
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/hax.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,13 @@ jobs:

- name: 🏃 Extract ML-DSA crate
working-directory: libcrux-ml-dsa
run: cargo hax into fstar
run: ./hax.py extract

- name: 🏃 Lax ML-DSA crate
working-directory: libcrux-ml-dsa
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.py prove --admit
39 changes: 34 additions & 5 deletions .github/workflows/mlkem.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,6 @@ jobs:
rustc --print=cfg
cargo build --verbose $RUST_TARGET_FLAG --features pre-verification

- name: 🔨 Build unpacked
run: |
rustc --print=cfg
cargo build --verbose $RUST_TARGET_FLAG --features pre-verification,unpacked

- name: 🔨 Build Release
run: cargo build --verbose --release $RUST_TARGET_FLAG --features pre-verification

Expand Down Expand Up @@ -173,3 +168,37 @@ jobs:
run: |
cargo clean
cargo hack test --each-feature $EXCLUDE_FEATURES --verbose $RUST_TARGET_FLAG

fuzz:
strategy:
fail-fast: false
matrix:
os:
- macos-latest # macos-14 m1
- ubuntu-latest

runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: libcrux-ml-kem

steps:
- uses: actions/checkout@v4

- name: 🛠️ Setup Rust Nightly
run: |
rustup toolchain install nightly
cargo install cargo-fuzz

- name: 🛠️ Update dependencies
run: cargo update

- name: 🏃🏻‍♀️ Decaps
run: CARGO_PROFILE_RELEASE_LTO=false cargo +nightly fuzz run decaps -- -runs=100000

- name: 🏃🏻‍♀️ Encaps
run: CARGO_PROFILE_RELEASE_LTO=false cargo +nightly fuzz run encaps -- -runs=100000

- name: 🏃🏻‍♀️ KeyGen
run: CARGO_PROFILE_RELEASE_LTO=false cargo +nightly fuzz run keygen -- -runs=1000000
44 changes: 44 additions & 0 deletions .github/workflows/s390x.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: s390x - Build & Test

on:
push:
pull_request:
branches: ["main", "dev"]
workflow_dispatch:
merge_group:

env:
CARGO_TERM_COLOR: always

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
s390x:
runs-on: ubuntu-latest
name: Build on ubuntu-22.04 s390x
steps:
- uses: actions/checkout@v4
- uses: uraimo/run-on-arch-action@v2
name: Run
id: runcmd
with:
arch: s390x
distro: ubuntu22.04

# Speed up builds by storing container images in
# a GitHub package registry.
githubToken: ${{ github.token }}

run: |
apt-get -y update
apt-get install -y curl gcc g++ make cmake ninja-build git
cd libcrux-ml-kem/c
cmake -B build -G"Ninja Multi-Config"
cmake --build build
./build/Debug/ml_kem_test
cd ../cg
cmake -B build -G"Ninja Multi-Config"
cmake --build build
./build/Debug/ml_kem_test
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ kyber-crate/
# F*
.fstar-cache
.depend
**/proofs/fstar/*/#*#
**/proofs/fstar/*/.#*
/proofs/fstar/*/#*#
/proofs/fstar/*/.#*
hax.fst.config.json
Loading
Loading