HomeЛюди и блогиRelated VideosMore From: nishant doshi

Ciphertext Policy Attribute Based Encryption (CP-ABE) installation in Ubuntu OS

10 ratings | 5636 views
This video is to show how to install Ciphertext Policy Attribute Based Encryption packages in Ubuntu OS. The 'C' language is used for implementation.
Html code for embedding videos on your blog
Text Comments (44)
Navya madhu (1 month ago)
Hi I'm getting an error that gmp library not linked Attach path using ldflags Can u tel how to resolve this
ARshAd aAzMeE (10 months ago)
Hello Sir I am getting this type of error policy_lang.y:612:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] (*l, g_strdup_printf("%s_flexint_%llu", s, value)); ^ make: *** [policy_lang.o] Error 1
Nikunj joshi (1 year ago)
Hello sir, I am trying to install JMIRACl cryptography library, but getting error. Link is https://dsl-external.bbn.com/tracsvr/openP3S/wiki/jmiracl Can you help me ? I want to explore waters CPABE scheme from library. Thanks in advance.
Nikunj joshi (1 year ago)
nishant doshi thank you. I have solved. Here is the link to install miracl crypto library in OSX. https://github.com/miracl/MIRACL/issues/46 It may help to future cryptogeeks ☺
nishant doshi (1 year ago)
Hi dear, I haven't try this. Hope that anyone from CPABE group will reply to your query.
Fighting JC (1 year ago)
Hello, can I ask is have you used the libfenc library at all in doing similar CP-ABE and KP-ABE?
nishant doshi (1 year ago)
No, I haven't used it.
Arun Tej Seethamraju (1 year ago)
Hello, Could you please tell me if it is possible for this algorithm to take input from a database and encrypt its info? if yes could you please assist me ?
nishant doshi (1 year ago)
Hi, I think if it's possible using AES than it's possible using CP-ABE.
Nikunj joshi (2 years ago)
Hello sir, I am getting this error when I tried to follow your instructions to install Link of screenshot http://i67.tinypic.com/289llbl.png collect2: error: ld returned 1 exit status Makefile:34: recipe for target 'cpabe-setup' failed make: *** [cpabe-setup] Error Visited and tried https://ubuntuforums.org/showthread.php?t=2254939 and http://stackoverflow.com/questions/17373306/error-in-linking-gmp-while-compiling-cpabe-package-from-its-source-code but no luck. Help please.
Nikunj joshi (2 years ago)
Thank you sir..
nishant doshi (2 years ago)
./configure gedit Makefile (find LDFLAGS and then add -lgmp as LDFLAGS = -O3 -Wall \ -lglib-2.0 \ -Wl,-rpath /usr/local/lib -lgmp \ -Wl,-rpath /usr/local/lib -lpbc \ -lbswabe \ -lcrypto -lcrypto \ -lgmp ) make make install
Harshila Gawali (2 years ago)
hello sir..this video is not audible..will u please upload same audible video..it would be very useful to us
Harshila Gawali (2 years ago)
+nishant doshi ok..thank u
nishant doshi (2 years ago)
+Hsg G Hi dear, as one have to follow the steps as mentioned in video, I skipped the audio part.
Jagadish Dachepalli (2 years ago)
what `date +%s' will produce there?..i mean in which format?
lizi shi (2 years ago)
hi.I am writing an article about CP-ABE,but i don't know how to compute these functions' runtime.Could you help me?
lizi shi (2 years ago)
+nishant doshi i can't hear what you say about the video.Why?
lizi shi (2 years ago)
+nishant doshi hi.i try to modify the structure of tree and i want to convert traditional AND/OR structure into disjunctive normal form .But i don't know how to modify it by C coding.In all ,i want to improve its performance.
nishant doshi (2 years ago)
+lizi shi Which Functions ?
Abubakr (2 years ago)
I am trying to follow the tutorial step by step and reach the point where I did this: $ cd pbc-0.5.14 $ ./configure $ make I am getting error that "make: *** No targets specified and no makefile found. Stop." what this means and how can I resolve it ?!
Karthickeyan Ganesan (3 years ago)
hi nishant,,i get following error,when i run cpabe-setup command karthick@karthick-PC/cygdrive/c/cpabe $ cpabe-setup /usr/local/bin/cpabe-setup.exe: error while loading shared libraries: libbswabe.dll.a: cannot open shared object file: No such file or directory
nishant doshi (3 years ago)
+Karthickeyan ganesan Dear, Please reinstall package libbswabe. and make sure it installs correctly.
Thank you so much for uploading....it helped me a lot :)
Pavel Salnikov (3 years ago)
HI, i trying to compile the last part with the cpabe but after i make "make LDFLAGS="-lgmp -lpbc -lcrypto -L/usr/lib/x86_64-linux-gnu -lglib-2.0 -lbswabe -lgmp"" it shows me that policy_lang.y: In function ‘yyparse’: policy_lang.y:67:38: error: expected ‘;’ before ‘}’ token  result: policy { final_policy = $1 }                                       ^ policy_lang.y: In function ‘eq_policy’: policy_lang.y:212:4: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]     (g_strdup_printf("%s_flexint_%llu", attr, n->value));     ^ policy_lang.y:215:4: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=]     (g_strdup_printf("%s_expint%02d_%llu", attr, n->bits, n->value));     ^ policy_lang.y: In function ‘yylex’: policy_lang.y:391:3: warning: format ‘%llu’ expects argument of type ‘long long unsigned int *’, but argument 3 has type ‘uint64_t *’ [-Wformat=]    sscanf(s->str, "%llu", &(yylval.nat));    ^ policy_lang.y: In function ‘parse_attribute’: policy_lang.y:577:3: warning: format ‘%llu’ expects argument of type ‘long long unsigned int *’, but argument 4 has type ‘uint64_t *’ [-Wformat=]    if( sscanf(a, " %s = %llu # %u ", s, &value, &bits) == 3 )    ^ policy_lang.y:596:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=]      (*l, g_strdup_printf("%s_expint%02d_%llu", s, bits, value));      ^ policy_lang.y:598:3: warning: format ‘%llu’ expects argument of type ‘long long unsigned int *’, but argument 4 has type ‘uint64_t *’ [-Wformat=]    else if( sscanf(a, " %s = %llu ", s, &value) == 2 )    ^ policy_lang.y:612:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]      (*l, g_strdup_printf("%s_flexint_%llu", s, value));      ^ Makefile:49: recipe for target 'policy_lang.o' failed make: *** [policy_lang.o] Error 1 Does any body can help?
Nikita Gorasia (3 years ago)
I have got the error of lgmp as /usr/bin/ld: note: '__gmpz_init' is defined in DSO /usr/local/lib/libgmp.so so try adding it to the linker command line But it has been solved using following commands: ./configure gedit Makefile         (find LDFLAGS and then add -lgmp as                   LDFLAGS = -O3 -Wall \                   -lglib-2.0   \                   -Wl,-rpath /usr/local/lib -lgmp \                   -Wl,-rpath /usr/local/lib -lpbc \                   -lbswabe \                   -lcrypto -lcrypto \                   -lgmp ) make make install
WyldeZk (3 years ago)
+Pavel Salnikov Glad to hear that
Pavel Salnikov (3 years ago)
tnx now it works fine
WyldeZk (3 years ago)
yeah i got the same error too, all I did was opening the policy_lang.y file in the cpabe-0.11 folder and simply adding that ; at line 67: 38 right before the closing bracket. I guess this blocked the compilation causing it brake before it's proper completion. Hope this work as It did for me!
nishant doshi (3 years ago)
Hi dear I think "WyldeZk" can able to give some directions on this.
WyldeZk (3 years ago)
Hi nishant doshi, I need to use this toolkit, since I'm a newbie with Linux I found this tutorial very helpulf. I've followed every single step of your tutorial but at last when I try to compile the cpabe package this error pops out:  ~/Downloads/cpabe-0.11$ make gcc -c -o setup.o setup.c -O3 -Wall -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pbc -I/usr/local/include/pbc -DPACKAGE_NAME=\"cpabe\" -DPACKAGE_TARNAME=\"cpabe\" -DPACKAGE_VERSION=\"0.11\" -DPACKAGE_STRING=\"cpabe\ 0.11\" -DPACKAGE_BUGREPORT=\"bethenco@cs.berkeley.edu\"-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_VPRINTF=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPTO=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_MEMSET=1 -DHAVE_GMP=1 -DHAVE_PBC=1 -DHAVE_BSWABE=1 gcc -c -o common.o common.c -O3 -Wall -I/usr/include/glib-2.0 -I/usr/lib/i386-linux-gnu/glib-2.0/include -I/usr/include/pbc -I/usr/local/include/pbc -DPACKAGE_NAME=\"cpabe\" -DPACKAGE_TARNAME=\"cpabe\" -DPACKAGE_VERSION=\"0.11\" -DPACKAGE_STRING=\"cpabe\ 0.11\" -DPACKAGE_BUGREPORT=\"bethenco@cs.berkeley.edu\"-DPACKAGE_URL=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 -DHAVE_STDDEF_H=1 -DHAVE_STRING_H=1 -DHAVE_STDLIB_H=1 -DHAVE_MALLOC=1 -DLSTAT_FOLLOWS_SLASHED_SYMLINK=1 -DHAVE_VPRINTF=1 -DHAVE_LIBCRYPTO=1 -DHAVE_LIBCRYPTO=1 -DHAVE_STRCHR=1 -DHAVE_STRDUP=1 -DHAVE_MEMSET=1 -DHAVE_GMP=1 -DHAVE_PBC=1 -DHAVE_BSWABE=1 common.c: In function ‘suck_file’: common.c:137:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]   fread(a->data, 1, s.st_size, f);   ^ common.c: In function ‘read_cpabe_file’: common.c:211:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]   fread((*aes_buf)->data, 1, len, f);   ^ common.c:218:2: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result [-Wunused-result]   fread((*cph_buf)->data, 1, len, f);   ^ gcc -o cpabe-setup setup.o common.o -O3 -Wall -lglib-2.0 -Wl,-rpath /usr/local/lib -lgmp -Wl,-rpath /usr/local/lib -lpbc -lbswabe -lcrypto -lcrypto  /usr/bin/ld: /usr/local/lib/libpbc.so: undefined reference to symbol '__gmpz_init' /usr/local/lib/libgmp.so: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status Makefile:34: recipe for target 'cpabe-setup' failed make: *** [cpabe-setup] Error 1 I hope you can help me, because I have literary no clue
ARshAd aAzMeE (10 months ago)
Hello Sir I am getting this type of error- policy_lang.y:612:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=] (*l, g_strdup_printf("%s_flexint_%llu", s, value)); ^ make: * [policy_lang.o] Error 1
ARshAd aAzMeE (10 months ago)
Sir I m also getting the same problem. Can you please tell me so that i can resolve...Please reply asap
WyldeZk (3 years ago)
+Samsul Huda I didnt' get this kind of error, perphaps something is missing? Have you installed all the stuff required? If so try to google the error. Sorry dude but I don't know ho to help you.
Samsul Huda (3 years ago)
+WyldeZk I get same problem and then i run command like your step, but i'm getting error like this : bla bla bla policy_lang.y:596:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’ [-Wformat=]      (*l, g_strdup_printf("%s_expint%02d_%llu", s, bits, value));      ^ policy_lang.y:598:3: warning: format ‘%llu’ expects argument of type ‘long long unsigned int *’, but argument 4 has type ‘uint64_t *’ [-Wformat=]    else if( sscanf(a, " %s = %llu ", s, &value) == 2 )    ^ policy_lang.y:612:5: warning: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ [-Wformat=]      (*l, g_strdup_printf("%s_flexint_%llu", s, value));      ^ make: *** [policy_lang.o] Error 1 Could you help me to resolve it?
WyldeZk (3 years ago)
+WyldeZk Ok I've found a solution, after I launch the ./configure command, I launch this command: make LDFLAGS="-lgmp -lpbc -lcrypto -L/usr/lib/x86_64-linux-gnu -lglib-2.0 -lbswabe -lgmp" this seams to do the trick
Abhijeet Kurle (3 years ago)
I dont know what is structure of that document, wheather is it structured or unstructured
nishant doshi (3 years ago)
You can use any document with any type.
Abhijeet Kurle (3 years ago)
can you provide me security_report.pdf used in tutorial??
nishant doshi (3 years ago)
You can rename any normal file as security_report.pdf and do it. 
Abhijeet Kurle (3 years ago)
Hi nishant I hv understood installation but where to mention access policies in txt or PDF files.
nishant doshi (3 years ago)
Dear Abhijeet The access policy need to be written with cpabe-enc as arguments. See the following example (from http://acsc.cs.utexas.edu/cpabe/cpabe-enc.html) $ cpabe-enc pub_key security_report.pdf  (sysadmin and (hire_date < 946702800 or security_team)) or  (business_staff and 2 of (exec_level >= 5#4, audit_group, strat_team))  ^D -Nishant

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.