Dear Angelo and everyone:
I have a big headache in implementing jPBC on android. I didn't find the android project soucecode for benchmark, so I have to do it by myself.
If I include 'jna-3.5.1.jar' in the android project, the android virtual device manager gives me error "The library 'jna-3.5.1.jar' contains native libraries that will not run on the device". so I have to remove the jna-3.5.1.jar from the android project library.
However, I need both the android and PC server to have the same curve paramenters so they can exchange messages, so I need to use "PairingFactory.getPairing" to generate consistent paring from 'curves.properties'. As a result, I use the following code to read the 'curves.properties' in android SD card:
Fileroot=Environment.getExternalStorageDirectory();StringcurvePropertyPath=root.getAbsolutePath()+"/curve.properties";CurveParameterscurparams=PairingFactory.getInstance().loadCurveParameters(curvePropertyPath);Pairingpairing=PairingFactory.getPairing(curparams);I'll get this error:E/dalvikvm(294):Couldnotfindclass'it.unisa.dia.gas.plaf.jpbc.wrapper.jna.WrapperLibrary',referencedfrommethodit.unisa.dia.gas.plaf.jpbc.wrapper.jna.WrapperLibraryProvider.<clinit>
It's because there is no 'jna-3.5.1.jar.jar'.I'm in a dilemma. how to solve this problem? I don't know how android benchmark app handle this. Your help will be highly appreciated.
Last edit: weiwei 2013-07-29
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am stuck at the same place. But about the same curve paramenters problem, i have another way to deal with that. I use pbc (not jPBC) to generate the an "a1.paramenter" and use it in java project with jPBC, that works(both server and client). But i am still stuck on how to use these jars from jPBC in a android project. Everything on a java project runs perfect, but when i build the jars(not include the jni) path in an android project with the same classes i wrote in java project, it pops up "java.lang.illegalArgumentException: No valid resource found" errors! DO you have any idea about this?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Angelo and everyone:
I have a big headache in implementing jPBC on android. I didn't find the android project soucecode for benchmark, so I have to do it by myself.
If I include 'jna-3.5.1.jar' in the android project, the android virtual device manager gives me error "The library 'jna-3.5.1.jar' contains native libraries that will not run on the device". so I have to remove the jna-3.5.1.jar from the android project library.
However, I need both the android and PC server to have the same curve paramenters so they can exchange messages, so I need to use "PairingFactory.getPairing" to generate consistent paring from 'curves.properties'. As a result, I use the following code to read the 'curves.properties' in android SD card:
It's because there is no 'jna-3.5.1.jar.jar'.I'm in a dilemma. how to solve this problem? I don't know how android benchmark app handle this. Your help will be highly appreciated.
Last edit: weiwei 2013-07-29
I am stuck at the same place. But about the same curve paramenters problem, i have another way to deal with that. I use pbc (not jPBC) to generate the an "a1.paramenter" and use it in java project with jPBC, that works(both server and client). But i am still stuck on how to use these jars from jPBC in a android project. Everything on a java project runs perfect, but when i build the jars(not include the jni) path in an android project with the same classes i wrote in java project, it pops up "java.lang.illegalArgumentException: No valid resource found" errors! DO you have any idea about this?
Hi Borui Li,
Please, put the curve parameters in assets folder. It should work.
./angelo
I don't know How to put curve parameters in assets folder.