mirror of
https://github.com/itzmeanjan/ml-kem.git
synced 2026-01-10 08:07:56 -05:00
bash script and make recipe for ease of running KATs
Signed-off-by: Anjan Roy <hello@itzmeanjan.in>
This commit is contained in:
5
Makefile
5
Makefile
@@ -4,7 +4,7 @@ OPTFLAGS = -O3 -march=native
|
||||
IFLAGS = -I ./include
|
||||
DEP_IFLAGS = -I ./sha3/include
|
||||
|
||||
all: testing
|
||||
all: testing test_kat
|
||||
|
||||
wrapper/libkyber_kem.so: wrapper/kyber_kem.cpp include/*.hpp sha3/include/*.hpp
|
||||
$(CXX) $(CXXFLAGS) $(OPTFLAGS) $(IFLAGS) $(DEP_IFLAGS) -fPIC --shared $< -o $@
|
||||
@@ -17,6 +17,9 @@ test/a.out: test/main.cpp include/*.hpp sha3/include/*.hpp
|
||||
testing: test/a.out
|
||||
./$<
|
||||
|
||||
test_kat:
|
||||
bash test_kat.sh
|
||||
|
||||
clean:
|
||||
find . -name '*.out' -o -name '*.o' -o -name '*.so' -o -name '*.gch' | xargs rm -rf
|
||||
|
||||
|
||||
11
test_kat.sh
Normal file
11
test_kat.sh
Normal file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 1. Make shared library object
|
||||
make lib
|
||||
|
||||
# 2. Run test cases
|
||||
pushd wrapper/python
|
||||
cp ../../kats/kyber{512,768,1024}.kat .
|
||||
python3 -m pytest -v
|
||||
rm kyber{512,768,1024}.kat
|
||||
popd
|
||||
Reference in New Issue
Block a user