Lines Matching refs:state
168 const uint32_t* rsaPubOpIterative(struct RsaState* state, const uint32_t *a, const uint32_t *c, uin… in rsaPubOpIterative() argument
174 memcpy(state->tmpB, a, RSA_BYTES); in rsaPubOpIterative()
186 … biMulIterative(state->tmpA, state->tmpB, gigastep == 16 ? a : state->tmpB, gigastepSubstep); in rsaPubOpIterative()
193 …if (biModIterative(state->tmpA, c, state->tmpB, state1, state2, gigastepSubstep - RSA_LEN)) { //MO… in rsaPubOpIterative()
203 memcpy(state->tmpB, state->tmpA, RSA_BYTES); in rsaPubOpIterative()
209 return state->tmpA; in rsaPubOpIterative()
214 const uint32_t* rsaPubOp(struct RsaState* state, const uint32_t *a, const uint32_t *c) in rsaPubOp() argument
220 ret = rsaPubOpIterative(state, a, c, &state1, &state2, &step); in rsaPubOp()
244 const uint32_t* rsaPrivOp(struct RsaState* state, const uint32_t *a, const uint32_t *b, const uint3… in rsaPrivOp() argument
248 memcpy(state->tmpC, a, RSA_BYTES); //tC will hold our powers of a in rsaPrivOp()
250 memset(state->tmpA, 0, RSA_BYTES * 2); //tA will hold result in rsaPrivOp()
251 state->tmpA[0] = 1; in rsaPrivOp()
256 memcpy(state->tmpB, state->tmpA, RSA_BYTES); in rsaPrivOp()
257 biMul(state->tmpA, state->tmpB, state->tmpC); in rsaPrivOp()
258 biMod(state->tmpA, c, state->tmpB); in rsaPrivOp()
263 memcpy(state->tmpB, state->tmpA, RSA_BYTES); //save tA in rsaPrivOp()
264 biMul(state->tmpA, state->tmpC, state->tmpC); in rsaPrivOp()
265 biMod(state->tmpA, c, state->tmpC); in rsaPrivOp()
266 memcpy(state->tmpC, state->tmpA, RSA_BYTES); in rsaPrivOp()
267 memcpy(state->tmpA, state->tmpB, RSA_BYTES); //restore tA in rsaPrivOp()
269 memcpy(state->tmpB, state->tmpC, RSA_BYTES); in rsaPrivOp()
270 biMul(state->tmpC, state->tmpB, state->tmpB); in rsaPrivOp()
271 biMod(state->tmpC, c, state->tmpB); in rsaPrivOp()
275 return state->tmpA; in rsaPrivOp()