Panic instead of returning an error in rejection sampling if 5 blocks of SHAKE aren't enough #93
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: hax | |
on: | |
push: | |
branches: ["dev"] | |
paths: | |
- 'specs/kyber/src/**' | |
- 'src/kem/kyber/**' | |
pull_request: | |
branches: ["dev"] | |
paths: | |
- 'specs/kyber/src/**' | |
- 'src/kem/kyber/**' | |
- 'proofs/fstar/**' | |
schedule: | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
hax: | |
runs-on: "ubuntu-latest" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: 🔨 OCaml Setup | |
uses: ocaml/setup-ocaml@v2 | |
with: | |
ocaml-compiler: 4.14.1 | |
- name: ⤵ Get Fstar binaries | |
run: | | |
curl -L https://github.com/FStarLang/FStar/releases/download/v2023.09.03/fstar_2023.09.03_Linux_x86_64.tar.gz \ | |
--output Fstar.tar.gz | |
tar --extract --file Fstar.tar.gz | |
- name: ⤵ Clone HACL-star repository | |
uses: actions/checkout@v4 | |
with: | |
repository: hacl-star/hacl-star | |
path: hacl-star | |
- name: ⤵ Clone hax repository | |
uses: actions/checkout@v4 | |
with: | |
repository: hacspec/hacspec-v2 | |
path: hax | |
- name: 🔨 Setup hax | |
working-directory: hax | |
run: | | |
sudo apt-get update | |
sudo apt-get install --yes nodejs | |
./setup.sh | |
- name: 🏃 Extract and verify the Kyber reference code | |
run: | | |
eval $(opam env) | |
./hax-driver.py --kyber-reference | |
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: 🏃 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 |