https://github.com/matchy233/mpc-rsa
🔐 Containerized distributed RSA keypair generation and decryption module
https://github.com/matchy233/mpc-rsa
distributed-computing grpc-java multiparty-computation rsa-cryptography
Last synced: about 1 year ago
JSON representation
🔐 Containerized distributed RSA keypair generation and decryption module
- Host: GitHub
- URL: https://github.com/matchy233/mpc-rsa
- Owner: matchy233
- Created: 2021-06-23T04:41:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-23T04:52:31.000Z (almost 5 years ago)
- Last Synced: 2025-04-21T23:05:16.125Z (about 1 year ago)
- Topics: distributed-computing, grpc-java, multiparty-computation, rsa-cryptography
- Language: Java
- Homepage:
- Size: 221 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Secure Multiparty Computing (MPC) Module for RSA Keypair Generation and Message Decryption
     
Secure Multiparty Computing (MPC) is a heated research field in cryptography with the goal of creating methods for
multiple parties to jointly contribute to the computation while keeping the input private to each party.
RSA encryption algorithm, which requires lots of computations involving multiplication and modulus on large prime
numbers, is suitable to be modified to working in an MPC scenario.
This project aims to implement a containerized MPC module for RSA keypair generation and message decryption.
Refined version of [a course project](https://github.com/7942jun/mpc-project).
## Build and Run the Project
### Run from Docker image
The Docker image is available in the Docker hub. You can simply do a `docker pull` to acquire the images.
```bash
$ docker pull matchy233/mpc-project_manager
$ docker pull matchy233/mpc-project_worker
```
It's also possible to build the image from source. We use Docker compose to distribute `manager` and `worker` conveniently. [Install Docker compose](https://docs.docker.com/compose/install/) if not already installed and simply run:
```bash
$ docker-compose build
```
Afterwards, you should be able to check the generated images by
```bash
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mpc-project_manager latest 56c59ec8a29d 1 minute ago 445MB
mpc-project_worker latest 3432307d295f 2 minutes ago 244MB
```
To run the application, a simple `docker run` will easily get the manager or worker set up.
The following 2 commands set up 2 containers. One is named `manager` running in manager mode with the exposed port published to port `8350` of the local machine; the other is named `worker1` running in worker mode with the exposed port published to port `8353` of the local machine.
These containers are then accessible through `:` from other machines.
```bash
$ docker run --rm --it --name manager mpc-project_manager -p 8350:8080
$ docker run --rm --itd --name worker1 mpc-project_worker -p 8353:8080
```
### Build from source
We use `Gradle` to manage and build the project. Thus, you can simply build the project from source with `Gradle`. Simply run the following command if you have `Gradle` installed on your
machine:
```bash
$ gradle clean install
```
If you don't have `gradle` installed, you can build with the `Gradle` wrapper:
```bash
$ gradlew clean install
```
After running either command, you can find the executable in `/app/build/install/`.
## Reference
1. Malkin, M., Wu, T. D., & Boneh, D. (1999, February). Experimenting with Shared Generation of RSA Keys. In **NDSS** (*The Network and Distributed System Security Symposium*).
2. Boneh, D., & Franklin, M. (1997, August). Efficient generation of shared RSA keys. In **CRYPTO** (*Annual
international cryptology conference*) (pp. 425-439). Springer, Berlin, Heidelberg.
3. Catalano, D., Gennaro, R., & Halevi, S. (2000, May). Computing inverses over a shared secret modulus. In **Eurocrypt**(*International Conference on the Theory and Applications of Cryptographic Techniques*) (pp. 190-206).
Springer, Berlin, Heidelberg.