byte[] msg = ("msg " + i).getBytes();
byte emsg[] = _context.elGamalAESEngine().encrypt(msg, pubKey, curKey, tags, curTag, nextKey, 64);
byte dmsg[] = _context.elGamalAESEngine().decrypt(emsg, privKey);
assertTrue(DataHelper.eq(dmsg, msg));
if ( (tags != null) && (tags.size() > 0) ) {
<BUG>if (nextKey == null) {
_context.sessionKeyManager().tagsDelivered(pubKey, curKey, tags);

} else {
_context.sessionKeyManager().tagsDelivered(pubKey, nextKey, tags);
</BUG>
}

byte[] msg = ("msg " + i).getBytes();
byte emsg[] = _context.elGamalAESEngine().encrypt(msg, pubKey, curKey, tags, curTag, nextKey, 64);
byte dmsg[] = _context.elGamalAESEngine().decrypt(emsg, privKey);
assertTrue(DataHelper.eq(dmsg, msg));
if ( (tags != null) && (tags.size() > 0) ) {
if (nextKey == null) {
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, curKey, tags);
_context.sessionKeyManager().tagsAcked(pubKey, curKey, tsh);
} else {
TagSetHandle tsh = _context.sessionKeyManager().tagsDelivered(pubKey, nextKey, tags);
_context.sessionKeyManager().tagsAcked(pubKey, nextKey, tsh);
