Re: Dividing long numbers
- From: Ertugrul Soeylemez <never@xxxxxxxxxxxxxx>
- Date: Wed, 1 Mar 2006 23:02:04 +0100
Carlos Moreno <moreno_at_mochima_dot_com@xxxxxxxxxxxxxx> (06-03-01 10:20:39):
A while ago, I was trying to have some fun (didactic fun) implementing
my own RSA. The division (required to calculate something modulo
something else) seemed to be the big bottleneck. I was trying the
standard division algorithm we're all taught as kids, except that
base 2^32 instead of base-10. From the answers I got here, it seemed
to me like I was using the right approach, only that my algorithm was
grossly unoptimized.
You might, as an alternative, use GMP. Then you don't have to reinvent
the wheel. Libtommath is nice, too. But personally I don't like the
convention that the destination is the last function argument, and GMP
is faster.
If you really want to do everything yourself, then read the GMP manual.
It explains every algorithm.
Regards.
.
- Follow-Ups:
- Re: Dividing long numbers
- From: Mark Wooding
- Re: Dividing long numbers
- References:
- Dividing long numbers
- From: Carlos Moreno
- Dividing long numbers
- Prev by Date: Re: IDEA NXT implementation
- Next by Date: Re: Breaking AES-64 bit key
- Previous by thread: Re: Dividing long numbers
- Next by thread: Re: Dividing long numbers
- Index(es):
Relevant Pages
|