cp abe java_CP-ABE环境配置

本文档详细介绍了在Ubuntu系统中配置CP-ABE(Ciphertext-Policy Attribute-Based Encryption)环境的步骤,包括安装m4、flex、bison、libssl-dev、libglib2.0-dev等依赖库,以及解决编译过程中遇到的问题,最终成功安装并运行cpabe-setup工具。
摘要由CSDN通过智能技术生成

本环境配置步骤参考互联网:

1、安装m4

sudo apt-get install m4

./configuremake

makechecksudo make install

./configure

出现

flex not found

执行

sudo apt-get install flex

安装成功后继续执行

./configure

出现

bison not found

运行

sudo apt-get install bison

成功后执行

./configuremake

sudo make install

4、安装cpabe toolkit

安装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 forthe*** exact error that occured. This usually means GLIB is incorrectly installed.

执行

sudo apt-get install libglib2.0-dev

安装成功后,执行

./configuremake

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 keyfor 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 tolong options are mandatory for shortoptions too.-h, --help print this message-v, --version print version information-p, --output-public-key FILE writepublic key to FILE-m, --output-master-key FILE writemaster secret key to FILE-d, --deterministic use deterministic "random"numbers

(onlyfor debugging)

安装成功~

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值