Private-file-sharing code on top of the p2b-blockchain code.
workspace
|__pyring
|__CS839-Blockchain-Project (this repo)
|____src // contains our source code
|_______data // contains test data we used to run our code
|____Deliverables // contains documents we submitted as part of our course project
mkdir workspace
cd workspace
python -m venv env
python -m venv env
- Setup pyring:
git clone --recurse-submodules https://github.com/bartvm/pyring.git
cd pyring
python setup.py build
python setup.py develop
- Setup this repository:
git clone ...
cd <repo>
chmod 777 setup.sh
./setup.sh
to install required packages
- Generate reencryption keys for the blockchain nodes
python3 src/keygen.py -f <output-file-name>
- Run the proxy,
python3 proxy-reencryption.py -p <port num>
. Right now it is hardcoded to port 5000. - Run blockchain nodes
python3 src/server.py -p 5001 -n 5001 5002 5003 -f <key-gen-file-name>
curl http://localhost:5001/startexp/
- To invoke the APIs, use:
python run.py -f startexp -s 5001
to startpython src/run.py -f upload -s 5001 -d <file to share>
to uploadpython src/run.py -f share -s 5001 -r 5002 -t <txn ref of upload>
to share
Link to our demo can be found here