diff options
| author | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-02 16:09:07 +0200 |
|---|---|---|
| committer | Kévin Le Gouguec <kevin.legouguec@airbus.com> | 2019-07-02 17:11:13 +0200 |
| commit | 53229fa55e46f4d474cd38f31185aa8dcb83c701 (patch) | |
| tree | fcd91a27df9f1f0c03950a8046b5022746128db8 /test/python/generate-vectors.sh | |
| parent | 401fd928088f51e90e391377c9d696b162d1878f (diff) | |
| download | lilliput-ae-implem-53229fa55e46f4d474cd38f31185aa8dcb83c701.tar.xz | |
Parallélisation de la génération des vecteurs Python
Diffstat (limited to 'test/python/generate-vectors.sh')
| -rwxr-xr-x | test/python/generate-vectors.sh | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/python/generate-vectors.sh b/test/python/generate-vectors.sh index d37f15f..3f68d6c 100755 --- a/test/python/generate-vectors.sh +++ b/test/python/generate-vectors.sh @@ -3,7 +3,7 @@ set -eu PYTHON_DIR=$(dirname $0) -ROOT_DIR=${PYTHON_DIR}/../../ +ROOT_DIR=${PYTHON_DIR}/../.. SRC_DIR=${ROOT_DIR}/src/add_python RESULTS_DIR=${ROOT_DIR}/results CRYPTO_AEAD=${RESULTS_DIR}/crypto_aead_py @@ -17,18 +17,20 @@ generate () { local mode=$1 local keylen=$2 + local dest_dir=${CRYPTO_AEAD}/${NAMES[${mode}]}${keylen}v1 + local param_dir=${RESULTS_DIR}/python-${mode}-${keylen} - echo generating for ${mode} ${keylen} - - cat <<EOF > ${RESULTS_DIR}/parameters.py + mkdir -p ${param_dir} + cat <<EOF > ${param_dir}/parameters.py MODE = ${mode} KEYBYTES = $((keylen/8)) EOF - PYTHONPATH=${RESULTS_DIR}:${SRC_DIR} ${PYTHON_DIR}/genkat_aead.py + echo ${mode} ${keylen}: starting + + PYTHONPATH=${param_dir}:${SRC_DIR} ${PYTHON_DIR}/genkat_aead.py ${dest_dir} - dest=${CRYPTO_AEAD}/${NAMES[${mode}]}${keylen}v1 - mv LWC_AEAD_KAT_${keylen}_120.txt ${dest} + echo ${mode} ${keylen}: finished } @@ -36,6 +38,11 @@ for mode in 1 2 do for keylen in 128 192 256 do - generate ${mode} ${keylen} + generate ${mode} ${keylen} & done done + +for ((i=0; i<6; i++)) +do + wait -n +done |
