diff --git a/README.md b/README.md index 15070060..e2d2f895 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,18 @@ To compile and run CryptoLine, the following packages need to be installed. Installation ============ +On macOS +-------- + +``` +$ brew install opam curl cmake boolector singular +$ opam install dune ocamlfind lwt lwt_ppx num zarith +$ opam init +$ eval $(opam env) +$ dune build +$ dune install +``` + On Linux --------------------- @@ -169,7 +181,7 @@ Reference ========= - Vincent Hwang, Jiaxiang Liu, Gregor Seiler, Xiaomu Shi, Ming-Hsien Tsai, Bow-Yaw Wang, and Bo-Yin Yang. - Verified NTT Multiplications for NISTPQC KEM Lattice Finalists: Kyber, SABER, and NTRU. + Verified NTT Multiplications for NISTPQC KEM Lattice Finalists: Kyber, SABER, and NTRU. IACR Transactions on Cryptographic Hardware and Embedded Systems. 2022(4): 718-750 (2022). - Yu-Fu Fu, Jiaxiang Liu, Xiaomu Shi, Ming-Hsien Tsai, Bow-Yaw Wang, and Bo-Yin Yang. Signed Cryptographic Program Verification with Typed CryptoLine. diff --git a/scripts/install-abc.sh b/scripts/install-abc.sh index 570e2c1c..7930c3cc 100755 --- a/scripts/install-abc.sh +++ b/scripts/install-abc.sh @@ -7,7 +7,14 @@ ABC_FILE=${ABC_NAME}-${ABC_VERSION}.tar.gz ABC_DIR=${ABC_NAME}-${ABC_VERSION} ABC_URL=https://github.com/berkeley-abc/${ABC_NAME}/archive/${ABC_VERSION}.tar.gz -sudo apt install -y curl build-essential binutils cmake libreadline-dev +if [ "$(uname)" == "Darwin" ]; then + brew install curl cmake + export PATH="/usr/local/opt/curl/bin:$PATH" +elif [ "$(uname)" == "Linux" ]; then + sudo apt install -y curl build-essential binutils cmake libreadline-dev +else + exit +fi mkdir -p ${TOOLS_DIR} pushd ${TOOLS_DIR} curl -L ${ABC_URL} -o ${ABC_FILE} diff --git a/scripts/install-aiger.sh b/scripts/install-aiger.sh index 4f256aed..77463399 100755 --- a/scripts/install-aiger.sh +++ b/scripts/install-aiger.sh @@ -17,7 +17,15 @@ PICOSAT_FILE=${PICOSAT_NAME}-${PICOSAT_VERSION}.tar.gz PICOSAT_DIR=${PICOSAT_NAME} PICOSAT_URL=http://fmv.jku.at/picosat/picosat-965.tar.gz -sudo apt install -y curl build-essential binutils +if [ "$(uname)" == "Darwin" ]; then + brew install curl + export PATH="/usr/local/opt/curl/bin:$PATH" +elif [ "$(uname)" == "Linux" ]; then + sudo apt install -y curl build-essential binutils +else + exit +fi + mkdir -p ${TOOLS_DIR} pushd ${TOOLS_DIR} curl -L ${AIGER_URL} -o ${AIGER_FILE} @@ -40,6 +48,9 @@ make popd pushd ${AIGER_DIR} +if [ "$(uname)" == "Darwin" ]; then + sed -i "29i#include " aigunconstraint.c +fi ./configure.sh make mkdir -p /usr/local/bin