assertNotNull(curTag);
assertNotNull(curKey);
byte emsg3[] = _context.elGamalAESEngine().encrypt(msg3, pubKey, curKey, secondTags, curTag, nextKey, 64);
byte dmsg3[] = _context.elGamalAESEngine().decrypt(emsg3, privKey);
assertTrue(DataHelper.eq(dmsg3, msg3));
<BUG>_context.sessionKeyManager().tagsDelivered(pubKey, nextKey, secondTags); // note nextKey not curKey

curKey = _context.sessionKeyManager().getCurrentKey(pubKey);</BUG>
curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
assertNotNull(curTag);

assertNotNull(curTag);
byte emsg2[] = _context.elGamalAESEngine().encrypt(msg2, pubKey, curKey, null, curTag, 64);
byte dmsg2[] = _context.elGamalAESEngine().decrypt(emsg2, privKey);
assertTrue(DataHelper.eq(dmsg2, msg2));
curKey = _context.sessionKeyManager().getCurrentKey(pubKey);
curTag = _context.sessionKeyManager().consumeNextAvailableTag(pubKey, curKey);
assertNotNull(curTag);
