| | More Long Arithmetic (Site not responding. Last check: 2007-10-31) |
 | | You can much more simply divide a large number by a one-digit number (like a 10-digit number by a one-digit number) because you know how to divide a two-digit number by a one-digit number--all those values are in your head (or at least, they are in mine--I don't know about the current generation). |
 | | To divide the 512-bit number that dn points to by a 32-bit number dv, you simply write r = dd(q, dn, dv, 0); and the quotient will be stored where q points and the remainder will be returned as the function value. |
 | | So you convert numbers to Montgomery form and do all the calculation that you want to do and then in the end you have M(a) where a is the desired answer, and you put that through REDC to get a mod N. You can take a shortcut here and there. |
| www2.ics.hawaii.edu /~wes/ICS623/MoreArith.htm (3243 words) |