I've been working with JPBC for a while. Now I'm stuck in one little problem. I need to receive a String representation of a generated element from G1 group. So I randomly generated (using newRandomElement()) this element g.
However, g cannot be converted to BigInteger (Exception: Cannot convert to BigInteger) because at some point it contains "401329,3521518".
The receiver gets a String representation of g and then has to instantiate a new Element but it's not possible to do that using a Big Integer as parameter (as I just told you) and there's no way to do it using a String as parameter.
Thank you!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been working with JPBC for a while. Now I'm stuck in one little problem. I need to receive a String representation of a generated element from G1 group. So I randomly generated (using newRandomElement()) this element g.
However, g cannot be converted to BigInteger (Exception: Cannot convert to BigInteger) because at some point it contains "401329,3521518".
The receiver gets a String representation of g and then has to instantiate a new Element but it's not possible to do that using a Big Integer as parameter (as I just told you) and there's no way to do it using a String as parameter.
Thank you!
Okay I got it, just use Base64 encoding and decoding from jpbc library