0

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.

chaoliu
  • 1
  • 1
  • @Lii thanks for editing my question. – chaoliu Apr 04 '19 at 19:08
  • No probs. :) Note that you have to use an empty line to get a new section. – Lii Apr 04 '19 at 19:51
  • @Artjom B. I have seen you helped others solve the similar question. I don't know could you give me some comments? Thanks! https://stackoverflow.com/questions/43486719/save-and-load-asymmetric-keys-from-jpbc – chaoliu Apr 04 '19 at 20:52

0 Answers0