generate_compressed_matrices.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. # create archive directory
  2. dstdir=$1
  3. [ ! -d $dstdir ] && mkdir $dstdir
  4. # generate 128 bit xoron matrix
  5. arch=128
  6. [ ! -d $dstdir/$arch ] && mkdir $dstdir/$arch
  7. if [ ! -e $dstdir/$arch/xmatrix_comp_file.xf ] || [ ! -s $dstdir/$arch/xmatrix_comp_file.xf ] ; then
  8. str="
  9. xrnlib-cli \
  10. --encoding-conf -compiled-param -no-password \
  11. --permutation-conf -arch $arch \
  12. --logging-conf -force-write \
  13. --mine-xmatrix-comp-rnd -random -xmatrix-comp $dstdir/$arch/xmatrix_comp_file.xf
  14. "
  15. echo ""; echo $str; echo ""
  16. eval $str
  17. fi
  18. # generate 256 bit xoron matrix
  19. arch=256
  20. [ ! -d $dstdir/$arch ] && mkdir $dstdir/$arch
  21. if [ ! -e $dstdir/$arch/xmatrix_comp_file.xf ] || [ ! -s $dstdir/$arch/xmatrix_comp_file.xf ] ; then
  22. str="
  23. xrnlib-cli \
  24. --encoding-conf -compiled-param -no-password \
  25. --permutation-conf -arch $arch \
  26. --logging-conf -force-write \
  27. --mine-xmatrix-comp-ot -random -xmatrix-comp $dstdir/$arch/xmatrix_comp_file.xf
  28. "
  29. echo ""; echo $str; echo ""
  30. eval $str
  31. fi