1, installation M4
sudo apt-get install M4
2. Installation of GMP
http://gmplib.org/ Download Gmplib
./configure
Make
Make Check
sudo Make Install
3. Installation of PBC
http://crypto.stanford.edu/pbc/download.html Download PBC
Unzip, install
./configure
Appear
Flex not Found
Perform
sudo Install Flex
Continue execution after successful installation
./configure
Appear
Bison not Found
Run
sudo Install Bison
After successful execution
Make
sudo Make Install
4, Install Cpabe Toolkit
http://hms.isi.jhu.edu/acsc/cpabe/or http://acsc.cs.utexas.edu/cpabe/ download cpabe-0.11 and libbswabe-0.9
Installing OpenSSL
sudo Install Libssl-dev
Go to libbswabe-0.9 Extract directory
Error
for 2.0. 0... no
Could not run GLIB test program, checking why ...
file for the
Exact error that occured. This usually means GLIB is incorrectly installed.
Perform
sudo Install libglib2. 0-dev
After the installation is successful, execute
./configure
Make
sudo Make Install
Go to cpabe-0.11 Extract directory
Error
/usr/bin/ld' __gmpz_init ' in dso/usr/local/lib/libgmp.so so try adding it to the linker Command line
/usr/local/lib/libgmp.so:could not read symbols: invalid operation
To compile in a different way:
sudo Install Checkinstall
Add-lgmp after modifying makefile,ldflags
sudo checkinstall
Compilation Successful ~
Perform
Cpabe-setup-h
Display information:
Usage:cpabe-setup [OPTION ...]
Generate system parameters, a public key, and a master secret key
for use with Cpabe-keygen, Cpabe-enc, and Cpabe-dec.
"Pub_key" "Master_key"
Unless the--output-public-key or--output-master-key options are
Used.
Long for short options too.
-H,--help print this message
-V,--version print version information
write public key to FILE
write master secret key to FILE
"random" numbers
for debugging)
Installation Successful ~
Successful Installation:
Reference: http://www.cnblogs.com/rockorange/p/3757805.html
Linux under Cpabe Toolkit installation Tutorial