Lines Matching refs:dfState
118 PDF_STATE dfState in DfCompute() argument
128 pIv = (crypt_uword_t *)&dfState->iv[iv].words[0]; in DfCompute()
131 temp[i] ^= pIv[i] ^ dfState->buf.words[i]; in DfCompute()
133 DRBG_ENCRYPT(&dfState->keySchedule, &temp, pIv); in DfCompute()
136 dfState->buf.words[i] = 0; in DfCompute()
137 dfState->contents = 0; in DfCompute()
145 PDF_STATE dfState, in DfStart() argument
161 memset(dfState, 0, sizeof(DF_STATE)); in DfStart()
162 DRBG_ENCRYPT_SETUP(&dfKey[0], DRBG_KEY_SIZE_BITS, &dfState->keySchedule); in DfStart()
165 ((BYTE *)&dfState->iv[i])[3] = (BYTE)i; in DfStart()
166 DfCompute(dfState); in DfStart()
171 memcpy(&dfState->iv[0], init, 8); in DfStart()
172 dfState->contents = 4; in DfStart()
180 PDF_STATE dfState, in DfUpdate() argument
187 int toFill = DRBG_IV_SIZE_BYTES - dfState->contents; in DfUpdate()
191 memcpy(&dfState->buf.bytes[dfState->contents], data, toFill); in DfUpdate()
197 dfState->contents += toFill; in DfUpdate()
198 pAssert(dfState->contents <= DRBG_IV_SIZE_BYTES); in DfUpdate()
200 if(dfState->contents == DRBG_IV_SIZE_BYTES) in DfUpdate()
201 DfCompute(dfState); in DfUpdate()
212 PDF_STATE dfState in DfEnd() argument
217 dfState->buf.bytes[dfState->contents++] = 0x80; in DfEnd()
219 while(dfState->contents < DRBG_IV_SIZE_BYTES) in DfEnd()
220 dfState->buf.bytes[dfState->contents++] = 0; in DfEnd()
222 DfCompute(dfState); in DfEnd()
223 return (DRBG_SEED *)&dfState->iv; in DfEnd()
236 DF_STATE dfState; in DfBuffer() local
240 DfStart(&dfState, size); in DfBuffer()
241 DfUpdate(&dfState, size, buf); in DfBuffer()
242 DfEnd(&dfState); in DfBuffer()
243 memcpy(output, &dfState.iv[0], sizeof(DRBG_SEED)); in DfBuffer()
682 DF_STATE dfState; in DRBG_InstantiateSeeded() local
701 DfStart(&dfState, totalInputSize); in DRBG_InstantiateSeeded()
705 DfUpdate(&dfState, seed->size, seed->buffer); in DRBG_InstantiateSeeded()
707 DfUpdate(&dfState, purpose->size, purpose->buffer); in DRBG_InstantiateSeeded()
709 DfUpdate(&dfState, name->size, name->buffer); in DRBG_InstantiateSeeded()
711 DfUpdate(&dfState, additional->size, additional->buffer); in DRBG_InstantiateSeeded()
715 DRBG_Reseed(((DRBG_STATE *)drbgState), DfEnd(&dfState), NULL); in DRBG_InstantiateSeeded()