This project aims to create an open platform that uses sets of smartcards connected to a Raspberry Pi and allows the execution of several Secure Multiparty Computation protocols.
- configuration, administration, and execution of MPC protocols
- currently supported protocols are Myst and Smart-ID RSA
- remote connection - users can access the back-end application installed on a remote computer over the network
The back-end application:
- can run on any operating system
- runs on the JVM
- contains MPC protocols
- communicates with smartcards
The front-end browser application:
- provides GUI
- communicates with the back-end application using WebSockets
- MPCOP instances can cooperate and collectively compute MPC signatures.
- MPCOP instances make up networks.
- A network can represent a single instance.
.
├── Dockerfile - MPCOP Dockerfile
├── mpcop - The back-end application
├── mpcop-web - The front-end React application
├── pcsc-build - A script for PC/SC software build
└── ping - A simple applet that is used for MPCOP performance measurement
- Set up the MPCOP repository on your system:
echo "deb https://packagecloud.io/kristian_mika/mpcop/any/ any main" | sudo tee --append /etc/apt/sources.list.d/kristian_mika_mpcop.list echo "deb-src https://packagecloud.io/kristian_mika/mpcop/any/ any main" | sudo tee --append /etc/apt/sources.list.d/kristian_mika_mpcop.list curl -L "https://packagecloud.io/kristian_mika/mpcop/gpgkey" 2> /dev/null | sudo apt-key add -
- Update your package indices
sudo apt-get update
- Install MPCOP
sudo apt-get install mpcop
- After the installation has been completed, the application is running as a systemd service.
- To access the application navigate to localhost:8082
Please note it may not be possible to communicate with smartcards when running on Docker on Windows. This is caused by the fact that Docker for Windows uses Hyper-V. Hyper-V does not support USB passthrough.
docker pull mpcop/mpcop:latest
docker run --detach --device /dev/bus/usb -p 8082:8082 mpcop/mpcop:latest
cd mpcop-web
npm test --all
cd mpcop
./gradlew :test
We encourage you to use the prepared pipeline that builds the package for you.
- Build the front-end server
Static files of the server are in the
cd mpcop-web npm install # to install dependencies npm build
mpcop-web/build
folder. - Build the app
cp mpcop-web/build/* mpcop/static/ # copy static files git submodule update --init --recursive # clone submodules mk-build-deps --install --tool 'apt-get --assume-yes' --root sudo --remove # install build dependencies dpkg-buildpackage -b -us -uc # create a package
There might be a convenience script for local packaging in the future.
To test your changes, you can take advantage of the React development server by running
cd mpcop-web
npm start
The development server runs by default on localhost:3000.
To run the back-end, type
cd mpcop
gradle run
PCSClite is an implementation of the PC/SC international standard for PC to smartcard reader communication. It's a middleware to access smartcard readers. CCID is a generic smartcard driver. Both limit the maximum number of simultaneously connected card readers. This script downloads and extracts the required packages, modifies the source code to enable communication with more than 16 card readers and builds new packages.
The provided script is intended to be executed in a Docker container, but you can also run it directly on your host machine. In that case, don't forget to install the required packages from the Docker file.
-
Build a docker image
cd pcsc-build docker build --tag mpcop/pcsc-build .
-
Run the built image
# create a new folder for the build packages mkdir release docker run -it --rm -v `pwd`/release:/release mpcop/pcsc-build
-
The
./release
folder now contains all required PC/SC packages. Install them usingcd release sudo apt install ./*