Hello everyone, I am trying to do "a*b mod n" operation with big numbers. I have written a function which is working fine but I am wondering if I can make it faster.
Do you have any advice about speed up function below? Thanks a lot, Regards. /* "(a * b) mod p" operation with mpir functions */ void MpirMultiplyModReduct(const mp_limb_t *a, const mp_limb_t *b, mp_size_t size, const mp_limb_t *mod) { mp_limb_t multiplicationResult[size*2]; memset(multiplicationResult, 0, size*2 * sizeof(mp_limb_t)); mp_limb_t c[size]; memset(c, 0, size * sizeof(mp_limb_t)); mp_limb_t d[size]; memset(d, 0, size * sizeof(mp_limb_t)); mpn_mul(multiplicationResult, a, size, b, size); mpn_tdiv_qr(c, d, 0, multiplicationResult, 2*size, mod, size); } -- MahmutG -- You received this message because you are subscribed to the Google Groups "mpir-devel" group. To unsubscribe from this group and stop receiving emails from it, send an email to mpir-devel+unsubscr...@googlegroups.com. To post to this group, send email to mpir-devel@googlegroups.com. Visit this group at http://groups.google.com/group/mpir-devel. For more options, visit https://groups.google.com/groups/opt_out.