From 473cd289acd584e956ac779a04c37c0aff42078f Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:15:41 -0400 Subject: [PATCH 1/7] Update Documentation --- source/setup/setup.rst | 126 +++++++++++++++++++++++--------------- source/setup/tutorial.rst | 5 +- 2 files changed, 81 insertions(+), 50 deletions(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index f96dad6..ab9a2d0 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -2,69 +2,99 @@ Cerebro Setup ************************* -Cerebro has a few core dependencies that need to be setup before it can be used. +We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. + * Create the Dockerfile and requirements.txt. + * Dockerfile :: + FROM rdeng2614/cerebro:initial_image + WORKDIR /root + RUN git clone https://github.com/mc2-project/cerebro.git + WORKDIR /root/cerebro + RUN git submodule update --init --recursive + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool + RUN git pull origin master && cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot + RUN cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc + RUN git pull origin master + RUN cmake . && make + WORKDIR /root + RUN apt-get update && apt-get install -y \ + python-gmpy2 \ + python-pip \ + emacs + COPY requirements.txt /root + RUN pip install -r requirements.txt + + * requirements.txt :: + asn1crypto==0.24.0 + astor==0.8.1 + astunparse==1.6.3 + cryptography==2.1.4 + decorator==4.4.2 + enum34==1.1.6 + gmpy2==2.0.8 + idna==2.6 + ipaddress==1.0.17 + keyring==10.6.0 + keyrings.alt==3.0 + networkx==2.2 + numpy==1.16.6 + ordered-set==3.1.1 + pathlib==1.0.1 + pycrypto==2.6.1 + pygobject==3.26.1 + pyxdg==0.25 + SecretStorage==2.3.1 + six==1.11.0 + * Place them in the same directory. + * In that directory, run ``docker build -t name_of_image``. + +After creating the image, run it. You should be in ``/root``, the directory Cerebro was installed in. Complete the setup steps for your desired backend. SCALE-MAMBA ################ -The documentation fully detailing SCALE-MAMBA can be obtained by running ``make doc`` in the SCALE-MAMBA repository. - -The following is copied from SCALE-MAMBA's current setup documentation. - -Prerequisite Libraries: -************************* - * gcc/g++, tested with version 7.2.1 - * MPIR (compiled with the -cxx flag) - * python 2.7.5 (ideally with gmpy2 installed) - * OpenSSL (tested with version 1.1.0) - * Crypto ++ (tested with version 7.0) - - - Setup Steps for SCALE-MAMBA ***************************** - * After installing the libraries, go to CONFIG.mine and change the entry corresponding with ``ROOT`` to point to the current path of where the SCALE-MAMBA directory is. Also, change the entry corresponding with ``OSSL`` to have it point to the installed OpenSSL directory. + * Go to ``cerebro/crypto_backend/SCALE-MAMBA``. + * Copy ``CONFIG`` into ``CONFIG.mine`` (i.e ``cp CONFIG CONFIG.mine``). + * Go to ``CONFIG.mine`` and change the entry corresponding with ``ROOT`` to point to the current path of where the SCALE-MAMBA directory is (most likely ``/root/cerebro/crypto_backend/SCALE-MAMBA``). Also, change the entry corresponding with ``OSSL`` to have it point to the installed OpenSSL directory (most likely ``/usr/lib/ssl``) * Run ``make progs`` and SCALE-MAMBA should compile. - * Create a config file with all the servers participating in the multiparty computation. Line i should have the IP address of the i'th server. - * Go to mc2/Config and run the script gen_cert.py and pass in the previously made config file along with the number of parties participating. - * Additionally, run ``python mc2/Config/make_config.py`` which sets up the Network configuration for SCALE-MAMBA to use. - * Then in mc2/SCALE-MAMBA, run the command: ``echo '2 1 p' > ./Setup.x`` where p is the length of the prime in terms of number of bits used in the secure computation. + * Go to ``cerebro``. Then do ``python Config/gen_cert.py n`` where ``n`` is the number of parties you want to compute with. For the tests (described below) to work, we require ``n`` to be ``2``. + * This will generate certificates for the root and the ``n`` parties. The first certificate is the the root's certificate. The following certificates are for the parties. For simplicity, make sure to set the ``Common Name`` of the root as ``RootCA``. Set the ``Common Name`` of the ``i``th party to ``Player(i-1)`` (e.g. ``Player0`` for the first party). + * Go to ``cerebro/crypto_backend/SCALE-MAMBA`` and run ``./Setup.x``. + * First, let's setup ``Certs`` (i.e enter ``1``). + * For the root, enter the name you gave your root (e.g. ``RootCA``). For the number of players, enter ``n`` (e.g. ``2``). Then, for each player, input an IP address (for testing, input ``127.0.0.1``). For the name of certificate, use the common name you gave your parties appended with ``.crt`` (e.g. ``Player0.crt`` and ``Player1.crt``). This should produce ``NetworkData.txt`` under ``Data``. + * Next, run ./Setup.x, and setup secret sharing. Choose full threshold. Let it find the prime for LSSS. For the modulus, for simplicity, enter 128. You can choose a different number if you want. The number you can choose is limited by ``MAX_MOD`` in ``CONFIG.mine``; you can't use more than 2 to the ``MAX_MOD`` bits. You can configure ``MAX_MOD`` if you want. + * Finally, run .Setup.x, and setup the convversion circuit. + +Testing for SCALE-MAMBA +************************* + * To run the tests with SCALE-MAMBA, run ``cd mc2/crypto_backend/SCALE-MAMBA`` and then run ``python test_scripts/test_scale_mamba.py``. + * Troubleshooting + * Try editing ``test_scripts/test_scale_mamba.py`` such that in ``run_online`` when running ``./Player.x 0 ...`` and ``./Player.x 1 ..``, you add a flag ``-max 5000,5000,5000``. This limits the numbers of triples that can be generated to 5000. + * Edit ``Data/NetworkData.txt`` such that the last two lines (which should be zeros) are ones. This uses a fake online phase so it sacrifices security for speed. However, for testing purposes, this is okay. + +Resources +********** + * SCALE-MAMBA repository EMP-AGMPC ################ -Prerequisite Libraries: -************************* - * emp-toolkit: - * Install: - * cmake - * git - * build-essential - * libssl-dev - * libgmp-dev - * Boost - * relic - * cd into emp-tool and run ``cmake . && make && sudo make install``. - * emp-ot: Installation instructions are here: https://github.com/emp-toolkit/emp-ot - * After installing emp-toolkit, just cd into emp-ot and run ``cmake . && make && sudo make install``. Setup Steps for EMP-AGMPC *************************** - * The make_config.py script should have set up all the network parameters inside emp-agmpc/emp-agmpc/cmpc_config.h, but if not, you'll have to manually input the IP's of each server. - * IP[i] will hold the IP address of the ith server. - * Note that everything here is 1-indexed so the first server goes into IP[1]. + * Navigate to ``cerebro/crypto_backend/emp-toolkit/emp-agmpc/emp-agmpc``. Edit the file ``cmpc_config.h``. You can set ``NUM_PARTY_FOR_RUNNING`` to configure the number of parties in your computation. Then, edit ``IP`` such that the ``i``th index holds the IP address of the ``i``th party. For example, ``IP[1]`` holds the IP address for party 1, ``IP[2]`` holds the IP address for party 2, etc. Also, make sure that the 0th index and the last index of ``IP`` contains ``""``. So if ``NUM_PARTY_FOR_RUNNING`` is 3, for example, ``IP[0]`` and ``IP[4]`` hold ``""``. + * For the tests, we require ``NUM_PARTY_FOR_RUNNING`` to be 2 and every party's IP address to be ``127.0.0.1``. * Run ``cmake . && make`` - -Alternatives -*************************** - * Alternatively, you can pull the docker image from here: ``docker pull rdeng2614/cerebro:initial_image`` which has all the dependencies installed. Then, you can clone the cerebro repository and directly start setting up from there. - - - -Testing -*************************** - * Included with Cerebro are a set of tests for both SCALE-MAMBA and emp-agmpc. - * To run the tests with SCALE-MAMBA, run ``cd mc2/crypto_backend/SCALE-MAMBA`` and then run ``python test_scripts/test_scale_mamba.py``. +Testing for EMP-AGMPC +*********************** * To run the tests with emp-agmpc, run ``cd mc2/crypto_backend/emp-toolkit/emp-agmpc`` and then run ``python test_scripts/test_gc.py``. +Resources +*********** + * emp-agmpc repository + * emp-tool repository + * emp-ot repository diff --git a/source/setup/tutorial.rst b/source/setup/tutorial.rst index 6e7c1a2..7affbec 100644 --- a/source/setup/tutorial.rst +++ b/source/setup/tutorial.rst @@ -31,6 +31,7 @@ Boolean: EMP_AGMPC * circuit_file_folder is the directory that contains the circuit file: "agmpc.txt" and the input format file "agmpc.txt.input". * After the computation is run, the output file "agmpc.output" will be stored in the specified output_file_folder. + * You can parse ``agmpc.output`` using the script ``agmpc_output_parser.py`` in ``Output_Data`` @@ -39,9 +40,9 @@ Side Note: Input Data Arithmetic and Boolean circuits are able to read in user data. Currently, Cerebro has it set up such that the input data comes from a directory called Input_Data. In there, there is a script called ``gen_data.py`` which will convert data generated from another python file to input_data recognizable by Cerebro. To have a user provide input data do the following: - * In another file (for example hello.py), run the program that generates the user data. + * In another file (for example hello.py), write the program that generates the user data. * At the very end of the program, set the variable ``data`` equal to the array of the user's input data. For example, if my input data is 1,2,3, then at the very end of the program we have the line: ``data = [1, 2, 3]`` - * Call ``python gen_data.py [file_name]`` where file_name is the python file containing the data. + * Call ``python gen_data.py . [file_name]`` where file_name is the python file containing the data. For example, if our data is generated in ``hello.py``, then call ``python gen_data.py . hello`` * The script generates a file f0 and input.txt. The former is used for arithmetic circuits and can be left alone while the latter text file can be moved depending on your needs. (More is explained above in the EMP_AGMPC section). Limitations: Currently the way the script is written, the input size is at most 64 bits in length. From ea68df1a9201e3501b6ca9d242176af4033235f8 Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:22:26 -0400 Subject: [PATCH 2/7] Fix formatting issue --- source/setup/setup.rst | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index ab9a2d0..a6ece80 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -4,7 +4,8 @@ Cerebro Setup We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. * Create the Dockerfile and requirements.txt. - * Dockerfile :: + * Dockerfile + :: FROM rdeng2614/cerebro:initial_image WORKDIR /root RUN git clone https://github.com/mc2-project/cerebro.git @@ -25,7 +26,8 @@ We provide a Dockerfile that installs all the dependencies required by Cerebro. COPY requirements.txt /root RUN pip install -r requirements.txt - * requirements.txt :: + * requirements.txt + :: asn1crypto==0.24.0 astor==0.8.1 astunparse==1.6.3 From b0566a09a6c647fa17a58029d3bc0d49d443b3ca Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:26:22 -0400 Subject: [PATCH 3/7] try 3 --- source/setup/setup.rst | 85 ++++++++++++++++++++++-------------------- 1 file changed, 44 insertions(+), 41 deletions(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index a6ece80..8992f62 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -5,49 +5,52 @@ Cerebro Setup We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. * Create the Dockerfile and requirements.txt. * Dockerfile - :: - FROM rdeng2614/cerebro:initial_image - WORKDIR /root - RUN git clone https://github.com/mc2-project/cerebro.git - WORKDIR /root/cerebro - RUN git submodule update --init --recursive - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool - RUN git pull origin master && cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot - RUN cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc - RUN git pull origin master - RUN cmake . && make - WORKDIR /root - RUN apt-get update && apt-get install -y \ - python-gmpy2 \ - python-pip \ - emacs - COPY requirements.txt /root - RUN pip install -r requirements.txt + :: + + FROM rdeng2614/cerebro:initial_image + WORKDIR /root + RUN git clone https://github.com/mc2-project/cerebro.git + WORKDIR /root/cerebro + RUN git submodule update --init --recursive + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool + RUN git pull origin master && cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot + RUN cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc + RUN git pull origin master + RUN cmake . && make + WORKDIR /root + RUN apt-get update && apt-get install -y \ + python-gmpy2 \ + python-pip \ + emacs + COPY requirements.txt /root + RUN pip install -r requirements.txt * requirements.txt - :: - asn1crypto==0.24.0 - astor==0.8.1 - astunparse==1.6.3 - cryptography==2.1.4 - decorator==4.4.2 - enum34==1.1.6 - gmpy2==2.0.8 - idna==2.6 - ipaddress==1.0.17 - keyring==10.6.0 - keyrings.alt==3.0 - networkx==2.2 - numpy==1.16.6 - ordered-set==3.1.1 - pathlib==1.0.1 - pycrypto==2.6.1 - pygobject==3.26.1 - pyxdg==0.25 - SecretStorage==2.3.1 - six==1.11.0 + :: + + asn1crypto==0.24.0 + astor==0.8.1 + astunparse==1.6.3 + cryptography==2.1.4 + decorator==4.4.2 + enum34==1.1.6 + gmpy2==2.0.8 + idna==2.6 + ipaddress==1.0.17 + keyring==10.6.0 + keyrings.alt==3.0 + networkx==2.2 + numpy==1.16.6 + ordered-set==3.1.1 + pathlib==1.0.1 + pycrypto==2.6.1 + pygobject==3.26.1 + pyxdg==0.25 + SecretStorage==2.3.1 + six==1.11.0 + * Place them in the same directory. * In that directory, run ``docker build -t name_of_image``. From 36044e3e32b606849c77dc689be3233de9928510 Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:28:04 -0400 Subject: [PATCH 4/7] almost there --- source/setup/setup.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index 8992f62..79db99c 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -27,6 +27,7 @@ We provide a Dockerfile that installs all the dependencies required by Cerebro. COPY requirements.txt /root RUN pip install -r requirements.txt + * requirements.txt :: @@ -50,7 +51,7 @@ We provide a Dockerfile that installs all the dependencies required by Cerebro. pyxdg==0.25 SecretStorage==2.3.1 six==1.11.0 - + * Place them in the same directory. * In that directory, run ``docker build -t name_of_image``. From f3d5537a798ce56317085833f05128d19048dfa2 Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:30:56 -0400 Subject: [PATCH 5/7] maybe --- source/setup/setup.rst | 83 +++++++++++++++++++++--------------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index 79db99c..aa2a32d 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -5,52 +5,51 @@ Cerebro Setup We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. * Create the Dockerfile and requirements.txt. * Dockerfile - :: + :: - FROM rdeng2614/cerebro:initial_image - WORKDIR /root - RUN git clone https://github.com/mc2-project/cerebro.git - WORKDIR /root/cerebro - RUN git submodule update --init --recursive - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool - RUN git pull origin master && cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot - RUN cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc - RUN git pull origin master - RUN cmake . && make - WORKDIR /root - RUN apt-get update && apt-get install -y \ - python-gmpy2 \ - python-pip \ - emacs - COPY requirements.txt /root - RUN pip install -r requirements.txt - + FROM rdeng2614/cerebro:initial_image + WORKDIR /root + RUN git clone https://github.com/mc2-project/cerebro.git + WORKDIR /root/cerebro + RUN git submodule update --init --recursive + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool + RUN git pull origin master && cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot + RUN cmake . && make && sudo make install + WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc + RUN git pull origin master + RUN cmake . && make + WORKDIR /root + RUN apt-get update && apt-get install -y \ + python-gmpy2 \ + python-pip \ + emacs + COPY requirements.txt /root + RUN pip install -r requirements.txt * requirements.txt - :: + :: - asn1crypto==0.24.0 - astor==0.8.1 - astunparse==1.6.3 - cryptography==2.1.4 - decorator==4.4.2 - enum34==1.1.6 - gmpy2==2.0.8 - idna==2.6 - ipaddress==1.0.17 - keyring==10.6.0 - keyrings.alt==3.0 - networkx==2.2 - numpy==1.16.6 - ordered-set==3.1.1 - pathlib==1.0.1 - pycrypto==2.6.1 - pygobject==3.26.1 - pyxdg==0.25 - SecretStorage==2.3.1 - six==1.11.0 + asn1crypto==0.24.0 + astor==0.8.1 + astunparse==1.6.3 + cryptography==2.1.4 + decorator==4.4.2 + enum34==1.1.6 + gmpy2==2.0.8 + idna==2.6 + ipaddress==1.0.17 + keyring==10.6.0 + keyrings.alt==3.0 + networkx==2.2 + numpy==1.16.6 + ordered-set==3.1.1 + pathlib==1.0.1 + pycrypto==2.6.1 + pygobject==3.26.1 + pyxdg==0.25 + SecretStorage==2.3.1 + six==1.11.0 * Place them in the same directory. * In that directory, run ``docker build -t name_of_image``. From c4022a64ff15ef36d5d5d465db6e0b567f74b88a Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Tue, 29 Jun 2021 15:35:08 -0400 Subject: [PATCH 6/7] finally --- source/setup/setup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index aa2a32d..d06f1b6 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -4,7 +4,7 @@ Cerebro Setup We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. * Create the Dockerfile and requirements.txt. - * Dockerfile + * Dockerfile :: FROM rdeng2614/cerebro:initial_image From b2e6fce9458c32ff15c206a0938cab78438c6488 Mon Sep 17 00:00:00 2001 From: Alvyn Wang Date: Wed, 18 Aug 2021 15:49:24 -0700 Subject: [PATCH 7/7] Add back prerequisite libraries and move Dockerfile and requirements.txt to cerebro repo --- source/setup/setup.rst | 103 +++++++++++++++++++---------------------- 1 file changed, 48 insertions(+), 55 deletions(-) diff --git a/source/setup/setup.rst b/source/setup/setup.rst index d06f1b6..3b4ce83 100644 --- a/source/setup/setup.rst +++ b/source/setup/setup.rst @@ -2,63 +2,55 @@ Cerebro Setup ************************* -We provide a Dockerfile that installs all the dependencies required by Cerebro. Running the Dockerfile will build SCALE-MAMBA and EMP-AGMPC. - * Create the Dockerfile and requirements.txt. - * Dockerfile - :: - - FROM rdeng2614/cerebro:initial_image - WORKDIR /root - RUN git clone https://github.com/mc2-project/cerebro.git - WORKDIR /root/cerebro - RUN git submodule update --init --recursive - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-tool - RUN git pull origin master && cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-ot - RUN cmake . && make && sudo make install - WORKDIR /root/cerebro/crypto_backend/emp-toolkit/emp-agmpc - RUN git pull origin master - RUN cmake . && make - WORKDIR /root - RUN apt-get update && apt-get install -y \ - python-gmpy2 \ - python-pip \ - emacs - COPY requirements.txt /root - RUN pip install -r requirements.txt - - * requirements.txt - :: - - asn1crypto==0.24.0 - astor==0.8.1 - astunparse==1.6.3 - cryptography==2.1.4 - decorator==4.4.2 - enum34==1.1.6 - gmpy2==2.0.8 - idna==2.6 - ipaddress==1.0.17 - keyring==10.6.0 - keyrings.alt==3.0 - networkx==2.2 - numpy==1.16.6 - ordered-set==3.1.1 - pathlib==1.0.1 - pycrypto==2.6.1 - pygobject==3.26.1 - pyxdg==0.25 - SecretStorage==2.3.1 - six==1.11.0 - - * Place them in the same directory. - * In that directory, run ``docker build -t name_of_image``. - -After creating the image, run it. You should be in ``/root``, the directory Cerebro was installed in. Complete the setup steps for your desired backend. +Cerebro has a few core dependencies that need to be setup before it can be used. SCALE-MAMBA ################ +The documentation fully detailing SCALE-MAMBA can be obtained by running ``make doc`` in the SCALE-MAMBA repository. + +The following is copied from SCALE-MAMBA's current setup documentation. + +Prerequisite Libraries: +************************* + * gcc/g++, tested with version 7.2.1 + * MPIR (compiled with the -cxx flag) + * python 2.7.5 (ideally with gmpy2 installed) + * OpenSSL (tested with version 1.1.0) + * Crypto ++ (tested with version 7.0) + + +EMP-AGMPC +################ +Prerequisite Libraries: +************************* + * emp-toolkit: + * Install: + * cmake + * git + * build-essential + * libssl-dev + * libgmp-dev + * Boost + * relic + * cd into emp-tool and run ``cmake . && make && sudo make install``. + * emp-ot: Installation instructions are here: https://github.com/emp-toolkit/emp-ot + * After installing emp-toolkit, just cd into emp-ot and run ``cmake . && make && sudo make install``. + + +Alternatively, we provide a Dockerfile that installs Cerebro as well as its dependencies. + + +Docker Setup +************** + * In the Cerebro repository, under ``Docker/`` are two files: `Dockerfile` and `requirements.txt` + * Place the two files in the same directory. + * In that directory, run ``docker build -t name_of_image``. + +After creating the image, run it. You should be in ``/root``, the directory Cerebro was installed in. + +Complete the setup steps for your desired backend. + Setup Steps for SCALE-MAMBA ***************************** * Go to ``cerebro/crypto_backend/SCALE-MAMBA``. @@ -70,8 +62,8 @@ Setup Steps for SCALE-MAMBA * Go to ``cerebro/crypto_backend/SCALE-MAMBA`` and run ``./Setup.x``. * First, let's setup ``Certs`` (i.e enter ``1``). * For the root, enter the name you gave your root (e.g. ``RootCA``). For the number of players, enter ``n`` (e.g. ``2``). Then, for each player, input an IP address (for testing, input ``127.0.0.1``). For the name of certificate, use the common name you gave your parties appended with ``.crt`` (e.g. ``Player0.crt`` and ``Player1.crt``). This should produce ``NetworkData.txt`` under ``Data``. - * Next, run ./Setup.x, and setup secret sharing. Choose full threshold. Let it find the prime for LSSS. For the modulus, for simplicity, enter 128. You can choose a different number if you want. The number you can choose is limited by ``MAX_MOD`` in ``CONFIG.mine``; you can't use more than 2 to the ``MAX_MOD`` bits. You can configure ``MAX_MOD`` if you want. - * Finally, run .Setup.x, and setup the convversion circuit. + * Next, run ``./Setup.x``, and setup secret sharing. Choose full threshold. Let it find the prime for LSSS. For the modulus, for simplicity, enter 128. You can choose a different number if you want. The number you can choose is limited by ``MAX_MOD`` in ``CONFIG.mine``; you can't use more than 2 to the ``MAX_MOD`` bits. You can configure ``MAX_MOD`` if you want. + * Finally, run ``./Setup.x``, and setup the convversion circuit. Testing for SCALE-MAMBA ************************* @@ -103,3 +95,4 @@ Resources * emp-agmpc repository * emp-tool repository * emp-ot repository +