码迷,mamicode.com
首页 > 系统相关 > 详细

Linux下Cpabe Toolkit安装教程

时间:2015-01-09 19:22:25      阅读:595      评论:0      收藏:0      [点我收藏+]

标签:cpabe toolkit安装教程   linux   


1、安装m4

sudo apt-get install m4

2、安装gmp
http://gmplib.org/   下载gmplib

./configure
make
make check
sudo make install

3、安装pbc
http://crypto.stanford.edu/pbc/download.html  下载pbc
解压,安装

./configure

出现

 flex not found

执行

sudo apt-get install flex

安装成功后继续执行

./configure

出现

bison not found

 

运行 

sudo apt-get install bison

成功后执行

./configure 
make
sudo make install

4、安装cpabe toolkit

http://hms.isi.jhu.edu/acsc/cpabe/or http://acsc.cs.utexas.edu/cpabe/ 下载cpabe-0.11和libbswabe-0.9

安装openSSL

sudo apt-get install libssl-dev

进入libbswabe-0.9解压目录

/configure 

报错

checking for GLIB - version >= 2.0.0... no
*** Could not run GLIB test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GLIB is incorrectly installed.

执行

sudo apt-get install libglib2.0-dev

安装成功后,执行

./configure
make
sudo make install

进入cpabe-0.11解压目录

./configure 

出错

/usr/bin/ld: note: ‘__gmpz_init‘ is defined 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: 无效的操作

改为另一种方式编译:

sudo apt-get install checkinstall

修改Makefile,LDFLAGS后加入-lgmp

sudo checkinstall

编译成功~

执行

 cpabe-setup -h

显示信息:

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.
 
Output will be written to the files "pub_key" and "master_key"
unless the --output-public-key or --output-master-key options are
used.
 
Mandatory arguments to long options are mandatory for short options too.
 
 -h, --help                    print this message
 
 -v, --version                 print version information
 
 -p, --output-public-key FILE  write public key to FILE
 
 -m, --output-master-key FILE  write master secret key to FILE
 
 -d, --deterministic           use deterministic "random" numbers
                               (only for debugging)

安装成功~

 

成功安装截图:

技术分享

参考:http://www.cnblogs.com/rockorange/p/3757805.html

Linux下Cpabe Toolkit安装教程

标签:cpabe toolkit安装教程   linux   

原文地址:http://blog.csdn.net/guomutian911/article/details/42558155

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!