public static BswabeElementBoolean dec(BswabePub pub, BswabePrv prv,
BswabeCph cph) {
Element t;
Element m;
BswabeElementBoolean beb = new BswabeElementBoolean();
m = pub.p.getGT().newElement();
t = pub.p.getGT().newElement();
checkSatisfy(cph.p, prv);
if (!cph.p.satisfiable) {
System.err
.println("cannot decrypt, attributes in key do not satisfy policy");
beb.e = null;
beb.b = false;
return beb;
}
pickSatisfyMinLeaves(cph.p, prv);
decFlatten(t, cph.p, prv, pub);
m = cph.cs.duplicate();
m.mul(t);
t = pub.p.pairing(cph.c, prv.d);
t.invert();
m.mul(t);
beb.e = m;
beb.b = true;
return beb;
}