public static BswabePub unserializeBswabePub(byte[] b) {
BswabePub pub;
int offset;
pub = new BswabePub();
offset = 0;
StringBuffer sb = new StringBuffer("");
offset = unserializeString(b, offset, sb);
pub.pairingDesc = sb.substring(0);
CurveParameters params = new DefaultCurveParameters()
.load(new ByteArrayInputStream(pub.pairingDesc.getBytes()));
pub.p = PairingFactory.getPairing(params);
Pairing pairing = pub.p;
pub.g = pairing.getG1().newElement();
pub.h = pairing.getG1().newElement();
pub.gp = pairing.getG2().newElement();
pub.g_hat_alpha = pairing.getGT().newElement();
offset = unserializeElement(b, offset, pub.g);
offset = unserializeElement(b, offset, pub.h);
offset = unserializeElement(b, offset, pub.gp);
offset = unserializeElement(b, offset, pub.g_hat_alpha);
return pub;
}