Lines Matching refs:acc
47 int64_t acc = 0; in subtract_modulus() local
51 acc += (uint64_t)num[i] - key->modulus[i]; in subtract_modulus()
52 num[i] = (uint32_t)acc; in subtract_modulus()
53 acc >>= 32; in subtract_modulus()
196 uint32_t val[key->len], acc[key->len], tmp[key->len]; in pow_mod() local
219 montgomery_mul(key, acc, val, key->rr); /* acc = a * RR / R mod n */ in pow_mod()
221 memcpy(a_scaled, acc, key->len * sizeof(a_scaled[0])); in pow_mod()
224 montgomery_mul(key, tmp, acc, acc); /* tmp = acc^2 / R mod n */ in pow_mod()
228 montgomery_mul(key, acc, tmp, a_scaled); in pow_mod()
231 memcpy(acc, tmp, key->len * sizeof(acc[0])); in pow_mod()
236 montgomery_mul(key, tmp, acc, acc); /* tmp = acc^2 / R mod n */ in pow_mod()
237 montgomery_mul(key, acc, tmp, val); /* acc = tmp * a / R mod M */ in pow_mod()
238 memcpy(result, acc, key->len * sizeof(result[0])); in pow_mod()
329 u32 val[RSA2048_BYTES], acc[RSA2048_BYTES], tmp[RSA2048_BYTES]; in zynq_pow_mod() local
345 montgomery_mul(key, acc, val, key->rr); /* axx = a * RR / R mod M */ in zynq_pow_mod()
347 montgomery_mul(key, tmp, acc, acc); /* tmp = acc^2 / R mod M */ in zynq_pow_mod()
348 montgomery_mul(key, acc, tmp, tmp); /* acc = tmp^2 / R mod M */ in zynq_pow_mod()
350 montgomery_mul(key, result, acc, val); /* result = XX * a / R mod M */ in zynq_pow_mod()