Lines Matching refs:cState
63 tpmCmacState_t *cState = &state->state.cmac; in CryptCmacStart() local
69 cState->symAlg = def->algorithm; in CryptCmacStart()
70 cState->keySizeBits = def->keyBits.sym; in CryptCmacStart()
71 cState->iv.t.size = CryptGetSymmetricBlockSize(def->algorithm, in CryptCmacStart()
73 MemoryCopy2B(&cState->symKey.b, key, sizeof(cState->symKey.t.buffer)); in CryptCmacStart()
78 return cState->iv.t.size; in CryptCmacStart()
136 tpmCmacState_t *cState = &state->cmac; in CryptCmacEnd() local
139 TPM_ALG_ID algorithm = cState->symAlg; in CryptCmacEnd()
140 BYTE *key = cState->symKey.t.buffer; in CryptCmacEnd()
141 UINT16 keySizeInBits = cState->keySizeBits; in CryptCmacEnd()
148 subkey.t.size = cState->iv.t.size; in CryptCmacEnd()
165 pAssert(cState->bcount <= cState->iv.t.size); in CryptCmacEnd()
167 if(cState->bcount < cState->iv.t.size) in CryptCmacEnd()
170 cState->iv.t.buffer[cState->bcount++] ^= 0x80; in CryptCmacEnd()
180 cState->iv.t.buffer[i] ^= subkey.t.buffer[i]; in CryptCmacEnd()
181 ENCRYPT(&keySchedule, cState->iv.t.buffer, cState->iv.t.buffer); in CryptCmacEnd()
182 i = (UINT16)MIN(cState->iv.t.size, outSize); in CryptCmacEnd()
183 MemoryCopy(outBuffer, cState->iv.t.buffer, i); in CryptCmacEnd()