This readme is here to help building this POC from sources and explain a bit what it's going on.
Steps to install on an Ubuntu-like system :
We need usual tools to build :
sudo apt-get install build-essential
sudo apt-get install cmakeSome libraries need to be installed before building the sources.
- Libcurl
- Libetpan
- Libsodium
- libgmp
- libbinn
- unqlite
Libbinn :
git clone https://github.com/liteserver/binn
cd binn
make
sudo make installDue to how binn installs, we need to set the environment variable LD_LIBRARY_PATH to /usr/local/lib
Libsodium :
git clone https://github.com/jedisct1/libsodium --branch stable
cd libsodium
./configure
make && make check
sudo make installLibcurl :
sudo apt-get install libcurl4-gnutls-devLibetpan:
sudo apt-get install autoconf libtool
git clone https://github.com/dinhvh/libetpan.git
cd libetpan
./autogen.sh
makeLibgmp :
sudo apt-get install libgmp-devOne more step in the directory, we need to download the RELIC library source and copy it to the lib folder because we need the headers. If neede you can reompile the library with the BLS12-P381 curve and create a relic-target folder but it's not necessary as it's already done.
cd libs
git clone https://github.com/relic-toolkit/relic.gitTo simply build from the sources you can try this command :
cmake . && makeAnd you will have an ELF executable called testAlgo, mainServer, mainClient.
You can try it yourself by first running the server and then the client. Or just try the testAlgo to see a test made for perfomences and testing a scenario.
The POC simply try to encrypt an AES Key with Certificateless crypto and then sign it. Then it will encrypt a message using the AES Key. It's simply a POC, so no memory is cleaned for the AES Key, and some vulnerabilities can appear at this point. But the POC proves just that certificateless crypto is quick and can be implemented to encrypt messages.