0
$\begingroup$

I'm trying to implement finite field arithmetic to use it in Elliptic Curve calculations. Since all that's ever used are arithmetic operations that commute with the modulo operator, I don't see a reason not to delaying that operation till the very end. One thing that may happen is that the numbers involved might become (way) too big and impractical/inefficient to work with, but I was wondering if there was a way to determine the optimal conditions/frequency which should trigger a modulo operation in the calculations.

I'm coding in C.

$\endgroup$
1
  • $\begingroup$ As a very rough rule of thumb, it's generally a good idea to reduce after multiplications, but not after additions (if avoidable). $\endgroup$
    – yyyyyyy
    Jul 25 at 7:18

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy