FROM ubuntu:16.04 RUN apt update && apt install -y wget git build-essential cmake \ libgmp-dev libprocps4-dev libssl-dev pkg-config sudo \ libboost-all-dev perl WORKDIR /root # This is the version of go we used, so we pin it for replicability. # It's likely newer versions will also work, however. RUN wget https://golang.org/dl/go1.13.5.linux-amd64.tar.gz RUN tar -C /usr/local -xzvvf go1.13.5.linux-amd64.tar.gz RUN cd /usr/local/bin && ln -s ../go/bin/* . RUN useradd -ms /bin/bash zxad RUN adduser zxad sudo RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers USER zxad WORKDIR /home/zxad # Our version of kyber patched to support hash-to-G2, while our pull # requests are pending: # https://github.com/dedis/kyber/pull/424 (merged) # https://github.com/dedis/kyber/pull/428 (not yet) RUN git clone git://git-crysp.uwaterloo.ca/zxad/kyber RUN cd kyber/pairing/bn256 && go test -v ./... RUN git clone git://git-crysp.uwaterloo.ca/zxad/code RUN cd code && go get -d ./... # Replace the downloaded kyber with our version above RUN cd go/src/go.dedis.ch && rm -rf kyber && ln -s ../../../kyber . RUN cd code/src && \ for i in */benchmark; do ( cd $i; go build ); done RUN git clone git://git-crysp.uwaterloo.ca/zxad/snarkcode RUN cd snarkcode && git submodule update --init --recursive && \ cd libsnark && mkdir build && cd build && cmake -DCURVE=BN128 .. && \ make -j8 && cd ../.. && make -j8 zxad