Skip to content

Add checksum KAT to Github Workflow #22

Add checksum KAT to Github Workflow

Add checksum KAT to Github Workflow #22

Workflow file for this run

# SPDX-License-Identifier: Apache-2.0
name: Build
on:
push:
branches: [ '*' ]
pull_request:
branches: [ "main" ]
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup nix
uses: ./.github/actions/setup-nix
- name: Astyle
shell: nix develop .#ci -c bash -e {0}
run: |
err=$(astyle $(git ls-files "*.c" "*.h") --options=.astylerc --dry-run --formatted | awk '{print $2}')
if [[ ${#err} != 0 ]]; then
echo "$err" | while IFS= read -r file; do
echo "::error file={"$file"},title={checking}::Formatted $file"
done
exit 1
fi
- name: Build targets
shell: nix develop .#ci -c bash -e {0}
run: |
make mlkem
./checksum.sh ./test/test_kyber512 880e1fe907682fb5a9029fc7da114131a0740f4f3328d6ddfae46728b5ac8db0
./checksum.sh ./test/test_kyber768 2b32e7f5aa91fe47b0ca9a1d5aa70d7dc7c4ff1ffcb7e8967e51bf15cc5d2095
./checksum.sh ./test/test_kyber1024 87da552c0878350fa7643a6b49996893d4dba4d8be2badb32c4298c5c2b512c6
- name: Compare gen_KAT with known hash
shell: nix develop .#ci -c bash -e {0}
run: |
make kat;
./checksum.sh ./test/gen_KAT512 ec4ac397e595ac7457cb7d8830921faf3290898a10d7dd3864aab89ea61fe9a3
./checksum.sh ./test/gen_KAT768 9a0826ad3c5232dfd3b21bc4801408655c565a491b760f509b2ee2cd7180babe
./checksum.sh ./test/gen_KAT1024 6dafb867599b750a6a831b03e494cf41dea748c78a0e275e7b268bbb893cf37d
- name: Clean up
shell: nix develop .#ci -c bash -e {0}
run: |
make clean