Home | History | Annotate | Download | only in nanohub

Lines Matching refs:step

23 static bool biModIterative(uint32_t *num, const uint32_t *denum, uint32_t *tmp, uint32_t *state1, uint32_t *state2, uint32_t step)
32 //first step is init
33 if (!step) {
43 if (step == 1) {
112 static void biMulIterative(uint32_t *ret, const uint32_t *a, const uint32_t *b, uint32_t step) //ret = a * b, call with step = [0..RSA_LIMBS)
118 if (!step)
124 r = (uint64_t)a[step] * b[j] + c + ret[step + j];
125 ret[step + j] = r;
130 for (j = step + RSA_LIMBS; j < RSA_LIMBS * 2; j++) {
143 * so if we allocate RSA_LEN * 3 step values to mod, each mul-mod pair will use <= RSA_LEN * 4 step values
144 * and the whole opetaion will need <= RSA_LEN * 4 * 34 step values, which fits into a uint32. cool. In fact
148 * In the first 16 gigasteps, the very last step of the gigastep will be used for the memcpy call.
170 uint32_t step = *stepP, gigastep, gigastepBase, gigastepSubstep, megaSubstep;
172 //step 0: copy a -> tmpB
173 if (!step) {
175 step = 1;
180 gigastep = (step - 1) / (RSA_LEN * 4);
181 gigastepSubstep = (step - 1) % (RSA_LEN * 4);
188 step = gigastepBase + RSA_LEN + 1;
190 step++;
195 step = 0;
197 step = gigastepBase + RSA_LEN * 4 - 1 + 1;
200 step++;
204 step++;
208 *stepP = step;
217 uint32_t state1 = 0, state2 = 0, step = 0, ns = 0;
220 ret = rsaPubOpIterative(state, a, c, &state1, &state2, &step);
222 } while(step);
231 uint32_t state1 = 0, state2 = 0, step;
233 for (step = 0; !biModIterative(num, denum, tmp, &state1, &state2, step); step++);
238 uint32_t step;
240 for (step = 0; step < RSA_LIMBS; step++)
241 biMulIterative(ret, a, b, step);