Special Topics in Innovative Integration of Medicine and EECS 2022 Team 6
Using pip to download the pyphe package and shamirs
pip install phe
python3 -m pip install shamirs
python3 -m pip install cherrypy
Add specified data in the database (encrypt and split)
sh add.sh...
Options:
-i Patient ID
-n Number of shares need to split
-t Minimum number of shares need to combine
-p Path of the data
Fetch and combine the splitted data to retrieve the original encrypted data
sh get.sh...
Options:
-i Patient ID
-h Header of data needed to combine
-t Number of shares needed to combine
Use the combined encrypted data to carry out calculation
sh cal.sh...
Options:
-i Patient ID
Put the file you want to encrypt in the directory data
python3 encrypt.py [path] [filename]
Split file into N shares with threshold T
The shares will be stored in share
python3 split.py [ID] [N] [T]
Combine x shares, where x must be >= T
python3 combine.py [ID] [Header] [x]
Decrypt file
python3 decrypt.py [ID] [Header]
python3 read_csv.py [filename]
Delete all files except original data in data and keys in key
sh remove.sh
A demostration of patient_dataset (encrypt, split, combine, calculate)
sh test3.sh patient_dataset [number_of_patient]