Privacy-Preserving E-Health Record Management Using Blockchain-Based Post-Quantum Access Control https://ieeexplore.ieee.org/document/10794736 doi:10.1109/UNet62310.2024.10794736
Project Title: Privacy-Preserving E-Health Record Management Using Blockchain-Based Post-Quantum Access Control
DOI: 10.1109/UNet62310.2024.10794736
This project implements a smart contract for a Ciphertext-Policy Attribute-Based Encryption (CP-ABE) scheme based on Learning With Errors (LWE), designed for secure e-health record management on a blockchain. It utilizes post-quantum cryptographic principles for access control.
Before testing the project, ensure the following software is installed:
- Node.js: Version 18.12.0 (LTS) is required. Download and install it from the official release page: https://nodejs.org/en/blog/release/v18.12.0.
- npm: Update npm to the latest version using
npm install -g npm
. - node-gyp: Install
node-gyp
globally usingnpm install -g node-gyp
. - Ganache: A personal Ethereum blockchain for development and testing. Download it from: https://archive.trufflesuite.com/ganache/.
- Truffle Suite: The project is built and tested using the Truffle framework. Install Truffle globally using
npm install -g truffle
. - Python Packages (for
AccessControl.py
): Install the required Python packages:pip install flask numpy sympy requests json-tricks flask_restful web3
Follow these steps to compile, deploy, and test the smart contracts:
- Compilation: Navigate to the project's root directory (
CP-ABE-LWE-Based-Smart-Contract-main\CP-ABE-LWE-Based-Smart-Contract-main
) and compile the smart contracts using Truffle:truffle compile
- Deployment:
- Launch Ganache.
- Configure your Truffle project (typically in
truffle-config.js
) to connect to your local Ganache network (usuallylocalhost:7545
). - Deploy the compiled contracts to the Ganache blockchain:
truffle deploy
- Testing: Execute the Truffle tests to verify the smart contract functionality:
truffle test
Steps:
- Open Ganache and go to CHAIN tab
- Set Hardfork to Petersburg
- Set Gas Price to 1 WEI
- Save and restart
Result: Petersburg hardfork with minimal gas costs for development testing.
Remember to update the contract address in AccessControl.py with your contract's address.
- Execution: Run the script using Python from the command line:
(Note: Use
python AccessControl.py
py
if it's aliased for Python on your system, as in the original text). - Access: Once running, the API will be accessible at
http://127.0.0.1:5000
.