Install GMP
- Download GMP from https://gmplib.org
- In Terminal, cd to the gmp folder
- ./configure
- make
- sudo make install
Install GMP-ECM
- Download GMP ECM from http://gforge.inria.fr/projects/ecm/
- In Terminal, cd to the ecm folder
- ./configure
- make ecm-params
- make
- sudo make install
In the Terminal session, where you will build and execute the BCR code,
- export C_INCLUDE_PATH=/usr/local/include
- export LIBRARY_PATH=/usr/local/lib
- export LD_LIBRARY_PATH=/usr/local/lib
- export LD_RUN_PATH=/usr/local/lib
To build BCR decryption code and execute,
- cd /Project_1
- gcc bcr.c -lgmp
- ./a.out
The code takes 30 minutes to execute because of the prime factorization step. The final message is printed on the output screen.