I'm doing a project which uses JPBC library in Java. In local area, it's easy to implement a scheme because I don't care about serializing keys or other parameters. However, if I implement a encryption scheme, I must consider how to serialize the keys and parameter.
My project is that I should encrypt the plaintext in client side send the cipertext and parameters to the server. For JPBC, I think I must send the pairing so I should serialize it, but the paring cannot be transformed to byte and it cannot be serialized by:
ObjectOutputStream oo = new ObjectOutputStream(new FileOutputStream(
new File("./keys.txt")));
oo.writeObject(b.getPairing());
What should I do? How to serialize the pairing? It shows that the type of pairing is it.unisa.dia.gas.plaf.jpbc.pairing.a.TypeAPairing
? If I don't use this approach, how can I implement this scheme?
I have tried to read some projects in github but I find most of these schemes don't transmit the parameters between different parts.