summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile11
-rwxr-xr-xcollect-traces.sh2
-rw-r--r--nist/README.md10
-rw-r--r--nist/TestVectorGen/crypto_aead.h18
-rw-r--r--nist/TestVectorGen/genkat_aead.c (renamed from nist/TestVectorGen.zip)bin10393 -> 5289 bytes
-rwxr-xr-xnist/make-package.sh4
6 files changed, 35 insertions, 10 deletions
diff --git a/Makefile b/Makefile
index 7b25332..7502c08 100644
--- a/Makefile
+++ b/Makefile
@@ -4,7 +4,10 @@ implementations = $(dir \
delegated = clean test
-.PHONY: $(delegated)
+.PHONY: $(delegated) nist
+
+results:
+ mkdir $@
$(delegated)::
status=0; \
@@ -16,6 +19,7 @@ $(delegated)::
clean::
- rm traces*.tgz
+ - rm -r results
# To generate complete traces, apply this patch before running "make traces":
# $ git apply traces.patch
@@ -23,6 +27,9 @@ clean::
# $ git diff src > traces.patch
traces: traces-ae traces-tbc
-traces-%:
+traces-%: | results
@ echo "Collecting traces"
@ ./collect-traces.sh $@
+
+nist: | results
+ ./nist/make-package.sh
diff --git a/collect-traces.sh b/collect-traces.sh
index f4dc847..79d6c95 100755
--- a/collect-traces.sh
+++ b/collect-traces.sh
@@ -21,7 +21,7 @@ do
cp ${implem_dir}/results/traces*.txt ${d}
done
-tar czf ${trace_type}.tgz -C ${d} .
+tar czf results/${trace_type}.tgz -C ${d} .
rm -r ${d}
diff --git a/nist/README.md b/nist/README.md
index 674e9dd..51eca24 100644
--- a/nist/README.md
+++ b/nist/README.md
@@ -1,9 +1,9 @@
-`TestVectorGen.zip` was retrieved on [NIST's website] ([direct link]).
+`TestVectorGen` was retrieved from [NIST's website] ([direct link]).
-`make-package.sh` will take create the directory structure specified
-by [NIST's requirements], compile and run `TestVectorGen.zip`'s
-`genkat_aead.c` against every member of the Lilliput-AE family, and
-bundle the sources and the vectors into a tarball.
+`make-package.sh` will create the directory structure specified by
+[NIST's requirements], compile and run `TestVectorGen/genkat_aead.c`
+against every member of the Lilliput-AE family, and bundle the sources
+and vectors into a folder.
[NIST's website]: https://csrc.nist.gov/projects/lightweight-cryptography
diff --git a/nist/TestVectorGen/crypto_aead.h b/nist/TestVectorGen/crypto_aead.h
new file mode 100644
index 0000000..e2ca9b0
--- /dev/null
+++ b/nist/TestVectorGen/crypto_aead.h
@@ -0,0 +1,18 @@
+
+int crypto_aead_encrypt(
+ unsigned char *c, unsigned long long *clen,
+ const unsigned char *m, unsigned long long mlen,
+ const unsigned char *ad, unsigned long long adlen,
+ const unsigned char *nsec,
+ const unsigned char *npub,
+ const unsigned char *k
+);
+
+int crypto_aead_decrypt(
+ unsigned char *m, unsigned long long *mlen,
+ unsigned char *nsec,
+ const unsigned char *c, unsigned long long clen,
+ const unsigned char *ad, unsigned long long adlen,
+ const unsigned char *npub,
+ const unsigned char *k
+); \ No newline at end of file
diff --git a/nist/TestVectorGen.zip b/nist/TestVectorGen/genkat_aead.c
index 938d9a8..666df24 100644
--- a/nist/TestVectorGen.zip
+++ b/nist/TestVectorGen/genkat_aead.c
Binary files differ
diff --git a/nist/make-package.sh b/nist/make-package.sh
index 009d997..4a4ae13 100755
--- a/nist/make-package.sh
+++ b/nist/make-package.sh
@@ -81,7 +81,7 @@ test-variant ()
}
-unzip ${NIST_DIR}/TestVectorGen.zip -d ${TMP_DIR}
+cp ${NIST_DIR}/TestVectorGen/* ${TMP_DIR}
for mode in i ii
do
@@ -92,6 +92,6 @@ do
done
done
-tar czf lilliput-ae.tgz -C ${TMP_DIR} crypto_aead
+cp -r ${TMP_DIR}/crypto_aead results/
cleanup