diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-29 15:21:39 +0100 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2018-11-29 15:21:39 +0100 |
| commit | 4ee53ce2ac2e32aa9ae9c2334f0770d7f5f28fa8 (patch) | |
| tree | a8ff5ca7466b5e9f4c80d2addffca6119ff8da4a | |
| parent | ffd17baa2f156d90f854e72eee374f0bc5abc99e (diff) | |
| download | lilliput-ae-implem-4ee53ce2ac2e32aa9ae9c2334f0770d7f5f28fa8.tar.xz | |
Ajout d'une cible dans le Makefile pour la livraison NIST
Et aussi :
- extraction des sources de TestVectorGen.zip (la flemme de m'assurer
que le conteneur GCC aura unzip)
- dépôt dans le dossier results ; on laissera Gitlab archiver le
résultat pour nous
| -rw-r--r-- | Makefile | 11 | ||||
| -rwxr-xr-x | collect-traces.sh | 2 | ||||
| -rw-r--r-- | nist/README.md | 10 | ||||
| -rw-r--r-- | nist/TestVectorGen/crypto_aead.h | 18 | ||||
| -rw-r--r-- | nist/TestVectorGen/genkat_aead.c (renamed from nist/TestVectorGen.zip) | bin | 10393 -> 5289 bytes | |||
| -rwxr-xr-x | nist/make-package.sh | 4 |
6 files changed, 35 insertions, 10 deletions
@@ -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 Binary files differindex 938d9a8..666df24 100644 --- a/nist/TestVectorGen.zip +++ b/nist/TestVectorGen/genkat_aead.c 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 |
