FTI_Video_Service/src/bswabe/Bswabe.java
/*
	 * Decrypt the specified ciphertext using the given private key, filling in
	 * the provided element m (which need not be initialized) with the result.
	 * 
	 * Returns true if decryption succeeded, false if this key does not satisfy
	 * the policy of the ciphertext (in which case m is unaltered).
	 */
Decrypt the specified ciphertext using the given private key, filling in
the provided element m (which need not be initialized) with the result.

Returns true if decryption succeeded, false if this key does not satisfy
the policy of the ciphertext (in which case m is unaltered).
Decrypt the specified ciphertext using the given private key filling in the provided element m ( which need not be initialized ) with the result . Returns true if decryption succeeded false if this key does not satisfy the policy of the ciphertext ( in which case m is unaltered ) .
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); /* num_muls++; */
		t = pub.p.pairing(cph.c, prv.d);
		t.invert();
		m.mul(t); /* num_muls++; */
		beb.e = m;
		beb.b = true;
		return beb;
	}
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 ) ; /* num_muls++; */ t = pub . p . pairing ( cph . c , prv . d ) ; t . invert ( ) ; m . mul ( t ) ; /* num_muls++; */ beb . e = m ; beb . b = true ; return beb ; }
Decrypt the specified ciphertext using the given private key, filling in
 the provided element m (which need not be initialized) with the result.
Decrypt the specified ciphertext using the given private key filling in the provided element m ( which need not be initialized ) with the result .