JCSystem.beginTransaction();
if (state[0] == (byte) 0x00) {
//nonceT
Util.arrayCopy(buff, (short) ISO7816.OFFSET_CDATA,tempData, (short) 0, (short) 8);
//nonceC
RandomData nonceC = RandomData.getInstance(RandomData.ALG_SECURE_RANDOM);
nonceC.generateData(calcData, (short) 0, (short) 8);
//nonceT^nonceC=nonceR
XOR(tempData, calcData, calcData, (short) 0, (short) 0,(short) 8, (short) 8);
//We send id,AES(nonceR)K and update internal state of handshake protocol