This project implements the KP-ABE (Key-Policy Attribute-Based Encryption) using the DPVS (Dual Pairing Vector Spaces) scheme for the Content Filtering Use Case.
The project utilizes the RELIC library for cryptographic operations, the GMP library for arbitrary precision arithmetic, and the ABE-LSSS library, which is a part of the OpenABE project.
To install and run this project, follow these steps:
-
Clone the Repository:
git clone https://github.com/acarreo/kpabe-content-filtering.git cd kpabe-content-filtering -
Install Dependencies: Two ways to install dependencies locally (for the host machine) or in a Docker environment, follow one of the following instructions:
cd scripts # Install dependencies in a Docker environment make docker # Or Install dependencies on the host machine # Clone ABE-LSSS submodule - only need if you want to compile the project on your host machine git submodule update --init --remote abe-lsss make
Go to the kpabe-content-filtering directory and follow one of the following instructions to build and run the project:
-
Build on the Host Machine
mkdir build && cd build cmake .. make # If you want to install the project as library, you need root privelege sudo make install
-
Build in a Docker Environment
cd .. # go back to the root directory docker run -ti --rm -v $PWD:/content-filtering cryptolib/abe-lsss:relic-0.6.0--bls12-381--v0.1.0 mkdir -p /tmp/build-kpabe cd /tmp/build-kpabe cmake /content-filtering make # If you want to install the project as library make install
- Run the
./kpabe_testexecutable to perform a simple encryption and decryption. - Run the
./kpabe_benchexecutable to perform a simplist benchmark - Run the
./kpabe_exampleexecutable to see an example of how to use the KP-ABE scheme.
If need, add the library path /usr/local/lib to the environment variable or add it to the ~/.bashrc file and run source ~/.bashrc.
echo 'export LD_LIBRARY_PATH=/usr/local/lib' >> ~/.bashrc
source ~/.bashrc