mirror of
https://github.com/itzmeanjan/ml-kem.git
synced 2026-01-07 23:04:00 -05:00
Add script for automating sync. and regeneration of ACVP kats for ml-kem keygen algo
Signed-off-by: Anjan Roy <hello@itzmeanjan.in>
This commit is contained in:
4
Makefile
4
Makefile
@@ -47,3 +47,7 @@ clean: ## Remove build directory
|
||||
.PHONY: format
|
||||
format: $(ML_KEM_SOURCES) $(TEST_SOURCES) $(TEST_HEADERS) $(BENCHMARK_SOURCES) $(BENCHMARK_HEADERS) ## Format source code
|
||||
clang-format -i $^
|
||||
|
||||
.PHONY: sync_acvp_kats
|
||||
sync_acvp_kats: ## Downloads NIST ACVP KAT vectors and updates local KATs
|
||||
cd kats/scripts && ./sync_acvp_kats.sh && cd -
|
||||
|
||||
19
kats/scripts/sync_acvp_kats.sh
Executable file
19
kats/scripts/sync_acvp_kats.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
ACVP_SERVER_REPO_PATH="ACVP-Server"
|
||||
if [ -d "$ACVP_SERVER_REPO_PATH" ]; then
|
||||
echo "> $ACVP_SERVER_REPO_PATH repository exists, let's just fetch latest."
|
||||
|
||||
pushd $ACVP_SERVER_REPO_PATH
|
||||
git checkout master
|
||||
git fetch
|
||||
git pull origin master
|
||||
popd
|
||||
else
|
||||
echo "> $ACVP_SERVER_REPO_PATH repository doesn't exist, let's clone it."
|
||||
git clone https://github.com/usnistgov/ACVP-Server.git
|
||||
fi
|
||||
|
||||
cat ./ACVP-Server/gen-val/json-files/ML-KEM-keyGen-FIPS203/internalProjection.json | python parse_ml_kem_keygen_acvp_kat.py
|
||||
|
||||
echo "> Generated all NIST ACVP KATs."
|
||||
Reference in New Issue
Block a user