I am having some problems with some functions that I can't seem to reach:
<code> undefined reference to `pairing_init_set_buf'
undefined reference to `pbc_die'</code>
Do you have any suggestions?
Regards
Steyn
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi!
I am actually working on a school project on attribute based encryption and I need to use the JPBC library on android. The jna wrapper must be replaced by a jni wrapper or something like that but I am struggling with the ndk...
Did you manage to make the android wrapper finally? If yes, would it be possible to get it?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, I was able to get it to work. The NDK is not very easy to get to work and takes quite a while to get to know. I mainly used the pairing based cryptography part of PBC, which will be of no use to you.
I can recommend this book to get you started: Android Ndk Beginner's Guide - Sylvain Ratabouil
Apart from that, I would recommend that you download Ben Lynn's PBC and not JPBC, as you need to compile the C source yourself, and using the Java parts of JPBC is extremely slow on Android.
PBC 0.5.12 was the version of PBC I worked with, and it used nested functions which compiles but crashes the APP on execution. PBC 0.5.13 has been released this week I think and removes the nested functions - this should make your life easier. I had to edit the PBC source to get it to work on Android.
Regards
Phaestion
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Phaestion,
Thank you for your fast answer!
I am actually using the paring based cryptography as the main cryptographic scheme of my algorithm (FYI http://goo.gl/HnkQY\).
Do you get to build all sub libraries (GMP,...) with JNI?
Sorry to insist but it would be very helpful for me if I could take a look at the way you did it.
Thank you.
Regards,
beji
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I cross compiled GMP using the Android standalone toolchain. Though you can download prebuild versions of GMP here: https://github.com/Rupan/gmp
I have a test application that I used for my masters degree that I can share with you. I will send you a message with my email address here on SF. You can contact me there.
Regards
Phaestion
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
did you manage to build gmp and pbc?
Anyway, it's not strictly necessary to
use JNA. It's always possible to resort
directly to JNI.
./angelo
Yes. I'm using a prebuilt version of GMP from https://github.com/Rupan/gmp, and I built pbc myself.
I am having some problems with some functions that I can't seem to reach:
<code> undefined reference to `pairing_init_set_buf'
undefined reference to `pbc_die'</code>
Do you have any suggestions?
Regards
Steyn
Hi!
I am actually working on a school project on attribute based encryption and I need to use the JPBC library on android. The jna wrapper must be replaced by a jni wrapper or something like that but I am struggling with the ndk...
Did you manage to make the android wrapper finally? If yes, would it be possible to get it?
Thanks!
Hi benji
Yes, I was able to get it to work. The NDK is not very easy to get to work and takes quite a while to get to know. I mainly used the pairing based cryptography part of PBC, which will be of no use to you.
I can recommend this book to get you started: Android Ndk Beginner's Guide - Sylvain Ratabouil
Apart from that, I would recommend that you download Ben Lynn's PBC and not JPBC, as you need to compile the C source yourself, and using the Java parts of JPBC is extremely slow on Android.
PBC 0.5.12 was the version of PBC I worked with, and it used nested functions which compiles but crashes the APP on execution. PBC 0.5.13 has been released this week I think and removes the nested functions - this should make your life easier. I had to edit the PBC source to get it to work on Android.
Regards
Phaestion
Phaestion,
Thank you for your fast answer!
I am actually using the paring based cryptography as the main cryptographic scheme of my algorithm (FYI http://goo.gl/HnkQY\).
Do you get to build all sub libraries (GMP,...) with JNI?
Sorry to insist but it would be very helpful for me if I could take a look at the way you did it.
Thank you.
Regards,
beji
Hi benji
I cross compiled GMP using the Android standalone toolchain. Though you can download prebuild versions of GMP here: https://github.com/Rupan/gmp
I have a test application that I used for my masters degree that I can share with you. I will send you a message with my email address here on SF. You can contact me there.
Regards
Phaestion