public void dec(String pubfile, String prvfile, String encfile,
String decfile) throws Exception {
byte[] aesBuf, cphBuf;
byte[] plt;
byte[] prv_byte;
byte[] pub_byte;
byte[][] tmp;
BswabeCph cph;
BswabePrv prv;
BswabePub pub;
pub_byte = Common.suckFile(pubfile);
pub = SerializeUtils.unserializeBswabePub(pub_byte);
tmp = Common.readCpabeFile(encfile);
aesBuf = tmp[0];
cphBuf = tmp[1];
cph = SerializeUtils.bswabeCphUnserialize(pub, cphBuf);
prv_byte = Common.suckFile(prvfile);
prv = SerializeUtils.unserializeBswabePrv(pub, prv_byte);
BswabeElementBoolean beb = Bswabe.dec(pub, prv, cph);
System.err.println("e = " + beb.e.toString());
if (beb.b) {
plt = AESCoder.decrypt(beb.e.toBytes(), aesBuf);
Common.spitFile(decfile, plt);
} else {
System.exit(0);
}
}